RFORM

Table Of Contents

  • [00001] PROC RPCEJCT 1)
  • [00002] RPCEJCT - CONDITIONALLY ISSUES A PAGE EJECT.
  • [00006] RPCEJCT - CONDITIONALLY ISSUES A PAGE EJECT.
  • [00029] PROC RPEJECT
  • [00030] PROC RPSRCH
  • [00073] PROC RPCLOSE2)
  • [00074] RPCLOSE - CLOSES A REPORT FILE.
  • [00079] RPCLOSE - CLOSES A REPORT FILE.
  • [00111] PROC RPLINEX
  • [00112] PROC RPSRCH
  • [00113] PROC WRITER
  • [00150] PROC RPEJECT3)
  • [00151] RPEJECT - STARTS A NEW REPORT PAGE.
  • [00156] RPEJECT - STARTS NEW REPORT PAGE.
  • [00189] PROC RPSRCH
  • [00190] PROC WRITEH
  • [00191] FUNC XCDD C(10)
  • [00192] PROC XPRC
  • [00252] PROC RPHEAD4)
  • [00253] RPHEAD - SETS UP HEADER PRINT FIELD.
  • [00258] RPHEAD - SETS UP HEADER PRINT FIELD.
  • [00292] PROC RPSRCH
  • [00325] PROC RPLINE5)
  • [00327] RPLINE - CALLS *RPLINEX* TO PRINT A LINE.
  • [00332] RPLINE - CALLS *RPLINEX* TO PRINT A LINE.
  • [00378] PROC RPEJECT
  • [00379] PROC RPLINEX
  • [00380] PROC RPSRCH
  • [00425] PROC RPLINEX6)
  • [00426] RPLINEX - PRINTS A REPORT LINE.
  • [00431] RPLINEX - PRINTS A LINE ON THE REPORT FILE.
  • [00476] PROC RPSRCH
  • [00477] PROC WRITEH
  • [00548] PROC RPOPEN7) [00692] RPSPACE - DOES REPORT SPACING. [00697] RPSPACE - DOES REPORT SPACING. [00731] PROC MESSAGE [00732] PROC RPSRCH [00733] PROC RPLINEX [00734] PROC RPEJECT [00834] PROC RPSRCH8) [00836] RPSRCH - SEARCHES THE PRINT TABLE. [00841] RPSRCH - SEARCHES THE PRINT TABLE FOR AN ENTRY WITH A [00874] PROC ABORT [00875] PROC MESSAGE </WRAP> === Source Code ===
    RFORM.txt
    1. PROC RPCEJCT ((FETP),(LINES));
    2. # TITLE RPCEJCT - CONDITIONALLY ISSUES A PAGE EJECT. #
    3. BEGIN # RPCEJCT #
    4.  
    5. #
    6. ** RPCEJCT - CONDITIONALLY ISSUES A PAGE EJECT.
    7. *
    8. * COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
    9. *
    10. * *RPCEJCT* ISSUES A PAGE EJECT IF THE NUMBER OF
    11. * LINES REMAINING ON THE PAGE IS LESS THAN THE NUMBER
    12. * OF LINES TO BE CHECKED.
    13. *
    14. * PROC RPCEJCT((FETP),(LINES))
    15. *
    16. * ENTRY (FETP) = FWA OF *FET*.
    17. * (LINES) = NUMBER OF LINES TO BE CHECKED.
    18. #
    19.  
    20. ITEM FETP I; # *FET* LOCATION #
    21. ITEM LINES I; # NUMBER OF LINES TO BE CHECKED #
    22.  
    23. #
    24. **** PROC RPCEJCT - XREF LIST BEGIN.
    25. #
    26.  
    27. XREF
    28. BEGIN
    29. PROC RPEJECT; # ISSUES PAGE EJECT #
    30. PROC RPSRCH; # SEARCHES PRINT TABLE #
    31. END
    32.  
    33. #
    34. **** PROC RPCEJCT - XREF LIST END.
    35. #
    36.  
    37. DEF LISTCON #0#; # TURN COMDECK LISTING OFF #
    38. *CALL COMAMSS
    39. *CALL COMUFMT
    40. *CALL COMUOUT
    41.  
    42. CONTROL EJECT;
    43.  
    44. #
    45. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    46. #
    47.  
    48. IF FETP EQ NULLFILE
    49. THEN
    50. BEGIN
    51. RETURN;
    52. END
    53.  
    54. RPSRCH(FETP); # SEARCH PRINT TABLE #
    55.  
    56. #
    57. * IF THE NUMBER OF LINES REMAINING ON THE PAGE IS
    58. * LESS THAN THE NUMBER OF LINES TO BE CHECKED, ISSUE
    59. * A PAGE EJECT.
    60. #
    61.  
    62. IF (PRTLINELIM[ORD] - PRTLINE[ORD] + 1) GQ LINES
    63. THEN
    64. BEGIN
    65. RETURN;
    66. END
    67.  
    68. RPEJECT(FETP);
    69. RETURN;
    70. END # RPCEJCT #
    71.  
    72. TERM
    73. PROC RPCLOSE((FETP));
    74. # TITLE RPCLOSE - CLOSES A REPORT FILE. #
    75.  
    76. BEGIN # RPCLOSE #
    77.  
    78. #
    79. ** RPCLOSE - CLOSES A REPORT FILE.
    80. *
    81. * THIS PROCEDURE WRITES THE MESSAGE *REPORT
    82. * COMPLETE* ON THE REPORT FILE, CLEARS THE
    83. * *FET* ADDRESS IN THE PRINT TABLE ENTRY, AND
    84. * CALLS *WRITER* TO CLOSE THE REPORT FILE.
    85. *
    86. * PROC RPCLOSE((FETP)).
    87. *
    88. * ENTRY (FETP) - ADDRESS OF REPORT FILE *FET*.
    89. * = *NULLFILE*, NO REPORT PROCESSING DONE.
    90. * (VALUE DEFINED IN *COMUOUT*)
    91. * = OTHER, ADDRESS OF *FET*.
    92. *
    93. * EXIT REPORT FILE IS CLOSED. A PAGE EJECT IS ISSUED AND
    94. * *REPORT COMPLETE* IS PRINTED.
    95. *
    96. * NOTES *RPCLOSE* CALLS *WRITER* TO WRITE AN
    97. * END-OF-RECORD ON THE REPORT FILE, AND
    98. * CLEARS THE VALUE OF *FETP* FROM THE PRINT
    99. * TABLE ENTRY TO INDICATE THAT THE ENTRY
    100. * IS NOW EMPTY.
    101. #
    102.  
    103. ITEM FETP U; # ADDRESS OF REPORT FILE *FET* #
    104.  
    105. #
    106. **** PROC RPCLOSE - XREF LIST BEGIN.
    107. #
    108.  
    109. XREF
    110. BEGIN
    111. PROC RPLINEX; # PRINTS A REPORT LINE #
    112. PROC RPSRCH; # SEARCHES THE PRINT TABLE #
    113. PROC WRITER; # WRITES *EOR* ON REPORT FILE #
    114. END
    115.  
    116. #
    117. **** PROC RPCLOSE - XREF LIST END.
    118. #
    119.  
    120. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    121. *CALL COMAMSS
    122. *CALL COMUFMT
    123. *CALL COMUOUT
    124. CONTROL EJECT;
    125.  
    126. #
    127. * NO PROCESSING IS DONE IF NO REPORT FILE IS INDICATED.
    128. #
    129.  
    130. IF FETP EQ NULLFILE
    131. THEN
    132. BEGIN
    133. RETURN;
    134. END
    135.  
    136. #
    137. * PRINT COMPLETION MESSAGE AND CLEAR THE PRINT TABLE.
    138. #
    139.  
    140. RPSRCH(FETP); # SEARCH PRINT TABLE #
    141. RPLINEX(FETP,"1**REPORT COMPLETE**",0,20,0);
    142. P<RPFET> = FETP;
    143. WRITER(RPFET[0],RCL); # WRITE END-OF-RECORD #
    144.  
    145. PRTFETP[ORD] = EMPTY; # CLEAR *FET* ADDRESS FROM TABLE #
    146. RETURN;
    147. END # RPCLOSE #
    148.  
    149. TERM
    150. PROC RPEJECT((FETP));
    151. # TITLE RPEJECT - STARTS A NEW REPORT PAGE. #
    152.  
    153. BEGIN # RPEJECT #
    154.  
    155. #
    156. ** RPEJECT - STARTS NEW REPORT PAGE.
    157. *
    158. * THIS PROCEDURE ADVANCES THE REPORT FILE
    159. * TO A NEW PAGE, SETS THE CURRENT LINE NUMBER
    160. * EQUAL TO ONE, AND PRINTS THE PAGE HEADING.
    161. *
    162. * PROC RPEJECT((FETP)).
    163. *
    164. * ENTRY (FETP) - ADDRESS OF THE REPORT FILE *FET*.
    165. * = *NULLFILE*, NO REPORT PROCESSING DONE.
    166. * (VALUE DEFINED IN *COMUOUT*)
    167. * = OTHER, ADDRESS OF *FET*.
    168. *
    169. * EXIT NEW PAGE HEADING IS COMPLETED.
    170. *
    171. * NOTES *RPEJECT* SETS UP THE PAGE HEADER LINE
    172. * WITH DATE, TIME, PAGE NUMBER, AND
    173. * CARRIAGE CONTROL CHARACTER. AFTER
    174. * PRINTING THIS LINE, THE LINE BUFFER
    175. * IS BLANK-FILLED AND *XPRC* IS CALLED
    176. * TO EXECUTE THE HEADER PROCEDURE. THE
    177. * REPORT FILE MUST HAVE ALREADY BEEN OPENED
    178. * BY CALLING *RPOPEN*.
    179. #
    180.  
    181. ITEM FETP U; # ADDRESS OF REPORT FILE *FET* #
    182.  
    183. #
    184. **** PROC RPEJECT - XREF LIST BEGIN.
    185. #
    186.  
    187. XREF
    188. BEGIN
    189. PROC RPSRCH; # SEARCHES THE PRINT TABLE #
    190. PROC WRITEH; # WRITES LINE ON REPORT FILE #
    191. FUNC XCDD C(10); # CONVERTS INTEGER TO DISPLAY #
    192. PROC XPRC; # EXECUTES A PROCEDURE #
    193. END
    194.  
    195. #
    196. **** PROC RPEJECT - XREF LIST END.
    197. #
    198.  
    199. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    200. *CALL COMAMSS
    201. *CALL COMUFMT
    202. *CALL COMUOUT
    203. ITEM PAGENUM C(10); # PAGE NUMBER IN DISPLAY CODE #
    204. CONTROL EJECT;
    205.  
    206. #
    207. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    208. #
    209.  
    210. IF FETP EQ NULLFILE
    211. THEN
    212. BEGIN
    213. RETURN;
    214. END
    215.  
    216.  
    217. #
    218. * UPDATE PAGE AND LINE COUNTS.
    219. #
    220.  
    221. RPSRCH(FETP); # SEARCH PRINT TABLE FOR *FETP* #
    222.  
    223. PRTPAGE[ORD] = PRTPAGE[ORD] + 1;
    224. PRTLINE[ORD] = 1;
    225. PAGENUM = XCDD(PRTPAGE[ORD]); # PAGE NUMBER IN DISPLAY CODE #
    226.  
    227. #
    228. * SET UP AND PRINT THE PAGE HEADER LINE.
    229. #
    230.  
    231. LIN$CNTRL[ORD] = PRCEJ; # CAUSE PAGE EJECT #
    232. LIN$HEAD[ORD] = PRTHEADT[ORD]; # CURRENT MESSAGE #
    233. LIN$DATE[ORD] = PRTDATE[ORD]; # CURRENT DATE #
    234. LIN$TIME[ORD] = PRTTIME[ORD]; # CURRENT TIME #
    235. LIN$PAGE[ORD] = "PAGE";
    236. LIN$PAGENM[ORD] = C<4,6>PAGENUM; # PAGE NUMBER #
    237. P<RPFET> = FETP;
    238. WRITEH(RPFET[0],LINEBUFF[ORD],LINELEN); # PRINT LINE #
    239. PRTLINE[ORD] = PRTLINE[ORD] + 1; # INCREMENT LINE COUNTER #
    240.  
    241. LIN$BUF[ORD] = SPACES; # BLANK FILL *LINEBUFF* #
    242.  
    243. #
    244. * EXECUTE SPECIFIED HEADER PROCEDURE.
    245. #
    246.  
    247. XPRC(PRTHEADP[ORD],FETP,BLANK);
    248. RETURN;
    249. END # RPEJECT #
    250.  
    251. TERM
    252. PROC RPHEAD((FETP),(MESG),(COL),(LEN));
    253. # TITLE RPHEAD - SETS UP HEADER PRINT FIELD. #
    254.  
    255. BEGIN # RPHEAD #
    256.  
    257. #
    258. ** RPHEAD - SETS UP HEADER PRINT FIELD.
    259. *
    260. * *RPHEAD* SETS UP AN OPTIONAL HEADER PRINT FIELD IN THE
    261. * FIRST ONE HUNDRED CHARACTERS OF THE HEADER PAGE LINE.
    262. *
    263. * PROC RPHEAD((FETP),(MESG),(COL),(LEN))
    264. *
    265. * ENTRY (FETP) - ADDRESS OF *FET* FOR REPORT FILE.
    266. * (MESG) - HEADER MESSAGE.
    267. * (COL) - STARTING COLUMN.
    268. * (LEN) - CHARACTER LENGTH OF FIELD.
    269. *
    270. * EXIT HEADER PRINT FIELD IS SET UP.
    271. *
    272. * NOTES THE SPECIFIED MESSAGE WILL BE PRINTED ON EVERY
    273. * SUBSEQUENT PAGE HEADING UNTIL CHANGED OR CLEARED
    274. * BY ANOTHER CALL TO *RPHEAD*. THE MAXIMUM NUMBER
    275. * OF CHARACTERS ALLOWED FOR THE HEADER FIELD IS
    276. * ONE HUNDRED.
    277. * (*COL* + *LEN* -1) MUST BE LESS THAN OR EQUAL
    278. * TO ONE HUNDRED.
    279. #
    280.  
    281. ITEM FETP U; # ADDRESS OF REPORT FILE FET #
    282. ITEM MESG C(100); # HEADER MESSAGE #
    283. ITEM COL U; # STARTING COLUMN FOR FIELD #
    284. ITEM LEN U; # LENGTH OF PRINT FIELD #
    285.  
    286. #
    287. **** PROC RPHEAD - XREF LIST BEGIN.
    288. #
    289.  
    290. XREF
    291. BEGIN
    292. PROC RPSRCH; # SEARCHES PRINT TABLE #
    293. END
    294.  
    295. #
    296. **** PROC RPHEAD - XREF LIST END.
    297. #
    298.  
    299. DEF LISTCON #0#; # TURN LISTING OFF #
    300. *CALL COMAMSS
    301. *CALL COMUFMT
    302. *CALL COMUOUT
    303.  
    304. CONTROL EJECT;
    305.  
    306. #
    307. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    308. #
    309.  
    310. IF FETP EQ NULLFILE
    311. THEN
    312. BEGIN
    313. RETURN;
    314. END
    315.  
    316. #
    317. * SET UP PRINT FIELD.
    318. #
    319.  
    320. RPSRCH(FETP); # FIND PRINT TABLE ENTRY #
    321. C<COL-1,LEN>PRTHEADT[ORD] = C<0,LEN>MESG;
    322. END # RPHEAD #
    323.  
    324. TERM
    325. PROC RPLINE((FETP),FIELD,(COL),(LEN),(FLAG));
    326.  
    327. # TITLE RPLINE - CALLS *RPLINEX* TO PRINT A LINE. #
    328.  
    329. BEGIN # RPLINE #
    330.  
    331. #
    332. ** RPLINE - CALLS *RPLINEX* TO PRINT A LINE.
    333. *
    334. * THIS PROCEDURE CHECKS THE CURRENT LINE NUMBER AND CALLS
    335. * *RPEJECT* IF THE LINE LIMIT IS EXCEEDED. IT THEN CALLS
    336. * *RPLINEX* TO SET UP PRINT FIELD *FIELD* IN THE LINE BUFFER.
    337. * THE LINE IS EITHER PRINTED OR SAVED, DEPENDING ON THE VALUE
    338. * OF *FLAG* SPECIFIED.
    339. *
    340. * PROC RPLINE((FETP),FIELD,(COL),(LEN),(FLAG)).
    341. *
    342. * ENTRY (FETP) - ADDRESS OF *FET* FOR REPORT FILE.
    343. * = *NULLFILE*, NO REPORT PROCESSING IS DONE.
    344. * (VALUE DEFINED IN *COMUOUT*)
    345. * = OTHER, ADDRESS OF *FET*.
    346. * (FIELD) - STRING TO BE PRINTED.
    347. * (COL) - STARTING COLUMN FOR *FIELD*.
    348. * (LEN) - CHARACTER LENGTH OF *FIELD*.
    349. * (FLAG) - INDICATES CONTINUATION OF LINE.
    350. * (VALUES DEFINED IN *COMUOUT*)
    351. * = *END$LN*, CONTENTS OF BUFFER ARE PRINTED.
    352. * = *CONT$LN*, CONTENTS OF BUFFER ARE SAVED.
    353. *
    354. * EXIT LINE IS PRINTED OR CONTENTS OF BUFFER ARE SAVED
    355. * UNTIL NEXT CALL TO *RPLINE*. THE MAXIMUM FIELD
    356. * SIZE IS 138 CHARACTERS.
    357. #
    358.  
    359. ITEM FETP U; # ADDRESS OF REPORT FILE *FET* #
    360.  
    361. ARRAY FIELD [0:0] S(14); # ARRAY CONTAINING PRINT FIELD #
    362. BEGIN
    363. ITEM FIELDPR C(00,00,138); # PRINT STRING #
    364. END
    365.  
    366. ITEM COL U; # STARTING COLUMN OF FIELD #
    367. ITEM LEN U; # LENGTH OF PRINT FIELD #
    368. ITEM FLAG U; # INDICATES LINE CONTINUATION #
    369.  
    370.  
    371.  
    372. #
    373. **** PROC RPLINE - XREF LIST BEGIN.
    374. #
    375.  
    376. XREF
    377. BEGIN
    378. PROC RPEJECT; # STARTS NEW REPORT PAGE #
    379. PROC RPLINEX; # PRINTS LINE ON REPORT FILE #
    380. PROC RPSRCH; # SEARCHES PRINT TABLE #
    381. END
    382.  
    383. #
    384. **** PROC RPLINE - XREF LIST END.
    385. #
    386.  
    387. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    388.  
    389. *CALL COMAMSS
    390. *CALL COMUFMT
    391. *CALL COMUOUT
    392. CONTROL EJECT;
    393.  
    394.  
    395. #
    396. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    397. #
    398.  
    399. IF FETP EQ NULLFILE
    400. THEN
    401. BEGIN
    402. RETURN;
    403. END
    404.  
    405. #
    406. * CHECK LINE COUNT AND PRINT REPORT LINE.
    407. #
    408.  
    409. RPSRCH(FETP); # SEARCH FOR MATCHING *FETP* #
    410.  
    411. IF PRTLINE[ORD] GR PRTLINELIM[ORD]
    412. THEN # NEW PAGE NEEDED #
    413. BEGIN
    414. RPEJECT(FETP);
    415. END
    416.  
    417. RPLINEX(FETP,FIELD,COL,LEN,FLAG);
    418.  
    419.  
    420.  
    421. RETURN;
    422. END # RPLINE #
    423.  
    424. TERM
    425. PROC RPLINEX((FETP),FIELD,(COL),(LEN),(FLAG));
    426. # TITLE RPLINEX - PRINTS A REPORT LINE. #
    427.  
    428. BEGIN # RPLINEX #
    429.  
    430. #
    431. ** RPLINEX - PRINTS A LINE ON THE REPORT FILE.
    432. *
    433. * *RPLINEX* SETS UP PRINT FIELD *FIELD* IN A LINE BUFFER.
    434. * THE CONTENTS OF THE BUFFER ARE EITHER PRINTED OR SAVED, DEPENDING
    435. * ON THE VALUE OF *FLAG*. MORE THAN ONE FIELD PER PRINT
    436. * LINE CAN BE SPECIFIED BY MAKING MORE THAN ONE CALL TO
    437. * *RPLINEX*.
    438. *
    439. * PROC RPLINEX((FETP),FIELD,(COL),(LEN),(FLAG)).
    440. *
    441. * ENTRY (FETP) - ADDRESS OF *FET* FOR REPORT FILE.
    442. * = *NULLFILE*, NO REPORT PROCESSING IS DONE.
    443. * (VALUE DEFINED IN *COMUOUT*)
    444. * = OTHER, ADDRESS OF *FET*.
    445. * (FIELD) - STRING TO BE PRINTED.
    446. * (COL) - STARTING COLUMN FOR *FIELD*.
    447. * (LEN) - CHARACTER LENGTH OF *FIELD*.
    448. * (FLAG) - INDICATES CONTINUATION OF LINE.
    449. * (VALUES DEFINED IN *COMUOUT*)
    450. * = *END$LN*, CONTENTS OF BUFFER ARE PRINTED.
    451. * = *CONT$LN*, CONTENTS OF BUFFER ARE SAVED.
    452. *
    453. * EXIT LINE IS PRINTED OR CONTENTS OF BUFFER ARE SAVED
    454. * UNTIL NEXT CALL TO *RPLINEX*. THE LINE COUNTER IS
    455. * INCREMENTED AS NEEDED.
    456. #
    457.  
    458. ITEM FETP U; # ADDRESS OF REPORT FILE *FET* #
    459.  
    460.  
    461. ARRAY FIELD [0:0] S(14); # ARRAY CONTAINING PRINT FIELD #
    462. BEGIN
    463. ITEM FIELDPR C(00,00,138); # PRINT STRING #
    464. END
    465.  
    466. ITEM COL U; # STARTING COLUMN OF FIELD #
    467. ITEM LEN U; # LENGTH OF PRINT FIELD #
    468. ITEM FLAG U; # INDICATES LINE CONTINUATION #
    469.  
    470. #
    471. **** PROC RPLINEX - XREF LIST BEGIN.
    472. #
    473.  
    474. XREF
    475. BEGIN
    476. PROC RPSRCH; # SEARCHES PRINT TABLE #
    477. PROC WRITEH; # WRITES LINE ON REPORT FILE #
    478. END
    479.  
    480. #
    481. **** PROC RPLINEX - XREF LIST END.
    482. #
    483.  
    484. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    485.  
    486. *CALL COMAMSS
    487. *CALL COMUFMT
    488. *CALL COMUOUT
    489.  
    490. CONTROL EJECT;
    491.  
    492.  
    493. #
    494. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    495. #
    496.  
    497. IF FETP EQ NULLFILE
    498. THEN
    499. BEGIN
    500. RETURN;
    501. END
    502.  
    503.  
    504. #
    505. * THE CHARACTER STRING *FIELD* IS PLACED IN THE
    506. * APPROPRIATE LOCATION IN *LINEBUFF*. IF THE VALUE
    507. * OF *FLAG* IS *CONT$LN*, THE CONTENTS OF *LINEBUFF*
    508. * ARE SAVED. OTHERWISE A LINE IS PRINTED.
    509. #
    510.  
    511. RPSRCH(FETP); # FIND PRINT TABLE ENTRY #
    512. P<RPFET> = FETP;
    513.  
    514. IF FIELDPR[0] NQ EMPTY # IF *FIELD* CONTAINS STRING #
    515. THEN
    516. BEGIN
    517. C<COL,LEN>LIN$BUF[ORD] = FIELDPR[0]; # SET UP PRINT FIELD #
    518. END
    519.  
    520. IF FLAG EQ CONT$LN # IF LINE CONTINUED #
    521. THEN
    522. BEGIN
    523. RETURN; # SAVE CONTENTS OF *LINEBUFF* #
    524. END
    525.  
    526. #
    527. * WRITE PRINT LINE.
    528. #
    529.  
    530. WRITEH(RPFET[0],LINEBUFF[ORD],LINELEN);
    531. IF LIN$CNTRL[ORD] EQ PRDBL
    532. THEN # DOUBLE SPACE DONE #
    533. BEGIN
    534. PRTLINE[ORD] = PRTLINE[ORD] + 2; # INCREMENT LINE COUNT #
    535. END
    536.  
    537. ELSE # SINGLE SPACE ASSUMED #
    538. BEGIN
    539. PRTLINE[ORD] = PRTLINE[ORD] + 1; # INCREMENT BY ONE #
    540. END
    541.  
    542. LIN$BUF[ORD] = SPACES; # BLANK FILL *LINEBUFF* #
    543. RETURN;
    544.  
    545. END # RPLINEX #
    546.  
    547. TERM
    548. PROC RPOPEN((NAME),(FETP),HEADPROC);
    549. # TITLE RPOPEN - OPENS A REPORT FILE. #
    550.  
    551. BEGIN # RPOPEN #
    552.  
    553. #
    554. ** RPOPEN - OPENS A REPORT FILE.
    555. *
    556. * THIS PROCEDURE SETS UP THE PRINT TABLE
    557. * FOR A REPORT FILE AND CALLS *RPEJECT*
    558. * TO START THE FIRST PAGE.
    559. *
    560. * PROC RPOPEN((NAME),(FETP),HEADPROC).
    561. *
    562. * ENTRY (NAME) - NAME OF REPORT FILE.
    563. * (FETP) - REPORT FILE *FET* OPTION.
    564. * = *NULLFILE*, NO REPORT PROCESSING IS DONE.
    565. * (VALUE DEFINED IN *COMUOUT*)
    566. * = OTHER, ADDRESS OF REPORT FILE *FET*.
    567. * (HEADPROC) - HEADER PROCEDURE OPTION.
    568. * = *DEFLT$HDR*, DEFAULT PAGE HEADER USED.
    569. * (VALUE DEFINED IN *COMUOUT*)
    570. * = NAME OF USER-SUPPLIED PROCEDURE TO
    571. * BE EXECUTED AFTER EACH PAGE EJECT.
    572. *
    573. * EXIT REPORT FILE OPENED OR PRINT TABLE FULL.
    574. *
    575. * NOTES *RPOPEN* INITIALIZES A PRINT TABLE ENTRY FOR
    576. * THE REPORT FILE SPECIFIED. UP TO *PRTABENT* REPORT
    577. * FILES MAY BE OPEN SIMULTANEOUSLY. AFTER EACH
    578. * PAGE EJECT, A LINE IS PRINTED CONTAINING THE
    579. * THE CURRENT DATE, TIME, AND PAGE NUMBER.
    580. * FOLLOWING THIS THE USER SUPPLIED HEADER PROCEDURE
    581. * IS EXECUTED.
    582. * TO AVOID RECURSIVE CALLS, THE HEADER PROCEDURE MUST
    583. * NOT CALL *RPLINE* OR *RPSPACE*. INSTEAD *RPLINEX*
    584. * SHOULD BE USED. TO PRINT A BLANK LINE, CALL:
    585. * RPLINEX(FETP,0,0,0,0).
    586. #
    587.  
    588. ITEM NAME C(7); # NAME OF THE REPORT FILE #
    589. ITEM FETP U; # ADDRESS OF REPORT FILE *FET* #
    590. FPRC HEADPROC; # USER-SUPPLIED HEADER PROCEDURE #
    591.  
    592. #
    593. **** PROC RPOPEN - XREF LIST BEGIN.
    594. #
    595.  
    596. XREF
    597. BEGIN
    598. PROC CLOCK; # GETS CURRENT TIME #
    599. PROC DATE; # GETS CURRENT DATE #
    600. PROC RPEJECT; # STARTS NEW REPORT PAGE #
    601. PROC RPLINEX; # PRINTS A LINE #
    602. PROC RPSRCH; # SEARCHES THE PRINT TABLE #
    603. PROC ZSETFET; # INITIALIZES A *FET* #
    604. END
    605.  
    606. #
    607. **** PROC RPOPEN - XREF LIST END.
    608. #
    609.  
    610. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    611. *CALL COMAMSS
    612. *CALL COMUFMT
    613. *CALL COMUOUT
    614.  
    615.  
    616.  
    617. ITEM DTEMP C(10); # TEMPORARY LOCATION FOR DATE #
    618. ITEM TTEMP C(10); # TEMPORARY LOCATION FOR TIME #
    619. ITEM PRBUFP U; # ADDRESS OF *CIO* BUFFER #
    620.  
    621. BASED
    622. ARRAY HEADWORD [0:0] S(1); # USED TO TEST *HEADPROC* #
    623. BEGIN
    624. ITEM HEADNAME U(00,00,60); # NAME OF HEADER PROCEDURE #
    625. END
    626.  
    627. CONTROL EJECT;
    628.  
    629. #
    630. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    631. #
    632.  
    633. IF FETP EQ NULLFILE
    634. THEN
    635. BEGIN
    636. RETURN;
    637. END
    638.  
    639.  
    640. #
    641. * SEARCH FOR AN EMPTY ENTRY IN THE PRINT TABLE.
    642. #
    643.  
    644. RPSRCH(EMPTY); # SEARCH TABLE FOR EMPTY ENTRY #
    645.  
    646. DATE(DTEMP); # GET CURRENT DATE #
    647. CLOCK(TTEMP); # GET CURRENT TIME #
    648.  
    649. #
    650. * INITIALIZE PRINT TABLE FIELDS.
    651. #
    652.  
    653. PRBUFP = LOC(PRBUF[ORD]); # ADDRESS OF *CIO* BUFFER #
    654. PRTLFN[ORD] = NAME;
    655. PRTLINE[ORD] = MAXLINE;
    656. PRTHEADT[ORD] = " ";
    657. PRTFETP[ORD] = FETP;
    658. PRTPAGE[ORD] = 0;
    659. PRTLINELIM[ORD] = PRDEFLIM;
    660. PRTDATE[ORD] = DTEMP;
    661. PRTTIME[ORD] = TTEMP;
    662.  
    663. #
    664. * SAVE ADDRESS OF THE HEADER PROCEDURE.
    665. #
    666.  
    667. P<HEADWORD> = LOC(HEADPROC);
    668. IF HEADNAME[0] EQ DEFLT$HDR
    669. THEN # DEFAULT HEADER CHOSEN #
    670. BEGIN
    671. PRTHEADP[ORD] = LOC(RPLINEX); # GET ADDRESS OF *RPLINEX* #
    672. END
    673.  
    674. ELSE # HEADER PROVIDED #
    675. BEGIN
    676. PRTHEADP[ORD] = LOC(HEADPROC); # GET HEADER ADDRESS #
    677. END
    678.  
    679. #
    680. * INITIALIZE *FET* AND START FIRST PAGE.
    681. #
    682.  
    683. ZSETFET(FETP,NAME,PRBUFP,PRBUFL,SFETL);
    684.  
    685. LIN$BUF[ORD] = SPACES; # BLANK FILL *LINEBUFF* #
    686. RETURN;
    687.  
    688. END # RPOPEN #
    689.  
    690. TERM
    691. PROC RPSPACE((FETP),(SPTYP),(NUM));
    692. # TITLE RPSPACE - DOES REPORT SPACING. #
    693.  
    694. BEGIN # RPSPACE #
    695.  
    696. #
    697. ** RPSPACE - DOES REPORT SPACING.
    698. *
    699. * THIS PROCEDURE DOES VARIOUS TYPES OF REPORT
    700. * PROCESSING, DEPENDING ON THE VALUE OF *SPTYP*
    701. * SPECIFIED.
    702. *
    703. * PROC RPSPACE((FETP),(SPTYP),(NUM)).
    704. *
    705. * ENTRY (FETP) - ADDRESS OF REPORT FILE *FET*.
    706. * (SPTYP) - STATUS ITEM INDICATING PROCESSING.
    707. * (VALUES DEFINED IN *COMUOUT*)
    708. * = *LIMIT*, CHANGE PAGE LINE LIMIT TO *NUM*.
    709. * = *LINE*, ADVANCE TO LINE *NUM*.
    710. * = *SPACE*, PRINT *NUM* BLANK LINES.
    711. * (NUM) - NUMBER USED IN ACCORDANCE WITH THE
    712. * VALUE OF *SPTYP*.
    713. *
    714. * EXIT REPORT SPACING IS COMPLETE.
    715. *
    716. * ERRORS LINE LIMIT EXCEEDS MAXIMUM.
    717. *
    718. * MESSAGES * MAXIMUM LINE COUNT TAKEN AS LIMIT.*.
    719. #
    720.  
    721. ITEM FETP U; # ADDRESS OF *FET* #
    722. ITEM NUM I; # NUMBER OF SPACES, LINE NUMBER,
    723.   OR NEW LINE LIMIT #
    724.  
    725. #
    726. **** PROC RPSPACE - XREF LIST BEGIN.
    727. #
    728.  
    729. XREF
    730. BEGIN
    731. PROC MESSAGE; # DISPLAYS DAYFILE MESSAGE #
    732. PROC RPSRCH; # SEARCHES THE PRINT TABLE #
    733. PROC RPLINEX; # PRINTS A LINE ON REPORT FILE #
    734. PROC RPEJECT; # STARTS NEW REPORT PAGE #
    735. END
    736.  
    737. #
    738. **** PROC RPSPACE - XREF LIST END.
    739. #
    740.  
    741. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    742. *CALL COMAMSS
    743. *CALL COMUFMT
    744. *CALL COMUOUT
    745. ITEM I I; # INDUCTION VARIABLE #
    746. ITEM LINESLEFT U; # LINES LEFT ON PAGE #
    747. ITEM SPTYP S:SP; # TYPE OF SPACING SPECIFIED #
    748.  
    749. SWITCH LABTYP:SP # SWITCH CONTROLLING PROCESSING #
    750. LIMITYP:LIMIT, # CHANGE PAGE LINE LIMIT #
    751. LINETYP:LINE, # ADVANCE TO ABSOLUTE LINE #
    752. SPACETYP:SPACE; # PRINT BLANK LINES #
    753.  
    754. CONTROL EJECT;
    755.  
    756.  
    757.  
    758. #
    759. * NO PROCESSING IS DONE IF A NULL REPORT FILE IS INDICATED.
    760. #
    761.  
    762. IF FETP EQ NULLFILE
    763. THEN
    764. BEGIN
    765. RETURN;
    766. END
    767.  
    768.  
    769. #
    770. * FIND PRINT TABLE ENTRY AND PROCESS REQUEST.
    771. #
    772.  
    773. RPSRCH(FETP);
    774. GOTO LABTYP[SPTYP]; # DO APPROPRIATE PROCESSING #
    775.  
    776. LIMITYP: # CHANGE LINE LIMIT TO *NUM* #
    777. IF NUM LS MAXLC
    778. THEN # LIMIT REQUESTED IS PERMISSABLE #
    779. BEGIN
    780. PRTLINELIM[ORD] = NUM;
    781. END
    782.  
    783. ELSE # EXCESSIVE LIMIT REQUESTED #
    784. BEGIN
    785. PRTLINELIM[ORD] = MAXLC; # MAXIMUM LINE LIMIT USED #
    786. MSGITEM[0] = " MAXIMUM LINE COUNT TAKEN AS LIMIT." ;
    787. MESSAGE(MSGITEM[0],UDFL1);
    788. END
    789.  
    790. RETURN;
    791.  
    792. LINETYP: # SKIP TO LINE NUMBER #
    793. IF NUM LQ PRTLINE[ORD]
    794. THEN # LINE IS ON NEXT PAGE #
    795. BEGIN
    796. RPEJECT(FETP); # EJECT TO NEW PAGE #
    797. END
    798.  
    799. NUM = NUM - PRTLINE[ORD];
    800. SLOWFOR I = 1 STEP 1 UNTIL NUM
    801. DO
    802. BEGIN
    803. RPLINEX(FETP,BLANK); # PRINT BLANK LINE #
    804. END
    805.  
    806. RETURN;
    807.  
    808. SPACETYP: # SKIP SPECIFIED NUMBER OF LINES #
    809. IF PRTLINE[ORD] GR PRTLINELIM[ORD]
    810. THEN
    811. BEGIN
    812. RPEJECT(FETP); # EJECT TO NEW PAGE #
    813. END
    814.  
    815. LINESLEFT = (PRTLINELIM[ORD] - PRTLINE[ORD]) + 1;
    816. IF NUM GQ LINESLEFT
    817. THEN # PAGE EJECT NECESSARY #
    818. BEGIN
    819. NUM = NUM - LINESLEFT;
    820. RPEJECT(FETP);
    821. END
    822.  
    823. SLOWFOR I = 1 STEP 1 UNTIL NUM
    824. DO # PRINT *NUM* BLANK LINES #
    825. BEGIN
    826. RPLINEX(FETP,BLANK); # PRINT *NUM* BLANK LINES #
    827. END
    828.  
    829.  
    830. RETURN;
    831. END # RPSPACE #
    832.  
    833. TERM
    834. PROC RPSRCH((FETP));
    835.  
    836. # TITLE RPSRCH - SEARCHES THE PRINT TABLE. #
    837.  
    838. BEGIN # RPSRCH #
    839.  
    840. #
    841. ** RPSRCH - SEARCHES THE PRINT TABLE FOR AN ENTRY WITH A
    842. * MATCHING *FETP*.
    843. *
    844. * *RPSRCH* SEARCHES THE PRINT TABLE FOR EITHER AN EMPTY
    845. * ENTRY, OR THE ENTRY FOR A FILE ALREADY OPENED BY
    846. * *RPOPEN*.
    847. *
    848. * PROC RPSRCH((FETP)).
    849. *
    850. * ENTRY (FETP) - THE *FET* ADDRESS FOR REPORT FILE.
    851. * = *EMPTY*, SEARCH FOR EMPTY ENTRY.
    852. * (VALUE DEFINED IN *COMUFMT*)
    853. * = OTHER, ADDRESS OF *FET*.
    854. *
    855. * EXIT (ORD) - ITEM IN COMMON CONTAINING THE ORDINAL
    856. * OF THE PRINT TABLE ENTRY FOUND.
    857. * IF THE PRINT TABLE IS FULL, OR A MATCHING
    858. * ENTRY IS NOT FOUND, PROCESSING IS ABORTED.
    859. *
    860. * MESSAGES * PRINT TABLE ENTRY NOT FOUND.*
    861. * * PRINT TABLE FULL.*
    862. #
    863.  
    864.  
    865. ITEM FETP U; # ADDRESS OF REPORT FILE *FET* #
    866.  
    867.  
    868. #
    869. **** PROC RPSRCH - XREF LIST BEGIN.
    870. #
    871.  
    872. XREF
    873. BEGIN
    874. PROC ABORT; # ABORTS PROCESSING #
    875. PROC MESSAGE; # DISPLAYS DAYFILE MESSAGE #
    876. END
    877.  
    878. #
    879. **** PROC RPSRCH - XREF LIST END.
    880. #
    881.  
    882. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
    883.  
    884. *CALL COMAMSS
    885. *CALL COMUFMT
    886. *CALL COMUOUT
    887.  
    888.  
    889. CONTROL EJECT;
    890.  
    891. #
    892. * FIND PRINT TABLE ENTRY WITH AN EMPTY OR MATCHING *FETP*.
    893. #
    894.  
    895. ORD = 1;
    896. REPEAT WHILE PRTFETP[ORD] NQ FETP AND ORD LQ PRTABENT
    897. DO
    898. BEGIN
    899. ORD = ORD + 1;
    900. END
    901.  
    902. IF ORD GR PRTABENT # MATCHING ENTRY NOT FOUND #
    903. THEN
    904. BEGIN
    905. IF FETP EQ EMPTY # CALLED BY *RPOPEN* #
    906. THEN
    907. BEGIN
    908. MSGITEM[0] = " PRINT TABLE FULL." ;
    909. END
    910.  
    911. ELSE
    912. BEGIN
    913. MSGITEM[0] = " PRINT TABLE ENTRY NOT FOUND." ;
    914. END
    915.  
    916. MESSAGE(MSGITEM[0],UDFL1);
    917. ABORT; # ISSUE MESSAGE AND ABORT #
    918. END
    919.  
    920. RETURN;
    921. END # RPSRCH #
    922.  
    923. TERM
1)
FETP),(LINES
2) , 3) , 8)
FETP
4)
FETP),(MESG),(COL),(LEN
5) , 6)
FETP),FIELD,(COL),(LEN),(FLAG
7)
NAME),(FETP),HEADPROC)
  • [00549] RPOPEN - OPENS A REPORT FILE.
  • [00554] RPOPEN - OPENS A REPORT FILE.
  • [00598] PROC CLOCK
  • [00599] PROC DATE
  • [00600] PROC RPEJECT
  • [00601] PROC RPLINEX
  • [00602] PROC RPSRCH
  • [00603] PROC ZSETFET
  • [00691] PROC RPSPACE((FETP),(SPTYP),(NUM