home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG102.ARC
/
BACK.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
2KB
|
68 lines
*BACK.PRG
*THIS PROGRAM APPENDS ITEMS BACK ORDERED
ERASE
set talk off
STORE 00000 TO INV:NUM
STORE 1 TO POINTER
SELECT PRIMARY
USE DATAFILE
SELECT SECONDARY
USE PRICELIS INDEX PRICECOD
DO WHILE T
SELECT PRIMARY
STORE 001 TO ITEM:NUMA
CLEAR GETS
? CHR(7)
@ 1,0 SAY 'INVOICE NUMBER ON WHICH BACK ORDER OCCURRED, ZERO TO EXIT';
GET INV:NUM PICT '99999'
@ 2,0 SAY 'LINE NUMBER' GET ITEM:NUMA PICTURE '999'
READ
IF INV:NUM=0
RETURN
ENDIF
GOTO POINTER
LOCATE FOR INVNUM=INV:NUM .AND. ITEM:NUM=ITEM:NUMA
STORE # TO POINTER
STORE CODE TO CODEA
STORE ACCNUM TO ACCNUMA
@ 7,1 SAY 'CODE ITEM QUANTITY ORDERED'
@ 8,1 SAY'-------------------------------------------------'
@ 9,11 say item
@ 9,41 SAY QTY:ORD
@ 9,1 SAY CODE
@ 10,1 SAY'-------------------------------------------------'
@ 6,1 SAY 'ACCOUNT NUMBER '+ACCNUM
@ 6,31 SAY 'DATE ORDERED '+DATE:ORD
@ 15,1 SAY 'IF NOT LINE REQUIRED PRESS (N) ELSE <CR>'
WAIT TO DEC
STORE !(DEC) TO DEC
IF DEC='N'
LOOP
ENDIF
IF DEC=' '
STORE 000 TO QTY:BACKOA
@ 17,1 SAY'------------------------------------------------------- '
@ 18,1 SAY' QUANTITY BACK ORDERED ' GET QTY:BACKOA
@ 19,1 SAY'-------------------------------------------------------'
READ
REPLACE QTY:BACKO WITH QTY:BACKOA
REPLACE SPECIAL WITH T
SELECT SECONDARY
FIND &CODEA
REPLACE B:ORDERED WITH B:ORDERED+QTY:BACKOA
REPLACE DATE:BO WITH DATE()
REPLACE STOCKED WITH STOCKED+QTY:BACKOA
ENDIF
ERASE
ENDDO!!!!!!!!!!!!!!!!!!!!!!'
@ 4,0 SAY 'CHECK' GET CHEK PICT' '
READ
IF QTY:BO =0
RETURN
ENDIF
USE DATARCH
APPEND BLANK
REPLACE ACCNUM WITH ACCNUMA,CODE WITH CODEA,ITEM WITH ITEMA,DATE:ORD WITH;
DATE(),ORD:COM WITH COMM,QTY:ORD WITH QTY:BO,SPECIAL WITH T
ENDDO