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
/
BACKCHEK.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
3KB
|
140 lines
*BACKCHEK.PRG
*A PROGRAM FOR SORTING THE BACK ORDERS OUT BY ITEM,BRAND OR CUSTOMER
RELEASE ALL
DO WHILE T
RELEASE ALL
RESTORE FROM A:NAME
SET TALK OFF
ERASE
? '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
?
?
? ' MENU TO DISPLAY BACKORDERS ' ,DATE()
?
? ' PRESS THE KEY REQUIRED TO ENTER THE DESIRED MODE'
?
?' KEY....................MODE'
?
?' 1 TO DISPLAY BACK ORDERS FOR A CUSTOMER '
?' 2 TO DISPLAY BACK ORDERS FOR A PRODUCT'
?' 3 TO DISPLAY BACK ORDERS FOR A BRAND '
?' 4 TO DISPLAY ALL BACK ORDERS'
?
?' R TO RETURN TO THE MAIN BACKORDER MENU'
?
?'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++'
WAIT TO DEC
STORE !(DEC) TO DEC
IF DEC='R'
RETURN
ENDIF
ACCEPT ' OUTPUT TO PRINTER (Y)ES OR NO <CR>' TO PRINT
STORE !(PRINT) TO PRINT
ACCEPT ' THIS MONTH OR (P)REVIOUS <CR> FOR THIS MONTH' TO FILE
IF FILE=' '
STORE 'DATAFILE' TO DATABASE
STORE 'CURRENT' TO PERIOD
ELSE
STORE 'DATARCH' TO DATABASE
STORE 'PREVIOUS' TO PERIOD
ENDIF
USE &DATABASE
IF DEC='1'
STORE T TO CHECK1
DO WHILE CHECK1
ERASE
STORE ' ' TO CUST
USE NAMELIST INDEX NAME
@ 2,0 SAY ' WHAT IS NAME OF THE CUSTOMER - FIRST PART ONLY REQUIRED'
ACCEPT TO CUST
STORE !(CUST) TO CUST
FIND &CUST
IF #=0
? ' NOT FOUND TRY AGAIN'
? CHR(7)
LOOP
ENDIF
@ 5,0 SAY NAME
@ 7,0 SAY 'IS THIS THE CORRECT CUSTOMER? <CR> IF YES; N IF NOT '
WAIT TO CHECK2
STORE !(CHECK2) TO CHECK2
IF CHECK2='N'
ERASE
LOOP
ENDIF
STORE F TO CHECK1
ERASE
STORE NAME TO CUST
STORE ACCNUM TO ACCNUMA
USE &DATABASE
IF PRINT='Y'
SET PRINT ON
ENDIF
STORE PERIOD+' B/O FOR '+CUST TO TITLE
SET HEADING TO &TITLE
REPORT FORM CUSBO FOR ACCNUM=ACCNUMA .AND. SPECIAL .AND. QTY:BACKO >0
SET PRINT OFF
WAIT
ENDDO
ENDIF
IF DEC='2'
ERASE
STORE ' ' TO CODEA
@ 2,0 SAY 'WHAT IS CODE NUMBER OF PRODUCT TO LOCATE' GET CODEA
READ
USE PRICELIS INDEX PRICECOD
FIND &CODEA
STORE ITEM TO ITEMA
USE &DATABASE
IF PRINT='Y'
SET PRINT ON
ENDIF
STORE PERIOD+' B/O FOR '+CODEA+' - '+TRIM(ITEMA) TO TITLE
SET HEADING TO &TITLE
REPORT FORM PRODBO FOR CODE=CODEA .AND. SPECIAL .AND. QTY:BACKO >0
SET PRINT OFF
WAIT
ENDIF
IF DEC='3'
ERASE
STORE ' ' TO SEARCH
@ 2,0 SAY 'WHAT IS THE BRAND REQUIRED FOR THE SEARCH' GET SEARCH
READ
IF PRINT ='Y'
SET PRINT ON
ENDIF
USE &DATABASE
STORE PERIOD+' B/O FOR '+TRIM(SEARCH)+' BRAND' TO TITLE
SET HEADING TO &TITLE
REPORT FORM BRANDBO FOR ITEM=TRIM(SEARCH) .AND. QTY:BACKO >0 .AND. SPECIAL
SET PRINT OFF
WAIT
ENDIF
IF DEC='4'
IF PRINT='Y'
SET PRINT ON
ENDIF
USE &DATABASE
STORE PERIOD+' BACKORDERS FOR ALL PRODUCTS AND CUSTOMERS' TO TITLE
SET HEADING TO &TITLE
REPORT FORM ALLBO FOR SPECIAL .AND. QTY:BACKO >0
SET PRINT OFF
WAIT
ENDIF
ENDDO
RETURN