User Tools

Site Tools


cdc:nos2.source:nam5871:ndas

NDAS

Table Of Contents

  • [00002] PROC NDAS
  • [00019] PROC ABORT
  • [00020] PROC MESSAGE
  • [00021] PROC READSR
  • [00022] PROC RECALL
  • [00023] PROC RETERN
  • [00024] PROC REWIND
  • [00025] PROC WRITEF
  • [00026] PROC WRITEH
  • [00027] PROC WRITER
  • [00028] PROC WRITESR
  • [00029] PROC OPENSIO
  • [00030] PROC CLOSSIO
  • [00031] PROC FINDRI
  • [00032] PROC READRI
  • [00033] PROC WRITERI
  • [00034] PROC READH
  • [00035] PROC READ
  • [00036] PROC BKSP
  • [00037] PROC MOVE
  • [00038] FUNC XCHD C(10)
  • [00039] FUNC XCDD C(10)
  • [00040] FUNC XCOD C(10)
  • [00729] PROC CRACK
  • [01098] PROC BADPARM(NUMBER,(VALUE),COUNT)
  • [01160] PROC FINDZERO1) [03647] PROC GETRAN 2) [03738] PROC PRINTH(OUTBUF,OUTLEN) [03792] PROC HEADING [03851] PROC DISHEX(DISIN,HEXOUT,CHARLEN,ERRORI) [03922] PROC HEXDIS3) [03986] PROC PTRMISS4) [04039] PROC WRITERR(FNAME,REC,(CODE)) [04087] PROC PRDFILE </WRAP> === Source Code ===
    NDAS.txt
    1. *DECK NDAS
    2. PROC NDAS; # NDA - NETWORK DUMP ANALYZER #
    3. *IF DEF,IMS
    4. #
    5. **
    6. *E
    7. * NETWORK PRODUCTS DOCUMENTATION
    8. *
    9. * NETWORK UTILITY INTERNAL MAINTAINENCE SPECIFICATION
    10. *
    11. * NETWORK DUMP ANALYZER (NDA) 83/01/27
    12. *
    13.  #
    14. *ENDIF
    15. BEGIN
    16.  
    17. XREF
    18. BEGIN
    19. PROC ABORT; #ABORT CONTROL POINT #
    20. PROC MESSAGE; #MESSAGE TO DAYFILE #
    21. PROC READSR; #READ SEQUENTIAL FILE #
    22. PROC RECALL; #PLACE ITEM IN RECALL STATUS #
    23. PROC RETERN; #RETURN DUMP INDEX AND DUMP FILES #
    24. PROC REWIND; #REWIND FILE #
    25. PROC WRITEF; #WRITE END OF FILE #
    26. PROC WRITEH; #WRITE LINE TO OUTPUT #
    27. PROC WRITER; #WRITE END OF RECORD ON FILE #
    28. PROC WRITESR; #WRITE SEQ FILE #
    29. PROC OPENSIO; # OPEN SUPIO RANDOM FILE #
    30. PROC CLOSSIO; # CLOSE SUPIO RANDOM FILE #
    31. PROC FINDRI; # SEARCH RECORD IDENT #
    32. PROC READRI; # READ A RECORD BY RECORD IDENT #
    33. PROC WRITERI; # WRITE A RECORD BY RECORD IDENT #
    34. PROC READH; # READ A LINE FROM INPUT #
    35. PROC READ; # READ A RECORD #
    36. PROC BKSP; # BACKSPACE ONE RECORD #
    37. PROC MOVE; # MOVE A BLOCK OF MEMORY #
    38. FUNC XCHD C(10); # CONVERT OCTAL TO HEXADECIMAL #
    39. FUNC XCDD C(10); # CONVERT OCTAL TO DECIMAL #
    40. FUNC XCOD C(10); #CONVERT OCTAL TO DISPLAY#
    41. ITEM FDMP; #DUMP FILES #
    42. ITEM OUTNDAS; #OUTPUT FILE #
    43. ITEM INPFIL; # INPUT DIRECTIVE FILE #
    44. ITEM NEUFILE; # RANDOM WORKING FILE #
    45. ITEM XLINP; #LINES / PRINTER PAGE-- FROM SYSCOM#
    46. END
    47.  
    48. *CALL CRCOM
    49. #
    50.   DATA ITEMS USED IN NDA
    51. #
    52. *CALL NDANSDD
    53. CONTROL EJECT;
    54. STATUS ECODE #ERROR CODE INDEX FOR PARAMETERS #
    55. ILLPARAM,
    56. ILLVAL,
    57. NOVALUE,
    58. INVCHAR;
    59.  
    60. *CALL SIODEFS
    61.  
    62.  
    63. DEF LOCAL #3#; # SEND MESSAGE TO LOCAL DAYFILE #
    64. DEF NBWORD #60#; #NUMBER OF BITS IN ONE CM WORD #
    65. DEF CWRDSIZE #10#; #NUMBER OF CHARACTERS IN ONE CM WORD #
    66. DEF LNSIZE #16#; #NO OF 16 BIT WORDS IN OUTPUT LINE #
    67. DEF DNTABL #4#; #MAX NUM OF DUMPS SELECTED - 1 #
    68. DEF BIGPARM #3#; #MAX LENGTH OF ANY PARAMETER #
    69. DEF PNLEN #6#; #MAX NUM OF CHAR IN SOME VALUES #
    70. DEF DISZERO #O"33"#; #DISPLAY CODE FOR ZERO #
    71. DEF DISNINE #O"44"#; #DISPLAY CODE FOR NINE #
    72. DEF DISPLA #O"01"#; # DISPLAY CODE FOR A #
    73. DEF DISPLF #O"06"#; # DISPLAY CODE FOR F #
    74. DEF DISPLZ #O"32"#; # DISPLAY CODE FOR Z #
    75. DEF DISPLUS #O"45"#; #DISPLAY CODE FOR PLUS #
    76. DEF BLANK #" "#; #CHARACTER BLANK #
    77. DEF PARAREA #O"2"#; #LOC OF PARAM AREA #
    78. DEF NUMPAREA #O"64"#; #LOC OF NUMBER OF PARAMS PRESENT #
    79. DEF EQUAL #O"02"#; #EQUALS SIGN CODE #
    80. DEF CONT #O"00"#; #CONTINUATION MARK CODE #
    81. DEF COMMA #O"01"#; #COMMA CODE #
    82. DEF PARTERM #O"17"#; #PARAM TERMINATING CODE #
    83. DEF NR #O"16220000000000"#;
    84. DEF LO #O"14170000000000"#;
    85. DEF DN #O"04160000000000"#;
    86. DEF NPU #O"16202500000000"#;
    87. DEF B #O"02000000000000"#;
    88. DEF E #O"05000000000000"#;
    89. DEF AD #O"01040000000000"#;
    90. DEF OPTION # 0 #; # MESSAGE DISPLAY TO SYSTEM AND LOCAL #
    91. # DAYFILE AND A AND B DISPLAY #
    92. DEF OUTFILE #" OUTPUT"#; #NAME OF OUTPUT FILE #
    93. DEF DMPFILE #"DMPFILE"#; #DUMP FILE ERROR NAME #
    94. DEF DMPINDX #"NDA4IND"#; #DIRECTORY FILE NAME #
    95. DEF OUTPUT # OUTNDAS #;
    96. DEF INPUT # INPFIL #;
    97. DEF MAXTCB #50#; # MAXIMUM NUMBER OF TCBS PER LCB #
    98. DEF MAXPGREG # 10 #; # MAX LENGTH OF PAGE REG IN CM WORDS#
    99.  
    100. COMMON FDMPB;
    101. BEGIN
    102. ARRAY FDMPBF [0:O"3500"] S(1); # CONTAINS 64*28 + 1 #
    103. BEGIN
    104. ITEM FDMPBUF U(0,0,60);
    105. END
    106. END
    107. CONTROL EJECT;
    108.  
    109.  
    110. ITEM EBCDIC B; # *EBCDIC* CONVERSION FLAG #
    111.  
    112. ITEM ERRFLG B=FALSE; #ERROR ON CALL CARD FLAG#
    113. ITEM ERROR B=FALSE; #EXIT LOOP-PROCESS ANOTHER DUMP FILE#
    114. ITEM ILLVALF B=FALSE; # FLAGS ILLEGAL PARAMETER VALUE #
    115. ITEM MACROMEM B=TRUE; #LIST MACRO MEMORY FLAG #
    116. ITEM NONPU B=TRUE; #FLAG TO INDICATE NO DUMPS FOUND#
    117. ITEM NOPARAM B=FALSE; #ILLEGAL PARAMETER FLAG #
    118. ITEM NOTMAC B=FALSE; # NOT MACRO MEMORY RECORD FLAG #
    119. ITEM PBUFIN B=FALSE; # BUFIN IN ONEWORD NOT POINTED YET #
    120. ITEM PREG B; # PAGE REGISTER EXISTS FLAG #
    121. ITEM PRINTIT B; # INDICATES LINE IS NOT A DUPLICATE #
    122. ITEM REGISTERS B=TRUE; #LIST REGISTERS FLAG #
    123. ITEM PAGEREG B=TRUE; # LIST PAGE REGISTERS FLAG #
    124. ITEM R7 B; # TRUE IF ITS AN R7 DUMP FILE #
    125. ITEM STATSRCH B; #STATUS RECORD FLAG #
    126. ITEM WRCH B; #FLAG TO INDICATE DUMP OF REMOTE NPU#
    127. ITEM INPDIR B=TRUE; # FLAG TO INDICATE INPUT DIRECTIVE #
    128. ITEM EXPAND B=FALSE; # EXPAND LISTING FLAG #
    129. ITEM IEOF B=FALSE; # END OF FILE FLAG #
    130. ITEM SUPERR B; # SUPIO ERROR INDICATOR #
    131. ITEM HEADRB B; # HEAD RECORD EXIST FLAG #
    132. ITEM FILE1B B; # FILE 1 RECORD EXIST FLAG #
    133. ITEM NDFFIRSTRD B = TRUE; # NDF FIRST READ INDICATOR #
    134. ITEM IFIRSTRD B = TRUE; # INPUT FILE FIRST READ INDICATOR #
    135. ITEM STATRB B; # STATUS RECORD EXIST FLAG #
    136. ITEM CKSUMB B; # CHECKSUM RECORD EXIST FLAG #
    137. ITEM MACROB B; # MACRO MEMORY EXIST FLAG #
    138. ITEM TEMPB B; # TEMP FLAG #
    139. ITEM ERRIND B; # ERROR FLAG #
    140.  
    141.  
    142. ITEM IOSTAT U; #STATUS RETURNED ON SUPIO FUNCTIONS #
    143. ITEM BEGADD U=0; #BEGINNING ADDRESS FOR FORM2 #
    144. ITEM ENDADD U=0; #ENDING ADDRESS FOR FORM2 #
    145. ITEM CHNUM U=0; #VARIABLE SET FOR INPUT INTO XCOD#
    146. ITEM EQNUM U=0; #VARIABLE SET FOR INPUT INTO XCOD#
    147. ITEM CKSM U; #INPUT ITEM FOR NUMBER CONVERSION #
    148. ITEM INWD U=0; #DATA HOLDING VAR FOR PROC CALLS #
    149. ITEM ASCN U; #CHAR INDEX FOR ASCII OUTPUT #
    150. ITEM DNI U; #DUMP INDEX #
    151. ITEM SRCHIND U; #DUMMY VARIABLE FOR SEARCH #
    152. ITEM RECKEY U; # RECORD KEY FOR RANDOM FILE #
    153. ITEM RULES U; # RULE FROM INPUT DIRECTIVES #
    154. ITEM STATREC U; # STATUS RECORD FROM DUMP FILE #
    155. ITEM CKSUMREC U; # CHECKSUM RECORD FROM DUMP FILE #
    156. ITEM TEMPU1 U; # TEMP AREA FOR U TYPE ITEM #
    157. ITEM TEMPU2 U; # TEMP AREA FOR U TYPE ITEM #
    158. ITEM CCIND I; #CONVERSION BOUNDARY INDEX #
    159. ITEM CIND I; #INDEX FOR SEARCH#
    160. ITEM DNTABIX I; #INDEX #
    161. ITEM FINDI I ; #INDEX #
    162. ITEM FINDNEXT I; #INDEX #
    163. ITEM I I; #INDEX #
    164. ITEM ICD I; # INDEX #
    165. ITEM IND I; # INDEX #
    166. ITEM IX1 I; #INDEX #
    167. ITEM J I; #INDEX #
    168. ITEM K I; #INDEX #
    169. ITEM STIND I; #INDEX #
    170. ITEM CCOUNT I; #CHAR COUNT FOR PARAMETERS #
    171. ITEM CCOUNT2 I; #HOLDS CHAR COUNT FOR PARAMETERS#
    172. ITEM RC I; #REASON CODE RETURNED ON ATTACH CALL #
    173. ITEM LENGTH I; #LENGTH OF READ/WRITE BUFFER #
    174. ITEM RCCT I; # WAIT TIME BETWEEN ATTACH CALLS #
    175.  
    176. ITEM I01 I; # INDEX #
    177. ITEM I02 I; # INDEX #
    178. ITEM I03 I; # INDEX #
    179. ITEM I04 I; # INDEX #
    180. ITEM I05 I; # INDEX #
    181. ITEM LOOP01 I; # LOOP COUNTER #
    182. ITEM LOOP02 I; # LOOP COUNTER #
    183. ITEM PAGENO I=0; # CURRENT PAGE NUMBER IN OUTPUT LISTING #
    184. ITEM LINENO I; # CURRENT LINE NUMBER IN OUTPUT LISTING #
    185. ITEM DUMMYI I; # DUMMY INDEX #
    186. ITEM INSPLN I=16; # INSTANCES PER LINE IN RULE 3 #
    187. ITEM CBWPLN I=26; # WORDS PER LINE #
    188. ITEM WODPLN I=16; # WORDS PER LINE IN OUTPUT #
    189. ITEM LCBPLN I=8; # NUMBER OF LCB PER LINE #
    190. ITEM TCBPLN I=15; # NUMBER OF TCB PER LINE #
    191. ITEM PTBPLN I=8; # PORT TABLES PER LINE #
    192. ITEM TEMPC1 C(10); # TEMP AREA FOR C TYPE ITEM #
    193. ITEM TEMPC2 C(10); # TEMP AREA FOR C TYPE ITEM #
    194.  
    195. ITEM TEMP C(10); #HOLDS OCTAL VALUE TO BE CONVERTED#
    196. ITEM XNPU C(7) = 0; #SPECIFIED NPU NAME #
    197. ITEM DFNAME C(8); # NPU DUMP FILE NAME #
    198. ITEM FILEREC C(1); #DUMP FILE RECORD TYPE CODE #
    199. ITEM BEGADDR C(6) = " "; #BEGIN ADDRESS IN HEX #
    200. ITEM ENDADDR C(6) = " "; #END ADDRESS IN HEX #
    201. ITEM GDATE C(7); # DATE PASSED BY NDA CALL #
    202.  
    203. ARRAY ASCIITAB [0:127] S(1); # ASCII CONVERSION TABLE #
    204. BEGIN
    205. ITEM ASCVAL U(0,54,6);
    206. ITEM ASCCHR C(0,54,1) = [
    207. 32(" "),
    208. " ",
    209. "!",
    210. """",
    211. "#",
    212. "$",
    213. "%",
    214. "&",
    215. "'",
    216. "(",
    217. ")",
    218. "*",
    219. "+",
    220. ",",
    221. "-",
    222. ".",
    223. "/",
    224. "0",
    225. "1",
    226. "2",
    227. "3",
    228. "4",
    229. "5",
    230. "6",
    231. "7",
    232. "8",
    233. "9",
    234. ":",
    235. ";",
    236. "<",
    237. "=",
    238. ">",
    239. "?",
    240. "@",
    241. "A",
    242. "B",
    243. "C",
    244. "D",
    245. "E",
    246. "F",
    247. "G",
    248. "H",
    249. "I",
    250. "J",
    251. "K",
    252. "L",
    253. "M",
    254. "N",
    255. "O",
    256. "P",
    257. "Q",
    258. "R",
    259. "S",
    260. "T",
    261. "U",
    262. "V",
    263. "W",
    264. "X",
    265. "Y",
    266. "Z",
    267. "[",
    268. "\",
    269. "]",
    270. "^",
    271. "_",
    272. " ",
    273. "A",
    274. "B",
    275. "C",
    276. "D",
    277. "E",
    278. "F",
    279. "G",
    280. "H",
    281. "I",
    282. "J",
    283. "K",
    284. "L",
    285. "M",
    286. "N",
    287. "O",
    288. "P",
    289. "Q",
    290. "R",
    291. "S",
    292. "T",
    293. "U",
    294. "V",
    295. "W",
    296. "X",
    297. "Y",
    298. "Z",
    299. 5(" ")
    300. ];
    301. END
    302.  
    303. ARRAY EBCDICTAB [0:255] S(1); # *EBCDIC* CONVERSION TABLE #
    304. BEGIN
    305. ITEM EBCDVAL U(00,54,06) =
    306. [
    307. 72(O"55"), # 00 - 47 #
    308. O"55",O"55",O"61",O"57",O"72",O"51",O"45",O"66", # 48 - 4F #
    309. O"67",O"55",O"55",O"55",O"55",O"55",O"55",O"55", # 50 - 57 #
    310. O"55",O"55",O"62",O"53",O"47",O"52",O"77",O"76", # 58 - 5F #
    311. O"46",O"50",O"55",O"55",O"55",O"55",O"55",O"55", # 60 - 67 #
    312. O"55",O"55",O"75",O"56",O"63",O"65",O"73",O"71", # 68 - 6F #
    313. 8(O"55"), # 70 - 77 #
    314. O"55",O"74",O"00",O"60",O"74",O"70",O"54",O"64", # 78 - 7F #
    315. O"55",O"01",O"02",O"03",O"04",O"05",O"06",O"07", # 80 - 87 #
    316. O"10",O"11",O"55",O"55",O"55",O"55",O"55",O"55", # 88 - 8F #
    317. O"55",O"12",O"13",O"14",O"15",O"16",O"17",O"20", # 90 - 97 #
    318. O"21",O"22",O"55",O"55",O"55",O"55",O"55",O"55", # 98 - 9F #
    319. O"55",O"76",O"23",O"24",O"25",O"26",O"27",O"30", # A0 - A7 #
    320. O"31",O"32",O"55",O"55",O"55",O"55",O"55",O"55", # A8 - AF #
    321. 16(O"55"), # B0 - BF #
    322. O"61",O"01",O"02",O"03",O"04",O"05",O"06",O"07", # C0 - C7 #
    323. O"10",O"11",O"55",O"55",O"55",O"55",O"55",O"55", # C8 - CF #
    324. O"62",O"12",O"13",O"14",O"15",O"16",O"17",O"20", # D0 - D7 #
    325. O"21",O"22",O"55",O"55",O"55",O"55",O"55",O"55", # D8 - DF #
    326. O"75",O"55",O"23",O"24",O"25",O"26",O"27",O"30", # E0 - E7 #
    327. O"31",O"32",O"55",O"55",O"55",O"55",O"55",O"55", # E8 - EF #
    328. O"33",O"34",O"35",O"36",O"37",O"40",O"41",O"42", # F0 - F7 #
    329. O"43",O"44",O"55",O"55",O"55",O"55",O"55",O"55", # F8 - FF #
    330. ];
    331. END
    332.  
    333. ITEM HEAD C(140)="0ADDRESS 0 1 2 3 4 5
    334. 6 7 8 9 A B C D E F ";
    335. #ADDRESS HEADER FOR OUTPUT OF DUMP #
    336. ITEM TTL1 C(70)="1 BASE
    337. FILE 1 REGISTERS "; # REPORT HEADING #
    338. ITEM TTL4 C(60)="1
    339. MACRO MEMORY "; #REPORT HEADING #
    340. ITEM TTL2 C(60)="1 P
    341. AGE REGISTERS "; # REPORT HEADER #
    342. CONTROL EJECT;
    343.  
    344. *CALL SIOBASE
    345.  
    346. BASED ARRAY CPARAMS;
    347. BEGIN #IMAGE OF CALL PARAMETER AREA #
    348. ITEM CPARCODE U(0,56,4);
    349. ITEM CPARREC U(0,0,42);
    350. ITEM CPARVAL C(0,0,7);
    351. END
    352.  
    353. BASED ARRAY PRA64;
    354. BEGIN #PARAMETER COUNT AREA #
    355. ITEM NOCPWDS U(0,42,18);
    356. END
    357.  
    358. BASED ARRAY CCARD [0:0] S(1);
    359. BEGIN #CONTROL CARD IMAGE #
    360. ITEM CCRD C(0,0,80);
    361. END
    362.  
    363.  
    364. ARRAY TTL [0:0] S(14);
    365. BEGIN # HEADING INFORMATION #
    366. ITEM TTL0 C(0,0,100);
    367. ITEM TTL01 C(10,0,17)=[" "];
    368. ITEM TTL02 C(11,42,4)=["PAGE"];
    369. ITEM PAGNUM C(12,6,8); # PAGE NUMBER #
    370. ITEM TTL03 C(12,54,9)=[" "];
    371. ITEM TTL04 U(13,42,18)=[0];
    372. END
    373.  
    374. ARRAY INPBUF [0:0] S(8);
    375. BEGIN # INPUT BUFFER FOR INPUT DIRECTIVE FILE #
    376. ITEM INPBUFC C(0,0,80); # INPUT DIRECTIVE STRING #
    377. ITEM RULEI C(0,0,1); # RULE SPECIFIED IN DIRECTIVE #
    378. END
    379.  
    380. ARRAY HEADREC [0:2] S(1);
    381. BEGIN # SAVE AREA FOR HEAD RECORD IN DUMP FILE #
    382. ITEM HEADREC0 U(0,0,60);
    383. END
    384.  
    385. ARRAY FILE1REC [0:70] S(1);
    386. BEGIN # SAVE AREA FOR FILE 1 RECORD IN DUMP FILE#
    387. ITEM FILE1REC1 U(0,0,60);
    388. END
    389.  
    390. ARRAY PAGREGREC [0:10] S(1);
    391. BEGIN # SAVE AREA FOR PAGE REGISTER IN DUMP FILE#
    392. ITEM PAGREGREC1 U(0,0,60);
    393. END
    394.  
    395. ARRAY PARAMI [0:15] S(1);
    396. BEGIN # INPUT PARAMETERS IN DIRECTIVE #
    397. ITEM PARAMT U(0,0,60);
    398. END
    399.  
    400. ARRAY OUTBUF [0:0] S(14);
    401. BEGIN # WORKING AREA FOR FILE OUTPUT #
    402. ITEM CCNTRL C(0,0,1) = [" "]; # CARRIAGE CONTROL #
    403. ITEM STRING C(0,0,137)=[" "];
    404. ITEM ZEROED U(13,42,18) = [0]; # ZERO FILLED #
    405. END
    406.  
    407. BASED ARRAY DMPBUF [0:BUFLEN] S(1);
    408. BEGIN #DUMP FILE RECORDS #
    409. ITEM DMPWD U(0,0,60);
    410. END
    411. ARRAY DMPBUF1 [0:BUFLEN] S(1);
    412. BEGIN # CIO BUFFER AREA FOR DUMP FILE RECORD #
    413. ITEM DMPWD1 U(0,0,60);
    414. END
    415.  
    416. ARRAY DMPBUF2 [0:BUFLEN] S(1);
    417. BEGIN # CIO BUFFER AREA FOR DUMP FILE #
    418. ITEM DMPWD2 U(0,0,60);
    419. END
    420.  
    421.  
    422. ARRAY BUFIND [0:15] S(1);
    423. BEGIN #INDEX INTO 16 WORD BUFFER #
    424. ITEM BUFWD U(0,0,30)=[0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,4];
    425. ITEM BUFBIT U(0,30,30)=[0,16,32,48,4,20,36,52,8,24,40,56,
    426. 12,28,44,0];
    427. END
    428.  
    429. ARRAY PARMSG [0:0] S(4); #ERROR MESSAGE OUTPUT FORMAT#
    430. BEGIN
    431. ITEM ERRMESS C(0,0,30); #ERROR MESSAGE TEXT#
    432. ITEM ERRPARAM C(3,0,7); #PARAMETER IN ERROR#
    433. ITEM ENDBLK U(3,42,18)=[0]; #ZERO FILL REST OF WORD#
    434. END
    435.  
    436. ARRAY BLLINE [0:0] S(3);
    437. BEGIN # PRINT 3 BLANK LINES #
    438. ITEM BLFILL C(0,0,30) = [O"00"];
    439. END
    440.  
    441.  
    442. ARRAY PRDN [0:0] S(10);
    443. BEGIN #PRINT DUMP NUMBER AND CALL CARD IMAGE #
    444. ITEM PRDN1 C(0,0,17)=["1NPU DUMP FILE = "];
    445. ITEM PRDN2 C(1,42,8);
    446. ITEM PRDN3 C(2,0,60) = [" "]; # CARD IMAGE #
    447. ITEM NDAVER C(8,0,13) = [" NDA VER 2.0-"]; #NDA VERSION #
    448. ITEM NDALEV C(9,18,5); # AND LEVEL #
    449. ITEM NDAZR C(9,48,2) = [" "];
    450. END
    451.  
    452. ARRAY PRDATE [0:0] S(2);
    453. BEGIN #DATE DUMP WAS GENERATED #
    454. ITEM PRDATE1 C(0,0,12)=["0DATE "];
    455. ITEM PRDATE2 C(1,12,8);
    456. END
    457.  
    458. ARRAY PRNPU [0:0] S(2);
    459. BEGIN #NPU NAME OF DUMP #
    460. ITEM PRNPU1 C(0,0,12)=["0NPU NAME "];
    461. ITEM PRNPU2 C(1,12,7);
    462. ITEM PRNPU3 C(1,54,1)=[" "];
    463. END
    464.  
    465. ARRAY PRTIME [0:0] S(2);
    466. BEGIN #TIME DUMP WAS GENERATED #
    467. ITEM PRTIME1 C(0,0,12)=["0TIME "];
    468. ITEM PRTIME2 C(1,12,7);
    469. ITEM PRTIME3 C(1,54,1);
    470. END
    471.  
    472. ARRAY PRNNODE [0:0] S(2);
    473. BEGIN
    474. ITEM PRNNODE1 C(0,0,15) = ["0NPU NODE "];
    475. ITEM PRNNODE2 C(1,12,2);
    476. ITEM PRNNODEZ U(1,30,30) = [ 0 ];
    477. END
    478.  
    479. ARRAY PRHALT [0:0] S(2);
    480. BEGIN
    481. ITEM PRHALT1 C(0,0,16) = ["0HALT CODE "];
    482. ITEM PRHALT2 C(1,12,4);
    483. ITEM PRHALTZ U(1,36,24) = [ 0 ];
    484. END
    485.  
    486. ARRAY PRPREG [0:0] S(2);
    487. BEGIN
    488. ITEM PRPREG1 C(0,0,16) = ["0P REGISTER "];
    489. ITEM PRPREG2 C(1,12,4);
    490. ITEM PRPREGZ U(1,36,24) = [ 0 ];
    491. END
    492.  
    493. ARRAY SEQLINE [0:0] S(4);
    494. BEGIN
    495. ITEM SEQQ C(0,0,40)=["-*****RECORD SEQUENCING ERROR*****
    496. "];
    497. END
    498.  
    499. ARRAY PRCOMP [0:0] S(5);
    500. BEGIN
    501. ITEM PRCOMP1 C(0,0,31) =
    502. ["PROCESSING COMPLETE ON XXXXXXX."];
    503. ITEM PRCOMP2 C(2,18,7);
    504. ITEM PRCOMPZ U(3,6,54) = [ 0 ];
    505. END
    506.  
    507. ARRAY ERRARRY [0:3] S(3); # ARRAY OF ERROR MESSAGES #
    508. ITEM ERRTEXT C(0,0,30) =
    509. [" ILLEGAL NDA CALL PARAMETER ",
    510. " PARAMETER VALUE ILLEGAL FOR ",
    511. " VALUE NEEDED FOR PARAMETER ",
    512. " INVALID CHARACTER AFTER ITEM "];
    513.  
    514.  
    515. ARRAY WRERR [0:0] S(5);
    516. BEGIN # ERROR MESSAGE FOR SUPIO #
    517. ITEM WRMESS C(0,0,32)=[" I/O ERROR IN ON"];
    518. ITEM WRCODE C(1,18,4); # ERROR CODE #
    519. ITEM WRFILE C(2,6,7); # FILE NAME #
    520. ITEM WRREC C(3,12,8); # ACTION #
    521. ITEM WRZERO U(4,0,60)=[0];
    522. END
    523.  
    524. ARRAY OUTBUFI [0:0] S(9);
    525. BEGIN # A COPY OF DIRECTIVE WHEN ERROR #
    526. ITEM CCNTRLI C(0,0,1)=[" "]; # CARRIAGE CONTROL #
    527. ITEM INPBUFD C(0,6,80);
    528. ITEM ZEROI1 U(8,6,54)=[0];
    529. END
    530.  
    531. ARRAY HEADERR [0:0] S(5);
    532. BEGIN # HEADER RECORD MISSING IN DUMP FILE #
    533. ITEM HEADERR1 C(0,0,48)=["1*** ERROR --- HEAD RECORD NOT I
    534. N DUMP FILE. ***"];
    535. ITEM HEADERR2 U(4,48,12)=[0];
    536. END
    537.  
    538. ARRAY DIRMES1 [0:0] S(6);
    539. BEGIN # DIRECTIVE ERROR MESSAGE #
    540. ITEM DIRMES12 C(0,6,20)=["*** ERROR IN FIELD ("];
    541. ITEM ERRFIELD C(2,6,5); # ERROR FIELD #
    542. ITEM DIRMES13 C(2,36,25)=["), MUST BE 5 HEX. DIGITS."];
    543. ITEM ZEROI2 U(5,6,54)=[0];
    544. END
    545.  
    546. ARRAY DIRMES2 [0:0] S(6);
    547. BEGIN # DIRECTIVE ERROR MESSAGE #
    548. ITEM DIRMES21 C(0,0,1)=["0"];
    549. ITEM DIRMES22 C(0,6,20)=["*** ERROR IN COLUMN "];
    550. ITEM DIRMES23 C(2,6,4); # ERROR FIELD #
    551. ITEM DIRMES24 C(2,30,25)=[", MUST BE BLANK OR COMMA."];
    552. ITEM ZEROI3 U(5,0,60)=[0];
    553. END
    554.  
    555. ARRAY COL1ERR [0:0] S(5);
    556. BEGIN # RULE ERROR IN DIRECTIVE #
    557. ITEM COL1ER1 C(0,0,42)=[" *** ERROR IN INPUT DIRECTIVE COL
    558. UMN 1 ***"];
    559. ITEM COL1ER2 U(4,12,48)=[0];
    560. END
    561.  
    562. ARRAY CBSERR [0:0] S(6);
    563. BEGIN # CONTINUOUS STRUCTURES DIRECTIVE ERROR #
    564. ITEM CBSER1 C(0,0,51)=[" PARAMETER FIRST IS GREATER THAN L
    565. AST IN DIRECTIVE."];
    566. ITEM CBSER2 U(5,06,54)=[0];
    567. END
    568.  
    569. ARRAY CIOERR [0:0] S(7);
    570. BEGIN # CIRCULAR BUFFER DIRECTIVE ERROR #
    571. ITEM CIOER1 C(0,0,60)=[" PARAMETER OLDEST MUST BE BETWEEN
    572. FWA AND LWA OF CIO BUFFER."];
    573. ITEM CIOER2 I(6,00,60)=[0];
    574. END
    575.  
    576. ARRAY NOMEAN [0:0] S(4);
    577. BEGIN # NO MEANINGFUL DATA IN CIO BUFFER #
    578. ITEM NOMEA1 C(0,0,38)=[" *** NO MEANINGFUL DATA IN BUFFER
    579. ***"];
    580. ITEM NOMEA2 U(3,48,12)=[0];
    581. END
    582.  
    583. ARRAY CIOLIM [0:0] S(4);
    584. BEGIN # SIZE EXCEED CIO BUFFER LIMIT #
    585. ITEM CIOLI1 C(0,0,38)=[" *** SIZE EXCEED CIO BUFFER LIMIT.
    586. ***"];
    587. ITEM CIOLI2 U(3,48,12)=[0];
    588. END
    589.  
    590. ARRAY NOPATT [0:0] S(4);
    591. BEGIN # DESIRED PATTERN NOT FOUND #
    592. ITEM NOPAT1 C(0,0,35)=[" *** DESIRED PATTERN NOT FOUND ***
    593. "];
    594. ITEM NOPAT2 U(3,30,30)=[0];
    595. END
    596.  
    597. ARRAY LCBERR [0:0] S(7);
    598. BEGIN
    599. ITEM LCBER1 C(0,0,63)=[" PARAMETER FTCB/NTCB MUST BE LESS
    600. THAN LCBL/TCBL IN DIRECTIVE. "];
    601. ITEM LCBER2 U(6,18,42)=[0];
    602. END
    603.  
    604. ARRAY TCBERR [0:0] S(6);
    605. BEGIN # TCB CHAINS EXCEED MAXIMUM #
    606. ITEM TCBER1 C(0,0,50)=[" TCB CHAINS EXCEED MAXIMUM NUMBER
    607. OF TCBS PER LCB."];
    608. ITEM TCBER2 U(5,0,60)=[0];
    609. END
    610.  
    611. ARRAY PTBERR [0:0] S(6);
    612. BEGIN # PORT TABLE DIRECTIVE ERROR #
    613. ITEM PTBER1 C(0,0,50)=[" PARAMETER MUXP AND/OR MUXID IS GR
    614. EATER THAN PTTL."];
    615. ITEM PTBER2 U(5,0,60)=[0];
    616. END
    617.  
    618. *CALL NAMLEV
    619. CONTROL EJECT;
    620. *IF DEF,IMS
    621. #
    622. **
    623. * 1. PROC NAME: AUTHOR: DATE:
    624. * NDAS E. SULLIVAN 77/01/31
    625. * JACOB C. K. CHEN 80/02/01
    626. *
    627. * 2. FUNCTIONAL DESCRIPTION:
    628. * NDAS IS THE MAIN ENTRY POINT INTO THE SYMPL PORTION OF NDA.
    629. * THIS PROCEDURE CONTROLS THE TOP LEVEL OF NDA PROCESSING.
    630. *
    631. * 3. METHOD USED:
    632. * CALL THE ROUTINE (CRACK) TO CHECK THE NDA CALL PARAMETERS.
    633. * IF I PARAMETER IS SPECIFIED, THE INPUT DIRECTIVES ARE
    634. * COPIED ONTO THE OUTPUT FILE.
    635. * IF THERE ARE NO ERRORS, THEN DUMPS ARE PROCESSED. DNPROC IS
    636. * CALLED TO PROCESS THE DUMP INFORMATION.
    637. *
    638. * 4. ENTRY PARAMETERS:
    639. * NONE
    640. *
    641. * 5. EXIT PARAMETERS:
    642. * NONE
    643. *
    644. * 6. COMDECKS CALLED:
    645. * NONE
    646. *
    647. * 7. ROUTINES CALLED:
    648. * CRACK CONTROL CARD CRACKING PROCEDURE - SYMPL
    649. * DNPROC PROCESS DUMP FILE - SYMPL
    650. * READDIR COPY INPUT DIRECTIVES TO OUTPUT
    651. * RETERN RETURN FILE
    652. *
    653. * 8. DAYFILE MESSAGES:
    654. * NONE
    655. *
    656.  #
    657. *ENDIF
    658. BEGIN
    659.  
    660. XREF
    661. ITEM ZZZZINP;
    662.  
    663. ITEM EOF B = FALSE; # END OF INPUT DUMP FILE INDICATOR #
    664.  
    665. #**********************************************************************#
    666. # #
    667. # CODE BEGINS HERE #
    668. # #
    669. #**********************************************************************#
    670.  
    671. CRACK;
    672. IF INPDIR
    673. THEN # COPY INPUT DIRECTIVES TO OUTPUT FILE #
    674. READDIR;
    675. FOR I = 1 WHILE NOT EOF DO
    676. BEGIN
    677. DNPROC(EOF);
    678. END
    679. RETERN(ZZZZINP);
    680. END
    681. CONTROL EJECT;
    682. *IF DEF,IMS
    683. #
    684. **
    685. *E
    686. * 1. PROC NAME: AUTHOR: DATE:
    687. * CRACK E. SULLIVAN 77/01/31
    688. * W. L. CHENG 80/02/01
    689. *
    690. * 2. FUNCTIONAL DESCRIPTION:
    691. * PROCESS NDA CALL PARAMETERS.
    692. *
    693. * 3. METHOD USED:
    694. * THE CRACKED PARAMETER AREA AT RA+2 IS USED TO DETERMINE
    695. * THE VALIDITY AND VALUE OF PARAMETERS PRESENT. THE ENTIRE
    696. * PARAMETER LIST IS EXAMINED EACH TIME CRACK IS CALLED.
    697. * VALID PARAMETERS CAUSE FLAGS TO BE SET AND/OR VALUES TO
    698. * BE PLACED IN CERTAIN VARIABLES. ANY ERROR CAUSES NDA TO
    699. * ABORT.
    700. *
    701. * 4. ENTRY PARAMETERS:
    702. * NONE
    703. *
    704. * 5. EXIT PARAMETERS:
    705. * INPUTFN CONTAINS THE NAME OF DIRECTIVE FILE
    706. * BEGADD CONTAINS BEGINNING DUMP ADDRESS OF MACRO MEMORY
    707. * ENDADD CONTAINS ENDING DUMP ADDRESS OF MACRO MEMORY
    708. * REGISTERS FALSE IF FILE REGISTER DUMP NOT WANTED
    709. * MACROMEM FALSE IF MACRO MEMORY DUMP NOT WANTED
    710. * INPDIR TRUE IF DIRECTIVE PROCESSING SELECTED
    711. * EXPAND TRUE IF EXPANSION OF DUPLICATE LINES SPECIFIED
    712. *
    713. * 6. COMDECKS CALLED
    714. * NONE
    715. *
    716. * 7. ROUTINES CALLED
    717. * FINDZERO GET LENGTH OF CURRENT PARAMETER/VALUE - SYMPL
    718. * BADPARM PROCESS CALL PARAMETER ERRORS - SYMPL
    719. * DISHEX CONVERT DISPLAY CODE TO HEXADECIMAL - SYMPL
    720. * MESSAGE WRITE MESSAGE TO DAYFILE - SUPIO
    721. * PRDFILE FLUSH OUTPUT BUFFER TO ASSURE DAYFILE - SYMPL
    722. * ABORT ABORT PROGRAM - MACREL
    723. *
    724. * 8. DAYFILE MESSAGES:
    725. * NONE
    726. *
    727.  #
    728. *ENDIF
    729. PROC CRACK;
    730. BEGIN # NDA CALL PARAMETERS CRACKING #
    731. XREF
    732. BEGIN
    733. ITEM INPUT U;
    734. ITEM NDF U;
    735. ITEM OUTPUT U;
    736. END
    737.  
    738. DEF NDAPARN # 7 #; # MAX NUMBER OF *NDA* PARAMETERS #
    739.  
    740. SWITCH PAR$RTN ER$RTN,L$RTN,NDF$RTN,BA$RTN,EA$RTN,
    741. LO$RTN,CV$RTN,I$RTN;
    742. ARRAY NDAPAR[1:NDAPARN];
    743. BEGIN # LEGAL KEYWORDS IN NDA CALL STATEMENT #
    744. ITEM NDAPARM U(0,0,42)=[O"14000000000000", # L #
    745. O"16040600000000", # NDF #
    746. O"02010000000000", # BA #
    747. O"05010000000000", # EA #
    748. O"14170000000000", # LO #
    749. O"03260000000000", # CV #
    750. O"11000000000000"]; # I #
    751. END
    752. ITEM ERFLAG B; # ERROR FLAG #
    753.  
    754. CONTROL EJECT;
    755. #**********************************************************************#
    756. # #
    757. # CODE BEGINS HERE #
    758. # #
    759. #**********************************************************************#
    760.  
    761. P<CPARAMS> = PARAREA; # PARAMETER AREA STARTS FROM RA+2 #
    762. P<PRA64> = NUMPAREA; # AREA HOLDING NUMBER OF PARAMETERS #
    763.  
    764. EBCDIC = FALSE; # PRESET *ASCII* CONVERSION #
    765.  
    766. DNTABIX = 0;
    767. IF NOCPWDS NQ 0 # ANY PARAMETER IN CALL STATEMENT #
    768. THEN
    769. FOR I=0 STEP 1 UNTIL NOCPWDS
    770. DO
    771. BEGIN # EXAMINE PARAMETER AREA #
    772. NOPARAM = FALSE;
    773. FINDZERO((CPARVAL[I]),CCOUNT);
    774. IF CCOUNT GR BIGPARM
    775. THEN # TOO MANY CHARACTERS IN PARAMETER #
    776. BADPARM(ECODE"ILLPARAM",(CPARVAL[I]),CCOUNT);
    777. ELSE
    778. BEGIN
    779. I02 = 0;
    780. FOR I01 = 1 STEP 1 UNTIL NDAPARN
    781. DO # SEARCH LEGAL PARAMETER ARRAY #
    782. IF CPARREC[I] EQ NDAPARM[I01]
    783. THEN
    784. BEGIN
    785. I02 = I01;
    786. I01 = NDAPARN;
    787. END
    788. GOTO PAR$RTN[I02]; # GO TO CORRESPONDING ROUTINE #
    789. TESTTER: # TEST FOR TERMINATING CHARACTER #
    790. IF CPARCODE[I] EQ COMMA
    791. THEN # COMMA FOLLOWS PARAMETER, OK #
    792. TEST I;
    793. IF CPARCODE[I] EQ PARTERM
    794. THEN # QUIT PARMETER PROCESSING #
    795. BEGIN
    796. I = NOCPWDS;
    797. TEST I;
    798. END
    799. IF NOT NOPARAM
    800. THEN # INVALID IF OTHER THAN , OR ) #
    801. BADPARM(ECODE"INVCHAR",(CPARVAL[I]),CCOUNT);
    802. I = I + 1;
    803. FOR FINDI=I STEP 1 UNTIL NOCPWDS
    804. DO
    805. BEGIN
    806. IF CPARCODE[FINDI] EQ COMMA
    807. THEN # COMMA FOUND #
    808. BEGIN
    809. I = FINDI;
    810. FINDI = NOCPWDS;
    811. TEST FINDI;
    812. END
    813. IF CPARCODE[FINDI] EQ PARTERM
    814. THEN # TERMINATOR FOUND #
    815. BEGIN
    816. I = NOCPWDS;
    817. FINDI = NOCPWDS;
    818. END
    819. END #FINDI#
    820. END
    821. END #I#
    822. IF BEGADDR NQ " "
    823. THEN # CONVERT DISPLAY TO HEX #
    824. DISHEX(BEGADDR,BEGADD,6,ERFLAG);
    825. ELSE
    826. BEGADD = 0;
    827. IF ENDADDR NQ " "
    828. THEN # CONVERT DISPLAY TO HEX #
    829. DISHEX(ENDADDR,ENDADD,6,ERFLAG);
    830. ELSE
    831. ENDADD = O"777777";
    832. IF BEGADD GR ENDADD
    833. THEN
    834. BEGIN
    835. ERRMESS[0] = ERRTEXT[1];
    836. ERRPARAM[0] = "BA/EA "; # BA/EA VALUE IS INVALID #
    837. MESSAGE(PARMSG,OPTION);
    838. PRDFILE; # FLUSH BUFFER TO ASSURE DAYFILE #
    839. ABORT;
    840. END
    841. IF ERRFLG
    842. THEN # ERROR IN CRACKING PARAMETERS #
    843. ABORT;
    844. RETURN; # RETURN TO MAIN PROC #
    845. ER$RTN: # PARAMETER NOT RECOGNIZED #
    846. BADPARM(ECODE"ILLPARAM",(CPARVAL[I]),CCOUNT);
    847. GOTO TESTTER;
    848. L$RTN: # L PARAMETER WAS SPECIFIED #
    849. IF CPARCODE[I] NQ EQUAL
    850. THEN # NO VALUE WAS SPECIFIED #
    851. BEGIN
    852. BADPARM(ECODE"NOVALUE",(CPARVAL[I]),CCOUNT);
    853. END
    854. ELSE # AN EQUAL SIGN WAS PRESENT #
    855. BEGIN
    856. CCOUNT2 = CCOUNT;
    857. I = I + 1;
    858. FINDZERO((CPARVAL[I]),CCOUNT); # GET PARAMETER LENGTH #
    859. FOR J = 0 STEP 1 UNTIL CCOUNT - 1 DO
    860. BEGIN # CHECK FOR VALID FILE NAME #
    861. IF ( C<J,1>CPARVAL[I] LS DISPLA ) OR
    862. ( C<J,1>CPARVAL[I] GR DISNINE )
    863. THEN # ILLEGAL FILE NAME #
    864. BEGIN
    865. BADPARM(ECODE"ILLVAL",CPARVAL[I-1],CCOUNT2);
    866. GOTO TESTTER;
    867. END
    868. END
    869. P<SIOFET> = LOC(OUTPUT);
    870. FETLFN[0] = C<0,7>CPARVAL[I];
    871. END
    872. GOTO TESTTER;
    873. NDF$RTN:
    874. IF CPARCODE[I] NQ EQUAL
    875. THEN # NO VALUE WAS SPECIFIED #
    876. BEGIN
    877. BADPARM(ECODE"NOVALUE",(CPARVAL[I]),CCOUNT);
    878. END
    879. ELSE
    880. BEGIN
    881. CCOUNT2 = CCOUNT;
    882. I = I + 1;
    883. FINDZERO((CPARVAL[I]),CCOUNT); # GET PARAMETER LENGTH #
    884. FOR J = 0 STEP 1 UNTIL CCOUNT - 1 DO
    885. BEGIN # CHECK FOR VALID FILE NAME #
    886. IF (C<J,1>CPARVAL[I] LS DISPLA) OR
    887. (C<J,1>CPARVAL[I] GR DISNINE)
    888. THEN #ILLEGAL FILE NAME #
    889. BEGIN
    890. BADPARM(ECODE"ILLVAL",CPARVAL[I-1],CCOUNT2);
    891. GOTO TESTTER;
    892. END
    893. END
    894. P<SIOFET> = LOC(NDF);
    895. FETLFN[0] = C<0,7>CPARVAL[I];
    896. END
    897. GOTO TESTTER;
    898. BA$RTN:
    899. EA$RTN: # KEYWORDS BA/EA ARE PROCESS HERE #
    900. IF CPARCODE[I] NQ EQUAL
    901. THEN # VALUE EXPECTED FOLLOWED BY = #
    902. BADPARM(ECODE"NOVALUE",(CPARVAL[I]),CCOUNT);
    903. ELSE
    904. BEGIN
    905. CCOUNT2 = CCOUNT;
    906. I = I + 1;
    907. FINDZERO((CPARVAL[I]),CCOUNT);
    908. K = 0;
    909. FOR J=0 STEP 1 UNTIL CCOUNT - 1
    910. DO
    911. BEGIN # CHECK IF VALUE IS LEGAL HEX DIGIT #
    912. K = B<J*6,6>CPARVAL[I];
    913. IF ((K LS DISZERO) OR (K GR DISNINE)) AND
    914. ((K LS DISPLA) OR (K GR DISPLF))
    915. THEN
    916. ILLVALF = TRUE;
    917. END
    918. IF CCOUNT GR PNLEN OR ILLVALF
    919. THEN
    920. BEGIN # ILLEGAL VALUE FOUND #
    921. ILLVALF = FALSE;
    922. BADPARM(ECODE"ILLVAL",(CPARVAL[I-1]),CCOUNT2);
    923. END
    924. ELSE
    925. BEGIN # SAVE PARAMETER IN BEGADDR,ENDADDR #
    926. IF I02 EQ 3
    927. THEN # MUST BE B PARAMETER #
    928. BEGIN
    929. C<0,6>BEGADDR = "000000";
    930. C<6-CCOUNT,CCOUNT>BEGADDR = C<0,CCOUNT>CPARVAL[I];
    931. END
    932. ELSE
    933. BEGIN
    934. C<0,6>ENDADDR = "000000";
    935. C<6-CCOUNT,CCOUNT>ENDADDR = C<0,CCOUNT>CPARVAL[I];
    936. END
    937. END
    938. END
    939. GOTO TESTTER;
    940. LO$RTN: # LIST OPTION SPECIFIED #
    941. IF CPARCODE[I] NQ EQUAL # NO EQUAL SIGN, CHECK AGAIN #
    942. THEN
    943. BADPARM(ECODE"NOVALUE",(CPARVAL[I]),CCOUNT);
    944. ELSE
    945. BEGIN
    946. REGISTERS = FALSE; # RESET LIST OPTIONS AT FIRST #
    947. MACROMEM = FALSE;
    948. PAGEREG = FALSE;
    949. CCOUNT2 = CCOUNT;
    950. I = I + 1;
    951. FINDZERO((CPARVAL[I]),CCOUNT); # EXAMINE OPTIONS #
    952. IF CCOUNT GR BIGPARM
    953. THEN
    954. BADPARM(ECODE"ILLVAL",(CPARVAL[I-1]),CCOUNT2);
    955. ELSE
    956. BEGIN
    957. FOR CCIND=0 STEP 1 UNTIL CCOUNT - 1
    958. DO
    959. BEGIN
    960. IF C<CCIND,1>CPARVAL[I] EQ "R"
    961. THEN
    962. BEGIN
    963. REGISTERS = TRUE;
    964. PAGEREG = TRUE;
    965. END
    966. ELSE
    967. BEGIN
    968. IF C<CCIND,1>CPARVAL[I] EQ "M"
    969. THEN
    970. MACROMEM = TRUE;
    971. ELSE
    972. BEGIN
    973. IF C<CCIND,1>CPARVAL[I] EQ "E"
    974. THEN
    975. EXPAND = TRUE;
    976. ELSE
    977. BADPARM(ECODE"ILLVAL",(CPARVAL[I-1]),CCOUNT2);
    978. END
    979. END
    980. END
    981. END
    982. IF EXPAND AND NOT REGISTERS AND NOT MACROMEM
    983. THEN
    984. BEGIN
    985. REGISTERS = TRUE;
    986. MACROMEM = TRUE;
    987. PAGEREG = TRUE;
    988. END
    989. END
    990. GOTO TESTTER;
    991.  
    992. CV$RTN: # CONVERSION MODE SPECIFIED #
    993.  
    994. IF CPARCODE[I] NQ EQUAL
    995. THEN # PARAMETER NOT EQUIVALENCED #
    996. BEGIN
    997. BADPARM(ECODE"NOVALUE",(CPARVAL[I]),CCOUNT);
    998. GOTO TESTTER; # TEST FOR TERMINATOR #
    999. END
    1000.  
    1001. I = I + 1; # SET INDEX TO PARAMETER VALUE #
    1002. FINDZERO((CPARVAL[I]),CCOUNT); # GET SIZE OF VALUE #
    1003.  
    1004. IF CCOUNT NQ 2
    1005. OR ((C<0,2>CPARVAL[I] NQ "AS")
    1006. AND (C<0,2>CPARVAL[I] NQ "EB"))
    1007. THEN # ILLEGAL VALUE FOR PARAMETER #
    1008. BEGIN
    1009. BADPARM(ECODE"ILLVAL",CPARVAL[I-1],2);
    1010. GOTO TESTTER; # TEST FOR TERMINATOR #
    1011. END
    1012.  
    1013. IF C<0,2>CPARVAL[I] EQ "EB"
    1014. THEN # *EBCDIC* CONVERSION SELECTED #
    1015. BEGIN
    1016. EBCDIC = TRUE; # SET *EBCDIC* CONVERSION FLAG #
    1017. END
    1018.  
    1019. GOTO TESTTER; # TEST FOR TERMINATOR #
    1020.  
    1021. I$RTN: # DIRECTIVE EXISTENCE ACKNOWLEDGED #
    1022. IF CPARCODE[I] NQ EQUAL
    1023. THEN
    1024. IF (CPARCODE[I] EQ PARTERM) OR (CPARCODE[I] EQ COMMA)
    1025. THEN
    1026. INPDIR = TRUE;
    1027. ELSE
    1028. BADPARM(ECODE"NOVALUE",(CPARVAL[I]),CCOUNT);
    1029. ELSE
    1030. BEGIN
    1031. I = I + 1;
    1032. FINDZERO((CPARVAL[I]),CCOUNT);
    1033. IF (CCOUNT EQ 1) AND (C<0,1>CPARVAL[I] EQ DISZERO)
    1034. THEN # I=0, NO DIRECTIVE FILE #
    1035. BEGIN
    1036. INPDIR = FALSE;
    1037. GOTO TESTTER;
    1038. END
    1039. FOR J = 0 STEP 1 UNTIL CCOUNT - 1 DO
    1040. BEGIN # CHECK FOR VALID FILE NAME #
    1041. IF ( C<J,1>CPARVAL[I] LS DISPLA )
    1042. OR ( C<J,1>CPARVAL[I] GR DISNINE )
    1043. THEN # ILLEGAL FILE NAME #
    1044. BEGIN
    1045. BADPARM(ECODE"ILLVAL",CPARVAL[I-1],1);
    1046. GOTO TESTTER;
    1047. END
    1048. END
    1049. P<SIOFET> = LOC(INPUT);
    1050. FETLFN[0] = C<0,7>CPARVAL[I];
    1051. INPDIR = TRUE;
    1052. END
    1053. GOTO TESTTER;
    1054. END
    1055. CONTROL EJECT;
    1056. *IF DEF,IMS
    1057. #
    1058. **
    1059. *E
    1060. * 1. PROC NAME: AUTHOR: DATE:
    1061. * BADPARM E. SULLIVAN 77/01/31
    1062. * W. L. CHENG 80/02/01
    1063. *
    1064. * 2. FUNCTIONAL DESCRIPTION:
    1065. * OUTPUTS ERROR MESSAGES FROM PARAMETER PROCESSING DEPENDING ON
    1066. * THE CODE PASSED TO IT FROM CRACK.
    1067. *
    1068. * 3. METHOD USED
    1069. * THE ERROR MESSAGE CODE PASSED FROM CRACK TO BADPARM INDICATES
    1070. * WHICH ERROR MESSAGE IS TO BE OUTPUT. IF THE PARAMETER WAS
    1071. * NOT LEGAL, A FLAG IS SET SO THAT ONLY ONE ERROR MESSAGE FOR
    1072. * THE PARAMETER WILL BE OUTPUT.
    1073. *
    1074. * 4. ENTRY PARAMETERS:
    1075. * NUMBER SUBSCRIPT INDICATING WHICH ERROR HAS OCCURRED
    1076. * VALUE PARAMETER/VALUE IN ERROR
    1077. * COUNT NUMBER OF CHARACTERS IN VALUE
    1078. *
    1079. * 5. EXIT PARAMETERS:
    1080. * ERRFLG SET TRUE
    1081. * NOPARAM SET TRUE TO INDICATE CURRENT PARAM IS ILLEGAL
    1082. *
    1083. * 6. COMDECKS CALLED:
    1084. * NONE
    1085. *
    1086. * 7. ROUTINES CALLED:
    1087. * MESSAGE WRITE MESSAGE TO DAYFILE - SUPIO
    1088. * PRDFILE FLUSH OUTPUT BUFFER TO ASSURE DAYFILE MESSAGE- SYMPL
    1089. *
    1090. * 8. DAYFILE MESSAGES:
    1091. * ILLEGAL NDA CALL PARAMETER XXXXXXX FATAL ERROR
    1092. * PARAMETER VALUE ILLEGAL FOR XXXXXXX FATAL ERROR
    1093. * VALUE NEEDED FOR PARAMETER XXXXXXX FATAL ERROR
    1094. * INVALID CHARACTER AFTER ITEM XXXXXXX FATAL ERROR
    1095. *
    1096.  #
    1097. *ENDIF
    1098. PROC BADPARM(NUMBER,(VALUE),COUNT);
    1099. BEGIN
    1100. ITEM NUMBER I; #ERROR MESSAGE SUBSCRIPT#
    1101. ITEM VALUE I; #PARAMETER TO BE PUT IN MESSAGE#
    1102. ITEM COUNT I; #PARAMETER CHARACTER COUNT#
    1103.  
    1104. CONTROL EJECT;
    1105. #**********************************************************************#
    1106. # #
    1107. # CODE BEGINS HERE #
    1108. # #
    1109. #**********************************************************************#
    1110.  
    1111. # THIS PROCEDURE FORMATS AND OUTPUTS THE ERROR MESSAGES
    1112.   ASSOCIATED WITH THE CONTROL CARD CRACKING PROCEDURE #
    1113. ERRMESS[0] = " ";
    1114. ERRPARAM[0] = " ";
    1115. ERRMESS[0] = ERRTEXT[NUMBER];
    1116. C<0,COUNT>ERRPARAM[0] = C<0,COUNT>VALUE;
    1117. MESSAGE(PARMSG,OPTION); #WRITE ERROR MESSAGE #
    1118. PRDFILE; # FLUSH OUTPUT BUFFER TO ASSURE DAYFILE #
    1119. ERRFLG = TRUE;
    1120. IF NUMBER EQ ECODE"ILLPARAM"
    1121. THEN
    1122. NOPARAM = TRUE;
    1123. END
    1124. CONTROL EJECT;
    1125. *IF DEF,IMS
    1126. #
    1127. **
    1128. *E
    1129. * 1. PROC NAME: AUTHOR: DATE:
    1130. * FINDZERO E. SULLIVAN 77/01/31
    1131. * W. L. CHENG 80/02/01
    1132. *
    1133. * 2. FUNCTIONAL DESCRIPTION:
    1134. * RETURNS THE CHARACTER COUNT OF A SPECIFIED PARAMETER OR VALUE
    1135. * AS GIVEN BY THE PROCEDURE CRACK.
    1136. *
    1137. * 3. METHOD USED:
    1138. * THE PARAMETER, AS SPECIFIED IN THE CALL TO FINDZERO IS
    1139. * SEARCHED UNTIL A CHARACTER WITH VALUE ZERO IS FOUND.
    1140. * THE NUMBER OF NONZERO CHARACTERS BEFORE THIS FIRST ZERO IS
    1141. * RETURNED.
    1142. *
    1143. * 4. ENTRY PARAMETERS:
    1144. * SRCHVAU PARAMETER WHOSE CHARACTERS ARE TO BE COUNTED
    1145. *
    1146. * 5. EXIT PARAMETERS:
    1147. * NUMCHARS NUMBER OF CHARACTERS IN SRCHVAL
    1148. *
    1149. * 6. COMDECKS CALLED:
    1150. * NONE
    1151. *
    1152. * 7. ROUTINES CALLED:
    1153. * NONE
    1154. *
    1155. * 8. DAYFILE MESSAGES:
    1156. * NONE
    1157. *
    1158.  #
    1159. *ENDIF
    1160. PROC FINDZERO((SRCHVAL),NUMCHARS);
    1161. BEGIN
    1162. ITEM NUMCHARS I; #NUMBER OF NONZERO CHARACTERS#
    1163. ITEM SRCHVAL C(7); #PARAMER CHARACTERS TO BE SEARCHED#
    1164. CONTROL EJECT;
    1165. #**********************************************************************#
    1166. # #
    1167. # CODE BEGINS HERE #
    1168. # #
    1169. #**********************************************************************#
    1170. # THIS PROCEDURE EXAMINES THE SEVEN CHARACTER FILED SRCHVAL
    1171.   AND COUNTS THE NUMBER OF CHARACTERS PRESENT. THE SEARCH
    1172.   STOPS ON ENCOUNTERING THE FIRST ZERO. #
    1173. NUMCHARS = 0; #INITIALIZATION#
    1174. FOR CIND = 0 STEP 1 UNTIL 6 DO
    1175. IF C<CIND,1>SRCHVAL NQ O"00"
    1176. THEN
    1177. NUMCHARS = NUMCHARS + 1;
    1178. END
    1179. CONTROL EJECT;
    1180. PROC READDIR;
    1181. BEGIN
    1182. *IF DEF,IMS
    1183. #
    1184. **
    1185. *E
    1186. * 1. PROC NAME: AUTHOR: DATE:
    1187. * READDIR M.E.VATCHER 81/04/01
    1188. *
    1189. * 2. FUNCTIONAL DESCRIPTION:
    1190. * COPIES INPUT DIRECTIVES TO OUTPUT FILE AND TO ZZZZINP.
    1191. *
    1192. * 3. METHODS USED:
    1193. * PRINT A HEADING. CALL READI TO GET A DIRECTIVE AND
    1194. * PRINTH TO COPY IT TO THE OUTPUT FILE. COPY THE LINES TO
    1195. * THE ZZZZINP FILE. LOOP TILL THE END OF DIRECTIVES.
    1196. *
    1197. * 4. ENTRY PARAMETERS:
    1198. * NONE
    1199. *
    1200. * 5. EXIT PARAMETERS:
    1201. * NONE
    1202. *
    1203. * 6. COMDECKS CALLED:
    1204. * NONE
    1205. *
    1206. * 7. ROUTINES CALLED:
    1207. * MESSAGE WRITE MESSAGE TO DAYFILE
    1208. * PRINTH WRITE A LINE TO OUTPUT FILE
    1209. * READI RAD INPUT FILE
    1210. * WRITEH WRITE A CODED LINE IN H FORMAT
    1211. * WRITER WRITE END OF RECORD TO FILE
    1212. *
    1213. * 8. DAYFILE MESSAGE:
    1214. * DIRECTIVE FILE XXXXXXX EMPTY.
    1215. *
    1216. *
    1217. #
    1218. *ENDIF
    1219. XREF
    1220. BEGIN
    1221. FUNC XSFW C(10);
    1222. ITEM ZZZZINP;
    1223. END
    1224.  
    1225. DEF LOCAL #3#;
    1226.  
    1227. ITEM TEMPC C(10);
    1228.  
    1229. ARRAY DIREMPTY [0:0] S(3);
    1230. BEGIN
    1231. ITEM DIREMPTY1 C(0,0,29) =
    1232. ["DIRECTIVE FILE XXXXXXX EMPTY."];
    1233. ITEM DIREMPTY2 C(1,30,7);
    1234. ITEM DIREMPTYZ U(2,48,12) = [ 0 ];
    1235. END
    1236.  
    1237. CONTROL EJECT;
    1238. #**********************************************************************#
    1239. # #
    1240. # CODE BEGINS HERE #
    1241. # #
    1242. #**********************************************************************#
    1243.  
    1244. TTL0 = "1 *** A COPY OF INPUT DIRECTIVES ***";
    1245. HEADING;
    1246. STRING = " ";
    1247. FOR DUMMYI = 0 WHILE NOT IEOF DO
    1248. BEGIN
    1249. READI;
    1250. IF IEOF
    1251. THEN # END OF INPUT FILE #
    1252. BEGIN
    1253. IF IFIRSTRD
    1254. THEN # DIRECTIVE FILE IS EMPTY #
    1255. BEGIN
    1256. TEMPC = XSFW(C<0,7>INPUT);
    1257. DIREMPTY2[0] = C<0,7>TEMPC;
    1258. MESSAGE(DIREMPTY,LOCAL);
    1259. END
    1260. TEST DUMMYI;
    1261. END
    1262. IFIRSTRD = FALSE;
    1263. INPBUFD = INPBUFC;
    1264. PRINTH(OUTBUFI,9);
    1265. WRITEH(ZZZZINP,INPBUF,8);
    1266. END
    1267. WRITER(ZZZZINP,"R");
    1268. END
    1269. CONTROL EJECT;
    1270. *IF DEF,IMS
    1271. #
    1272. **
    1273. *E
    1274. * 1. PROC NAME: AUTHOR: DATE:
    1275. * DNPROC JACOB C. K. CHEN 80/02/01
    1276. *
    1277. * 2. FUNCTIONAL DESCRIPTION:
    1278. * DEPENDING ON FLAGS SET BY PROCEDURE CRACK, DNPROC PROCESSES
    1279. * THE DUMP RECORD PASSED BY THE MAIN PROCEDURE. DNPROC CALLS
    1280. * THE PROCEDURE BLDFILE TO REFORMAT THE DUMP RECORD INTO A
    1281. * RANDOM FILE. IF THE INPUT DIRECTIVE FILE IS PRESENT, A
    1282. * DIRECTIVE FILE IS READ AND THE CORRESPONDING FORMAT ROUTINE IS
    1283. * CALLED TO PROCESS IT.
    1284. *
    1285. * 3. METHOD USED:
    1286. * PROCEDURE PREP IS CALLED TO DETERMINE IF THE DUMP RECORD IS
    1287. * IN MULTI-HOST NPU DUMP RECORD FORMAT. IF SO, THE DUMP RECORD
    1288. * IS CONVERTED BACK INTO THE PRE-MULTI-HOST FORMAT FOR
    1289. * SUBSEQUENT PROCESSING.
    1290. * IF DIRECTIVES FILE PRESENT, READ A DIRECTIVE AND CONVERT THE
    1291. * PARAMETERS TO OCTAL, THEN GOTO CORRESPONDING FORMAT ROUTINE TO
    1292. * PROCESS DUMP INFORMATION. IF THERE IS NO DIRECTIVES FILE, DUMP
    1293. * PROCESS IS CONTROLED BY PARAMETERS ON NDA CALL. THE DUMP FILE
    1294. * IS RETURNED WHEN ALL PROCESSING ON THE DUMP FILE IS COMPLETE.
    1295. *
    1296. * 4. ENTRY PARAMETERS:
    1297. * LISTT SET TRUE IF REPORT LISTING WANTED
    1298. * REGISTERS TRUE IF REGISTERS ARE TO BE PROCESSED
    1299. * MACROMEM TRUE IF MACRO MEMORY IS TO BE PROCESSED
    1300. *
    1301. * 5. EXIT PARAMETERS:
    1302. * EOF END OF FILE INDICATOR
    1303. *
    1304. * 6. COMDECKS CALLED:
    1305. * NONE
    1306. *
    1307. * 7. ROUTINES CALLED:
    1308. *
    1309. * BLDFILE COPY DUMP FILE TO RANDOM WORK FILE NEUFILE - SYMPL
    1310. * MOVE MOVE A BLOCK OF MEMORY WORDS - SUPIO
    1311. * FORM1 FORMAT HEADER RECORD - SYMPL
    1312. * HEADING PRINT HEADING INFORMATION - SYMPL
    1313. * READI READ A INPUT DIRECTIVE - SYMPL
    1314. * SYNCHK SYNTAX CHECK AND CONVERSION - SYMPL
    1315. * CLOSSIO CLOSE SUPIO RANDOM FILE - SUPIO
    1316. * RETERN RETURN FILE - SUPIO
    1317. * REWIND REWIND FILE - SUPIO
    1318. * RECALL PUT PROGRAM OR FUNCTION IN RECALL STATUS - MACREL
    1319. * MESSAGE WRITE A MESSAGE TO DAYFILE - MACREL
    1320. * PREP DUMP RECORD PREPROCEESOR
    1321. * PRINTH PRINT A LINE TO OUTPUT - SYMPL
    1322. * FORMAT0 FORMAT COMMENT CARDS - SYMPL
    1323. * FORMAT1 FILE 1 AND MACRO MEMORY INTERPRETER - SYMPL
    1324. * FORMAT3 FORMAT CONTINUOUS DATA STRUCTURES - SYMPL
    1325. * FORMAT4 FORMAT CIRCULAR BUFFER - SYMPL
    1326. * FORMAT9 FORMAT FILE 1 AND MACRO MEMORY RECORDS - SYMPL
    1327. * FORMATA FORMAT LCB/TCB - SYMPL
    1328. * FORMATB FORMAT PORT/MUX TABLES - SYMPL
    1329. * FORMATF FINISH - SYMPL
    1330. *
    1331. * 8. DAYFILE MESSAGES:
    1332. * PROCESSING COMPLETE ON DMPAXXX
    1333. *
    1334.  #
    1335. *ENDIF
    1336. #**********************************************************************#
    1337. # #
    1338. # PROCESS DUMP FROM INPUT DIRECTIVES #
    1339. # #
    1340. #**********************************************************************#
    1341. PROC DNPROC(EOF);
    1342. BEGIN
    1343. XREF
    1344. BEGIN
    1345. ITEM FDMP;
    1346. ITEM ZZZZINP;
    1347. END
    1348. SWITCH RULE RULE0,RULE1,RULE2,RULE3,RULE4,RULE5,RULE6,RULE7,
    1349. RULE8,RULE9,RULEA,RULEB,RULEC,RULED,RULEE,RULEF;
    1350. ITEM EOF B;
    1351. ITEM ERRI B; # ERROR FLAG #
    1352. CONTROL EJECT;
    1353. #*********************************************************************#
    1354. # #
    1355. # CODE BEGINS HERE #
    1356. # #
    1357. #*********************************************************************#
    1358.  
    1359. PAGENO = 0; # RESET PAGE NUMBER #
    1360. LINENO = 0; # RESET LINE NUMBER #
    1361. SUPERR = FALSE; # INITIAL FLAG #
    1362. PREP(EOF); # CALL PREPROCESSOR #
    1363. IF EOF
    1364. THEN
    1365. RETURN; # ***** EXIT ***** #
    1366.  
    1367. BLDFILE; # COPY DUMP FILE TO A RANDOM FILE #
    1368. IF SUPERR
    1369. THEN # ERROR IN BUILDING RANDOM FILE #
    1370. BEGIN
    1371. RETURN; # RETURN TO MAIN LOOP #
    1372. END
    1373. FORM1; # PRINT TITLE PAGE #
    1374. STRING = " "; # CLEAR WORKING BUFFER #
    1375. IF NOT INPDIR
    1376. THEN # DIRECTIVE FILE NOT PRESENT #
    1377. BEGIN
    1378. IF REGISTERS
    1379. THEN
    1380. BEGIN # PRINT FILE 1 REGISTERS TO OUTPUT #
    1381. TTL0 = TTL1; # MOVE HEADER #
    1382. RULES = 8; # SET FILE 1 TO BE DUMPED #
    1383. HEADING; # WRITE HEADING #
    1384. FORMAT9; # FORMAT FILE 1 DUMP #
    1385. FILE1B = FALSE; # CLEAR FILE1 REG FLAG #
    1386. END
    1387. IF PAGEREG AND R7
    1388. THEN
    1389. BEGIN # PRINT PAGE REGISTERS TO OUTPUT #
    1390. TTL0 = TTL2; # MOVE HEADER #
    1391. RULES = 7; # SET PAGE REGISTERS TO BE DUMPED #
    1392. HEADING; # WRITE HEADING #
    1393. FORMAT9; # FORMAT PAGE REG DUMP #
    1394. PREG = FALSE; # CLEAR PAGE REGISTER FLAG #
    1395. END
    1396. IF MACROMEM
    1397. THEN # PRINT MACRO MEMORY TO OUTPUT #
    1398. BEGIN
    1399. TTL0 = TTL4; # FORMAT TITLE LINE #
    1400. RULES = 9; # SET MACRO MEMORY TO BE DUMPED #
    1401. HEADING; # WRITE HEADING #
    1402. FORMAT9; # FORMAT MACRO MEMORY DUMP #
    1403. END
    1404. END
    1405. ELSE
    1406. BEGIN # DIRECTIVE CONTROL DUMP #
    1407. RULES = 0;
    1408. REWIND(ZZZZINP);
    1409. READ(ZZZZINP);
    1410. RECALL(ZZZZINP);
    1411. IEOF = FALSE; # RESET END OF FILE INDICATOR #
    1412. FOR DUMMYI=0 STEP 1 WHILE NOT IEOF
    1413. DO
    1414. BEGIN
    1415. LENGTH = 8;
    1416. READH(ZZZZINP,INPBUF,LENGTH,IOSTAT);
    1417. RECALL(ZZZZINP);
    1418. IF IOSTAT NQ 0
    1419. THEN
    1420. BEGIN
    1421. IEOF = TRUE;
    1422. TEST DUMMYI;
    1423. END
    1424. IF RULEI NQ " "
    1425. THEN # IF NEW RULE SPECIFIED #
    1426. BEGIN
    1427. DISHEX(RULEI,RULES,1,ERRI); # CONVERT RULE TO HEX#
    1428. IF ERRI
    1429. THEN # RULE ERROR #
    1430. RULES = 14; # SET TO INVALID RULE #
    1431. C<0,11>TTL0 = "1";
    1432. C<11,90>TTL0 = C<10,70>INPBUFC;
    1433. HEADING; # WRITE HEADING #
    1434. IF RULES LS 5 OR RULES EQ 10 OR RULES EQ 11
    1435. THEN
    1436. TEST DUMMYI;
    1437. END
    1438. SYNCHK(ERRI); # SYNTAX CHECK AND CONVERSION #
    1439. IF ERRI # DIRECTIVE ERROR THEN NEXT #
    1440. THEN
    1441. TEST DUMMYI;
    1442. GOTO RULE[RULES]; # GOTO FORMAT ROUTINE BY RULE #
    1443. RULE0:
    1444. FORMAT0; # FORMAT COMMENTS CARD #
    1445. TEST DUMMYI;
    1446. RULE1:
    1447. RULE2:
    1448. FORMAT1; # FILE 1 OR MACROMEM INTERPRETER#
    1449. TEST DUMMYI;
    1450. RULE3:
    1451. FORMAT3; # FORMAT CONTIGUOUS BLOCK #
    1452. TEST DUMMYI;
    1453. RULE4:
    1454. FORMAT4; # FORMAT CIRCULAR BUFFERS #
    1455. TEST DUMMYI;
    1456. RULE7:
    1457. RULE8:
    1458. RULE9:
    1459. FORMAT9; # FORMAT FILE 1 OR MACROMEM DUMP#
    1460. TEST DUMMYI; # OR PAGE REGISTERS #
    1461. RULEA:
    1462. FORMATA; # FORMAT LCB/TCB #
    1463. TEST DUMMYI;
    1464. RULEB:
    1465. FORMATB; # FORMAT PORT TABLE AND MUXLCBS #
    1466. TEST DUMMYI;
    1467. RULEF:
    1468. FORMATF; # END OF NDA DIRECTIVES #
    1469. TEST DUMMYI;
    1470. RULE5:
    1471. RULE6:
    1472. RULEC:
    1473. RULED:
    1474. RULEE: # INVALID RULES #
    1475. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    1476. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    1477. PRINTH(COL1ERR,5); # PRINT ERROR MESSAGE #
    1478. RULES = 0;
    1479. TEST DUMMYI;
    1480. END
    1481. END
    1482. CLOSSIO(LOC(NEUFILE),"REWIND");
    1483. RETERN(NEUFILE); # RETURN RANDOM WORK FILE #
    1484. RETERN(FDMP);
    1485. WRITER(OUTPUT,"R");# FLUSH OUTPUT BUFFER #
    1486. DMPWD1[0] = 0; # CLEAR DUMP FILE BUFFER #
    1487. DMPWD2[0] = 0; # CLEAR DUMP FILE BUFFER #
    1488. MESSAGE(PRCOMP,LOCAL); # PROCESSING COMPLETE ON XXXXXXX #
    1489. END
    1490. CONTROL EJECT;
    1491. PROC PREP(EOF);
    1492. BEGIN
    1493. *IF DEF,IMS
    1494. #
    1495. **
    1496. *E
    1497. * 1. PROC NAME: AUTHOR: DATE:
    1498. * PREP M.E. VATCHER 81/04/13
    1499. *
    1500. * 2. FUNCTIONAL DESCRIPTION:
    1501. * THIS PROCEDURE WILL REFORMAT A MULTI-HOST NPU DUMP RECORD
    1502. * TO PRE-MULTI-HOST DUMP FILE FORMAT.
    1503. *
    1504. * 3. METHODS USED:
    1505. * INITIATE READ OF NPU DUMP RECORD
    1506. * IF HEADER RECORD INDICATES A MULTI-HOST FORMAT:
    1507. * FORMAT PRE-MULTIHOST HEADER RECORD FROM 7700 TABLE,
    1508. * WRITE HEADER TO FILE FDMP,
    1509. * FOR ALL DUMP BLOCKS IN THE DUMP RECORD:
    1510. * READ DUMP BLOCK HEADER,
    1511. * BUILD BEGINNING ADDRESS TABLE FOR ADDRESS SEQUENCING,
    1512. * FOR ALL DUMP PACKETS WITHIN THE DUMP BLOCK:
    1513. * READ DUMP PACKET HEADER, GET BEGINNING ADDRESS, AND
    1514. * USING THE BEGINNING ADDRESS TABLE, FIND PLACE ( IN
    1515. * IN ASCENDING ADDRESSES ) IN WRITE BUFFER.
    1516. * WRITER DUMP BLOCK RECORD.
    1517. *
    1518. * 4. ENTRY PARAMETERS:
    1519. * NONE
    1520. *
    1521. * 5. EXIT PARAMETERS:
    1522. * EOF END OF FILE INDICATOR
    1523. *
    1524. * 6. COMDECKS CALLED:
    1525. * NONE
    1526. *
    1527. * 7. ROUTINES CALLED:
    1528. * ABORT ABORT PROGRAM
    1529. * MESSAGE WRITE MESSAGE TO DAYFILE
    1530. * READ READ FILE
    1531. * READW READ WORDS FROM FILE
    1532. * RECALL GIVE UP CPU
    1533. * REWIND REWIND FILE
    1534. * WRITER FLUSH FILE AND WRITE EOR
    1535. * XCHD CONVERT HEXADECIMALS TO DISPLAY CODE
    1536. * XSFW BLANK-FILLED WORD
    1537. *
    1538. * 8. DAYFILE MESSAGES:
    1539. * DUMP FILE XXXXXXX EMPTY.
    1540. * PREMATURE END OF FILE ON XXXXXXX.
    1541. *
    1542.  #
    1543. *ENDIF
    1544.  
    1545. XREF
    1546. BEGIN
    1547. ITEM FDMP U;
    1548. ITEM NDF U;
    1549. PROC READW;
    1550. FUNC XCHD C(10);
    1551. FUNC XSFW C(10);
    1552. END
    1553.  
    1554. DEF LOCAL #3#;
    1555.  
    1556. ITEM BA U; # BEGINNING ADDRESS #
    1557. ITEM BC U; # BATCH COUNT #
    1558. ITEM CURBA U; # CURRENT BEGINNING ADDRESS #
    1559. ITEM EA U; # ENDING ADDRESS #
    1560. ITEM EOR B = FALSE; # END OF RECORD INDICATOR #
    1561. ITEM EOF B; # END OF FILE INDICATOR #
    1562. ITEM STATIS U; # RETURNED STATUS FROM READW #
    1563. ITEM TEMPC C(10);
    1564. ITEM WC U; # 60 BIT WORD COUNT #
    1565.  
    1566. ARRAY DB [0:63] S(1);
    1567. BEGIN
    1568. ITEM DBBA U(0,0,24); # BEGINNING ADDRESS #
    1569. ITEM DBLEN U(0,24,12); # LENGTH OF DUMP PACKET #
    1570. ITEM DBZ U(0,36,24) = [ 0 ];
    1571. END
    1572.  
    1573. ARRAY NDFBF [0:16] S(1);
    1574. BEGIN
    1575. ITEM NDFBUF U(0,0,60);
    1576. END
    1577.  
    1578. ARRAY DFE [0:0] S(3);
    1579. BEGIN
    1580. ITEM DFE1 C(0,0,25) = [" DUMP FILE XXXXXXX EMPTY"];
    1581. ITEM DFE2 C(1,06,7);
    1582. ITEM DFEZ U(2,24,36) = [ 0 ];
    1583. END
    1584.  
    1585. ARRAY PEOF [0:0] S(4);
    1586. BEGIN
    1587. ITEM PEOF1 C(0,0,34) = [" PREMATURE END OF FILE ON XXXXXXX."];
    1588. ITEM PEOF2 C(2,36,7);
    1589. ITEM PEOFZ U(3,18,42) = [ 0 ];
    1590. END
    1591.  
    1592. BASED ARRAY DBUFFER [0:0] S(1);
    1593. BEGIN
    1594. ITEM DBUFFER1 U(0,0,60);
    1595. END
    1596.  
    1597. CONTROL EJECT;
    1598. #**********************************************************************#
    1599. # #
    1600. # CODE BEGINS HERE #
    1601. # #
    1602. #**********************************************************************#
    1603. READ(NDF);
    1604. RECALL(NDF);
    1605. P<SIOFET> = LOC(NDF);
    1606. IF FETSTAT[0] EQ RDEOF OR FETSTAT[0] EQ RDEOI
    1607. THEN
    1608. BEGIN # END OF FILE #
    1609. IF NDFFIRSTRD
    1610. THEN #NDF IS EMPTY #
    1611. BEGIN
    1612. TEMPC = XSFW(C<0,7>NDF);
    1613. DFE2[0] = C<0,7>TEMPC;
    1614. MESSAGE(DFE,LOCAL);
    1615. ABORT;
    1616.  
    1617. END
    1618. EOF = TRUE;
    1619. RETURN; # ***** EXIT ***** #
    1620.  
    1621. END
    1622. NDFFIRSTRD = FALSE; # NEXT READ WILL NOT BE THE FIRST #
    1623. READW(NDF,NDFBF,17,STATIS);
    1624. IF B<0,12>NDFBUF[0] NQ O"7700"
    1625. THEN # SKIP THE PREPROCESSOR #
    1626. BEGIN # ITS AN R5 FORMAT DUMP FILE #
    1627. R7 = FALSE; # NOT AN R7 DUMP FILE #
    1628. C<0,7>FDMP = C<0,7>NDF; # PUT DUMP FILE NAME IN FDMP FET #
    1629. DFNAME = C<0,7>NDF; # SET DUMP FILE NAME FOR OUTPUT #
    1630. REWIND(FDMP);
    1631. RECALL(FDMP);
    1632. PRCOMP2[0] = C<0,7>NDF; # FOR PROCESSING COMPLETE MESSAGE #
    1633. RETURN; # ***** EXIT ***** #
    1634.  
    1635. END
    1636. IF STATIS NQ 0
    1637. THEN # PREMATURE END OF RECORD #
    1638. BEGIN
    1639. TEMPC = XSFW(C<0,7>NDF);
    1640. PEOF2[0] = C<0,7>TEMPC;
    1641. MESSAGE(PEOF,LOCAL);
    1642. ABORT;
    1643.  
    1644. END
    1645. R7 = TRUE; # ITS AN R7 FORMAT DUMP FILE #
    1646. PRCOMP2[0] = C<0,7>NDFBUF[1]; # FOR PROCESSING COMPLETE MSG #
    1647. DFNAME = C<0,7>NDFBUF[1]; # SET DUMP FILE NAME FOR OUTPUT #
    1648. # IN FORM1 PROC #
    1649. B<0,18>FDMPBUF[0] = 0;
    1650. C<3,7>FDMPBUF[0] = C<0,7>NDFBUF[3]; # SET FIRST PART OF TIME #
    1651. C<0,1>FDMPBUF[1] = C<7,1>NDFBUF[3]; # SET SECOND PART OF TIME #
    1652. C<2,8>FDMPBUF[1] = C<0,8>NDFBUF[2]; # SET DATE #
    1653. C<0,7>FDMPBUF[2] = C<0,7>NDFBUF[15]; # SET NODE NAME #
    1654. C<7,3>FDMPBUF[2] = 0; # ZERO FILL REST OF WORD 2 #
    1655. TEMPC = XCHD(B<36,8>NDFBUF[16]);
    1656. PRNNODE2[0] = C<8,2>TEMPC;
    1657. TEMPC = XCHD(B<44,16>NDFBUF[16]);
    1658. PRHALT2[0] = C<6,4>TEMPC;
    1659. TEMPC = XCHD(B<44,16>NDFBUF[15]);
    1660. PRPREG2[0] = C<6,4>TEMPC;
    1661. P<SIOFET> = LOC(FDMP);
    1662. FETFST[0] = LOC(FDMPBF);
    1663. FETLMT[0] = FETFST[0] + O"3501";
    1664. FETOUT[0] = FETFST[0];
    1665. FETIN[0] = FETFST[0] + 3;
    1666. WRITER(FDMP);
    1667.  
    1668. EOR = FALSE;
    1669. FOR I=1 WHILE NOT EOR DO
    1670. BEGIN
    1671. FETIN[0] = FETFST[0]; #RESET FDMP FET POINTERS #
    1672. FETOUT[0] = FETFST[0];
    1673. READW(NDF,NDFBF,1,STATIS);
    1674. IF STATIS NQ 0
    1675. THEN # END OF RECORD #
    1676. BEGIN
    1677. EOR = TRUE;
    1678. TEST I;
    1679. END
    1680.  
    1681. B<0,3>FDMPBUF[0] = B<0,3>NDFBUF[0]; # SET RECORD TYPE FIELD #
    1682. BC = B<4,8>NDFBUF[0]; # GET BATCH COUNT #
    1683. BA = B<12,24>NDFBUF[0]; # GET BEGINNING ADDRESS #
    1684. EA = B<36,24>NDFBUF[0]; # GET ENDING ADDRESS FOR THIS BATCH #
    1685. B<12,24>FDMPBUF[0] = BA;
    1686. B<36,24>FDMPBUF[0] = EA;
    1687. FETIN[0] = FETIN[0] + 1; # KEEP TRACK OF PLACE IN FDMP FET #
    1688. CURBA = BA; # SET CURRENT BEGINNING ADDRESS #
    1689. FOR J = 0 STEP 1 WHILE CURBA LQ EA DO
    1690. BEGIN
    1691. DBBA[J] = CURBA;
    1692. IF CURBA + 105 GR EA
    1693. THEN # LAST PACKET OF BATCH #
    1694. DBLEN[J] = EA - CURBA + 1;
    1695. ELSE
    1696. DBLEN[J] = 105;
    1697. CURBA = CURBA + DBLEN[J];
    1698. END
    1699. FOR J = 1 STEP 1 UNTIL BC DO
    1700. BEGIN
    1701. READW(NDF,NDFBF,1,STATIS);
    1702. IF STATIS NQ 0
    1703. THEN # PREMATURE END OF FILE #
    1704. BEGIN
    1705. TEMPC = XSFW(C<0,7>NDF);
    1706. PEOF2[0] = C<0,7>TEMPC;
    1707. MESSAGE(PEOF,LOCAL);
    1708. ABORT;
    1709.  
    1710. END
    1711. WC = B<0,12>NDFBUF[0]; # 60 BIT WORD COUNT OF DUMP PACKET #
    1712. BA = B<36,24>NDFBUF[0]; # ACTUAL BA OF DUMP PACKET #
    1713. FOR K=0 STEP 1 UNTIL BC DO
    1714. BEGIN
    1715. IF BA EQ DBBA[K]
    1716. THEN
    1717. BEGIN # MOVE DATA TO APPROPRIATE PLACE #
    1718. P<DBUFFER> = LOC(FDMPBUF[0]) + K*28 + 1;
    1719. READW(NDF,DBUFFER,WC-1,STATIS);
    1720. IF STATIS NQ 0
    1721. THEN # PREMATURE END OF RECORD #
    1722. BEGIN
    1723. TEMPC = XSFW(C<0,7>NDF);
    1724. PEOF2[0] = C<0,7>TEMPC;
    1725. MESSAGE(PEOF,LOCAL);
    1726. ABORT;
    1727.  
    1728. END
    1729. FETIN[0] = FETIN[0] + WC - 1;
    1730. END
    1731. END
    1732. END
    1733. WRITER(FDMP,"R");
    1734. END
    1735. END
    1736. CONTROL EJECT;
    1737. *IF DEF,IMS
    1738. #
    1739. **
    1740. *E
    1741. * 1. PROC NAME: AUTHOR: DATE:
    1742. * BLDFILE JACOB C. K. CHEN 80/02/01
    1743. *
    1744. * 2. FUNCTIONAL DESCRIPTION:
    1745. * BLDFILE COPIES THE DUMP FILE DMPAXXX TO A RANDOM WORK FILE
    1746. * NEUFILE.
    1747. *
    1748. * 3. METHOD USED:
    1749. * READ RECORDS FROM DUMP FILE DMPAXXX, IF RECORD TYPE OTHER THAN
    1750. * MACRO MEMORY RECORD,THEN SAVE IN CORE, IF MACRO MEMORY RECORDS
    1751. * FOUND, THEN COPY THE RECORD TO A SUPIO RANDOM FILE WITH END
    1752. * ADDRESS AND BEGIN ADDRESS OF THIS RECORD FOR KEY VALUE.
    1753. *
    1754. * 4. ENTRY PARAMETERS:
    1755. * NONE
    1756. *
    1757. * 5. EXIT PARAMETERS:
    1758. * HEADRB TRUE IF HEAD RECORD PRESENT IN DUMP FILE
    1759. * FILE1B TRUE IF FILE 1 RECORD PRESENT IN DUMP FILE
    1760. * STATRB TRUE IF STATUS RECORD PRESENT IN DUMP FILE
    1761. * CKSUMB TRUE IF CHECKSUM RECORD PRESENT IN DUMP FILE
    1762. * MACROB TRUE IF MACRO MEMORY RECORD PRESENT
    1763. *
    1764. * 6. COMDECKS CALLED
    1765. * NONE
    1766. *
    1767. * 7. ROUTINES CALLED
    1768. * REWIND REWIND FILE
    1769. * RECALL PUT PROGRAM IN RECALL STATUS - MACREL
    1770. * OPENSIO OPEN SUPIO FILE - SUPIO
    1771. * CLOSSID CLOSE SUPIO FILE - SUPIO
    1772. * READSR READ A SEQUENTIAL RECORD - SUPIO
    1773. * MOVE MOVE A BLOCK OF MEMORY WORDS - MACREL
    1774. * WRITERI WRITE A RANDOM RECORD - SUPIO
    1775. * WRITERR WRITE A SUPIO ERROR MESSAGE - SYMPL
    1776. * PRINTH PRINT A LINE TO OUTPUT - SYMPL
    1777. * RETERN RETURN FILE - MACREL
    1778. *
    1779. * 8. DAYFILE MESSAGES:
    1780. * NONE
    1781. *
    1782.  #
    1783. *ENDIF
    1784. #**********************************************************************#
    1785. # #
    1786. # PROCEDURE TO COPY DUMP FILE TO A RANDOM FILE #
    1787. # #
    1788. #**********************************************************************#
    1789. PROC BLDFILE;
    1790. BEGIN # COPY DUMP FILE TO RANDOM FILE NEUFILE #
    1791. ITEM NOTEOF B=TRUE; # END OF FILE FLAG #
    1792. ITEM ICODE U=0; # RECORD TYPE #
    1793. ITEM II; # INDEX #
    1794. SWITCH RECCOD RECOD0,RECOD1,RECOD2,RECOD3,RECOD4,RECOD5,
    1795. RECOD6;
    1796. CONTROL EJECT;
    1797. #*********************************************************************#
    1798. # #
    1799. # CODE BEGINS HERE #
    1800. # #
    1801. #**********************************************************************#
    1802.  
    1803. P<DMPBUF> = LOC(DMPBUF1); # LOCATE DUMP FILE BUFFER #
    1804. HEADRB = FALSE; # INITIAL FLAG #
    1805. FILE1B = FALSE;
    1806. STATRB = FALSE;
    1807. CKSUMB = FALSE;
    1808. MACROB = FALSE;
    1809. PREG = FALSE;
    1810. NOTEOF = TRUE;
    1811. REWIND(FDMP); # REWIND DUMP FILE #
    1812. RECALL(FDMP);
    1813. OPENSIO(LOC(NEUFILE),"NEW",IOSTAT); # OPEN RANDOM FILE #
    1814. IF IOSTAT NQ 0
    1815. THEN # OPEN ERROR #
    1816. WRITERR("NEUFILE","OPENING ",IOSTAT); # ISSUE ERROR MESS#
    1817. FOR DUMMYI=0 WHILE NOTEOF
    1818. DO
    1819. BEGIN
    1820. LENGTH = BUFLEN; # SET BUFFER LENGTH #
    1821. READSR(LOC(FDMP),LOC(DMPBUF),LENGTH,IOSTAT); # READ A REC#
    1822. IF IOSTAT EQ RDEOF OR IOSTAT EQ RDEOI
    1823. THEN # END OF FILE ENCOUNTERED #
    1824. BEGIN
    1825. NOTEOF = FALSE;
    1826. TEST DUMMYI;
    1827. END
    1828. ELSE # NOT END OF FILE #
    1829. IF IOSTAT NQ 0 AND IOSTAT NQ RDEOR
    1830. THEN # READ ERROR #
    1831. WRITERR(FDMP,"READING ",IOSTAT);
    1832. ICODE = B<0,3>DMPWD[0]; # GET RECORD TYPE FROM RECORD #
    1833. IF ICODE GR 6
    1834. THEN # INVALID RECORD TYPE #
    1835. ICODE = 3;
    1836. GOTO RECCOD[ICODE]; # GO TO CORRESPONDING ROUTINE #
    1837. RECOD0: # RECORD TYPE 0, HEADER #
    1838. HEADRB = TRUE; # HEADER RECORD EXIST #
    1839. MOVE(3,DMPBUF,HEADREC); # SAVE HEADER #
    1840. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1841. RECOD1: # RECORD TYPE 1, FILE 1 REGISTERS #
    1842. FILE1B = TRUE; # FILE 1 EXIST #
    1843. MOVE(71,DMPBUF,FILE1REC);# SAVE FILE 1 IN CORE #
    1844. B<36,24>FILE1REC1[0] = B<36,24>FILE1REC1[0] -
    1845. B<12,24>FILE1REC1[0];
    1846. B<12,24>FILE1REC1[0] = 0;
    1847. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1848. RECOD2: # RECORD TYPE 2, PAGE REGISTER RECORD EXISTS#
    1849. PREG = TRUE; # PAGE REGISTER RECORD EXISTS #
    1850. MOVE(MAXPGREG,DMPBUF,PAGREGREC);#SAVE PAG REG IN CORE#
    1851. B<36,24>PAGREGREC1[0] = B<36,24>PAGREGREC1[0] -
    1852. B<12,24>PAGREGREC1[0];
    1853. B<12,24>PAGREGREC1[0] = 0;
    1854. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1855. RECOD3: # INVALID RECORD TYPE #
    1856. STRING = " UNRECOGNIZED RECORD IN DUMP FILE ";
    1857. PRINTH(OUTBUF,14); # PRINT ERROR MESSAGE #
    1858. STRING = " ";
    1859. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1860. RECOD4: # RECORD TYPE 4, MACRO MEMORY RECORDS #
    1861. MACROB = TRUE; # MACRO MEMORY RECORD EXIST #
    1862. B<0,12>RECKEY = 0; # CONSTRUCT RECORD KEY #
    1863. B<12,24>RECKEY = B<36,24>DMPWD[0];
    1864. B<36,24>RECKEY = B<12,24>DMPWD[0];
    1865. WRITERI(LOC(NEUFILE),RECKEY,LOC(DMPBUF),LENGTH,IOSTAT);
    1866. # WRITE A RECORD TO RANDOM FILE #
    1867. IF IOSTAT NQ 0
    1868. THEN # WRITE ERROR #
    1869. WRITERR("NEUFILE","WRITING ",IOSTAT);
    1870. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1871. RECOD5: # RECORD TYPE 5, CHECKSUM RECORD #
    1872. CKSUMB = TRUE; # SET CHECKSUM RECORD EXIST FLAG #
    1873. CKSUMREC = DMPWD[0]; # SAVE CHECKSUM RECORD IN CORE #
    1874. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1875. RECOD6: # RECORD TYPE 6, STATUS RECORD #
    1876. STATRB = TRUE; # SET STATUS RECORD EXIST FLAG #
    1877. STATREC = DMPWD[0]; # SAVE STATUS RECORD IN CORE #
    1878. TEST DUMMYI; # TEST END OF FILE CONDITION #
    1879. END
    1880. CLOSSIO(LOC(NEUFILE),"REWIND"); # CLOSE RANDOM FILE #
    1881. OPENSIO(LOC(NEUFILE),"READ",IOSTAT); # OPEN FILE FOR READ #
    1882. IF IOSTAT NQ 0
    1883. THEN # OPEN ERROR #
    1884. WRITERR("NEUFILE","OPENING ",IOSTAT);
    1885. END
    1886. CONTROL EJECT;
    1887. *IF DEF,IMS
    1888. #
    1889. **
    1890. *E
    1891. * 1. PROC NAME: AUTHOR: DATE:
    1892. * FORM1 E. SULLIVAN 77/01/31
    1893. * JACOB C. K. CHEN 80/02/01
    1894. *
    1895. * 2. FUNCTIONAL DESCRIPTION:
    1896. * FORM1 FORMATS THE INFORMATION IN THE DUMP FILE HEADER AND
    1897. * WRITES THIS TO OUTPUT.
    1898. *
    1899. * 3. METHOD USED:
    1900. * DATA FIELDS ARE TAKEN FROM THE RECORD IN CORE, CONVERTED TO
    1901. * OCTAL DISPLAY IF NECESSARY, AND WRITTEN TO OUTPUT IN THE PROPER
    1902. * FORMAT.
    1903. *
    1904. * 4. ENTRY PARAMETERS:
    1905. * HEADRB SET TRUE IF HEADER RECORD PRESENT
    1906. * STATRB SET TRUE IF STATUS RECORD PRESENT
    1907. * CKSUMB SET TRUE IF CHECKSUM RECORD PRENSET
    1908. * HEADREC CONTAINS HEADER RECORD
    1909. * STATREC CONTAINS STATUS RECORD
    1910. * CKSUMREC CONTAINS CHECKSUM RECORD
    1911. * DNDIS CONTAINS DISPLAY CODE OF DUMP FILE NUMBER
    1912. *
    1913. * 5. EXIT PARAMETERS:
    1914. * NONE
    1915. *
    1916. * 6. COMDECKS CALLED:
    1917. * NONE
    1918. *
    1919. * 7. ROUTINES CALLED:
    1920. * XCOD CONVERT OCTAL TO DISPLAY CODE - SUPIO
    1921. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    1922. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY CODE - SYMPL
    1923. *
    1924. * 8. DAYFILE MESSAGES:
    1925. * NONE
    1926. *
    1927.  #
    1928. *ENDIF
    1929. CONTROL EJECT;
    1930. #**********************************************************************#
    1931. # #
    1932. # FORMAT HEADER RECORD PROCEDURE #
    1933. # #
    1934. #**********************************************************************#
    1935. PROC FORM1;
    1936. BEGIN
    1937. IF NOT HEADRB
    1938. THEN # HEAD RECORD NOT IN DUMP FILE #
    1939. BEGIN
    1940. PRINTH(HEADERR,5);
    1941. RETURN;
    1942. END
    1943. P<CCARD> = O"70"; # CONTROL CARD IMAGE AREA #
    1944. PRDN2[0] = DFNAME; # SET UP DUMP FILE NAME FOR HEADER #
    1945. FOR ICD=0 STEP 1 WHILE C<ICD,1>CCRD[0] NQ O"00"
    1946. DO # MOVE CHARACTERS UNTIL END OF CARD #
    1947. C<ICD+10,1>PRDN3[0] = C<ICD,1>CCRD[0];
    1948. NDAVER[0] = NAMVER[0]; # FILL IN NDA VERSION NO.#
    1949. C<0,4>NDAVER[0] = " NDA";
    1950. NDALEV[0] = NAMLV[0];
    1951. MOVE(10,PRDN,TTL); # MOVE HEADING INFORMATION #
    1952. RULES = 0;
    1953. HEADING; # WRITE HEADING #
    1954. PRINTH(BLLINE,3);
    1955. PRINTH(BLLINE,3);
    1956. PRTIME2[0] = C<3,7>HEADREC0[0];
    1957. PRTIME3[0] = C<0,1>HEADREC0[1];
    1958. PRINTH(PRTIME,2); # PRINT TIME LINE #
    1959. PRDATE2[0] = C<2,8>HEADREC0[1];
    1960. PRINTH(PRDATE,2); # PRINT DATE LINE #
    1961. PRNPU2[0] = C<0,7>HEADREC0[2];
    1962. PRINTH(PRNPU,2); # PRINT NPU NAME LINE #
    1963. IF R7
    1964. THEN # ITS AN R7 FORMAT DUMP FILE #
    1965. BEGIN # PRINT ADDITIONAL INFORMATION #
    1966. PRINTH(PRNNODE,2);
    1967. PRINTH(PRHALT,2);
    1968. PRINTH(PRPREG,2);
    1969. END
    1970. END
    1971. CONTROL EJECT;
    1972. *IF DEF,IMS
    1973. #
    1974. **
    1975. *E
    1976. * 1. PROC NAME: AUTHOR: DATE:
    1977. * SYNCHK JACOB C. K. CHEN 80/02/01
    1978. *
    1979. * 2. FUNCTIONAL DESCRIPTION:
    1980. * SYNCHK SYNTAX CHECK THE INPUT DIRECTIVES AND CONVERT THE
    1981. * PARAMETERS ON DIRECTIVE TO HEXADECIMAL.
    1982. *
    1983. * 3. METHOD USED:
    1984. * SYNCHK CALL THE SUBROUTINE DISHEX TO CONVERT PARAMETERS TO
    1985. * HEXADECIMAL AND SAVE IT IN PARAMETER ARRAY PARAMT. IF ERROR
    1986. * FLAG SET BY DISHEX, THEN PRINT THE ERROR MESSAGE AND SET
    1987. * DIRECTIVE ERROR FLAG DIRERR.
    1988. *
    1989. * 4. ENTRY PARAMETERS:
    1990. * RULES RULE NUMBER OF THIS DIRECTIVE
    1991. *
    1992. * 5. EXIT PARAMETERS:
    1993. * DIRERR DIRECTIVE ERROR FLAG
    1994. * PARAMT ARRAY CONTAINS INPUT PARAMETERS
    1995. *
    1996. * 6. COMDECKS CALLED
    1997. * NONE
    1998. *
    1999. * 7. ROUTINES CALLED:
    2000. * DISHEX CONVERT DISPLAY CODE TO HEXADECIMAL - SYMPL
    2001. * PRINTH PRINT A LINE TO OUTPUT - SYMPL
    2002. *
    2003. * 8. DAYFILE MESSAGES:
    2004. * NONE
    2005. *
    2006.  #
    2007. *ENDIF
    2008. CONTROL EJECT;
    2009. #**********************************************************************#
    2010. # #
    2011. # INPUT DIRECTIVES SYNTAX CHECK AND CONVERSION #
    2012. # #
    2013. #**********************************************************************#
    2014. PROC SYNCHK(DIRERR);
    2015. BEGIN # INPUT DIRECTIVES SYNTAX CHECK #
    2016. ARRAY NUMPARA [0:15] S(1);
    2017. BEGIN # NUMBER OF PARAMER FOR CORRESPONDING RULE #
    2018. ITEM NUMPAR U(0,0,60)=[0,1,1,5,7,0,0,0,0,0,7,8,0,0,0,0];
    2019. END
    2020. ITEM DIRERR B; # ERROR FLAG #
    2021. ITEM III I; # INDEX #
    2022. ITEM I; # INDEX #
    2023. ITEM WORKCI C(10); # WORKING AREA #
    2024. ITEM WORKUI U; # WORKING AREA #
    2025. CONTROL EJECT;
    2026. #**********************************************************************#
    2027. # #
    2028. # CODE BEGINS HERE #
    2029. # #
    2030. #**********************************************************************#
    2031.  
    2032. DIRERR = FALSE; # RESET ERROR FLAG #
    2033. FOR I= 1 STEP 1 UNTIL NUMPAR[RULES]
    2034. DO
    2035. BEGIN
    2036. III = (I - 1) * 6 + 1; # START POSITION #
    2037. WORKCI = C<III,5> INPBUFC;
    2038. DISHEX(WORKCI,WORKUI,5,DIRERR); # CONVERT TO HEX. #
    2039. IF DIRERR
    2040. THEN # ERROR IN CONVERSION #
    2041. BEGIN
    2042. INPBUFD = INPBUFC;
    2043. PRINTH(OUTBUFI,9); # PRINT THE ERROR DIRECTIVE #
    2044. ERRFIELD = WORKCI;
    2045. PRINTH(DIRMES1,6); # PRINT ERROR MESSAGE #
    2046. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2047. RETURN;
    2048. END
    2049. IF C<(I-1)*6,1>INPBUFC NQ " " AND C<(I-1)*6,1>INPBUFC
    2050. NQ ","
    2051. THEN # SEPERATOR ERROR #
    2052. BEGIN
    2053. DIRERR = TRUE;
    2054. INPBUFD = INPBUFC;
    2055. PRINTH(OUTBUFI,9);
    2056. III = (I - 1) * 6 + 1;
    2057. WORKCI = XCDD(III);
    2058. DIRMES23 = C<6,4> WORKCI;
    2059. PRINTH(DIRMES2,6); # PRINT ERROR MESSAGE #
    2060. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2061. RETURN;
    2062. END
    2063. PARAMT[I-1] = WORKUI; # SAVE PARAMETER FOR LATER USE #
    2064. END
    2065. END
    2066. CONTROL EJECT;
    2067. *IF DEF,IMS
    2068. #
    2069. **
    2070. *E
    2071. * 1. PROC NAME: AUTHOR: DATE:
    2072. * READI JACOB C. K. CHEN 80/02/01
    2073. *
    2074. * 2. FUNCTIONAL DESCRIPTION:
    2075. * READI READ A INPUT DIRECTIVE FROM FILE SPECIFIED IN NDA CONTROL
    2076. * STATEMENT.
    2077. *
    2078. * 3. METHOD USED:
    2079. * READI USE THE NOS DATA TRANSFER MACRO READH TO READ A INPUT
    2080. * DIRECTIVE INTO CORE.
    2081. *
    2082. * 4. ENTRY PARAMETERS:
    2083. * NONE
    2084. *
    2085. * 5. EXIT PARAMETERS:
    2086. * IOSTAT RETURNED STATUS
    2087. * IEOF END OF FILE FLAG
    2088. *
    2089. * 6. COMDECKS CALLED:
    2090. * NONE
    2091. *
    2092. * 7. ROUTINES CALLED:
    2093. * READH READ A CODED LINE - MACREL
    2094. * RECALL PUT THE PROGRAM INTO RECALL STATUS - MACREL
    2095. *
    2096. * 8. DAYFILE MESSAGES:
    2097. * NONE
    2098. *
    2099.  #
    2100. *ENDIF
    2101. #**********************************************************************#
    2102. # #
    2103. # READ INPUT DIRECTIVE PROCEDURE #
    2104. # #
    2105. #**********************************************************************#
    2106. PROC READI;
    2107. BEGIN # READ A INPUT DIRECTIVE #
    2108. LENGTH = 8;
    2109. READH(INPUT,INPBUF,LENGTH,IOSTAT); # READ A CARD #
    2110. RECALL(INPUT);
    2111. IF IOSTAT NQ 0
    2112. THEN # READ ERROR OR END OF FILE #
    2113. IEOF = TRUE; # SET END OF FILE INDICATOR #
    2114. END
    2115. CONTROL EJECT;
    2116. *IF DEF,IMS
    2117. #
    2118. **
    2119. *E
    2120. * 1. PROC NAME: AUTHOR: DATE:
    2121. * FORMAT0 JACOB C. K. CHEN 80/02/01
    2122. *
    2123. * 2. FUNCTIONAL DESCRIPTION:
    2124. * FORMAT0 MOVE THE COMMENT LINES TO THE OUTPUT LISTING TO PROCESS
    2125. * DIRECTIVE RULE O.
    2126. *
    2127. * 3. METHOD USED:
    2128. * FORMAT0 MOVE A COMMENT LINE TO THE OUTPUT BUFFER AND CALL
    2129. * SUBROUTINE PRINTH TO PRINT THE LINE.
    2130. *
    2131. * 4. ENTRY PARAMETERS:
    2132. * INPBUF THE COMMENT LINE READ FROM INPUT DIRECTIVES.
    2133. *
    2134. * 5. EXIT PARAMETERS:
    2135. * NONE
    2136. *
    2137. * 6. COMDECKS CALLED:
    2138. * NONE
    2139. *
    2140. * 7. ROUTINES CALLED:
    2141. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2142. *
    2143. * 8. DAYFILE MESSAGES:
    2144. * NONE
    2145. *
    2146.  #
    2147. *ENDIF
    2148. #**********************************************************************#
    2149. # #
    2150. # PROCESS COMMENTS CARDS PROCEDURE #
    2151. # #
    2152. #**********************************************************************#
    2153. PROC FORMAT0;
    2154. BEGIN # PRINT COMMENTS CARDS TO OUTPUT #
    2155. BASED ARRAY INPBUF0 [0:0] S(8);
    2156. BEGIN # COMMENTS FROM INPUT #
    2157. ITEM COMENTI0 C(1,0,60);
    2158. END
    2159. ARRAY OUTBUF0 [0:0] S(8);
    2160. BEGIN # OUTPUT BUFFER #
    2161. ITEM CCNTRL01 C(0,0,1) = [" "]; # CARRIAGE CONTROL #
    2162. ITEM FILLER01 C(0,6,9) = [" "];
    2163. ITEM COMENTO0 C(1,0,60); # COMMENTS #
    2164. ITEM ZEROEND0 U(7,0,60) = [0];
    2165. END
    2166. CONTROL EJECT;
    2167. #**********************************************************************#
    2168. # #
    2169. # CODE BEGINS HERE #
    2170. # #
    2171. #**********************************************************************#
    2172.  
    2173. P<INPBUF0> = LOC(INPBUF); # LOCATE INPUT BUFFER #
    2174. COMENTO0 = COMENTI0; # MOVE COMMENTS #
    2175. PRINTH(OUTBUF0,8); # PRINT COMMENT #
    2176. END
    2177. CONTROL EJECT;
    2178. *IF DEF,IMS
    2179. #
    2180. **
    2181. *E
    2182. * 1. PROC NAME: AUTHOR: DATE:
    2183. * FORMAT1 JACOB C. K. CHEN 80/02/01
    2184. *
    2185. * 2. FUNCTIONAL DESCRIPTION:
    2186. * FORMAT1 ISOLATE AND INTERPRET THE FILE 1 REGISTER LOCATIONS AND
    2187. * MACRO MEMORY LOCATIONS TO PROCESS DIRECTIVE RULE 1 AND 2.
    2188. *
    2189. * 3. METHOD USED:
    2190. * FORMAT1 CALL SUBROUTINE ONEWORD TO GET THE 16-BITS DATA WORD
    2191. * FROM RANDOM WORK FILE. EVENTUALLY FORMAT1 CALL PRINTH TO PRINT
    2192. * THE LINE.
    2193. *
    2194. * 4. ENTRY PARAMETERS:
    2195. * INPBUF CONTAINS THE INPUT DIRECTIVE LINE.
    2196. * RULES RULE ON DIRECTIVE TO BE PROCESSED.
    2197. *
    2198. * 5. EXIT PARAMETERS:
    2199. * NONE
    2200. *
    2201. * 6. COMDECKS CALLED:
    2202. * NONE
    2203. *
    2204. * 7. ROUTINES CALLED:
    2205. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    2206. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2207. *
    2208. * 8. DAYFILE MESSAGES:
    2209. * NONE
    2210. *
    2211.  #
    2212. *ENDIF
    2213. #**********************************************************************#
    2214. # #
    2215. # FILE 1 AND MACRO MEMORY INTERPRETER #
    2216. # #
    2217. #**********************************************************************#
    2218. PROC FORMAT1;
    2219. BEGIN # INTERPRETE THE FILE 1 OR MACRO MEMORY #
    2220. BASED ARRAY INPAR1 [0:0] S(1);
    2221. BEGIN # INPUT PARAMETER FOR RULES 1 AND 2 #
    2222. ITEM ADDR U(0,0,60);
    2223. END
    2224. ARRAY OUTBUF1 [0:0] S(9);
    2225. BEGIN # OUTPUT BUFFER #
    2226. ITEM CCNTRL11 C(0,0,1) = [" "]; # CARRIAGE CONTROL #
    2227. ITEM FILLER11 C(0,6,6) = [" (LOC "];
    2228. ITEM REGLOCO1 C(0,42,5); # LOCATION #
    2229. ITEM FILLER12 C(1,12,2) = [") "];
    2230. ITEM REGCONO1 C(1,24,4);
    2231. ITEM FILLER13 C(1,48,2) = [" "];
    2232. ITEM COMENTO1 C(2,0,64); # CONTENTS #
    2233. ITEM ZEROEND1 U(8,24,36) = [0];
    2234. END
    2235. ITEM WORKC1 C(10); # WORKING AREA #
    2236. ITEM WORKU1 U; # WORKING AREA #
    2237. CONTROL EJECT;
    2238. P<INPAR1> = LOC(PARAMI); # LOCATE INPUT PARAMETERS #
    2239. REGLOCO1 = C<1,5>INPBUFC; # MOVE LOCATION #
    2240. COMENTO1 = C<06,64>INPBUFC; # MOVE COMMENTS #
    2241. WORKU1 = RULES + 1; # SET RECORD TYPE. FILE 1 OR MEM#
    2242. ONEWORD(ADDR,WORKC1,WORKU1); # GET ONE WORD #
    2243. REGCONO1 = WORKC1;
    2244. PRINTH(OUTBUF1,9);
    2245. END
    2246. CONTROL EJECT;
    2247. *IF DEF,IMS
    2248. #
    2249. **
    2250. *E
    2251. * 1. PROC NAME: AUTHOR: DATE:
    2252. * FORMAT3 JACOB C. K. CHEN 80/02/01
    2253. *
    2254. * 2. FUNCTIONAL DESCRIPTION:
    2255. * FORMAT3 ISOLATE AND LIST FIXED LENGTH DATA STRUCTURES HAVING
    2256. * ONE OR MORE INSTANCE TO PROCESS DIRECTIVE RULE 3.
    2257. *
    2258. * 3. METHOD USED:
    2259. * FORMAT3 CALL ONEWORD TO GET POINTER WORD FROM RANDOM WORK FILE.
    2260. * IF POINTER WORD MISSING THEN PRINT A ERROR MESSAGE AND RETURN
    2261. * TO DNPROC, ELSE CALL ONEWORD TO RETRIEVE DATA FROM RANDOM FILE
    2262. * FORMAT THE LINE AND CALL PRINTH TO PRINT THE LINE.
    2263. *
    2264. * 4. ENTRY PARAMETERS:
    2265. * INPBUFC CONTAINS THE INPUT DIRECTIVE LINE
    2266. * PARAMI CONTAINS THE INPUT PARAMETERS ON DIRECTIVE LINE
    2267. *
    2268. * 5. EXIT PARAMETERS:
    2269. * NONE
    2270. *
    2271. * 6. COMDECKS CALLED:
    2272. * NONE
    2273. *
    2274. * 7. ROUTINES CALLED:
    2275. * HEADING PRINT THE HEADING INFORMATION - SYMPL
    2276. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    2277. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2278. * PTRMISS PRINT THE POINTER WORD MISSING MESSAGE - SYMPL
    2279. * XCHD CONVER OCTAL TO HEXADECIMAL DISPLAY CODE - MACREL
    2280. *
    2281. * 8. DAYFILE MESSAGES:
    2282. * NONE
    2283. *
    2284.  #
    2285. *ENDIF
    2286. #**********************************************************************#
    2287. # #
    2288. # PROCESS CONTINUOUS DATA STRUCTURES PROCEDURE #
    2289. # #
    2290. #**********************************************************************#
    2291. PROC FORMAT3;
    2292. BEGIN # FORMAT CONTIGUOUS BLOCK STRUCTURES #
    2293. BASED ARRAY INPAR3 [0:0] S(5);
    2294. BEGIN # PARAMETERS FROM INPUT DIRECTIVES #
    2295. ITEM PNTR U(0,0,60);
    2296. ITEM SIZE U(1,0,60);
    2297. ITEM INDX U(2,0,60);
    2298. ITEM FIRST U(3,0,60);
    2299. ITEM LAST U(4,0,60);
    2300. END
    2301. ITEM PNTRY U;
    2302. CONTROL EJECT;
    2303. P<INPAR3> = LOC(PARAMI);
    2304. IF FIRST GR LAST
    2305. THEN # ERROR #
    2306. BEGIN
    2307. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    2308. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    2309. PRINTH(CBSERR,6); # PRINT ERROR MESSAGE #
    2310. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2311. RETURN;
    2312. END
    2313. ONEWORD(PNTR,PNTRY,1); # GET THE POINTER WORD FROM MEM #
    2314. IF B<24,1>PNTRY EQ 1
    2315. THEN # POINTER WORD MISSING #
    2316. BEGIN
    2317. PTRMISS(PNTR);
    2318. RETURN;
    2319. END
    2320. LOOP01 = (LAST - FIRST) / INSPLN; # LOOP COUNT #
    2321. FOR I01=0 STEP 1 UNTIL LOOP01
    2322. DO
    2323. BEGIN
    2324. IF I01 EQ LOOP01
    2325. THEN
    2326. LOOP02 = (LAST-FIRST)-(LAST-FIRST) / INSPLN * INSPLN;
    2327. ELSE
    2328. LOOP02 = INSPLN - 1;
    2329. IF (LINENO + SIZE + 3) GR XLINP
    2330. THEN # SIZE BEYOND THE BOTTOM OF PRESENT PAGE #
    2331. HEADING; # START A NEW PAGE #
    2332. C<7,40>STRING = C<30,40> INPBUFC;
    2333. PRINTH(OUTBUF,14); # PRINT THE CURRENT LINE #
    2334. STRING = " "; # CLEAR OUTPUT BUFFER #
    2335. C<1,6>STRING = "OFFSET";
    2336. FOR I02=0 STEP 1 UNTIL LOOP02
    2337. DO # FORMAT A INDEX TITLE LINE #
    2338. BEGIN
    2339. TEMPC1 =XCHD(FIRST+I01*INSPLN+I02); # CONVERT TO HEX #
    2340. C<I02*7+10,4>STRING = C<6,4>TEMPC1;
    2341. END
    2342. PRINTH(OUTBUF,14); # PRINT INDEX TITLE LINE #
    2343. STRING = " ";
    2344. FOR I02=0 STEP 1 UNTIL SIZE - 1
    2345. DO
    2346. BEGIN # FORMAT THE DETAIL LINE #
    2347. TEMPC1 = XCHD(I02); # CONVERT OFFSET TO HEX #
    2348. C<1,6>STRING = C<6,4>TEMPC1;
    2349. FOR I03=0 STEP 1 UNTIL LOOP02
    2350. DO
    2351. BEGIN
    2352. TEMPU1 = PNTRY + (I01*INSPLN+I03) * SIZE + I02;
    2353. ONEWORD(TEMPU1,TEMPC1,3); # GET DATA FROM FILE #
    2354. C<I03*7+10,4>STRING = TEMPC1;
    2355. END
    2356. PRINTH(OUTBUF,14); # PRINT THE DETAIL LINE #
    2357. STRING = " ";
    2358. END
    2359. PRINTH(BLLINE,1); # PRINT BLANK LINE BETWEEN STRU.#
    2360. PRINTH(BLLINE,1);
    2361. END
    2362. END
    2363. CONTROL EJECT;
    2364. *IF DEF,IMS
    2365. #
    2366. **
    2367. *E
    2368. * 1. PROC NAME: AUTHOR: DATE:
    2369. * FORMAT4 JACOB C. K. CHEN 80/02/01
    2370. *
    2371. * 2. FUNCTIONAL DESCRIPTION:
    2372. * FORMAT4 ISOLATE AND LIST THE CONTENT OF CIRCULAR BUFFERS IN
    2373. * CHRONOLOGICAL ORDER TO PROCESS DIRECTIVE RULE 4.
    2374. *
    2375. * 3. METHOD USED:
    2376. * FORMAT4 CALL ONEWORD TO GET POINTER WORDS FROM RANDOM WORK FILE
    2377. * 1 IF POINTER WORDS MISSING THEN PRINT A ERROR MESSAGE AND
    2378. * RETURN TO DNPROC, ELSE CALL ONEWORD TO RETRIEVE DATA WORDS FROM
    2379. * RANDOM WORK FILE, FORMAT THE LINE AND CALL PRINTH TO PRINT THE
    2380. * LINE.
    2381. *
    2382. * 4. ENTRY PARAMETERS:
    2383. * INPBUFC CONTAINS THE INPUT DIRECTIVE LINE.
    2384. * PARAMI CONTAINS THE PARAMETERS ON DIRECTIVE LINE.
    2385. *
    2386. * 5. EXIT PARAMETERS:
    2387. * NONE
    2388. *
    2389. * 6. COMDECKS CALLED:
    2390. * NONE
    2391. *
    2392. * 7. ROUTINES CALLED:
    2393. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    2394. * PTRMISS PRINT THE POINTER WORD MISSING MESSAGE - SYMPL
    2395. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2396. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY CODE - SYMPL
    2397. *
    2398. * 8. DAYFILE MESSAGES:
    2399. * NONE
    2400. *
    2401.  #
    2402. *ENDIF
    2403. #**********************************************************************#
    2404. # #
    2405. # FORMAT CIRCULAR BUFFER PROCEDURE #
    2406. # #
    2407. #**********************************************************************#
    2408. PROC FORMAT4;
    2409. BEGIN # FORMAT CIRCULAR IO BUFFERS #
    2410. BASED ARRAY INPAR4 [0:0] S(7);
    2411. BEGIN # INPUT PARAMETERS FOR RULE 4 #
    2412. ITEM FWA U(0,0,60); # POINTER TO FWA OF CIO BUFFERS #
    2413. ITEM NEXT U(1,0,60); # POINTER TO OLDEST ITEM #
    2414. ITEM LWA U(2,0,60); # POINTER TO LWA OF CIO BUFFERS #
    2415. ITEM FLAG U(3,0,60); # POINTER TO MEANINGFUL DATA FLAG #
    2416. ITEM PTRN U(4,0,60); # PATTERN OF DELIMITER #
    2417. ITEM MASK U(5,0,60); # MASK FOR ISOLATING DELIMITER #
    2418. ITEM SIZE U(6,0,60); # LENGTH OF FIXED LENGTH DATA #
    2419. END
    2420. ITEM BEGNY U; # FWA ADDRESS OF CIO BUFFERS #
    2421. ITEM NEXTY U; # OLDEST ITEM ADDRESS #
    2422. ITEM LASTY U; # LWA ADDRESS OF CIO BUFFERS #
    2423. ITEM FLAGY U; # MEANINGFUL DATA FLAG #
    2424. ITEM CIOEND B; # END OF BUFFER FLAG #
    2425. ITEM WORADR U; # WORD ADDRESS #
    2426. ITEM PASSI B; # FIRST PASS FLAG #
    2427. CONTROL EJECT;
    2428. #**********************************************************************#
    2429. # #
    2430. # CODE BEGINS HERE #
    2431. # #
    2432. #**********************************************************************#
    2433.  
    2434. P<INPAR4> = LOC(PARAMI); # LOCATE INPUT PARAMETERS #
    2435. ONEWORD(FLAG,FLAGY,0); # GET FLAG WORD #
    2436. IF FLAGY EQ 0
    2437. THEN # NO MEANINGFUL DATA IN BUFFERS #
    2438. BEGIN
    2439. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    2440. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    2441. PRINTH(NOMEAN,4); # PRINT ERROR MESSAGE #
    2442. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2443. RETURN;
    2444. END
    2445. ONEWORD(FWA,BEGNY,0); # GET FWA ADDRESS #
    2446. ONEWORD(NEXT,NEXTY,0); # GET OLDEST ITEM ADDRESS #
    2447. ONEWORD(LWA,LASTY,0); # GET LWA ADDRESS #
    2448. IF B<24,1>FLAGY EQ 1 OR B<24,1>BEGNY EQ 1 OR
    2449. B<24,1>NEXTY EQ 1 OR B<24,1>LASTY EQ 1
    2450. THEN # POINTER WORD MISSING #
    2451. BEGIN
    2452. IF B<24,1>FLAGY EQ 1 THEN PTRMISS(FLAG);
    2453. IF B<24,1>BEGNY EQ 1 THEN PTRMISS(FWA);
    2454. IF B<24,1>NEXTY EQ 1 THEN PTRMISS(NEXT);
    2455. IF B<24,1>LASTY EQ 1 THEN PTRMISS(LWA);
    2456. RETURN; # RETURN TO PROCESS NEXT DIRECTIVE #
    2457. END
    2458. IF NOT ( NEXTY GQ BEGNY AND LASTY GQ NEXTY )
    2459. THEN # ERROR IN CIO FWA OR LWA OR NEXT ADDRESS #
    2460. BEGIN
    2461. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    2462. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    2463. PRINTH(CIOERR,7); # PRINT ERROR MESSAGE #
    2464. PRINTH(BLLINE,1);
    2465. RETURN;
    2466. END
    2467. C<10,28> STRING = C<42,28> INPBUFC; # MOVE HEADER #
    2468. C<3,3> STRING = "LOC";
    2469. PRINTH(OUTBUF,14); # PRINT HEADER LINE #
    2470. STRING = " ";
    2471. WORADR = NEXTY;
    2472. IF SIZE NQ 0
    2473. THEN # MUST BE FIXED LENGTH DATA STRUCTURES #
    2474. BEGIN
    2475. FOR I01 = 0 STEP 1 UNTIL SIZE - 1
    2476. DO
    2477. BEGIN
    2478. I02 = I01 - I01 / CBWPLN * CBWPLN;
    2479. IF I02 EQ 0
    2480. THEN # FORMAT FIRST WORD ADDRESS #
    2481. BEGIN
    2482. HEXDIS(WORADR,TEMPC1,4); # CONVERT TO DISPLAY #
    2483. C<2,4> STRING = TEMPC1;
    2484. END
    2485. ONEWORD(WORADR,TEMPC1,3); # GET ONE DATA WORD #
    2486. C<I02*5+7,4> STRING = TEMPC1;
    2487. IF I02 EQ CBWPLN-1 OR I01 EQ SIZE-1
    2488. THEN # LINE FILLED #
    2489. BEGIN
    2490. PRINTH(OUTBUF,14); # PRINT ONE DATA LINE #
    2491. STRING = " ";
    2492. END
    2493. IF WORADR EQ LASTY
    2494. THEN # LWA ADDRESS REACHED #
    2495. WORADR = BEGNY; # SET ADDRESS TO FWA #
    2496. ELSE
    2497. WORADR = WORADR + 1; # INCREASE ONE #
    2498. IF WORADR EQ NEXTY AND I01 NQ SIZE-1
    2499. THEN # CIO LIMITE REACHED #
    2500. BEGIN
    2501. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    2502. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    2503. PRINTH(CIOLIM,4); # PRINT ERROR MESSAGE #
    2504. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2505. I01 = SIZE;
    2506. END
    2507. END
    2508. END
    2509. ELSE # VARIABLE LENGTH DATA STRUCTURE #
    2510. BEGIN
    2511. CIOEND = FALSE; # INITIAL FLAG #
    2512. PASSI = TRUE;
    2513. FOR I01=0 STEP 1 WHILE NOT CIOEND
    2514. DO
    2515. BEGIN
    2516. ONEWORD(WORADR,TEMPU1,1); # GET ONE DATA WORD #
    2517. IF (B<44,16>TEMPU1 LAN B<44,16>MASK) EQ B<44,16>PTRN
    2518. THEN # DESIRED PATTERN FOUND #
    2519. BEGIN
    2520. IF PASSI
    2521. THEN # FIRST PATTERN THEN SET PROCESS FLAG #
    2522. BEGIN
    2523. I01 = 0;
    2524. PASSI = FALSE;
    2525. END
    2526. ELSE
    2527. CIOEND = TRUE;
    2528. END
    2529. IF NOT PASSI
    2530. THEN # DESIRED DATA FOUND PROCESS HERE #
    2531. BEGIN
    2532. I02 = I01 - I01 / CBWPLN * CBWPLN;
    2533. IF I02 EQ 0
    2534. THEN # FORMAT FIRST WORD ADDRESS #
    2535. BEGIN
    2536. HEXDIS(WORADR,TEMPC1,4);
    2537. C<2,4> STRING = TEMPC1;
    2538. END
    2539. HEXDIS(TEMPU1,TEMPC1,4); # CONVERT TO DISPLAY #
    2540. C<I02*5+7,4> STRING = TEMPC1;
    2541. END
    2542. IF WORADR EQ LASTY
    2543. THEN # LWA ENCOUNTER THEN SET TO FWA #
    2544. WORADR = BEGNY;
    2545. ELSE
    2546. WORADR = WORADR + 1; # INCREASE ONE #
    2547. IF WORADR EQ NEXTY
    2548. THEN # CIO LIMIT REACHED #
    2549. CIOEND = TRUE;
    2550. IF NOT PASSI
    2551. THEN # TEST FOR LINE FILLED #
    2552. BEGIN
    2553. IF I02 EQ CBWPLN-1 OR CIOEND
    2554. THEN # LINE FILLED #
    2555. BEGIN
    2556. PRINTH(OUTBUF,14); # PRINT DATA LINE #
    2557. STRING = " ";
    2558. END
    2559. END
    2560. END
    2561. IF PASSI
    2562. THEN # NO DATA FOUND #
    2563. BEGIN
    2564. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    2565. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    2566. PRINTH(NOPATT,4); # PRINT ERROR MESSAGE #
    2567. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2568. END
    2569. END
    2570. PRINTH(BLLINE,1); # PRINT A BLANK LINE BETWEEN SEC#
    2571. PRINTH(BLLINE,1);
    2572. END
    2573. CONTROL EJECT;
    2574. *IF DEF,IMS
    2575. #
    2576. **
    2577. *E
    2578. * 1. PROC NAME AUTHOR: DATE:
    2579. * FORMAT9 JACOB C. K. CHEN
    2580. *
    2581. * 2. FUNCTIONAL DESCRIPTION:
    2582. * FORMAT9 FORMAT THE FILE 1 AND MACR MEMORY RECORDS INTO OUTPUT
    2583. * LISTING TO PROCESS DIRECTIVE RULE 8 AND 9.
    2584. *
    2585. * 3. METHOD USED:
    2586. * FORMAT9 CALL ONEWORD TO RETRIEVE DATA WORDS FROM RANDOM WORK
    2587. * FILE OR FROM CORE, CONVERT THEM INTO ASCII DISPLAY CODE, FORMAT
    2588. * THEM IN OUPUT LISTING LINE, CALL PRINTH TO PRIN THE LINE.
    2589. *
    2590. * 4. ENTRY PARAMETERS:
    2591. * RULES
    2592. * BEGADD OCTAL VALUE OF REPORT BEGINNING ADDRESS SET
    2593. * ENDADD OCTAL VALUE OF REPORT ENDING ADDRESS SET
    2594. *
    2595. * 5. EXIT PARAMETERS:
    2596. * NONE
    2597. *
    2598. * 6. COMDECKS CALLED:
    2599. * NONE
    2600. *
    2601. * 7. ROUTINES CALLED:
    2602. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY CODE - SYMPL
    2603. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    2604. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2605. * MOVE MOVE A BLOCK OF MEMORY WORDS - MACREL
    2606. *
    2607. * 8. DAYFILE MESSAGES:
    2608. * NONE
    2609. *
    2610.  #
    2611. *ENDIF
    2612. #**********************************************************************#
    2613. # #
    2614. # FORMAT MACRO MEMORY RECORDS AND FILE 1 RECORD PROCEDURE #
    2615. # #
    2616. #**********************************************************************#
    2617. PROC FORMAT9;
    2618. BEGIN # FORMAT FILE 1 AND MACRO MEM RECORDS #
    2619. BASED ARRAY OUTLINE [0:0] S(14);
    2620. BEGIN # WORKING AREA FOR OUTPUT LISTING #
    2621. ITEM DISADR C(0,6,6); # ADDRESS OF THIS LINE #
    2622. ITEM DUPLIC C(0,42,2); # DUPLCATED LINE INDICATOR #
    2623. ITEM OUTLIN C(0,0,140);
    2624. ITEM OUTLIN1 C(0,54,96); # HEX DISPLAY CODE PORTION #
    2625. ITEM OUTLIN2 C(10,30,32);# ASCII DISPLAY CODE PORTION #
    2626. END
    2627.  
    2628. ARRAY OUTLINE8 [0:0] S(14);
    2629. BEGIN # WORKING AREA FOR OUTPUT LISTING #
    2630. ITEM OUTLIN8 C(0,0,137)=[" "];
    2631. ITEM LIN8END U(13,42,18)=[0];
    2632. END
    2633.  
    2634. ARRAY OUTLINE9 [0:0] S(14);
    2635. BEGIN # WORKING AREA FOR OUTPUT LISTING #
    2636. ITEM OUTLIN9 C(0,0,137)=[" "];
    2637. ITEM LIN9END U(13,42,18)=[0];
    2638. END
    2639.  
    2640. ARRAY DISPOSP [0:15] S(1);
    2641. BEGIN # HEX. DISPLAY CODE POSITION #
    2642. ITEM DISPOS U(0,52,8)=[0,6,12,18,24,30,36,42,48,54,60,66,
    2643. 72,78,84,90];
    2644. END
    2645.  
    2646. ARRAY ASCPOSP [0:15] S(1);
    2647. BEGIN # ASCII DISPLAY CODE POSITION #
    2648. ITEM ASCPOS U(0,52,8)=[0,2,4,6,8,10,12,14,16,18,20,22,24,
    2649. 26,28,30];
    2650. END
    2651.  
    2652. ITEM TYPE9 I; # FLAG TO INDICATE FILE 1 OR MACRO MEM#
    2653. ITEM DMPBEG U; # BEGIN ADDRESS TO BE PRINTED #
    2654. ITEM DMPEND U; # END ADDRESS TO BE PRINTED #
    2655. ITEM LINEADR U=0; # CURRENT LINE ADDRESS #
    2656. ITEM LASTADR U=0; # ADDRESS OF LAST LINE PRINTED #
    2657. ITEM DATAMISS C(110)=" -- -- -- -- --
    2658. -- -- -- -- -- -- -- -- -- -- -- ";
    2659. # DATA MISSING IN DUMP FILE #
    2660. CONTROL EJECT;
    2661. #**********************************************************************#
    2662. # #
    2663. # CODE BEGINS HERE #
    2664. # #
    2665. #**********************************************************************#
    2666.  
    2667. IF RULES EQ 8
    2668. THEN # FILE 1 REGISTERS TO BE PRINTED #
    2669. BEGIN
    2670. TYPE9 = 6; # FILE 1 RECORD AND CONVERSION WANTED #
    2671. DMPBEG = B<12,24>FILE1REC1[0];
    2672. DMPEND = B<36,24>FILE1REC1[0];
    2673. END
    2674. ELSE # MACRO MEMORY RECORDS TO BE PRINTED #
    2675. BEGIN
    2676. IF RULES EQ 7 # PAGE REGISTER RECORDS TO BE PRINTED #
    2677. THEN
    2678. BEGIN
    2679. TYPE9 = 6;
    2680. DMPBEG = B<12,24>PAGREGREC1[0];# SET BEGIN ADDRESS #
    2681. DMPEND = B<36,24>PAGREGREC1[0];
    2682. END
    2683. ELSE
    2684. BEGIN
    2685. TYPE9 = 7; # MACRO MEM RECORDS AND CONVERSION WANTED #
    2686. DMPBEG = BEGADD; # SET BEGIN ADDRESS #
    2687. DMPEND = ENDADD; # SET END ADDRESS #
    2688. DMPWD1[0] = 0; # CLEAR BUFFER TO FORCE READ IN GETRAN #
    2689. DMPWD2[0] = 0;
    2690. END
    2691. END
    2692. I01 = DMPBEG - DMPBEG / WODPLN * WODPLN;
    2693. IF I01 NQ 0
    2694. THEN # ROUND BEGIN ADDRESS #
    2695. DMPBEG = DMPBEG - I01;
    2696. P<OUTLINE> = LOC(OUTLINE8); # LOCATE OUTPUT WORKING AREA #
    2697. FOR I01=DMPBEG STEP 1 UNTIL DMPEND
    2698. DO # FORMAT DUMP RECORDS HERE #
    2699. BEGIN
    2700. I02 = I01 - I01 / WODPLN * WODPLN;
    2701. IF I02 EQ 0
    2702. THEN # CONVERT LINE ADDRESS TO DISPLAY #
    2703. BEGIN
    2704. HEXDIS(I01,TEMPC1,6);
    2705. DISADR = TEMPC1;
    2706. LINEADR = I01; # SAVE LINE ADDRESS #
    2707. END
    2708. ONEWORD(I01,TEMPC1,TYPE9);
    2709. C<DISPOS[I02],4>OUTLIN1[0] = TEMPC1;
    2710. C<ASCPOS[I02],2>OUTLIN2[0] = C<5,2>TEMPC1;
    2711. IF I02 EQ WODPLN - 1 OR I01 EQ DMPEND
    2712. THEN # LINE FILLED #
    2713. BEGIN
    2714. IF I01 EQ DMPEND
    2715. THEN
    2716. BEGIN # PRINT LAST LINE #
    2717. PRINTIT = TRUE; # SET PRINT FLAG #
    2718. I03 = WODPLN - I02 - 1;
    2719. IF I03 NQ 0
    2720. THEN # CLEAR BUFFER OF DATAS AFTER END ADDRESS #
    2721. BEGIN
    2722. C<(I02+1)*6,I03*6>OUTLIN1 = " ";
    2723. C<(I02+1)*2,I03*2>OUTLIN2 = " ";
    2724. END
    2725. END
    2726. ELSE # TEST FOR DUPLICATED LINE #
    2727. BEGIN
    2728. PRINTIT = FALSE; # INITIAL FLAG #
    2729. IF C<9,94>OUTLIN8 NQ C<9,94>OUTLIN9
    2730. THEN # NOT A DUPLICATED LINE #
    2731. PRINTIT = TRUE;
    2732. IF NOT PRINTIT AND EXPAND
    2733. THEN # TEST FOR DATA MISSING IN DUMP FILE #
    2734. IF C<9,94>OUTLIN NQ C<9,94>DATAMISS
    2735. THEN # NOT DATA MISSING #
    2736. PRINTIT = TRUE; # EXPAND LISTING WANTED #
    2737. END
    2738. IF PRINTIT
    2739. THEN # PRINT THE LINE #
    2740. BEGIN
    2741. IF LINEADR GR LASTADR + WODPLN
    2742. THEN # SET DUPLICATED LINE SYMBOL ** IN OUTPUT #
    2743. DUPLIC = "**";
    2744. ELSE
    2745. DUPLIC = " ";
    2746. LASTADR = LINEADR; # RESET LAST LINE ADDR#
    2747. PRINTH(OUTLINE,14);
    2748. IF P<OUTLINE> EQ LOC(OUTLINE8)
    2749. THEN # LOCATE ANOTHER WORKING BUFFER #
    2750. P<OUTLINE> = LOC(OUTLINE9);
    2751. ELSE
    2752. P<OUTLINE> = LOC(OUTLINE8);
    2753. END
    2754. END
    2755. IF IOSTAT EQ RDEOI
    2756. THEN # END OF FILE #
    2757. I01 = DMPEND; # SET INDEX TO END #
    2758. END
    2759. END
    2760. CONTROL EJECT;
    2761. *IF DEF,IMS
    2762. #
    2763. **
    2764. *E
    2765. * 1. PROC NAME: AUTHOR: DATE:
    2766. * FORMATA JACOB C. K. CHEN 80/02/01
    2767. *
    2768. * 2. FUNCTIONAL DESCRIPTION:
    2769. * FORMATA ISOLATE AND LIST THE CONTENT OF LCBS WITH ITS
    2770. * SUBORDINATE TCBS TO PROCESS DIRECTIVE RULE A.
    2771. *
    2772. * 3. METHOD USED:
    2773. * FORMATA COUNT THE NUMBER OF TCBS WITH A LCB TO DECIDE HOW MANY
    2774. * LCB-TCB WE MUST FORMAT IN ONE LINE. IF A LCB WITH MORE
    2775. * THAN 15 TCBS THEN CALL FORMATA1 TO FORMAT IT, ELSE CALL
    2776. * FORMATA2 TO FORMAT ONE OR MORE THAN ONE LCBS IN ONE LINE.
    2777. *
    2778. * 4. ENTRY PARAMETERS:
    2779. * INPBUFC CONTAINS THE INPUT DIRECTIVE LINE.
    2780. * PARAMI CONTAINS THE INPUT PARAMETERS ON DIRECTIVE LINE.
    2781. *
    2782. * 5. EXIT PARAMETERS:
    2783. * TCBCNT TCB COUNT WITH A LCB
    2784. * TCBADR LCB/TCB ADDRESS POINTER
    2785. * CNT COUNT OF LCB WE MUST FORMAT THEM IN ONE LINE
    2786. *
    2787. * 6. COMDECKS CALLED:
    2788. * NONE
    2789. *
    2790. * 7. ROUTINES CALLED:
    2791. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    2792. * PTRMISS PRINT THE POINTER WORD MISSING MESSAGE - SYMPL
    2793. * HEADING PRINT THE HEADING INFORMATION - SYMPL
    2794. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2795. * FORMATA1 FORMAT A LCB WITH MORE THAN 15 TCBS - SYMPL
    2796. * FORMATA2 FORMAT ONE OR MORE THAN ONE LCB IN ONE LINE - SYMPL
    2797. *
    2798. * 8. DAYFILE MESSAGES:
    2799. * NONE
    2800. *
    2801.  #
    2802. *ENDIF
    2803. #**********************************************************************#
    2804. # #
    2805. # FORMAT LCB/TCB PROCEDURE #
    2806. # #
    2807. #**********************************************************************#
    2808. PROC FORMATA;
    2809. BEGIN #FORMATA# # FORMAT LCB/TCB OR LCB/CCB #
    2810. BASED ARRAY INPARA [0:0] S(7);
    2811. BEGIN # INPUT PARAMETERS FOR RULE A #
    2812. ITEM LCBP U(0,0,60); # POINTER TO FIRST LCB #
    2813. ITEM LCBL U(1,0,60); # LENGTH OF LCB DATA STRUCTURE #
    2814. ITEM FTCB U(2,0,60); # INDEX TO FIRST TCB #
    2815. ITEM TCBL U(3,0,60); # LENGTH OF TCB STRUCTURE #
    2816. ITEM NTCB U(4,0,60); # INDEX TO NEXT TCB #
    2817. ITEM NLCB U(5,0,60); # NUMBER OF LCB TO BE LISTED #
    2818. ITEM LCBX U(6,0,60); # FIRST LCB TO BE LISTED #
    2819. END
    2820.  
    2821. ARRAY TCBADDR[0:15] S(1);
    2822. BEGIN # TCB ADDRESS #
    2823. ITEM TCBADR U(0,0,60); # TCB ADDRESS #
    2824. END
    2825.  
    2826. ARRAY TCBNUMB [0:15] S(1);
    2827. BEGIN
    2828. ITEM TCBNUM U(0,0,60); # TCB NUMBER #
    2829. END
    2830.  
    2831. ARRAY TCBCOUNT [0:7] S(1);
    2832. BEGIN
    2833. ITEM TCBCNT U(0,0,60); # TCB COUNT #
    2834. END
    2835.  
    2836. ITEM LCBPY U; # FIRST LCB ADDRESS #
    2837. ITEM NLCBY U; # NUMBER OF LCB TO BE LISTED #
    2838. ITEM CNT I; # COUNT #
    2839. ITEM TCBPTR U; # TCB POINTER #
    2840. ITEM NXTTCB U; # NEXT TCB POINTER #
    2841. ITEM LCBADR U; # LCB ADDRESS #
    2842. ITEM TOTALT I; # TOTAL OF TCB #
    2843. CONTROL EJECT;
    2844. P<INPARA> = LOC(PARAMI); # LOCATE INPUT PARAMETERS #
    2845. IF FTCB GR LCBL OR NTCB GR TCBL
    2846. THEN # ERROR IN DIRECTIVE #
    2847. BEGIN
    2848. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    2849. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    2850. PRINTH(LCBERR,7); # PRINT ERROR MESSAGE #
    2851. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    2852. RETURN;
    2853. END
    2854. ONEWORD(LCBP,LCBPY,1); # GET LCB ADDRESS FROM DUMP FILE#
    2855. IF NLCB EQ 0
    2856. THEN # JUST ONE LCB TO BE LISTED #
    2857. NLCBY = 1;
    2858. ELSE # GET THE NUMBER OF LCBS TO BE LISTED #
    2859. ONEWORD(NLCB,NLCBY,0); # GET NUMBER OF LCBS FROM FILE #
    2860. IF NLCBY EQ 0
    2861. THEN # SET NUMBER TO MINIMUM #
    2862. NLCBY = 1;
    2863. IF B<24,1>LCBPY EQ 1 OR B<24,1>NLCBY EQ 1
    2864. THEN # POINTER WORD MISSING #
    2865. BEGIN
    2866. IF B<24,1>LCBPY EQ 1 THEN PTRMISS(LCBP);
    2867. IF B<24,1>NLCBY EQ 1 THEN PTRMISS(NLCB);
    2868. RETURN;
    2869. END
    2870. FOR I01=0 STEP 1 UNTIL 15
    2871. DO # INITIAL VALUE #
    2872. BEGIN
    2873. TCBNUM[I01] = 0;
    2874. TCBADR[I01] = 0;
    2875. END
    2876. FOR I01=LCBX STEP 1 UNTIL NLCBY + LCBX - 1
    2877. DO
    2878. BEGIN
    2879. LCBADR = LCBPY + LCBL * I01;
    2880. FOR I02=0 STEP 1 UNTIL 7
    2881. DO # INITIAL TCB COUNT ARRAY #
    2882. TCBCNT[I02] = 0;
    2883. TOTALT = 0;
    2884. FOR I02=0 STEP 1 UNTIL LCBPLN-1
    2885. DO # DETERMINE HOW MANY LCBS IN ONE LINE #
    2886. BEGIN
    2887. IF (I01 + I02) LQ NLCBY + LCBX - 1
    2888. THEN
    2889. BEGIN
    2890. TCBPTR = LCBADR + I02 * LCBL + FTCB;
    2891. ONEWORD(TCBPTR,NXTTCB,1); # GET NEXT TCB POINTER#
    2892. FOR I03=0 STEP 1 WHILE B<44,16>NXTTCB NQ 0
    2893. DO # COUNT TCB #
    2894. BEGIN
    2895. TCBPTR = NXTTCB + NTCB;# NEXT TCB POINTER #
    2896. ONEWORD(TCBPTR,NXTTCB,1); # GET NEXT TCB #
    2897. IF NXTTCB NQ 0
    2898. THEN # SAVE TCB POINTER #
    2899. TCBCNT [I02] = TCBCNT [I02] + 1;
    2900. IF TCBCNT[I02] GQ MAXTCB
    2901. THEN # TCB CHAINS EXCEED MAXIMUM #
    2902. BEGIN # ERROR IN TCB CHAIN #
    2903. IF I02 EQ 0
    2904. THEN
    2905. BEGIN
    2906. INPBUFD = INPBUFC;
    2907. PRINTH(OUTBUFI,9);
    2908. PRINTH(TCBERR,6);
    2909. PRINTH(BLLINE,1);
    2910. END
    2911. NXTTCB = 0; # FORCE LOOP END #
    2912. END
    2913. END
    2914. IF TCBCNT[I02] EQ 0
    2915. THEN
    2916. TCBCNT[I02] = 1;
    2917. TOTALT = TOTALT + TCBCNT[I02] + 1; # COUNT TOTAL#
    2918. IF TOTALT EQ LCBPLN * 2
    2919. THEN # EACH LCB WITH ONE TCB #
    2920. BEGIN
    2921. CNT = I02;
    2922. I02 = LCBPLN - 1;
    2923. END
    2924. IF TOTALT GR LCBPLN * 2
    2925. THEN # EXCEED LINE SIZE #
    2926. BEGIN
    2927. IF I02 GR 0
    2928. THEN
    2929. CNT = I02 - 1; # ROUND COUNT TO LAST #
    2930. ELSE
    2931. CNT = 0;
    2932. I02 = LCBPLN - 1;
    2933. END
    2934. END
    2935. ELSE
    2936. BEGIN
    2937. CNT = I02 - 1;
    2938. I02 = LCBPLN - 1;
    2939. END
    2940. END
    2941. IF LCBL GQ TCBL
    2942. THEN # SET LENGTH TO LCB LENGTH #
    2943. I05 = LCBL - 1;
    2944. ELSE # SET LENGTH TO TCB LENGTH #
    2945. I05 = TCBL - 1;
    2946. IF (LINENO + I05 + 3) GR XLINP
    2947. THEN # STRUCTURE EXCEED PAGE SIZE #
    2948. HEADING; # PRINT HEADER INFORMATION #
    2949. C<10,28> STRING = C<42,28> INPBUFC;
    2950. PRINTH(OUTBUF,14); # PRINT HEADER LINE #
    2951. STRING = " ";
    2952. IF CNT EQ 0 AND TCBCNT[0] GR TCBPLN
    2953. THEN # FORMAT ONE LCB WITH MORE THAN 15 TCBS #
    2954. BEGIN
    2955. FORMATA1;
    2956. END
    2957. ELSE # ONE OR MORE THAN ONE LCBS IN ONE LINE #
    2958. BEGIN
    2959. FORMATA2;
    2960. I01 = I01 + CNT; # RESET COUNTER #
    2961. END
    2962. END
    2963. CONTROL EJECT;
    2964. *IF DEF,IMS
    2965. #
    2966. **
    2967. *E
    2968. * 1. PROC NAME: AUTHOR: DATE:
    2969. * FORMATA1 JACOB C. K. CHEN 80/02/01
    2970. *
    2971. * 2. FUNCTIONAL DESCRIPTION:
    2972. * FORMATA1 FORMAT THE LCB WITH MORE THAN 15 TCBS AND PRINT THEM
    2973. * INTO OUTPUT LISTING.
    2974. *
    2975. * 3. METHOD USED:
    2976. * FORMATA1 CALL ONEWORD TO GET DATA WORDS FROM RANDOM WORK FILE,
    2977. * CALL HEXDIS TO CDNVERT HEXADECIMAL TO DISPLAY, FORMAT THEM INTO
    2978. * OUTPUT LINE AND CALL PRINTH TO PRINT IT.
    2979. *
    2980. * 4. ENTRY PARAMETERS:
    2981. * TCBCNT CONTAINS NUMBER OF TCBS WITH THIS LCB.
    2982. * TCBADR CONTAINS LCB/TCB ADDRESS POINTER.
    2983. *
    2984. * 5. EXIT PARAMETERS:
    2985. * NONE
    2986. *
    2987. * 6. COMDECKS CALLED:
    2988. * NONE
    2989. *
    2990. * 7. ROUTINES CALLED:
    2991. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY - SYMPL
    2992. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    2993. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    2994. *
    2995. * 8. DAYFILE MESSAGES:
    2996. * NONE
    2997. *
    2998.  #
    2999. *ENDIF
    3000. #**********************************************************************#
    3001. # #
    3002. # PROCESS MORE THAN 15 TCBS WITH ONE LCB FOR RULES A. #
    3003. # #
    3004. #**********************************************************************#
    3005. PROC FORMATA1;
    3006. BEGIN #FORMATA1# # FORMAT LCB WITH MORE THAN 15 TCBS #
    3007. LOOP01 = TCBCNT[0] / TCBPLN; # LOOP COUNTER #
    3008. FOR I02=0 STEP 1 UNTIL LOOP01
    3009. DO
    3010. BEGIN
    3011. IF I02 EQ LOOP01
    3012. THEN
    3013. LOOP02 = TCBCNT[0] - TCBCNT[0] / TCBPLN * TCBPLN;
    3014. ELSE
    3015. LOOP02 = TCBPLN;
    3016. C<1,6> STRING = "OFFSET";
    3017. IF I02 EQ 0
    3018. THEN # FORMAT OFFSET LINE #
    3019. BEGIN
    3020. C<10,3>STRING = "LCB";
    3021. HEXDIS(I01,TEMPC1,3);
    3022. C<13,3>STRING = TEMPC1;
    3023. END
    3024. FOR I03=0 STEP 1 UNTIL LOOP02 - 1
    3025. DO
    3026. BEGIN
    3027. I04 = I02 * TCBPLN + I03;
    3028. HEXDIS(I04,TEMPC1,3);
    3029. C<I03*7+20,3>STRING = TEMPC1;
    3030. C<I03*7+17,3>STRING = "TCB";
    3031. END
    3032. PRINTH(OUTBUF,14);
    3033. STRING = " ";
    3034. C<2,5> STRING = "LOC..";
    3035. IF I02 EQ 0
    3036. THEN # FORMAT ADDRESS LINE #
    3037. BEGIN
    3038. HEXDIS(LCBADR,TEMPC1,4); # CONVERT TO DISPLAY #
    3039. C<10,4> STRING = TEMPC1;
    3040. TCBADR[0] = LCBADR;
    3041. END
    3042. FOR I03=1 STEP 1 UNTIL LOOP02
    3043. DO
    3044. BEGIN
    3045. IF I03 EQ 1 AND I02 EQ 0
    3046. THEN
    3047. TEMPU1 = TCBADR[I03 - 1] + FTCB;
    3048. ELSE
    3049. TEMPU1 = TCBADR[I03 - 1] + NTCB;
    3050. ONEWORD(TEMPU1,TEMPC1,3);
    3051. B<0,44> TCBADR[I03] = 0;
    3052. B<44,16> TCBADR[I03] = B<44,16> TEMPC1;
    3053. C<I03*7+10,4> STRING = TEMPC1;
    3054. END
    3055. PRINTH(OUTBUF,14);
    3056. STRING = " ";
    3057. FOR I03=0 STEP 1 UNTIL I05
    3058. DO # FORMAT OFFSET #
    3059. BEGIN
    3060. TEMPC1 = XCHD(I03);
    3061. C<3,4> STRING = C<6,4> TEMPC1;
    3062. FOR I04=0 STEP 1 UNTIL LOOP02
    3063. DO # FORMAT DATA LINE #
    3064. BEGIN
    3065. IF (I04 EQ 0 AND I03 LS LCBL AND I02 EQ 0) OR
    3066. (I04 NQ 0 AND I03 LS TCBL)
    3067. THEN
    3068. BEGIN
    3069. ONEWORD(TCBADR[I04]+I03,TEMPC1,3);
    3070. C<I04*7+10,4> STRING = TEMPC1;
    3071. END
    3072. END
    3073. PRINTH(OUTBUF,14); # PRINT DATA LINE #
    3074. STRING = " "; # CLEAR OUTPUT BUFFER #
    3075. END
    3076. TCBADR[0] = TCBADR[LOOP02];
    3077. PRINTH(BLLINE,1); # BLANK LINE BETWEEN SECTION #
    3078. PRINTH(BLLINE,1);
    3079. IF (LINENO + I05 + 3) GR XLINP
    3080. THEN # SIZE EXCEED PAGE LIMIT #
    3081. HEADING; # START A NEW PAGE #
    3082. C<10,28> STRING = C<42,28> INPBUFC;
    3083. PRINTH(OUTBUF,14); # PRINT HEADER LINE #
    3084. STRING = " ";
    3085. END
    3086. END #FORMATA1#
    3087. CONTROL EJECT;
    3088. *IF DEF,IMS
    3089. #
    3090. **
    3091. *E
    3092. * 1. PROC NAME: AUTHOR: DATE:
    3093. * FORMATA2 JACOB C. K. CHEN 80/02/01
    3094. *
    3095. * 2. FUNCTIONAL DESCRIPTION:
    3096. * FORMATA2 FORMAT ONE OR MORE THAN ONE LCBS IN A OUTPUT LINE, AND
    3097. * PRINT THE LINE TO OUTPUT LISTING.
    3098. *
    3099. * 3. METHOD USED:
    3100. * FORMATA2 CALL ONEWORD TO GET DATA WORDS FROM RANDOM WORK FILE,
    3101. * CALL HEXDIS TO CONVERT HEXADECIMAL TO DISPLAY, FORMAT THEM INTO
    3102. * OUTPUT LINE AND CALL PRINTH TO PRINT IT.
    3103. *
    3104. * 4. ENTRY PARAMETERS:
    3105. * CNT COUNT OF LCBS IN ONE LINE
    3106. *
    3107. * 5. EXIT PARAMETERS:
    3108. * NONE
    3109. *
    3110. * 6. COMDECKS CALLED:
    3111. * NONE
    3112. *
    3113. * 7. ROUTINES CALLED:
    3114. * ONEWORD GET A 16-BIT WORD FROM RANDOM WORK FILE - SYMPL
    3115. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY - SYMPL
    3116. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    3117. * XCHD CONVERT OCTAL TO HEXADECIMAL DISPLAY - SUPIO
    3118. *
    3119. * 8. DAYFILE MESSAGES:
    3120. * NONE
    3121. *
    3122.  #
    3123. *ENDIF
    3124. #**********************************************************************#
    3125. # #
    3126. # FORMAT ONE OR MANY LCB WITH ITS TCB IN ONE LINE. #
    3127. # #
    3128. #**********************************************************************#
    3129. PROC FORMATA2; # FORMAT MORE THAN ONE LCBS IN ONE LINE #
    3130. BEGIN #FORMATA2#
    3131. I04 = 0;
    3132. FOR I02=I01 STEP 1 UNTIL CNT + I01
    3133. DO
    3134. BEGIN
    3135. TCBNUM[I04] = I02;
    3136. B<0,1> TCBNUM[I04] = 1;
    3137. TCBADR[I04] = LCBPY + LCBL * I02;
    3138. I04 = I04 + 1;
    3139. FOR I03=1 STEP 1 UNTIL TCBCNT[I02 - I01]
    3140. DO
    3141. BEGIN # GET LCB/TCB ADDRESS #
    3142. TCBNUM[I04] = I03 - 1; # SAVE TCB NUMBER #
    3143. IF I03 EQ 1
    3144. THEN # GET TCB POINTER FROM LCB #
    3145. TEMPU1 = TCBADR[I04-1] + FTCB;
    3146. ELSE # GET TCB POINTER FROM LAST TCB #
    3147. TEMPU1 = TCBADR[I04-1] + NTCB;
    3148. ONEWORD(TEMPU1,TEMPU2,1); # GET POINTER FROM FILE #
    3149. TCBADR[I04] = TEMPU2; # SAVE LCB/TCB ADDRESS #
    3150. I04 = I04 + 1;
    3151. END
    3152. END
    3153. C<1,6> STRING = "OFFSET";
    3154. FOR I02=0 STEP 1 UNTIL I04-1
    3155. DO # FORMAT LCB NUMBER LINE #
    3156. BEGIN
    3157. IF B<0,1>TCBNUM[I02] EQ 1
    3158. THEN
    3159. C<I02*7+10,3>STRING = "LCB";
    3160. ELSE
    3161. C<I02*7+10,3>STRING = "TCB";
    3162. HEXDIS(TCBNUM[I02],TEMPC1,3);
    3163. C<I02*7+13,3>STRING = TEMPC1;
    3164. END
    3165. PRINTH(OUTBUF,14); # PRINT LCB NUMBER LINE #
    3166. STRING = " ";
    3167. C<2,5> STRING = "LOC..";
    3168. FOR I02=0 STEP 1 UNTIL I04 - 1
    3169. DO # FORMAT LOCATION LINE #
    3170. IF TCBADR[I02] NQ 0
    3171. THEN
    3172. BEGIN
    3173. HEXDIS(TCBADR[I02],TEMPC1,4);
    3174. C<I02*7+10,4> STRING = TEMPC1;
    3175. END
    3176. PRINTH(OUTBUF,14); # PRINT LOCATION LINE #
    3177. STRING = " "; # CLEAR OUTPUT BUFFER #
    3178. FOR I02=0 STEP 1 UNTIL I05
    3179. DO # FORMAT DATA LINE #
    3180. BEGIN
    3181. TEMPC1 = XCHD(I02); # CONVERT TO HEX. DIS. #
    3182. C<3,4> STRING = C<6,4> TEMPC1;
    3183. FOR I03=0 STEP 1 UNTIL I04-1
    3184. DO # FORMAT DATA LINE #
    3185. BEGIN
    3186. IF (B<0,1>TCBNUM[I03] EQ 1 AND I02 LS LCBL) OR
    3187. (B<0,1>TCBNUM[I03] NQ 1 AND I02 LS TCBL AND
    3188. TCBADR[I03] NQ 0)
    3189. THEN
    3190. BEGIN
    3191. TEMPU1 = TCBADR[I03] + I02;
    3192. ONEWORD(TEMPU1,TEMPC1,3);
    3193. C<I03*7+10,4> STRING = TEMPC1;
    3194. END
    3195. END
    3196. PRINTH(OUTBUF,14); # PRINT DATA LINE #
    3197. STRING = " "; # CLEAR OUTPUT BUFFER #
    3198. END
    3199. PRINTH(BLLINE,1); # BLANK LINE BETWEEN SECTION #
    3200. PRINTH(BLLINE,1);
    3201. END #FORMATA2#
    3202. END #FORMATA#
    3203. CONTROL EJECT;
    3204. *IF DEF,IMS
    3205. #
    3206. **
    3207. *E
    3208. * 1. PROC NAME: AUTHOR: DATE:
    3209. * FORMATB JACOB C. K. CHEN 80/02/01
    3210. *
    3211. * 2. FUNCTIONAL DESCRIPTION:
    3212. * FORMATB ISOLATE AND LIST THE CONTENT OF THE PORT TABLE WITH ITS
    3213. * SUBORDINATE MUX LCBS TO PROCESS DIRECTIVE RULE B.
    3214. *
    3215. * 3. METHOD USED:
    3216. * FORMATB CALL ONEWORD TO GET POINTER WORDS FROM RANDOM WORK FILE
    3217. * , IF POINTER WORDS MISSING THEN CALL PTRMISS TO PRINT THE ERROR
    3218. * MESSAGE AND RETURN TO DNPROC,ELSE CALL ONEWORD TO RETREIVE DATA
    3219. * WORDS FROM RANDOM WORK FILE, CALL HEXDIS TO CONVERT DATA TO
    3220. * DISPLAY AND CALL PRINTH TO PRINT THE FORMATTED LINE.
    3221. *
    3222. * 4. ENTRY PARAMETERS:
    3223. * INPBUFC CONTAINS THE INPUT DIRECTIVE LINE
    3224. * PARAMI CONTAINS THE PARAMETERS ON DIRECTIVE LINE.
    3225. *
    3226. * 5. EXIT PARAMETERS:
    3227. * NONE
    3228. *
    3229. * 6. COMDECKS CALLED:
    3230. * NONE
    3231. *
    3232. * 7. ROUTINES CALLED:
    3233. * ONEWORD GET A 16-BITS WORD FROM RANDOM WORK FILE - SYMPL
    3234. * PTRMISS PRINT THE POINTER WORD MISSING MESSAGE - SYMPL
    3235. * HEADING PRINT THE HEADING INFORMATION - SYMPL
    3236. * PRINTH PRINT A LINE TO OUTPUT LISTING - SYMPL
    3237. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY CODE - SYMPL
    3238. *
    3239. * 8. DAYFILE MESSAGES:
    3240. * NONE
    3241. *
    3242.  #
    3243. *ENDIF
    3244. #**********************************************************************#
    3245. # #
    3246. # FORMAT PORT TABLES AND ITS ASSOCIATED MUX TABLES PROCEDURE #
    3247. # #
    3248. #**********************************************************************#
    3249. PROC FORMATB;
    3250. BEGIN # FORMAT PORT AND MUX TABLES #
    3251. BASED ARRAY INPARB [0:0] S(8);
    3252. BEGIN # INPUT PARAMETERS FOR RULE B #
    3253. ITEM PTTP U(0,0,60); # FIRST PORT TABLE POINTER #
    3254. ITEM PTTL U(1,0,60); # PORT TABLE LENGTH #
    3255. ITEM MUXP U(2,0,60); # MUX TABLE POINTER #
    3256. ITEM MUXL U(3,0,60); # MUX TABLE LENGTH #
    3257. ITEM PTRN U(4,0,60); # PATTERN FOR VALID MUX TABLE #
    3258. ITEM MASK U(5,0,60); # MASK FOR ISOLATING PATTERN #
    3259. ITEM TSTX U(6,0,60); # VALIDITY TESTING WORD INDEX #
    3260. ITEM NPTT U(7,0,60); # POINTER TO NO. OF PORT TABLE #
    3261. END
    3262.  
    3263. ARRAY PTADR [0:15] S(1);
    3264. BEGIN # PORT AND MUX TABLE ADDRESS #
    3265. ITEM PTADDR U(0,0,60);
    3266. END
    3267.  
    3268. ITEM PTTPY U; # CONTENT OF PORT TABLE POINTER #
    3269. ITEM NPTTY U; # NUMBER OF PORT TO BE LISTED #
    3270. CONTROL EJECT;
    3271. #**********************************************************************#
    3272. # #
    3273. # CODE BEGINS HERE #
    3274. # #
    3275. #**********************************************************************#
    3276.  
    3277. P<INPARB> = LOC(PARAMI); # LOCATE INPUT PARAMETER #
    3278. ONEWORD(PTTP,PTTPY,0); # GET PORT TABLE POINTER #
    3279. IF MUXP GR PTTL OR TSTX GR PTTL
    3280. THEN # ERROR IN DIRECTIVE #
    3281. BEGIN
    3282. INPBUFD = INPBUFC; # MOVE DIRECTIVE FOR MESSAGE #
    3283. PRINTH(OUTBUFI,9); # PRINT ERROR DIRECTIVE #
    3284. PRINTH(PTBERR,6); # PRINT ERROR MESSAGE #
    3285. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    3286. RETURN;
    3287. END
    3288. ONEWORD(NPTT,NPTTY,0); # GET NUMBER OF PORTS TO BE LIST#
    3289. IF B<24,1>PTTPY EQ 1 OR B<24,1>NPTTY EQ 1
    3290. THEN # POINTER WORD MISSING #
    3291. BEGIN
    3292. IF B<24,1>PTTPY EQ 1 THEN PTRMISS(PTTP);
    3293. IF B<24,1>NPTTY EQ 1 THEN PTRMISS(NPTT);
    3294. RETURN;
    3295. END
    3296. IF PTTL GQ MUXL
    3297. THEN
    3298. I03 = PTTL - 1;
    3299. ELSE
    3300. I03 = MUXL - 1;
    3301. LOOP01 = (NPTTY - 1) / PTBPLN;
    3302. FOR I01=0 STEP 1 UNTIL LOOP01
    3303. DO
    3304. BEGIN
    3305. IF I01 EQ LOOP01
    3306. THEN # LAST LOOP #
    3307. LOOP02 = (NPTTY - 1) - (NPTTY - 1) / PTBPLN * PTBPLN;
    3308. ELSE # NOT LAST LOOP #
    3309. LOOP02 = PTBPLN - 1;
    3310. IF (LINENO + I03 + 3) GR XLINP
    3311. THEN # STRUCTURE BEYOND END OF PAGE #
    3312. HEADING;
    3313. C<10,22> STRING = C<48,22> INPBUFC; # MOVE HEADING #
    3314. PRINTH(OUTBUF,14); # PRINT THE HEDER LINE #
    3315. STRING = " ";
    3316. FOR I02=0 STEP 1 UNTIL LOOP02
    3317. DO # FORMAT IDENTIFICATION LINE #
    3318. BEGIN
    3319. HEXDIS(I01*PTBPLN+I02,TEMPC1,3);
    3320. C<I02*14+10,4> STRING = "PORT";
    3321. C<I02*14+14,3> STRING = TEMPC1;
    3322. C<I02*14+18,3> STRING = "MUX";
    3323. END
    3324. C<1,6> STRING = "OFFSET";
    3325. PRINTH(OUTBUF,14); # PRINT ID LINE #
    3326. STRING = " "; # CLEAR OUTPUT BUFFER #
    3327. C<2,5> STRING = "LOC..";
    3328. FOR I02=0 STEP 1 UNTIL LOOP02
    3329. DO # FORMAT STRUCTURE ADDRESS LINE #
    3330. BEGIN
    3331. PTADDR[I02*2] = PTTPY + (I01*PTBPLN+I02) *PTTL;
    3332. ONEWORD(PTADDR[I02*2]+TSTX,TEMPU2,1);
    3333. IF (TEMPU2 LAN MASK) EQ PTRN
    3334. THEN # GET MUX POINTER FROM DUMP FILE #
    3335. BEGIN
    3336. ONEWORD(PTADDR[I02*2]+MUXP,TEMPU1,1);
    3337. PTADDR[I02*2+1] = TEMPU1;
    3338. END
    3339. ELSE # NOT A VALID MUX TABLE #
    3340. PTADDR[I02*2+1] = 0; # SET ADDRESS TO ZERO #
    3341. HEXDIS(PTADDR[I02*2],TEMPC1,4);# CONVERT TO DIS. #
    3342. C<I02*14+10,4> STRING = TEMPC1;
    3343. IF PTADDR[I02*2+1] NQ 0
    3344. THEN
    3345. BEGIN
    3346. HEXDIS(PTADDR[I02*2+1],TEMPC1,4);
    3347. C<I02*14+17,4> STRING = TEMPC1;
    3348. END
    3349. END
    3350. PRINTH(OUTBUF,14); # PRINT ADDRESS LINE #
    3351. STRING = " "; # CLEAR OUTPUT BUFFER #
    3352. FOR I04=0 STEP 1 UNTIL I03
    3353. DO # FORMAT DETAIL DATA LINE #
    3354. BEGIN
    3355. TEMPC1 = XCHD(I04); # CONVERT OFFSET TO HEX. DIS. #
    3356. C<3,4> STRING = C<6,4> TEMPC1;
    3357. FOR I02=0 STEP 1 UNTIL LOOP02
    3358. DO
    3359. BEGIN
    3360. IF I04 LS PTTL
    3361. THEN
    3362. BEGIN # RETRIVE DATA FROM DUMP FILE #
    3363. ONEWORD(PTADDR[I02*2]+I04,TEMPC1,3);
    3364. C<I02*14+10,4> STRING = TEMPC1;
    3365. END
    3366. IF I04 LS MUXL AND PTADDR[I02*2+1] NQ 0
    3367. THEN
    3368. BEGIN # GET MUX TABLE DATA #
    3369. ONEWORD(PTADDR[I02*2+1]+I04,TEMPC1,3);
    3370. C<I02*14+17,4> STRING = TEMPC1;
    3371. END
    3372. END
    3373. PRINTH(OUTBUF,14); # PRINT DETAIL DATA LINE #
    3374. STRING = " "; # CLEAR OUTPUT BUFFER #
    3375. END
    3376. PRINTH(BLLINE,1); # BLANK LINE #
    3377. PRINTH(BLLINE,1);
    3378. END
    3379. END
    3380. CONTROL EJECT;
    3381. *IF DEF,IMS
    3382. #
    3383. **
    3384. *E
    3385. * 1. PROC NAME: AUTHOR: DATE:
    3386. * FORMATF JACOB C. K. CHEN 80/02/01
    3387. *
    3388. * 2. FUNCTIONAL DESCRIPTION:
    3389. * FORMATF PROCESS THE FINISH DIRECTIVE.
    3390. *
    3391. * 3. METHOD USED:
    3392. * FORMATF SET THE END OF FILE FLAG ON TO FORCE END OF DIRECTIVES
    3393. * PROCESSING.
    3394. *
    3395. * 4. ENTRY PARAMETERS:
    3396. * NONE
    3397. *
    3398. * 5. EXIT PARAMETERS:
    3399. * IEOF END OF FILE FLAG OF INPUT DIRECTIVES FILE
    3400. *
    3401. * 6. COMDECKS CALLED:
    3402. * NONE
    3403. *
    3404. * 7. ROUTINES CALLED
    3405. * NONE
    3406. *
    3407. * 8. DAYFILE MESSAGES:
    3408. * NONE
    3409. *
    3410.  #
    3411. *ENDIF
    3412. #**********************************************************************#
    3413. # #
    3414. # PROCESS FINISH DIRECTIVE PROCEDURE #
    3415. # #
    3416. #**********************************************************************#
    3417. PROC FORMATF;
    3418. BEGIN # PROCESS FINISH DIRECTIVE #
    3419. IEOF = TRUE;
    3420. END
    3421. CONTROL EJECT;
    3422. *IF DEF,IMS
    3423. #
    3424. **
    3425. *E
    3426. * 1. PROC NAME: AUTHOR: DATE:
    3427. * ONEWORD JACOB C. K. CHEN 80/02/01
    3428. *
    3429. * 2. FUNCTIONAL DESCRIPTION:
    3430. * GET ONE 16-BIT WORD FROM RANDOM FILE AND CONVERT IT TO DISPLAY
    3431. * CODE SUITABLE FOR OUTPUT
    3432. *
    3433. * 3. METHOD USED:
    3434. * USE ONE FLAG AS FILE 1 REGISTER OR MACRO MEMORY DUMP INDICATOR,
    3435. * ANOTHER FLAG AS CONVERSION INDICATOR. IF DATA MISSING SET NO
    3436. * DATA FLAG ON THEN RETURN TO CALLING PROCEDURE
    3437. *
    3438. * 4. ENTRY PARAMETERS:
    3439. * WODADR WORD ADDRESS IN DUMP RECORD.
    3440. * TYPE USE BIT 59 AND 58 AS DUMP TYPE AND CONVERSION FLAG
    3441. *
    3442. * 5. EXIT PARAMETERS:
    3443. * WODOUT FOR DATA OUTPUT AND NO DATA FLAG BIT
    3444. *
    3445. * 6. COMDECKS CALLED:
    3446. * NONE
    3447. *
    3448. * 7. ROUTINES CALLED:
    3449. * HEXDIS CONVERT HEX TO DISPLAY CODE - SYMPL
    3450. * GETRAN GET A RANDOM RECORD FROM NEVFILE - SYMPL
    3451. *
    3452. * 8. DAYFILE MESSAGES:
    3453. * NONE.
    3454. *
    3455.  #
    3456. *ENDIF
    3457. #**********************************************************************#
    3458. # #
    3459. # GET A 16 BITS WORD RROM RANDOM FILE #
    3460. # #
    3461. #**********************************************************************#
    3462. PROC ONEWORD((WODADR),WODOUT,(TYPE));
    3463. BEGIN # GET A 16 BITS WORD FROM RANDOM FILE #
    3464. BASED ARRAY BUFIN [0:0] S(1);
    3465. BEGIN # DUMP FILE BUFFER #
    3466. ITEM BUFWD U(0,0,60);
    3467. ITEM BUFBEG U(0,12,24); # BEGIN ADDRESS OF BUFFER #
    3468. ITEM BUFEND U(0,36,24); # END ADDRESS OF BUFFER #
    3469. END
    3470. ITEM WODPOS U; # WORD POSITION #
    3471. ITEM BITPOS U; # BIT POSITION #
    3472. ITEM WODADR U; # ADDRESS #
    3473. ITEM TEMPC1 C(10); # WORK AREA #
    3474. ITEM TYPE I; # INDEX #
    3475. ITEM NODATA C(10)=" -- "; # DATA MISSING IN DUMP FILE #
    3476. ITEM WODOUT U; # WORD RETURN #
    3477. ITEM I; # INDEX #
    3478. CONTROL EJECT;
    3479. #*********************************************************************#
    3480. # #
    3481. # CODE BEGINS HERE #
    3482. # #
    3483. #*********************************************************************#
    3484.  
    3485. WODOUT = 0; # CLEAR OUTPUT WORD #
    3486. IF PBUFIN
    3487. THEN
    3488. BEGIN
    3489. IF RULES EQ 9
    3490. AND B<0,3>BUFWD[0] EQ MACREC
    3491. AND WODADR GR BUFBEG[0]
    3492. AND WODADR LQ BUFEND[0]
    3493. THEN # DISIRED WORD ALREADY IN BUFFER #
    3494. GOTO MOVEDATA;
    3495.  
    3496. END
    3497. IF B<59,1> TYPE EQ 1
    3498. THEN # MARO MEMORY RECORD WANTED #
    3499. BEGIN
    3500. IF NOT MACROB
    3501. THEN # NO MEMORY RECORD IN DUMP FILE #
    3502. BEGIN
    3503. B<0,24>WODOUT = B<0,24>NODATA; # DATA MISSING #
    3504. B<24,1>WODOUT = 1; # SET FLAG TO INDICATE DATA MISS#
    3505. B<30,6>WODOUT = " ";
    3506. B<36,6>WODOUT = " ";
    3507. RETURN;
    3508. END
    3509. GETRAN(WODADR); # GET A RECORD BY KEY #
    3510. IF IOSTAT EQ 0
    3511. THEN
    3512. BEGIN
    3513. P<BUFIN> = LOC(DMPBUF);# LOCATE RECORD BUFFER #
    3514. PBUFIN = TRUE;
    3515. END
    3516. ELSE # RECORD NOT IN FILE #
    3517. BEGIN
    3518. B<0,24> WODOUT = B<0,24> NODATA; # DATA MISSING #
    3519. B<24,1> WODOUT = 1; # SET DATA MISSING FLAG #
    3520. B<30,6>WODOUT = " ";
    3521. B<36,6>WODOUT = " ";
    3522. RETURN;
    3523. END
    3524. END
    3525. ELSE
    3526. BEGIN # NOT MACRO MEM,THEN MUST BE FILE1 OR PAGE REG #
    3527. IF FILE1B AND WODADR LQ 255
    3528. THEN
    3529. BEGIN
    3530. P<BUFIN> = LOC(FILE1REC); # LOCATE BUFFER #
    3531. PBUFIN = TRUE;
    3532. END
    3533. ELSE
    3534. BEGIN # NOT FILE1 DUMP REC #
    3535. IF PREG AND WODADR LQ 32 # PAGE REGISTER #
    3536. THEN
    3537. BEGIN
    3538. P<BUFIN> = LOC(PAGREGREC);
    3539. PBUFIN = TRUE;
    3540. END
    3541. ELSE # DATA NOT IN DUMP FILE #
    3542. BEGIN
    3543. B<0,24> WODOUT = B<0,24> NODATA;
    3544. B<24,1> WODOUT = 1;#SET FLAG TO INDICATE DATA MISS#
    3545. B<30,6>WODOUT = " ";
    3546. B<36,6>WODOUT = " ";
    3547. RETURN;
    3548. END
    3549. END
    3550. END
    3551. WODADR = WODADR - BUFBEG[0]; # COUNT DATA ADDRESS IN BUFFER #
    3552. WODPOS = WODADR * 16 / 60; # CACULATE WORD POSITION #
    3553. BITPOS = WODADR * 16 - WODPOS * 60; # BIT POSITION #
    3554. MOVEDATA:
    3555. FOR I=0 STEP 1 UNTIL 3
    3556. DO # MOVE A 16 BITS WORD TO WORD OUT #
    3557. BEGIN
    3558. B<I*4+44,4>WODOUT = B<BITPOS,4>BUFWD[WODPOS+1];
    3559. IF BITPOS GQ 56
    3560. THEN # SPAN TO NEXT WORD #
    3561. BEGIN
    3562. BITPOS = 0; # RESET BIT POSITION #
    3563. WODPOS = WODPOS + 1; # SET WORD POSITION #
    3564. END
    3565. ELSE
    3566. BITPOS = BITPOS + 4;
    3567. END
    3568. IF B<58,1> TYPE EQ 1
    3569. THEN # CONVERTION TO DISPLAY CODE DESIRED #
    3570. BEGIN
    3571. HEXDIS(WODOUT,TEMPC1,4); # CONVERT TO DISPLAY #
    3572. B<0,24> WODOUT = B<0,24> TEMPC1;
    3573. END
    3574. IF B<57,1>TYPE EQ 1
    3575. AND NOT EBCDIC
    3576. THEN # CONVERT TO ASCII WANTED #
    3577. BEGIN
    3578. IF B<44,1>WODOUT EQ 1
    3579. THEN
    3580. B<30,6>WODOUT = " ";
    3581. ELSE
    3582. B<30,6>WODOUT = ASCVAL[B<44,8>WODOUT];
    3583. IF B<52,1>WODOUT EQ 1
    3584. THEN
    3585. B<36,6>WODOUT = " ";
    3586. ELSE
    3587. B<36,6>WODOUT = ASCVAL[B<52,8>WODOUT];
    3588. END
    3589.  
    3590. ELSE # NOT *ASCII* CONVERSION #
    3591. BEGIN # NOT *ASCII* #
    3592.  
    3593. IF B<57,1>TYPE EQ 1
    3594. AND EBCDIC
    3595. THEN # *EBCDIC* CONVERSION SELECTED #
    3596. BEGIN
    3597. B<30,6>WODOUT = EBCDVAL[B<44,8>WODOUT];
    3598. B<36,6>WODOUT = EBCDVAL[B<52,8>WODOUT];
    3599. END
    3600.  
    3601. END # NOT *ASCII* #
    3602.  
    3603. END
    3604. CONTROL EJECT;
    3605. *IF DEF,IMS
    3606. #
    3607. **
    3608. *E
    3609. * 1. PROC NAME: AUTHOR: DATE:
    3610. * GETRAN JACOB C. K. CHEN 80/02/01
    3611. *
    3612. * 2. FUNCTIONAL DESCRIPTION:
    3613. * GET A RANDOM RECORD FROM NEUFILE WITH ADDRESS SPECIFIED
    3614. *
    3615. * 3. METHOD USED:
    3616. * USE TWO BUFFERS AS DUMP BUFFERS FOR INCREASED I/O SPEED
    3617. * IF RECORD NOT FOUND IN TWO BUFFERS TRY TO GET ANOTHER
    3618. * RECORD FROM RANDOM FILE NEUFILE WITH RECORD ID AND ADDRESS
    3619. * SPECIFIED.
    3620. *
    3621. * 4. ENTRY PARAMETERS:
    3622. * ADDRES KEY ADDRESS
    3623. * MACREC MACRO MEMORY RECORD TYPE
    3624. * DMPBUF1 DUMP FILE RECORDS BUFFER 1
    3625. * DMPBUF2 DUMP FILE RECORDS BUFFER 2
    3626. *
    3627. * 5. EXIT PARAMETERS:
    3628. * IOSTAT STATUS RETURNED ON SUPIO FUNCTIONS
    3629. *
    3630. * 6. COMDECKS CALLED:
    3631. * NONE
    3632. *
    3633. * 7. ROUTINES CALLED:
    3634. * FINDRI GET RECORD ID - SYMPL
    3635. * READRI READ A RECORD FROM RANDOM FILE - SYMPL
    3636. *
    3637. * 8. DAYFILE MESSAGES:
    3638. * NONE
    3639. *
    3640.  #
    3641. *ENDIF
    3642. #**********************************************************************#
    3643. # #
    3644. # GET A RANDOM RECORD FROM NEUFILE WITH BEGIN ADDRESS #
    3645. # #
    3646. #**********************************************************************#
    3647. PROC GETRAN ((ADDRES));
    3648. BEGIN # GET A RECORD BY KEY #
    3649. ITEM ADDRES U; # KEY ADDRESS #
    3650. CONTROL EJECT;
    3651. IF B<0,3>DMPWD[0] EQ MACREC AND ADDRES GQ B<12,24>DMPWD[0]
    3652. AND ADDRES LQ B<36,24>DMPWD[0]
    3653. THEN
    3654. BEGIN # RECORD ALREADY IN BUFFER #
    3655. IOSTAT = 0; # RESET RETURN CODE #
    3656. RETURN;
    3657. END
    3658. ELSE
    3659. BEGIN # CHECK ANOTHER BUFFER #
    3660. IF P<DMPBUF> EQ LOC(DMPBUF1)
    3661. THEN # LOCATE BUFFER ADDRESS #
    3662. P<DMPBUF> = LOC(DMPBUF2);
    3663. ELSE
    3664. P<DMPBUF> = LOC(DMPBUF1);
    3665. IF B<0,3>DMPWD[0] EQ MACREC AND ADDRES GQ B<12,24>DMPWD[0]
    3666. AND ADDRES LQ B<36,24>DMPWD[0]
    3667. THEN
    3668. BEGIN # RECORD IN THIS BUFFER #
    3669. IOSTAT = 0; # RESET STATUS #
    3670. RETURN;
    3671. END
    3672. END
    3673. P<SIOFET> = LOC(NEUFILE); # LOCATE FET ADDRESS #
    3674. P<SIOINDX> = FETINDX[0]; # LOCATE SUPERVISOR INDEX #
    3675. RECKEY = 0; # RESET KEY VALUE #
    3676. B<12,24>RECKEY = ADDRES;
    3677. FINDRI (LOC(SIOINDX),RECKEY,TEMP,TEMPB); # GET RECORD ID #
    3678. IF TEMP LQ LINDX[0]
    3679. THEN # RECORD FOUND #
    3680. BEGIN
    3681. IF B<36,24>RI[TEMP] GR ADDRES
    3682. THEN
    3683. IOSTAT = BADRI; # SET BAD RECORD STATUS #
    3684. ELSE
    3685. BEGIN
    3686. RECKEY = RI[TEMP]; # MOVE RECORD ID #
    3687. LENGTH = BUFLEN;
    3688. READRI(LOC(NEUFILE),RECKEY,LOC(DMPBUF),LENGTH,IOSTAT);
    3689. # READ A RECORD FROM RANDOM FILE #
    3690. END
    3691. END
    3692. ELSE # RECORD AFTER LAST RECORD #
    3693. IOSTAT = RDEOI; # SET END OF FILE STATUS #
    3694. IF IOSTAT EQ RDEOR
    3695. THEN
    3696. IOSTAT = 0;
    3697. END
    3698. CONTROL EJECT;
    3699. *IF DEF,IMS
    3700. #
    3701. **
    3702. *E
    3703. * 1. PROC NAME: AUTHOR: DATE:
    3704. * PRINTH JACOB C. K. CHEN 80/02/01
    3705. *
    3706. * 2. FUNCTIONAL DESCRIPTION:
    3707. * WRITE A DETAIL LINE TO OUTPUT WITH HEADING ON EACH PAGE
    3708. *
    3709. * 3. METHOD USED:
    3710. * WRITE A FORMATTED LINE TO CIO BUFFER WITH 140 CHARACTERS LONG
    3711. * IF TOTAL LINE IN A PAGE EXCEED XLINP THEN START A NEW PAGE
    3712. * WITH SUITABLE HEADING AT THE TOP OF EACH PAGE
    3713. *
    3714. * 4. ENTRY PARAMETERS:
    3715. * OUTLEN LINE LENGTH
    3716. *
    3717. * 5. EXIT PARAMETERS:
    3718. * NONE
    3719. *
    3720. * 6. COMDECKS CALLED:
    3721. * NONE
    3722. *
    3723. * 7. ROUTINES CALLED:
    3724. * WRITEH WRITE THE LINE TO CIO BUFFER--SUPIO
    3725. * RECALL SET PROGRAM/FUNCTION IN RECALL STATUS--MACREL
    3726. * HEADING WRITE HEADING INFORMATION--SYMPL
    3727. *
    3728. * 8. DAYFILE MESSAGE:
    3729. * NONE
    3730. *
    3731.  #
    3732. *ENDIF
    3733. #**********************************************************************#
    3734. # #
    3735. # WRITE A DETAIL LINE TO OUTPUT #
    3736. # #
    3737. #**********************************************************************#
    3738. PROC PRINTH(OUTBUF,OUTLEN);
    3739. BEGIN # WRITE A LINE TO OUTPUT #
    3740. ITEM OUTBUF C(140); # OUTPUT LINE #
    3741. ITEM OUTLEN U; # LINE LENGTH #
    3742. CONTROL EJECT;
    3743. WRITEH(OUTPUT,OUTBUF,OUTLEN);# WRITE THE LINE TO CIO BUFFER #
    3744. RECALL(OUTPUT);
    3745. LINENO = LINENO + 1; # COUNT LINE NUMBER #
    3746. IF LINENO GR XLINP
    3747. THEN # START A NEW PAGE #
    3748. HEADING; # PRINT HEADING INFORMATION #
    3749. END
    3750. CONTROL EJECT;
    3751. *IF DEF,IMS
    3752. #
    3753. **
    3754. *E
    3755. * 1. PROC NAME: AUTHOR: DATE:
    3756. * HEADING JACOB C. K. CHEN 80/02/01
    3757. *
    3758. * 2. FUNCTIONAL DESCRIPTION:
    3759. * PROCESS HEADING INFORMATION FOR EACH PAGE
    3760. *
    3761. * 3. METHOD USED:
    3762. * USE TTL0 AS DIFFERENT KIND OF OUTPUT TITLE BUFFER, IF MACRO
    3763. * MEMORY OR FILE 1 REGISTER DUMP, THEN WRITE ANOTHER OUTPUT
    3764. * TITLE FROM HEAD FOR THEM
    3765. *
    3766. * 4. ENTRY PARAMETERS:
    3767. * TTL0 HEADING INFORMATION BUFFER
    3768. * HEAD HEADING INFORMATION FOR MACRO MEM AND FILE 1 REG.
    3769. * BLLINE BLANK LINE.
    3770. * RULES MACRO MEM OR FILE 1 DUMP INDICATOR
    3771. *
    3772. * 5. EXIT PARAMETERS:
    3773. * LINENO CURRENT LINE NUMBER IN LISTING
    3774. *
    3775. * 6. COMDECKS CALLED:
    3776. * NONE
    3777. *
    3778. * 7. ROUTINES CALLED:
    3779. * WRITEH WRITE A LINE OF DATA TO FILE--SUPIO
    3780. * RECALL SET PROGRAM/FUNCTION IN RECALL STATUS--MACREL
    3781. *
    3782. * 8. DAYFILE MESSAGES:
    3783. * NONE
    3784. *
    3785.  #
    3786. *ENDIF
    3787. #**********************************************************************#
    3788. # #
    3789. # PROCESS HEADING INFORMATION #
    3790. # #
    3791. #**********************************************************************#
    3792. PROC HEADING;
    3793. BEGIN # PRINT HEADING INFORMATION #
    3794. PAGENO = PAGENO + 1;
    3795. TEMPC2 = XCDD(PAGENO);
    3796. PAGNUM = C<2,8>TEMPC2;
    3797. WRITEH(OUTPUT,TTL,14);
    3798. RECALL(OUTPUT);
    3799. WRITEH(OUTPUT,BLLINE,1); # PRINT A BLANK LINE #
    3800. RECALL(OUTPUT);
    3801. IF RULES EQ 7 OR RULES EQ 8 OR RULES EQ 9
    3802. THEN # IF MACRO MEM FILE 1, OR PAGE REG THEN ANOTHER LINE#
    3803. BEGIN
    3804. WRITEH(OUTPUT,HEAD,14);
    3805. RECALL(OUTPUT);
    3806. LINENO = 5; # RESET LINE NUMBER #
    3807. END
    3808. ELSE
    3809. LINENO = 3;
    3810. END
    3811. CONTROL EJECT;
    3812. *IF DEF,IMS
    3813. #
    3814. **
    3815. *E
    3816. * 1. PROC NAME: AUTHOR: DATE:
    3817. * DISHEX JACOB C. K. CHEN 80/02/01
    3818. *
    3819. * 2. FUNCTIONAL DESCRIPTION:
    3820. * CONVERT DISPLAY CODE TO HEXADECIMAL
    3821. *
    3822. * 3. METHOD USED:
    3823. * THIS PROCEDURE CONVERTS 6-BIT DISPLAY CODE TO 4-BIT HEXADECIMAL
    3824. * DEPENDING ON THE CHARACTER LENGTH ( CHARLEN ) DEMAND, IF INPUT
    3825. * DISIN OUT OF RANGE THEN SET ERROR FLAG ERRORI TRUE
    3826. *
    3827. * 4. ENTRY PARAMETERS:
    3828. * DISIN INPUT DISPLAY CODE TO BE CONVERTED
    3829. * CHARLEN LENGTH OF DISPLAY CODE TO BE CONVERTED
    3830. *
    3831. * 5. EXIT PARAMETERS:
    3832. * HEXOUT OUTPUT HEXADECIMAL.
    3833. * ERRORI ERROR FLAG FOR UNSUITABLE DISPLAY CODE
    3834. *
    3835. * 6. COMDECKS CALLED:
    3836. * NONE
    3837. *
    3838. * 7. ROUTINES CALLED:
    3839. * NONE
    3840. *
    3841. * 8. DAYFILE MESSAGES:
    3842. * NONE
    3843. *
    3844.  #
    3845. *ENDIF
    3846. #**********************************************************************#
    3847. # #
    3848. # CONVERT THE DISPLAY CODE TO HEXADECIMAL #
    3849. # #
    3850. #**********************************************************************#
    3851. PROC DISHEX(DISIN,HEXOUT,CHARLEN,ERRORI);
    3852. BEGIN # CONVERT DISPLAY TO HEX. #
    3853. ITEM DISIN C(10); # DISPLAY CODE TO BE CONVERTED #
    3854. ITEM HEXOUT U; # CONVERTED HEXADECIMAL #
    3855. ITEM CHARLEN U; # LENGTH TO BE CONVERTED #
    3856. ITEM ERRORI B; # ERROR FLAG #
    3857. ITEM I; # INDEX #
    3858. ITEM IPOS; # INDEX #
    3859. CONTROL EJECT;
    3860. #**********************************************************************#
    3861. # #
    3862. # CODE BEGINS HERE #
    3863. # #
    3864. #**********************************************************************#
    3865.  
    3866. ERRORI = FALSE; # INITIAL FLAG #
    3867. HEXOUT = 0; # CLEAR OUTPUT WORD #
    3868. FOR I=0 STEP 1 UNTIL CHARLEN-1
    3869. DO
    3870. BEGIN
    3871. IPOS = (15 + I - CHARLEN) * 4;
    3872. IF C<I,1>DISIN LQ "F" AND C<I,1>DISIN GQ "A"
    3873. THEN
    3874. B<IPOS,4>HEXOUT = C<I,1>DISIN + 9;
    3875. ELSE
    3876. IF (C<I,1>DISIN GQ DISZERO) AND (C<I,1>DISIN LQ DISNINE)
    3877. THEN
    3878. B<IPOS,4>HEXOUT = C<I,1>DISIN - DISZERO;
    3879. ELSE # THERE ARE NON HEX. DIGIT #
    3880. ERRORI = TRUE; # SET ERROR FLAG #
    3881. END
    3882. END
    3883. CONTROL EJECT;
    3884. *IF DEF,IMS
    3885. #
    3886. **
    3887. *E
    3888. * 1. PROC NAME: AUTHOR: DATE:
    3889. * HEXDIS JACOB C. K. CHEN 80/02/01
    3890. *
    3891. * 2. FUNCTIONAL DESCRIPTION:
    3892. * CONVERT HEXADECIMAL TO DISPLAY CODE
    3893. *
    3894. * 3. METHOD USED:
    3895. * THIS PROCEDURE CONVERT 4-BIT HEXADECIMAL TO 6-BIT DISPLAY CODE
    3896. * DEPENDING ON THE LENGTH ( LEN ) DEMAND, PUT CONVERTED DISPLAY
    3897. * CODE IN DISOUT
    3898. *
    3899. * 4. ENTRY PARAMETERS:
    3900. * HEXIN INPUT HEXADECIMAL TO BE CONVERTED
    3901. * LEN LENGTH FOR CONVERSION
    3902. *
    3903. * 5. EXIT PARAMETERS:
    3904. * DISOUT OUTPUT DISPLAY CODE
    3905. *
    3906. * 6. COMDECKS CALLED:
    3907. * NONE
    3908. *
    3909. * 7. ROUTINES CALLED:
    3910. * NONE
    3911. *
    3912. * 8. DAYFILE MESSAGES:
    3913. * NONE
    3914. *
    3915.  #
    3916. *ENDIF
    3917. #**********************************************************************#
    3918. # #
    3919. # CONVERT THE HEXADECIMAL TO DISPLAY CODE #
    3920. # #
    3921. #**********************************************************************#
    3922. PROC HEXDIS((HEXIN),DISOUT,(LEN));
    3923. BEGIN # CONVERT HEX. TO DISPLAY CODE #
    3924. ITEM DISOUT C(10); # CONVERTED DISPLAY CODE #
    3925. ITEM HEXIN U; # HEX. TO BE CONVERTED #
    3926. ITEM LEN I; # INDEX #
    3927. ITEM I; # INDEX #
    3928. CONTROL EJECT;
    3929. #*********************************************************************#
    3930. # #
    3931. # CODE BEGINS HERE #
    3932. # #
    3933. #**********************************************************************#
    3934.  
    3935. FOR I=0 STEP 1 UNTIL LEN - 1
    3936. DO
    3937. BEGIN
    3938. IF B<(15+I-LEN)*4,4>HEXIN LQ 9
    3939. THEN
    3940. C<I,1>DISOUT = B<(15+I-LEN)*4,4>HEXIN + DISZERO;
    3941. ELSE
    3942. C<I,1>DISOUT = B<(15+I-LEN)*4,4>HEXIN - 9;
    3943. END
    3944. END
    3945. CONTROL EJECT;
    3946. *IF DEF,IMS
    3947. #
    3948. **
    3949. *E
    3950. * 1. PROC NAME: AUTHOR: DATE:
    3951. * PTRMISS JACOB C. K. CHEN 80/02/01
    3952. *
    3953. * 2. FUNCTIONAL DESCRIPTION:
    3954. * PRINT POINTER MISSING ERROR MESSAGE
    3955. *
    3956. * 3. METHOD USED:
    3957. * IF POINTER MISSING THEN PRINT INPUT ERROR DIRECTIVE TOGETHER
    3958. * WITH OTHER PROPER ERROR MESSAGE
    3959. *
    3960. * 4. ENTRY PARAMETERS:
    3961. * POINTER POINTER WHICH IS NOT IN THE DUMP FILE
    3962. * BLLINE BLANK LINE
    3963. * INPBUFC INPUT DIRECTIVE BUFFER
    3964. * OUTBUF OUTPUT ERROR DIRECTIVE/MESSAGE BUFFER
    3965. *
    3966. * 5. EXIT PARAMETERS:
    3967. * NONE
    3968. *
    3969. * 6. COMDECKS CALLED:
    3970. * NONE
    3971. *
    3972. * 7. ROUTINES CALLED:
    3973. * PRINTH WRITE A DETAIL LINE TO OUTPUT. - SYMPL
    3974. * HEXDIS CONVERT HEXADECIMAL TO DISPLAY CODE. - SYMPL
    3975. *
    3976. * 8. DAYFILE MESSAGES:
    3977. * NONE
    3978. *
    3979.  #
    3980. *ENDIF
    3981. #**********************************************************************#
    3982. # #
    3983. # PRINT POINTER WORD MISSING ERROR MESSAGE #
    3984. # #
    3985. #**********************************************************************#
    3986. PROC PTRMISS((POINTER));
    3987. BEGIN # PRINT POINTER WORD MISSING MESSAGE #
    3988. ITEM POINTER U; # POINTER THAT NOT IN DUMP FILE #
    3989. ITEM WORKCP C(10); # WORKING AREA #
    3990. CONTROL EJECT;
    3991. STRING = " "; # CLEAR OUTPUT BUFFER #
    3992. C<1,80>STRING = INPBUFC; # PRINT ERROR DIRECTIVE #
    3993. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    3994. PRINTH(OUTBUF,14);
    3995. STRING = " ERROR IN POINTER( ), DATA MISSING IN DUMP FILE";
    3996. HEXDIS(POINTER,WORKCP,4); # CONVERT TO DISPLAY CODE #
    3997. C<18,4>STRING = WORKCP;
    3998. PRINTH(OUTBUF,14); # PRINT ERROR MESSAGE #
    3999. PRINTH(BLLINE,1); # PRINT A BLANK LINE #
    4000. STRING = " ";
    4001. END
    4002. CONTROL EJECT;
    4003. *IF DEF,IMS
    4004. #
    4005. **
    4006. *E
    4007. * 1. PROC NAME: AUTHOR: DATE:
    4008. * WRITERR E. SULLIVAN 77/01/31
    4009. *
    4010. * 2. FUNCTIONAL DESCRIPTION:
    4011. * PROCESSES ERRORS RETURNED FROM CALLS TO SUPIO FUNCTION WRITESR.
    4012. *
    4013. * 3. METHOD USED:
    4014. * AN UNSATISFACTORY STATUS CODE RETURNED FROM WRITESR CAUSES
    4015. * WRITERR TO BE CALLED. AN ERROR MESSAGE IS FORMATTED AND
    4016. * WRITTEN TO OUTPUT AFTER WHICH AN ERROR IS FLAGGED.
    4017. *
    4018. * 4. ENTRY PARAMETERS:
    4019. * FNAME FILE ON WHICH WRITESR ERROR WAS RETURNED
    4020. * REC RECORD TYPE CURRENTLY BEING PROCESSED
    4021. * CODE ERROR CODE RESPONSE FROM WRITESR
    4022. *
    4023. * 5. EXIT PARAMETERS:
    4024. * WERRFLG SET TRUE
    4025. *
    4026. * 6. COMDECKS CALLED:
    4027. * NONE
    4028. *
    4029. * 7. ROUTINES CALLED:
    4030. * MESSAGE WRITE MESSAGE TO DAYFILE--SUPIO
    4031. * PRDFILE FLUSH OUTPUT BUFFER TO ASSURE A DAYFILE MESSAGE
    4032. * XCOD CONVERT OCTAL TO DISPLAY - MACREL
    4033. *
    4034. * 8. DAYFILE MESSAGES:
    4035. * SUPIO ERROR XXXX IN XXXXXXX WHEN WRITING RECORD X
    4036. *
    4037.  #
    4038. *ENDIF
    4039. PROC WRITERR(FNAME,REC,(CODE));
    4040. BEGIN
    4041. ITEM FNAME C(7); #FILE IN ERROR #
    4042. ITEM REC C(8);
    4043. ITEM CODE U; #ERROR CODE RETURNED #
    4044. CONTROL EJECT;
    4045. WRREC[0] = REC; #FORMAT MESSAGE #
    4046. TEMP = XCOD(CODE);
    4047. WRCODE[0] = C<6,4>TEMP;
    4048. WRFILE[0] = FNAME;
    4049. MESSAGE(WRERR,OPTION); #OUTPUT MESSAGE #
    4050. PRDFILE; # FLUSH OUTPUT BUFFER TO ASSURE DAYFILE #
    4051. SUPERR = TRUE;
    4052. END
    4053. CONTROL EJECT;
    4054. *IF DEF,IMS
    4055. #
    4056. **
    4057. *E
    4058. * 1. PROC NAME AUTHOR DATE
    4059. * PRDFILE S.D.LEE 78/02/24
    4060. *
    4061. * 2. FUNCTIONAL DESCRIPTION
    4062. * PRDFILE WILL ASSURE THAT THE DAYFILE IS PRINTED WHEN NDA ABORTS
    4063. * WITH AN ERROR LOGGED IN THE DAYFILE.
    4064. *
    4065. * 3. METHOD USED
    4066. * THREE BLANK LINES ARE WRITTEN TO THE OUTPUT FILE AND
    4067. * THE OUTPUT BUFFER IS FLUSHED TO ASSURE THE ERROR IN THE
    4068. * DAYFILE ARE PRINTED.
    4069. *
    4070. * 4. ENTRY PARAMETERS
    4071. * NONE
    4072. *
    4073. * 5. EXIT PARAMETERS
    4074. * NONE
    4075. *
    4076. * 6. COMDECKS CALLED
    4077. * NONE
    4078. *
    4079. * 7. ROUTINES CALLED
    4080. * WRITEH WRITE A LINE OF DATA TO FILE
    4081. * WRITER WRITE A RECORD OF DATA TO FILE
    4082. *
    4083. * 8. DAYFILE MESSAGES
    4084. * NONE
    4085.  #
    4086. *ENDIF
    4087. PROC PRDFILE;
    4088. BEGIN
    4089. WRITEH(OUTPUT,BLLINE,3); # OUTPUT 3 BLANK LINES #
    4090. RECALL(OUTPUT);
    4091. WRITER(OUTPUT,0); # FLUSH OUT CIO BUFFER #
    4092. RECALL(OUTPUT);
    4093. END
    4094. END
    4095. TERM
1)
SRCHVAL),NUMCHARS)
  • [01180] PROC READDIR
  • [01221] FUNC XSFW C(10)
  • [01341] PROC DNPROC(EOF)
  • [01491] PROC PREP(EOF)
  • [01549] PROC READW
  • [01550] FUNC XCHD C(10)
  • [01551] FUNC XSFW C(10)
  • [01789] PROC BLDFILE
  • [01935] PROC FORM1
  • [02014] PROC SYNCHK(DIRERR)
  • [02106] PROC READI
  • [02153] PROC FORMAT0
  • [02218] PROC FORMAT1
  • [02291] PROC FORMAT3
  • [02408] PROC FORMAT4
  • [02617] PROC FORMAT9
  • [02808] PROC FORMATA
  • [03005] PROC FORMATA1
  • [03129] PROC FORMATA2
  • [03249] PROC FORMATB
  • [03417] PROC FORMATF
  • [03462] PROC ONEWORD((WODADR),WODOUT,(TYPE
2)
ADDRES
3)
HEXIN),DISOUT,(LEN
4)
POINTER
cdc/nos2.source/nam5871/ndas.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator