• Please visit and share your knowledge at our sister communities:
  • If you have not, please join our official Homebrewing Facebook Group!

    Homebrewing Facebook Group

What's on yours?

Homebrew Talk

Help Support Homebrew Talk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Declare @AS400 as varchar(1200)
Declare @SelectClause as varchar(50)
Declare @MyDate as varchar(10)
Declare @MySql as nvarchar(1200)

SET @MyDate = '1070924'
SET @SelectClause = 'SELECT * FROM OPENQUERY(AS400,'
SET @AS400 = '''SELECT * FROM PRODLIB.TRHIST, PRODLIB.RESMST WHERE PRODLIB.TRHIST.THRESF = PRODLIB.RESMST.RMRESC AND (PRODLIB.TRHIST.THDATE = ' + @MyDate + ' AND PRODLIB.TRHIST.THWHST IN(''''02'''', ''''20'''', ''''21'''', ''''22'''', ''''23'''', ''''24'''', ''''25'''', ''''26'''', ''''27'''', ''''28'''', ''''29'''', ''''30'''', ''''31'''', ''''32'''') AND PRODLIB.TRHIST.THTRTP IN(''''VR'''', ''''VR'''', ''''PO'''', ''''VQ'''', ''''NR'''')) OR (PRODLIB.TRHIST.THDATE = ' + @MyDate + ' AND PRODLIB.TRHIST.THTRTP IN(''''VR'''', ''''VR'''', ''''PO'''', ''''VQ'''', ''''NR'''') AND PRODLIB.TRHIST.THWHSF IN(''''02'''', ''''20'''', ''''21'''', ''''22'''', ''''23'''', ''''24'''', ''''25'''', ''''26'''', ''''27'''', ''''28'''', ''''29'''', ''''30'''', ''''31'''', ''''32''''))'''
SET @MySql = CAST(@SelectClause + ' ' + @AS400 + ')' AS NVARCHAR(1200))


PRINT @MySql

EXEC sp_executesql @MySql

Meh, nothing but geekanese. I still haven't gotten this damn thing finished yet.
 
Here's the latest
-------------------------------
Invoice feed to Tucson
VC shows up on Blocked Billing Report
Block updates to St. Paul registry
Accounts aligned to contracts
-------------------------------

Mindless dribble that some corporate puke wanted me to approve in email that these modules were tested in QA.
 
org 0x00004
call ISR
; retfie

org 0x0005
Start
bsf STATUS,RP0 ; select Register Page 1
movlw 0xFF
movwf TRISA ; Make PortA all input
clrf TRISD ; Make PortD all output
movlw 0x10 ; A2D Clock Fosc/8
movwf ADCON1
movlw 0xFF ; we want all Port A pins Analoga
movwf ANSEL

movlw 0x01
movwf ADCON0 ; configure A2D for Channel 0 (RA0), Left justified, and turn on the A2D module

bcf STATUS,RP0
bcf STATUS,RP1 ; select Register Page 0

CLRF CCP1CON ; CCP Module is off
CLRF TMR2 ; Clear Timer2
MOVLW 0xFF ;
MOVWF PR2 ;
MOVLW 0x00 ;
MOVWF CCPR1L ; Duty Cycle is 25% of PWM Period
CLRF INTCON ; Disable interrupts and clear T0IF
BSF STATUS, RP0 ; Bank1
clrF TRISC ; Make pin output
CLRF PIE1 ; Disable peripheral interrupts
BCF STATUS, RP0 ; Bank0
bcf PORTC,5
bcf PORTC,6
bcf PORTC,7
CLRF PIR1 ; Clear peripheral interrupts Flags
MOVLW 0x2C ; PWM mode, 2 LSbs of Duty cycle = 10
MOVWF CCP1CON ;
bcf T2CON, TOUTPS0
bcf T2CON, TOUTPS1
bcf T2CON, TOUTPS2
bcf T2CON, TOUTPS3
BSF T2CON, TMR2ON ; Timer2 starts to increment
clrf PWM_OutPut


Old school here baby
 
chillHayze said:
*stolen*

890

nupe. Just don't have the source code anymore and the person that wrote it originally has left and is uncontactable.
...currently rewritting it just now.

May use Fortran for Old School reasons. :cross:
 
Back
Top