cdc:nos2.source:opl871:tmsproc
Table of Contents
TMSPROC
Table Of Contents
Source Code
- TMSPROC.txt
- *NOSEQ
- .PROC,RGENTMS,FM=.
- .IFE,OT.NE.SYO,OT1.
- $REVERT,ABORT. INCORRECT ACCESS.
- .ENDIF,OT1.
- .IFE,$FM$.EQ.$$,FM1.
- $REVERT,ABORT. NO FAMILY NAME.
- .ENDIF,FM1.
- ****************************************
- *
- * RGENTMS
- *
- * THIS PROCEDURE ROUTES A SYSTEM ORIGIN
- * JOB THAT GENERATES THE *TMS* BILLING
- * FILE *TFDUMP* ON USER INDEX 377777 OF
- * THE SPECIFIED FAMILY. THIS PROCEDURE
- * MUST BE CALLED FROM A SYSTEM ORIGIN
- * JOB.
- *
- * FORMAT OF CALL -
- *
- * RGENTMS,FAMILY.
- *
- * FAMILY NAME OF FAMILY TO
- * GENERATE *TMS* BILLING
- * FILE ON. MANDATORY
- * ENTRY.
- *
- * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
- * *RGENTMS* -
- *
- * ZZZJOB
- *
- * THE FOLLOWING MESSAGE MAY BE FLASHED BY
- * *RGENTMS* IF UNSUCCESSFUL -
- *
- * RGENTMS ABORTED.
- *
- ****************************************
- $ROUTE,ZZZJOB,OT=SYOT,DC=IN.
- $REVERT. RGENTMS COMPLETE.
- $EXIT.
- $OPMSG. RGENTMS ABORTED, SEE DAYFILE.
- $REVERT,ABORT. RGENTMS ABORTED.
- $EXIT.
- $REVERT,ABORT. RGENTMS ABORTED.
- .DATA,ZZZJOB.
- GENTMS(T7777) GENERATE BILLING FOR *TMS* TAPES.
- $ASSIGN,MS,OUTPUT.
- $NOTE(OUTPUT/NR)/1 *** GENTMS - GENERATE TMS BILLING INFORMATION. ***
- $SUI(377777)
- $FAMILY,FM.
- *
- $WHILE,R1 .EQ. 0,LOOP.
- $PURGE(TFDUMP/NA)
- $DEFINE(TFDUMP/PW=CHANGE,NA)
- *
- $IF,FILE(TFDUMP,PM),GENTMS1. IF TFDUMP WAS DEFINED
- $SET(R1=1) END LOOPING
- $ELSE(GENTMS1)
- *** INSTRUCTIONS.
- *
- * THERE WAS A PROBLEM DEFINING AN EMPTY
- * PERMANENT FILE (TFDUMP) ON WHICH TO
- * WRITE BILLING INFORMATION.
- * TYPE GO,JSN TO RETRY.
- * TYPE DROP,JSN TO ABANDON GENTMS RUN.
- *
- $OPMSG. GENTMS ABORTED. GO,JSN TO RETRY.
- $SKIP,RETRY.
- $EXIT. OPERATOR DROPPED.
- $EXIT. ABANDON RUN.
- $ENDIF,RETRY.
- $ENDIF,GENTMS1.
- *
- $ENDW,LOOP.
- *
- * GET MACHINE READABLE FILE
- * FROM THE TAPE FILE CATALOG
- * VIA *TFSP*.
- *
- $SET,R1=0.
- $WHILE,R1.EQ.0,MREAD1.
- $RETURN,MREAD.
- $TFSP,L=0,SS=MREAD,OP=Z,RT./MREADUN=
- $SET,R1=1.
- $NOTE,OUTPUT,NR./ / MACHINE READABLE FILE
- $NOTE,OUTPUT,NR./ GENERATED FROM FAST-ATTACHED
- $NOTE,OUTPUT,NR./ TAPE CATALOG FILE.
- $SKIP,MREAD2.
- $EXIT.
- *
- * UNABLE TO ACCESS FAST-ATTACHED FILE.
- * ATTEMP TO ACCESS DIRECT-ACCESS FILE
- * *ZZZZZFC*.
- *
- $ATTACH,OLD=ZZZZZFC/M=M.
- $RETURN,MREAD.
- $TFSP,L=0,LF,SS=MREAD,OP=Z./MREADUN=
- $RETURN,OLD.
- $SET,R1=1.
- $NOTE,OUTPUT,NR./ / MACHINE READABLE FILE
- $NOTE,OUTPUT,NR./ GENERATED FROM DIRECT-ACCESS
- $NOTE,OUTPUT,NR./ FILE *ZZZZZFC*.
- $SKIP,MREAD2.
- $EXIT.
- *
- * UNABLE TO ACCESS DIRECT-ACCESS FILE.
- * CHECK IF DIRECT-ACCESS FILE EXISTS.
- *
- $CATLIST,FN=ZZZZZFC.
- *** INSTRUCTIONS.
- *
- * UNABLE TO ACCESS TAPE CATALOG FILE.
- * TYPE GO,JSN TO RETRY.
- * TYPE DROP,JSN TO ABANDON GENTMS RUN.
- *
- $OPMSG. GENTMS ABORTED. GO,JSN TO RETRY.
- $SKIP,MREAD2.
- $EXIT.
- *
- * DIRECT-ACCESS FILE *ZZZZZFC*
- * DOES NOT EXIST
- * OR
- * OPERATOR DROPPED TO ABANDON RUN.
- *
- $NOTE,OUTPUT,NR./ / TAPE CATALOG FILE *ZZZZZFC*
- $NOTE,OUTPUT,NR./ DOES NOT EXIST
- $NOTE,OUTPUT,NR./ OR
- $NOTE,OUTPUT,NR./ OPERATOR DROPPED TO ABANDON RUN.
- $SET,R1=2. FLAG CATALOG ERROR.
- $SKIP,ERRPROC. PROCESS NO CATALOG ERROR AND ABORT.
- $ENDIF,MREAD2.
- $ENDW,MREAD1.
- *
- * CONVERT MACHINE READABLE LISTING
- * TO TFDUMP VIA *GENTMS* BINARY.
- *
- $REWIND,MREAD.
- $TMSBILL.
- $IFE,FILE(TAPE2,AS),FILE1.
- $REWIND,TAPE2.
- $SORT5.FROM=TAPE2 TO=TFDUMP KEY=((8,7,COBOL6,A),(21,6,COBOL6,A))
- $ENDIF,FILE1.
- $NOTE,OUTPUT,NR./ / CONVERSION FROM MACHINE READABLE FILE
- $NOTE,OUTPUT,NR./ TO *TFDUMP* COMPLETE.
- $PACK,OUTPUT.
- $ROUTE,OUTPUT,DC=PR.
- $DAYFILE,OUT.
- $ROUTE,OUT,DC=PR.
- $EXIT.
- $ENDIF,ERRPROC.
- $IFE,R1.NE.2,CONVERR.
- $NOTE,OUTPUT,NR./ / ERROR OCCURRED IN CONVERSION
- $NOTE,OUTPUT,NR./ FROM MACHINE READABLE LISTING
- $NOTE,OUTPUT,NR./ TO *TFDUMP*.
- $ENDIF,CONVERR.
- *** INSTRUCTIONS.
- *
- * A PROBLEM OCCURRED WHILE WRITING
- * BILLING INFORMATION TO THE FILE
- * *TFDUMP* OR THE TMS DATA BASE COULD
- * NOT BE ATTACHED.
- * TYPE EITHER GO,JSN OR DROP,JSN TO
- * ACKNOWLEDGE.
- * SAVE THIS JOB'S OUTPUT FOR ANALYSIS.
- * MANUALLY INITIATE GENTMS AGAIN WHEN
- * THE CAUSE IS CORRECTED.
- *
- $PURGE(TFDUMP/NA)
- $PACK,OUTPUT.
- $OPMSG. GENTMS ABORTED. CFO,JSN.OK TO ACKNOWLEDGE.
- $REVERT,ABORT. GENTMS ABORTED.
- $EXIT.
- $REVERT,ABORT. GENTMS ABORTED.
- *WEOR
- .PROC,TMSDBLD,FM=,AFN=,DFN=DIRFILE,STIME=000000,ETIME=250000,
- SAM=0/1,EAM=0/1.
- .IFE,OT.NE.SYO,OT1.
- $REVERT,ABORT. INCORRECT ACCESS.
- .ENDIF,OT1.
- .IFE,$FM$.EQ.$$,FM1.
- $REVERT,ABORT. NO FAMILY NAME.
- .ENDIF,FM1.
- $RFL,0.
- $FAMILY,FM.
- $SUI,377777.
- ****************************************
- *
- * TMSDBLD
- *
- * THIS PROCEDURE USES THE ACCOUNT FILE
- * TO GENERATE *TFSP* DIRECTIVES THAT CAN
- * BE USED TO RECOVER A TMS TAPE CATALOG
- * FILE. THIS PROCEDURE MUST BE CALLED FROM A
- * SYSTEM ORIGIN JOB.
- *
- * FORMAT OF CALL -
- *
- * TMSDBLD,FAMILY,#AFN,#DFN,#STIME,#ETIME,#SAM,#EAM.
- *
- * FAMILY NAME OF FAMILY TO BUILD
- * DIRECITIVES AGAINST. MANDATORY
- * ENTRY.
- *
- * #AFN LOCAL FILE NAME OF
- * ACCOUNT FILE. IF NOT SPECIFIED,
- * THE CURRENT ACCOUNT FILE WILL BE
- * USED.
- *
- * #DFN LOCAL FILE NAME OF *TFSP*
- * DIRECTIVE FILE. DEFAULT IS
- *DIRFILE*. IF #DFN IS NOT AN EMPTY
- * FILE, THE DIRECTIVES ARE COPIED
- * TO THE END OF THE FILE.
- *
- * #STIME STARTING TIME TO BEGIN READING
- * ACCOUNT FILE. FORMAT IS HHMMSS.
- * IF NOT SPECIFIED, THE ACCOUNT
- * FILE WILL BE READ FROM THE START.
- *
- * #ETIME ENDING TIME TO COMPLETE READING
- * ACCOUNT FILE. FORMAT IS HHMMSS.
- * IF NOT SPECIFIED, THE ACCOUNT
- * FILE WILL BE READ TO THE END.
- *
- * #SAM IF SPECIFIED, THE STARTING TIME
- * IS AFTER MIDNIGHT IN THE ACCOUNT
- * FILE.
- *
- * #EAM IF SPECIFIED, THE ENDING TIME IS
- * AFTER MIDNIGHT IN THE ACCOUNT
- * FILE.
- *
- * THE CALLING JOB EXITS AT USER INDEX 377777
- * OF THE FAMILY.
- *
- * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
- * *TMSDBLD* -
- *
- * ACCFILE
- * DIRFILE
- * FAMNAME
- *
- * THE FOLLOWING MESSAGE MAY BE FLASHED BY
- * *TMSDBLD* IF UNSUCCESSFUL -
- *
- * TMSDBLD ABORTED, CHECK DAYFILE.
- *
- ****************************************
- .IFE,$AFN$.EQ.$$,AFN1.
- $AFD,ACCFILE.
- .ELSE,AFN1.
- $RENAME,ACCFILE=AFN.
- .ENDIF,AFN1.
- $IFE,FILE(DFN,AS),DFN1.
- $RENAME,DIRFILE=DFN.
- $ENDIF,DFN1.
- $RETURN,FAMNAME.
- $NOTE,FAMNAME,NR./FM
- .IFE,$ETIME$.EQ.$250000$,ETIME1.
- $NOTE,FAMNAME,NR./STIME_SAM_ETIME_1
- .ELSE,ETIME1.
- .IFE,$SAM$.EQ.$1$,SAM1.
- $NOTE,FAMNAME,NR./STIME_SAM_ETIME_1
- .ELSE,SAM1.
- $NOTE,FAMNAME,NR./STIME_SAM_ETIME_EAM
- .ENDIF,SAM1.
- .ENDIF,ETIME1.
- $PACK,FAMNAME.
- $REWIND,ACCFILE.
- $RECTMS.
- $RENAME,DFN=DIRFILE.
- $PACK,DFN.
- .IFE,$AFN$.NE.$$,AFN2.
- $RENAME,AFN=ACCFILE.
- .ENDIF,AFN2.
- $REVERT. TMS TMSDBLD COMPLETE.
- $EXIT.
- $OPMSG. TMSDBLD ABORTED, SEE DAYFILE.
- $REVERT,ABORT. TMSDBLD ABORTED.
- $EXIT.
- $REVERT,ABORT. TMSDBLD ABORTED.
- *WEOR
- .PROC,TMSDUMP,FM=,DFM=,DUI=377777,DPF=.
- .IFE,OT.NE.SYO,OT1.
- $REVERT,ABORT. INCORRECT ACCESS.
- .ENDIF,OT1.
- .IFE,$FM$.EQ.$$,FM1.
- $REVERT,ABORT. NO FAMILY NAME.
- .ENDIF,FM1.
- $FAMILY,FM.
- $SUI,377777.
- ****************************************
- *
- * TMSDUMP
- *
- * THIS PROCEDURE USES *PFDUMP* TO DUMP A
- * TAPE CATALOG FILE OF A FAMILY TO A DIFFERENT
- * DEVICE. THIS PROCEDURE MUST BE CALLED
- * FROM A SYSTEM ORIGIN JOB.
- *
- * FORMAT OF CALL -
- *
- * TMSDUMP,FAMILY,#DFM,#DUI,#DPF.
- *
- * FAMILY NAME OF THE FAMILY OF THE
- * TAPE CATALOG FILE TO DUMP.
- * MANDATORY ENTRY.
- *
- * #DFM NAME OF THE FAMILY TO RECEIVE
- * THE DUMP FILE. DEFAULT IS
- * THE SAME AS THE FAMILY OF THE
- * TAPE CATALOG FILE.
- *
- * #DUI USER INDEX TO RECEIVE THE DUMP
- * FILE. DEFAULT IS 377777.
- *
- * #DPF NAME OF THE DIRECT-ACCESS FILE
- * TO RECEIVE THE DUMP. IF NOT
- * SPECIFIED, THE DUMP WILL BE
- * COPIED TO A LOCAL FILE *TAPE*.
- *
- * THE CALLING JOB EXITS AT USER INDEX 377777
- * OF THE FAMILY.
- *
- * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
- * *TMSDUMP* -
- *
- * TAPE
- *
- * THE FOLLOWING MESSAGE MAY BE FLASHED BY
- * *TMSDUMP* IF UNSUCCESSFUL -
- *
- * TMSDUMP ABORTED, SEE DAYFILE.
- *
- ****************************************
- .IFE,$DPF$.NE.$$,DPF1.
- .IFE,$DFM$.NE.$$,DFM1.
- $FAMILY,DFM.
- .ENDIF,DFM1.
- $SUI,DUI.
- $PURGE,DPF/NA.
- $DEFINE,TAPE=DPF.
- $FAMILY,FM.
- $SUI,377777.
- .ENDIF,DPF1.
- $PFDUMP,#FM=FM,UI=377777,PF=ZZZZZFC.
- $REVERT. TMSDUMP COMPLETE.
- $EXIT.
- $OPMSG. TMSDUMP ABORTED, SEE DAYFILE.
- $REVERT,ABORT. TMSDUMP ABORTED.
- $EXIT.
- $REVERT,ABORT. TMSDUMP ABORTED.
- *WEOR
- .PROC,TMSLOAD,FM=,DFM=,DUI=377777,DPF=.
- .IFE,OT.NE.SYO,OT1.
- $REVERT,ABORT. INCORRECT ACCESS.
- .ENDIF,OT1.
- .IFE,$FM$.EQ.$$,FM1.
- $REVERT,ABORT. NO FAMILY NAME.
- .ENDIF,FM1.
- $FAMILY,FM.
- $SUI,377777.
- ****************************************
- *
- * TMSLOAD
- *
- * THIS PROCEDURE USES *PFLOAD* TO RELOAD A
- * TAPE CATALOG FILE OF A FAMILY FROM A DIFFERENT
- * DEVICE. THIS PROCEDURE MUST BE CALLED
- * FROM A SYSTEM ORIGIN JOB.
- *
- * FORMAT OF CALL -
- *
- * TMSLOAD,FAMILY,#DFM,#DUI,#DPF.
- *
- * FAMILY NAME OF THE FAMILY OF THE
- * TAPE CATALOG FILE TO RELOAD.
- * MANDATORY ENTRY.
- *
- * #DFM NAME OF THE FAMILY THAT HAS
- * THE DUMP FILE. DEFAULT IS
- * THE SAME AS THE FAMILY OF THE
- * TAPE CATALOG FILE.
- *
- * #DUI USER INDEX THAT HAS THE DUMP
- * FILE. DEFAULT IS 377777.
- *
- * #DPF NAME OF THE DIRECT-ACCESS FILE
- * THAT HAS THE LOAD FILE. IF NOT
- * SPECIFIED, THE LOCAL FILE
- * *TAPE* IS ASSUMED TO BE
- * THE DUMP FILE.
- *
- * THE CALLING JOB EXITS AT USER INDEX 377777
- * OF THE FAMILY.
- *
- * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
- * *TMSLOAD* -
- *
- * TAPE
- *
- * THE FOLLOWING MESSAGE MAY BE FLASHED BY
- * *TMSLOAD* IF UNSUCCESSFUL -
- *
- * TMSLOAD ABORTED, SEE DAYFILE.
- *
- ****************************************
- .IFE,$DPF$.NE.$$,DPF1.
- .IFE,$DFM$.NE.$$,DFM1.
- $FAMILY,DFM.
- .ENDIF,DFM1.
- $SUI,DUI.
- $ATTACH,TAPE=DPF.
- $FAMILY,FM.
- $SUI,377777.
- .ENDIF,DPF1.
- $REWIND,TAPE.
- $PFLOAD,#FM=FM,UI=377777,PF=ZZZZZFC,OP=OR.
- $REVERT. TMSLOAD COMPLETE.
- $EXIT.
- $OPMSG. TMSLOAD ABORTED, SEE DAYFILE.
- $REVERT,ABORT. TMSLOAD ABORTED.
- $EXIT.
- $REVERT,ABORT. TMSLOAD ABORTED.
- *WEOR
- .PROC,TMSRBLD,FM=,P=,N=NEW,I=DIRFILE.
- .IFE,OT.NE.SYO,OT1.
- $REVERT,ABORT. INCORRECT ACCESS.
- .ENDIF,OT1.
- .IFE,$FM$.EQ.$$,FM1.
- $REVERT,ABORT. NO FAMILY NAME.
- .ENDIF,FM1.
- $FAMILY,FM.
- $SUI,377777.
- ****************************************
- *
- * TMSRBLD
- *
- * THIS PROCEDURE CAN BE USED TO REBUILD A
- * TAPE CATALOG FILE GIVEN AN OLD TAPE
- * CATALOG FILE AND A *TFSP* DIRECTIVE FILE.
- * THIS PROCEDURE MUST BE CALLED FROM A
- * SYSTEM ORIGIN JOB.
- *
- * FORMAT OF CALL -
- *
- * TMSRBLD,FAMILY,OFN,NFN,DFN.
- *
- * FAMILY NAME OF FAMILY OF TAPE
- * CATALOG FILE. MANDATORY
- * ENTRY.
- *
- * OFN LOCAL FILE NAME OF OLD
- * TAPE CATALOG FILE TO BUILD
- * AGAINST. IF NOT SPECIFIED,
- * THE DIRECT-ACCESS FILE
- * *ZZZZZFC* ON USER INDEX
- * 377777 OF THE FAMILY IS
- * USED. *ZZZZZFC* MUST NOT
- * BE A FAST-ATTACHED FILE
- * WHEN *TMSRBLD* IS CALLED.
- *
- * NFN LOCAL FILE NAME OF THE
- * REBUILT TAPE CATALOG FILE.
- * DEFAULT IS *NEW*. THE
- * *OFN* AND *NFN* PARAMETERS
- * MAY HAVE THE SAME NAME.
- *
- * DFN LOCAL FILE NAME OF THE
- * *TFSP* DIRECTIVE INPUT
- * FILE TO APPLY AGAINST THE
- * OLD TAPE CATALOG FILE.
- * DEFAULT IS *DIRFILE*.
- *
- * THE CALLING JOB EXITS AT USER INDEX 377777
- * OF THE FAMILY.
- *
- * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
- * *TMSRBLD* -
- *
- * ZZZZZFC
- * NEW
- * DIRFILE
- *
- * THE FOLLOWING MESSAGE MAY BE FLASHED BY
- * *TMSRBLD* IF UNSUCCESSFUL -
- *
- * TMSRBLD ABORTED, CHECK DAYFILE.
- *
- ****************************************
- $REWIND,I.
- .IFE,$P$.EQ.$$,P1.
- $ATTACH,ZZZZZFC/M=W.
- $TFSP,LF,#P=ZZZZZFC,#N=N,#I=I,A.
- .ELSE,P1.
- $TFSP,LF,#P=P,#N=N,#I=I,A.
- .ENDIF,P1.
- $REVERT. TMS TMSRBLD COMPLETE.
- $EXIT.
- $OPMSG. TMSRBLD ABORTED, SEE DAYFILE.
- $REVERT,ABORT. TMSRBLD ABORTED.
- $EXIT.
- $REVERT,ABORT. TMSRBLD ABORTED.
- *WEOR
cdc/nos2.source/opl871/tmsproc.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator