Table of Contents

TMSPROC

Table Of Contents

Source Code

TMSPROC.txt
  1. *NOSEQ
  2. .PROC,RGENTMS,FM=.
  3. .IFE,OT.NE.SYO,OT1.
  4. $REVERT,ABORT. INCORRECT ACCESS.
  5. .ENDIF,OT1.
  6. .IFE,$FM$.EQ.$$,FM1.
  7. $REVERT,ABORT. NO FAMILY NAME.
  8. .ENDIF,FM1.
  9. ****************************************
  10. *
  11. * RGENTMS
  12. *
  13. * THIS PROCEDURE ROUTES A SYSTEM ORIGIN
  14. * JOB THAT GENERATES THE *TMS* BILLING
  15. * FILE *TFDUMP* ON USER INDEX 377777 OF
  16. * THE SPECIFIED FAMILY. THIS PROCEDURE
  17. * MUST BE CALLED FROM A SYSTEM ORIGIN
  18. * JOB.
  19. *
  20. * FORMAT OF CALL -
  21. *
  22. * RGENTMS,FAMILY.
  23. *
  24. * FAMILY NAME OF FAMILY TO
  25. * GENERATE *TMS* BILLING
  26. * FILE ON. MANDATORY
  27. * ENTRY.
  28. *
  29. * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
  30. * *RGENTMS* -
  31. *
  32. * ZZZJOB
  33. *
  34. * THE FOLLOWING MESSAGE MAY BE FLASHED BY
  35. * *RGENTMS* IF UNSUCCESSFUL -
  36. *
  37. * RGENTMS ABORTED.
  38. *
  39. ****************************************
  40. $ROUTE,ZZZJOB,OT=SYOT,DC=IN.
  41. $REVERT. RGENTMS COMPLETE.
  42. $EXIT.
  43. $OPMSG. RGENTMS ABORTED, SEE DAYFILE.
  44. $REVERT,ABORT. RGENTMS ABORTED.
  45. $EXIT.
  46. $REVERT,ABORT. RGENTMS ABORTED.
  47. .DATA,ZZZJOB.
  48. GENTMS(T7777) GENERATE BILLING FOR *TMS* TAPES.
  49. $ASSIGN,MS,OUTPUT.
  50. $NOTE(OUTPUT/NR)/1 *** GENTMS - GENERATE TMS BILLING INFORMATION. ***
  51. $SUI(377777)
  52. $FAMILY,FM.
  53. *
  54. $WHILE,R1 .EQ. 0,LOOP.
  55. $PURGE(TFDUMP/NA)
  56. $DEFINE(TFDUMP/PW=CHANGE,NA)
  57. *
  58. $IF,FILE(TFDUMP,PM),GENTMS1. IF TFDUMP WAS DEFINED
  59. $SET(R1=1) END LOOPING
  60. $ELSE(GENTMS1)
  61. *** INSTRUCTIONS.
  62. *
  63. * THERE WAS A PROBLEM DEFINING AN EMPTY
  64. * PERMANENT FILE (TFDUMP) ON WHICH TO
  65. * WRITE BILLING INFORMATION.
  66. * TYPE GO,JSN TO RETRY.
  67. * TYPE DROP,JSN TO ABANDON GENTMS RUN.
  68. *
  69. $OPMSG. GENTMS ABORTED. GO,JSN TO RETRY.
  70. $SKIP,RETRY.
  71. $EXIT. OPERATOR DROPPED.
  72. $EXIT. ABANDON RUN.
  73. $ENDIF,RETRY.
  74. $ENDIF,GENTMS1.
  75. *
  76. $ENDW,LOOP.
  77. *
  78. * GET MACHINE READABLE FILE
  79. * FROM THE TAPE FILE CATALOG
  80. * VIA *TFSP*.
  81. *
  82. $SET,R1=0.
  83. $WHILE,R1.EQ.0,MREAD1.
  84. $RETURN,MREAD.
  85. $TFSP,L=0,SS=MREAD,OP=Z,RT./MREADUN=
  86. $SET,R1=1.
  87. $NOTE,OUTPUT,NR./ / MACHINE READABLE FILE
  88. $NOTE,OUTPUT,NR./ GENERATED FROM FAST-ATTACHED
  89. $NOTE,OUTPUT,NR./ TAPE CATALOG FILE.
  90. $SKIP,MREAD2.
  91. $EXIT.
  92. *
  93. * UNABLE TO ACCESS FAST-ATTACHED FILE.
  94. * ATTEMP TO ACCESS DIRECT-ACCESS FILE
  95. * *ZZZZZFC*.
  96. *
  97. $ATTACH,OLD=ZZZZZFC/M=M.
  98. $RETURN,MREAD.
  99. $TFSP,L=0,LF,SS=MREAD,OP=Z./MREADUN=
  100. $RETURN,OLD.
  101. $SET,R1=1.
  102. $NOTE,OUTPUT,NR./ / MACHINE READABLE FILE
  103. $NOTE,OUTPUT,NR./ GENERATED FROM DIRECT-ACCESS
  104. $NOTE,OUTPUT,NR./ FILE *ZZZZZFC*.
  105. $SKIP,MREAD2.
  106. $EXIT.
  107. *
  108. * UNABLE TO ACCESS DIRECT-ACCESS FILE.
  109. * CHECK IF DIRECT-ACCESS FILE EXISTS.
  110. *
  111. $CATLIST,FN=ZZZZZFC.
  112. *** INSTRUCTIONS.
  113. *
  114. * UNABLE TO ACCESS TAPE CATALOG FILE.
  115. * TYPE GO,JSN TO RETRY.
  116. * TYPE DROP,JSN TO ABANDON GENTMS RUN.
  117. *
  118. $OPMSG. GENTMS ABORTED. GO,JSN TO RETRY.
  119. $SKIP,MREAD2.
  120. $EXIT.
  121. *
  122. * DIRECT-ACCESS FILE *ZZZZZFC*
  123. * DOES NOT EXIST
  124. * OR
  125. * OPERATOR DROPPED TO ABANDON RUN.
  126. *
  127. $NOTE,OUTPUT,NR./ / TAPE CATALOG FILE *ZZZZZFC*
  128. $NOTE,OUTPUT,NR./ DOES NOT EXIST
  129. $NOTE,OUTPUT,NR./ OR
  130. $NOTE,OUTPUT,NR./ OPERATOR DROPPED TO ABANDON RUN.
  131. $SET,R1=2. FLAG CATALOG ERROR.
  132. $SKIP,ERRPROC. PROCESS NO CATALOG ERROR AND ABORT.
  133. $ENDIF,MREAD2.
  134. $ENDW,MREAD1.
  135. *
  136. * CONVERT MACHINE READABLE LISTING
  137. * TO TFDUMP VIA *GENTMS* BINARY.
  138. *
  139. $REWIND,MREAD.
  140. $TMSBILL.
  141. $IFE,FILE(TAPE2,AS),FILE1.
  142. $REWIND,TAPE2.
  143. $SORT5.FROM=TAPE2 TO=TFDUMP KEY=((8,7,COBOL6,A),(21,6,COBOL6,A))
  144. $ENDIF,FILE1.
  145. $NOTE,OUTPUT,NR./ / CONVERSION FROM MACHINE READABLE FILE
  146. $NOTE,OUTPUT,NR./ TO *TFDUMP* COMPLETE.
  147. $PACK,OUTPUT.
  148. $ROUTE,OUTPUT,DC=PR.
  149. $DAYFILE,OUT.
  150. $ROUTE,OUT,DC=PR.
  151. $EXIT.
  152. $ENDIF,ERRPROC.
  153. $IFE,R1.NE.2,CONVERR.
  154. $NOTE,OUTPUT,NR./ / ERROR OCCURRED IN CONVERSION
  155. $NOTE,OUTPUT,NR./ FROM MACHINE READABLE LISTING
  156. $NOTE,OUTPUT,NR./ TO *TFDUMP*.
  157. $ENDIF,CONVERR.
  158. *** INSTRUCTIONS.
  159. *
  160. * A PROBLEM OCCURRED WHILE WRITING
  161. * BILLING INFORMATION TO THE FILE
  162. * *TFDUMP* OR THE TMS DATA BASE COULD
  163. * NOT BE ATTACHED.
  164. * TYPE EITHER GO,JSN OR DROP,JSN TO
  165. * ACKNOWLEDGE.
  166. * SAVE THIS JOB'S OUTPUT FOR ANALYSIS.
  167. * MANUALLY INITIATE GENTMS AGAIN WHEN
  168. * THE CAUSE IS CORRECTED.
  169. *
  170. $PURGE(TFDUMP/NA)
  171. $PACK,OUTPUT.
  172. $OPMSG. GENTMS ABORTED. CFO,JSN.OK TO ACKNOWLEDGE.
  173. $REVERT,ABORT. GENTMS ABORTED.
  174. $EXIT.
  175. $REVERT,ABORT. GENTMS ABORTED.
  176. *WEOR
  177. .PROC,TMSDBLD,FM=,AFN=,DFN=DIRFILE,STIME=000000,ETIME=250000,
  178. SAM=0/1,EAM=0/1.
  179. .IFE,OT.NE.SYO,OT1.
  180. $REVERT,ABORT. INCORRECT ACCESS.
  181. .ENDIF,OT1.
  182. .IFE,$FM$.EQ.$$,FM1.
  183. $REVERT,ABORT. NO FAMILY NAME.
  184. .ENDIF,FM1.
  185. $RFL,0.
  186. $FAMILY,FM.
  187. $SUI,377777.
  188. ****************************************
  189. *
  190. * TMSDBLD
  191. *
  192. * THIS PROCEDURE USES THE ACCOUNT FILE
  193. * TO GENERATE *TFSP* DIRECTIVES THAT CAN
  194. * BE USED TO RECOVER A TMS TAPE CATALOG
  195. * FILE. THIS PROCEDURE MUST BE CALLED FROM A
  196. * SYSTEM ORIGIN JOB.
  197. *
  198. * FORMAT OF CALL -
  199. *
  200. * TMSDBLD,FAMILY,#AFN,#DFN,#STIME,#ETIME,#SAM,#EAM.
  201. *
  202. * FAMILY NAME OF FAMILY TO BUILD
  203. * DIRECITIVES AGAINST. MANDATORY
  204. * ENTRY.
  205. *
  206. * #AFN LOCAL FILE NAME OF
  207. * ACCOUNT FILE. IF NOT SPECIFIED,
  208. * THE CURRENT ACCOUNT FILE WILL BE
  209. * USED.
  210. *
  211. * #DFN LOCAL FILE NAME OF *TFSP*
  212. * DIRECTIVE FILE. DEFAULT IS
  213. *DIRFILE*. IF #DFN IS NOT AN EMPTY
  214. * FILE, THE DIRECTIVES ARE COPIED
  215. * TO THE END OF THE FILE.
  216. *
  217. * #STIME STARTING TIME TO BEGIN READING
  218. * ACCOUNT FILE. FORMAT IS HHMMSS.
  219. * IF NOT SPECIFIED, THE ACCOUNT
  220. * FILE WILL BE READ FROM THE START.
  221. *
  222. * #ETIME ENDING TIME TO COMPLETE READING
  223. * ACCOUNT FILE. FORMAT IS HHMMSS.
  224. * IF NOT SPECIFIED, THE ACCOUNT
  225. * FILE WILL BE READ TO THE END.
  226. *
  227. * #SAM IF SPECIFIED, THE STARTING TIME
  228. * IS AFTER MIDNIGHT IN THE ACCOUNT
  229. * FILE.
  230. *
  231. * #EAM IF SPECIFIED, THE ENDING TIME IS
  232. * AFTER MIDNIGHT IN THE ACCOUNT
  233. * FILE.
  234. *
  235. * THE CALLING JOB EXITS AT USER INDEX 377777
  236. * OF THE FAMILY.
  237. *
  238. * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
  239. * *TMSDBLD* -
  240. *
  241. * ACCFILE
  242. * DIRFILE
  243. * FAMNAME
  244. *
  245. * THE FOLLOWING MESSAGE MAY BE FLASHED BY
  246. * *TMSDBLD* IF UNSUCCESSFUL -
  247. *
  248. * TMSDBLD ABORTED, CHECK DAYFILE.
  249. *
  250. ****************************************
  251. .IFE,$AFN$.EQ.$$,AFN1.
  252. $AFD,ACCFILE.
  253. .ELSE,AFN1.
  254. $RENAME,ACCFILE=AFN.
  255. .ENDIF,AFN1.
  256. $IFE,FILE(DFN,AS),DFN1.
  257. $RENAME,DIRFILE=DFN.
  258. $ENDIF,DFN1.
  259. $RETURN,FAMNAME.
  260. $NOTE,FAMNAME,NR./FM
  261. .IFE,$ETIME$.EQ.$250000$,ETIME1.
  262. $NOTE,FAMNAME,NR./STIME_SAM_ETIME_1
  263. .ELSE,ETIME1.
  264. .IFE,$SAM$.EQ.$1$,SAM1.
  265. $NOTE,FAMNAME,NR./STIME_SAM_ETIME_1
  266. .ELSE,SAM1.
  267. $NOTE,FAMNAME,NR./STIME_SAM_ETIME_EAM
  268. .ENDIF,SAM1.
  269. .ENDIF,ETIME1.
  270. $PACK,FAMNAME.
  271. $REWIND,ACCFILE.
  272. $RECTMS.
  273. $RENAME,DFN=DIRFILE.
  274. $PACK,DFN.
  275. .IFE,$AFN$.NE.$$,AFN2.
  276. $RENAME,AFN=ACCFILE.
  277. .ENDIF,AFN2.
  278. $REVERT. TMS TMSDBLD COMPLETE.
  279. $EXIT.
  280. $OPMSG. TMSDBLD ABORTED, SEE DAYFILE.
  281. $REVERT,ABORT. TMSDBLD ABORTED.
  282. $EXIT.
  283. $REVERT,ABORT. TMSDBLD ABORTED.
  284. *WEOR
  285. .PROC,TMSDUMP,FM=,DFM=,DUI=377777,DPF=.
  286. .IFE,OT.NE.SYO,OT1.
  287. $REVERT,ABORT. INCORRECT ACCESS.
  288. .ENDIF,OT1.
  289. .IFE,$FM$.EQ.$$,FM1.
  290. $REVERT,ABORT. NO FAMILY NAME.
  291. .ENDIF,FM1.
  292. $FAMILY,FM.
  293. $SUI,377777.
  294. ****************************************
  295. *
  296. * TMSDUMP
  297. *
  298. * THIS PROCEDURE USES *PFDUMP* TO DUMP A
  299. * TAPE CATALOG FILE OF A FAMILY TO A DIFFERENT
  300. * DEVICE. THIS PROCEDURE MUST BE CALLED
  301. * FROM A SYSTEM ORIGIN JOB.
  302. *
  303. * FORMAT OF CALL -
  304. *
  305. * TMSDUMP,FAMILY,#DFM,#DUI,#DPF.
  306. *
  307. * FAMILY NAME OF THE FAMILY OF THE
  308. * TAPE CATALOG FILE TO DUMP.
  309. * MANDATORY ENTRY.
  310. *
  311. * #DFM NAME OF THE FAMILY TO RECEIVE
  312. * THE DUMP FILE. DEFAULT IS
  313. * THE SAME AS THE FAMILY OF THE
  314. * TAPE CATALOG FILE.
  315. *
  316. * #DUI USER INDEX TO RECEIVE THE DUMP
  317. * FILE. DEFAULT IS 377777.
  318. *
  319. * #DPF NAME OF THE DIRECT-ACCESS FILE
  320. * TO RECEIVE THE DUMP. IF NOT
  321. * SPECIFIED, THE DUMP WILL BE
  322. * COPIED TO A LOCAL FILE *TAPE*.
  323. *
  324. * THE CALLING JOB EXITS AT USER INDEX 377777
  325. * OF THE FAMILY.
  326. *
  327. * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
  328. * *TMSDUMP* -
  329. *
  330. * TAPE
  331. *
  332. * THE FOLLOWING MESSAGE MAY BE FLASHED BY
  333. * *TMSDUMP* IF UNSUCCESSFUL -
  334. *
  335. * TMSDUMP ABORTED, SEE DAYFILE.
  336. *
  337. ****************************************
  338. .IFE,$DPF$.NE.$$,DPF1.
  339. .IFE,$DFM$.NE.$$,DFM1.
  340. $FAMILY,DFM.
  341. .ENDIF,DFM1.
  342. $SUI,DUI.
  343. $PURGE,DPF/NA.
  344. $DEFINE,TAPE=DPF.
  345. $FAMILY,FM.
  346. $SUI,377777.
  347. .ENDIF,DPF1.
  348. $PFDUMP,#FM=FM,UI=377777,PF=ZZZZZFC.
  349. $REVERT. TMSDUMP COMPLETE.
  350. $EXIT.
  351. $OPMSG. TMSDUMP ABORTED, SEE DAYFILE.
  352. $REVERT,ABORT. TMSDUMP ABORTED.
  353. $EXIT.
  354. $REVERT,ABORT. TMSDUMP ABORTED.
  355. *WEOR
  356. .PROC,TMSLOAD,FM=,DFM=,DUI=377777,DPF=.
  357. .IFE,OT.NE.SYO,OT1.
  358. $REVERT,ABORT. INCORRECT ACCESS.
  359. .ENDIF,OT1.
  360. .IFE,$FM$.EQ.$$,FM1.
  361. $REVERT,ABORT. NO FAMILY NAME.
  362. .ENDIF,FM1.
  363. $FAMILY,FM.
  364. $SUI,377777.
  365. ****************************************
  366. *
  367. * TMSLOAD
  368. *
  369. * THIS PROCEDURE USES *PFLOAD* TO RELOAD A
  370. * TAPE CATALOG FILE OF A FAMILY FROM A DIFFERENT
  371. * DEVICE. THIS PROCEDURE MUST BE CALLED
  372. * FROM A SYSTEM ORIGIN JOB.
  373. *
  374. * FORMAT OF CALL -
  375. *
  376. * TMSLOAD,FAMILY,#DFM,#DUI,#DPF.
  377. *
  378. * FAMILY NAME OF THE FAMILY OF THE
  379. * TAPE CATALOG FILE TO RELOAD.
  380. * MANDATORY ENTRY.
  381. *
  382. * #DFM NAME OF THE FAMILY THAT HAS
  383. * THE DUMP FILE. DEFAULT IS
  384. * THE SAME AS THE FAMILY OF THE
  385. * TAPE CATALOG FILE.
  386. *
  387. * #DUI USER INDEX THAT HAS THE DUMP
  388. * FILE. DEFAULT IS 377777.
  389. *
  390. * #DPF NAME OF THE DIRECT-ACCESS FILE
  391. * THAT HAS THE LOAD FILE. IF NOT
  392. * SPECIFIED, THE LOCAL FILE
  393. * *TAPE* IS ASSUMED TO BE
  394. * THE DUMP FILE.
  395. *
  396. * THE CALLING JOB EXITS AT USER INDEX 377777
  397. * OF THE FAMILY.
  398. *
  399. * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
  400. * *TMSLOAD* -
  401. *
  402. * TAPE
  403. *
  404. * THE FOLLOWING MESSAGE MAY BE FLASHED BY
  405. * *TMSLOAD* IF UNSUCCESSFUL -
  406. *
  407. * TMSLOAD ABORTED, SEE DAYFILE.
  408. *
  409. ****************************************
  410. .IFE,$DPF$.NE.$$,DPF1.
  411. .IFE,$DFM$.NE.$$,DFM1.
  412. $FAMILY,DFM.
  413. .ENDIF,DFM1.
  414. $SUI,DUI.
  415. $ATTACH,TAPE=DPF.
  416. $FAMILY,FM.
  417. $SUI,377777.
  418. .ENDIF,DPF1.
  419. $REWIND,TAPE.
  420. $PFLOAD,#FM=FM,UI=377777,PF=ZZZZZFC,OP=OR.
  421. $REVERT. TMSLOAD COMPLETE.
  422. $EXIT.
  423. $OPMSG. TMSLOAD ABORTED, SEE DAYFILE.
  424. $REVERT,ABORT. TMSLOAD ABORTED.
  425. $EXIT.
  426. $REVERT,ABORT. TMSLOAD ABORTED.
  427. *WEOR
  428. .PROC,TMSRBLD,FM=,P=,N=NEW,I=DIRFILE.
  429. .IFE,OT.NE.SYO,OT1.
  430. $REVERT,ABORT. INCORRECT ACCESS.
  431. .ENDIF,OT1.
  432. .IFE,$FM$.EQ.$$,FM1.
  433. $REVERT,ABORT. NO FAMILY NAME.
  434. .ENDIF,FM1.
  435. $FAMILY,FM.
  436. $SUI,377777.
  437. ****************************************
  438. *
  439. * TMSRBLD
  440. *
  441. * THIS PROCEDURE CAN BE USED TO REBUILD A
  442. * TAPE CATALOG FILE GIVEN AN OLD TAPE
  443. * CATALOG FILE AND A *TFSP* DIRECTIVE FILE.
  444. * THIS PROCEDURE MUST BE CALLED FROM A
  445. * SYSTEM ORIGIN JOB.
  446. *
  447. * FORMAT OF CALL -
  448. *
  449. * TMSRBLD,FAMILY,OFN,NFN,DFN.
  450. *
  451. * FAMILY NAME OF FAMILY OF TAPE
  452. * CATALOG FILE. MANDATORY
  453. * ENTRY.
  454. *
  455. * OFN LOCAL FILE NAME OF OLD
  456. * TAPE CATALOG FILE TO BUILD
  457. * AGAINST. IF NOT SPECIFIED,
  458. * THE DIRECT-ACCESS FILE
  459. * *ZZZZZFC* ON USER INDEX
  460. * 377777 OF THE FAMILY IS
  461. * USED. *ZZZZZFC* MUST NOT
  462. * BE A FAST-ATTACHED FILE
  463. * WHEN *TMSRBLD* IS CALLED.
  464. *
  465. * NFN LOCAL FILE NAME OF THE
  466. * REBUILT TAPE CATALOG FILE.
  467. * DEFAULT IS *NEW*. THE
  468. * *OFN* AND *NFN* PARAMETERS
  469. * MAY HAVE THE SAME NAME.
  470. *
  471. * DFN LOCAL FILE NAME OF THE
  472. * *TFSP* DIRECTIVE INPUT
  473. * FILE TO APPLY AGAINST THE
  474. * OLD TAPE CATALOG FILE.
  475. * DEFAULT IS *DIRFILE*.
  476. *
  477. * THE CALLING JOB EXITS AT USER INDEX 377777
  478. * OF THE FAMILY.
  479. *
  480. * THE FOLLOWING LOCAL FILE NAMES ARE USED BY
  481. * *TMSRBLD* -
  482. *
  483. * ZZZZZFC
  484. * NEW
  485. * DIRFILE
  486. *
  487. * THE FOLLOWING MESSAGE MAY BE FLASHED BY
  488. * *TMSRBLD* IF UNSUCCESSFUL -
  489. *
  490. * TMSRBLD ABORTED, CHECK DAYFILE.
  491. *
  492. ****************************************
  493. $REWIND,I.
  494. .IFE,$P$.EQ.$$,P1.
  495. $ATTACH,ZZZZZFC/M=W.
  496. $TFSP,LF,#P=ZZZZZFC,#N=N,#I=I,A.
  497. .ELSE,P1.
  498. $TFSP,LF,#P=P,#N=N,#I=I,A.
  499. .ENDIF,P1.
  500. $REVERT. TMS TMSRBLD COMPLETE.
  501. $EXIT.
  502. $OPMSG. TMSRBLD ABORTED, SEE DAYFILE.
  503. $REVERT,ABORT. TMSRBLD ABORTED.
  504. $EXIT.
  505. $REVERT,ABORT. TMSRBLD ABORTED.
  506. *WEOR