Typical DCL Command Procedure to run the program :
$!
$! THIS COMMAND PROCEDURE RUNS THE PROCESS THAT SENDS OUT
$! THE LIST OF REQUISITION APPROVALS TO THE PURCHASING OFFICER.
$!
$ DELETE/LOG FR$FEX:*.FTM;*
$ DELETE/LOG FR$FEX:*.MAS;*
$ DELETE/LOG FR$FEX:PLAY.WP;*
$!
$ DEFINE FOC$DIR1 FR$DATA
$ DEFINE FOC$DIR2 FR$FEX,FR$MFD
$!
$ SET DEFAULT FR$FEX
$ FOCUS
EXEC (file name)
FIN
$!
$ MAIL/SUBJECT="(file name) - Approved Requisitions List" FR$FEX:PLAY.WP (VMS mail id)
$!
$ EXIT
FOCUS program :
JOIN CLEAR *
SET PAGE = NOPAGE
SET LINES = 999999
-*
-* Retrieve all approved requisitions..
-*
DEFINE FILE POFILE
CHK_PO/A1=EDIT(PO_NUM,'9');
END
TABLE FILE POFILE
PRINT PO_NUM PO_DT TOTAL_AMT
BY VENDOR_NUM
ON TABLE HOLD AS POTMP1
WHERE CHK_PO EQ 'R';
WHERE PR_TRANSFER_CODE EQ 'A';
END
-*
-* Retrieve vendor information for thee requisitions.
-*
JOIN VENDOR_NUM IN POTMP1 TO VENDOR_NUM IN VNFILE AS J1
TABLE FILE POTMP1
PRINT PO_DT AS 'Requisition,Date' VENDOR_NUM AS 'Vendor,Number'
VENDOR_NAME TOTAL_AMT AS 'Total,Amount'
BY PO_NUM AS 'Requisition,Number'
ON TABLE SAVE AS PLAY FORMAT WP
END
JOIN CLEAR *
This page hosted by
Get your own Free Homepage