User Tools

Site Tools


cdc:nos2.source:nam5871:dlrep

Table of Contents

DLREP

Table Of Contents

  • [00015] PROC DLREP
  • [00113] PROC DLABEND
  • [00114] PROC DLCND
  • [00115] PROC DLDFM
  • [00116] PROC DLFLUSH
  • [00117] PROC DLINT
  • [00118] PROC DLRECL
  • [00119] PROC DLREST
  • [00120] PROC DLRT
  • [00121] PROC DLSCAN
  • [00122] PROC DLRDW
  • [00123] PROC DLUPTM
  • [00124] PROC DLWRT

Source Code

DLREP.txt
  1. *DECK DLREP
  2. USETEXT DLFPDEF
  3. USETEXT DIERR
  4. USETEXT DIRTBL
  5. USETEXT DIRTBLH
  6. USETEXT DIRTBLM
  7. USETEXT DIRTBLS
  8. USETEXT ERRMSG
  9. USETEXT MISRES
  10. USETEXT OFETB
  11. USETEXT OUTCDA
  12. USETEXT ZCIOBB
  13. USETEXT ZFETB
  14. USETEXT ZHRCD
  15. PROC DLREP; # REPORT GENERATING PROGRAM #
  16. *IF DEF,IMS
  17. #
  18. *1DC DLREP
  19. *
  20. * 1. PROC NAME AUTHOR DATE
  21. * DLREP P.C.TAM 78/12/12
  22. *
  23. * 2. FUNCTIONAL DESCRIPTION.
  24. * REPORT GENERATING ROUTINE
  25. *
  26. * 3. METHOD USED.
  27. * INITIALIZE COUNTER OF NUMBER OF ENTRIES WRITTEN TO OUTPUT
  28. * AND CLEAR COMPLETE FLAG.
  29. * READ DEBUG LOG FILE INFORMATION.
  30. * DETERMINE IF AIP OR NIP DEBUG LOG FILE.
  31. * CALL DLRT TO COMPUTE MIDNIGHT OFFSET.
  32. * ADD INITIAL RT VALUE TO COMPUTE RT VALUE.
  33. * IF BD PARAMETER EXISTS IN PARAMETER TABLE, CALL DLCND TO
  34. * COMPUTE NUMBER (IN SECONDS) OF FULL 24 HOUR PERIODS FROM
  35. * DATE IN HEADER TO BD DATE (NUMBER = 0 IF BD DATE @ HEADER
  36. * + 1). NUMBER IS ADDED TO MIDNIGHT RT VALUE TO GET BD RT
  37. * VALUE.
  38. * IF BT PARAMETER EXISTS IN PARAMETER TABLE, CALL DLRT TO
  39. * CONVERT IT TO A RT VALUE AND ADD SRTMILS (START TIME)
  40. * AND ADD BEGIN DATE OFFSET TO COMPUTE BT RT VALUE.
  41. * IF BT PARAMETER DOES NOT EXIST AND BD PARAMETER DOES
  42. * THEN BT RT VALUE IS SET TO START TIME. IF BT PARAMETER
  43. * DOES NOT EXIST AND BD PARAMETER DOES NOT EXIST, THEN
  44. * PARAMETER TABLE BT VALUE IS LEFT AT ZERO.
  45. * ZERO BD PARAMETER IN PARAMETER TABLE.
  46. * IF ED PARAMETER EXISTS IN PARAMETER TABLE, CALL DLCND TO
  47. * COMPUTE NUMBER OF FULL 24 HOUR PERIODS IN SECONDS FROM
  48. * DATE IN HEADER TO ED DATE (NUMBER = - MIDNIGHT RT VALUE
  49. * IF ED DATE @ HEADER DATE). NUMBER IS ADDED TO MIDNIGHT RT
  50. * VALUE TO GET ED RT VALUE.
  51. * IF ET PARAMETER EXISTS IN PARAMETER TABLE, CALL DLRT TO
  52. * CONVERT IT TO A RT VALUE AND ADD TO SRTMILS (START
  53. * TIME) AND TO END DATE OFFSET TO COMPUTE ET RT VALUE.
  54. * ZERO ED PARAMETER IN PARAMETER TABLE.
  55. * IF AIP LOG FILE, ZERO DN AND SN ENTRIES IN PARAMETER TABLE.
  56. * IF NIP LOG FILE, ZERO T, U, AND B ENTRIES IN PARAMETER TABLE,
  57. * AND INITIALIZE THE CONNECTION TABLE.
  58. * COPY FIRST 6 ENTRIES OF PARAMETER TABLE, IF NONZERO,
  59. * TO MESSAGE PROCESSING TABLE.
  60. * COPY NEXT 11 ENTRIES OF PARAMETER TABLE, IF NONZERO,
  61. * TO ABH/NBH PROCESSING TABLE (INCLUDING CN)
  62. * COPY LAST 5 ENTRIES OF PARAMETER TABLE, IF NONZERO,
  63. * TO SUPMSG PROCESSING TABLE (INCLUDING CN)
  64. * IF LE PARAMETER EXISTS IN PARAMETER TABLE, STORE IN LENGTH.
  65. * OTHERWISE, SET LENGTH TO TLWMAX (410 WORDS).
  66. * SET SM TO SM PARAMETER IN PARAMETER TABLE. THIS WILL SET
  67. * SM TO ZERO IF THE SM PARAMETER DOES NOT EXIST.
  68. * CALL DLSCAN TO PROCESS DEBUG LOG FILE
  69. * IF END OF FILE IS ENCOUNTERED SET COMPLETE FLAG TO
  70. * FALSE TO PROCESS THE NEXT FILE (MAY HAVE MULTI-FILE FILES).
  71. * CALL DLFLUSH TO WRITE EOR TO OUTPUT FILE
  72. * IF NIP DEBUG LOG FILE AND MESSAGES HAVE BEEN OUTPUT,
  73. * THEN CALL DLREST TO WRITE AVERAGE RESPONSE TIME TO
  74. * OUTPUT FILE.
  75. *
  76. * 4. ENTRY PARAMETERS.
  77. * NONE.
  78. *
  79. * 5. EXIT PARAMETERS.
  80. * NONE.
  81. *
  82. * ARGTBL NCIOBB NFETB
  83. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  84. * DIERR DIRTBL DIRTBLH DIRTBLM
  85. * DIRTBLS MISRES OFETB OUTCDA
  86. * SYSDATEX ZCIOBB ZFETB ZHRCD
  87. * ERRMSG
  88. *
  89. * 7. ROUTINES CALLED.
  90. * DLABEND ABORT PROGRAM
  91. * DLCND CALCULATE DATE OFFSET IN SECONDS
  92. * DLDFM DAYFILE MESSAGE PROCESSOR
  93. * DLFLUSH WRITE EOR ON OUTPUT FILE
  94. * DLINT INITIALIZE READ FOR ANOTHER EOR
  95. * DLRECL RECALL ON COMPLETION BIT
  96. * DLREST NIP RESPONSE TIME AVERAGES
  97. * DLRT COMPUTES REAL TIME FROM CLOCK TIME
  98. * DLSCAN SCAN DEBUG LOG FILE
  99. * DLRDW RECORD A SPECIFIED NO OF WORDS FROM FILE
  100. * DLUPTM CALCULATE THE CLOCK TIME FROM OFFSET
  101. *
  102. * 8. DAYFILE MESSAGES.
  103. * *BAD FILE CONTENT*
  104. *
  105.  #
  106. *ENDIF
  107.  
  108. #
  109.   EXTERNAL VARIABLES
  110. #
  111. XREF
  112. BEGIN
  113. PROC DLABEND; # ABORT MAIN PROGRAM #
  114. PROC DLCND; # CALCULATE OFFSET DATE IN SECONDS #
  115. PROC DLDFM; # DAYFILE MESSAGE PROCESSOR #
  116. PROC DLFLUSH; # WRITE EOR ON OUTPUT FILE #
  117. PROC DLINT; # INITIALIZE READ #
  118. PROC DLRECL; # RECALL ON COMPLETION BIT #
  119. PROC DLREST; # NIP RESPONSE TIME AVERAGES #
  120. PROC DLRT; # COMPUTES REAL TIME FROM CLOCK TIME #
  121. PROC DLSCAN; # SCAN DEBUG LOG FILE #
  122. PROC DLRDW; # READ RECORD FROM CIO BUFFER #
  123. PROC DLUPTM; # CALCULATE CLOCK TIME #
  124. PROC DLWRT; # DIRECT WRITE TO CIO BUFFER #
  125. END
  126. #
  127.   COMMON VARIABLES
  128. #
  129. CONTROL NOLIST; # SEE DLFP FOR LISTING OF ARGTBL #
  130. *CALL ARGTBL
  131. CONTROL LIST;
  132. CONTROL NOLIST; # SEE DLFP FOR LISTING OF NCIOBB #
  133. *CALL NCIOBB
  134. CONTROL LIST;
  135. CONTROL NOLIST;
  136. *CALL NFETB
  137. CONTROL LIST;
  138. *CALL SYSDATEX
  139. #
  140.   LOCAL VARIABLES
  141. #
  142.  
  143.  
  144. ITEM
  145. BRTIME, # BEGIN REAL TIME #
  146. ERTIME, # END REAL TIME #
  147. RSIZE I, # READ IN DATA SIZE #
  148. OFF$DATE, # DATE OFFSET IN SECONDS #
  149. J, # TEMPORARY VARIABLE #
  150. I I; # TEMPORARY VARIABLE #
  151.  
  152. BASED ARRAY DUMMY; ;
  153.  
  154. # ******************************************************************** #
  155.  
  156.  
  157. BEGIN
  158.  
  159. #
  160.   INITIALIZE LOCAL VARIABLES
  161. #
  162. PAGE$COUNT = 0;
  163. MSG$COUNT = 0;
  164. OUMSGNO = 0;
  165. COMPLETE = FALSE;
  166. FOR I = I WHILE NOT COMPLETE
  167. DO
  168. BEGIN
  169. LINE$COUNT = MAXNO;
  170. DLRDW(ZFET, ZHSIZE, TEMPB1, RSIZE);# READ IN HEADR #
  171. IF RSIZE EQ 0 OR
  172. RSIZE LS 0
  173. THEN
  174. BEGIN # EOF, EOI OR EMPTY RECORDS ENCOUNTERED #
  175. COMPLETE = TRUE;
  176. TEST I;
  177. END
  178.  
  179. IF RSIZE NQ ZHSIZE
  180. THEN
  181. BEGIN # BAD DEBUG LOG FILE CONTENT #
  182. DLDFM(BAD$ZFILE);
  183. DLABEND;
  184. END
  185. L1NAME[0] = ZHNAME[0]; # PRESET HEADER INFORMATION #
  186. FOR I = 0 STEP 1 UNTIL 7 DO
  187. BEGIN # CONVERT ZERO BYTES TO BLANK #
  188. IF C<I>L1NAME[0] EQ 0
  189. THEN
  190. C<I>L1NAME[0] = " ";
  191. END
  192.  
  193. L1DATE[0] = SYSDATE[0];
  194. L2DATE[0] = ZHYMD[0];
  195. SRTSEC = ZHSEC[0];
  196. SRTMILS = ZHMILS[0];
  197. SCLHHMMSS = ZHWD2[0];
  198. SDTYYMMDD = ZHWD3[0];
  199. IF C<0,3>ZHNAME[0] EQ "NIP"
  200. THEN # CHANGE THE PRESET VALUE #
  201. NIP = TRUE;
  202.  
  203. DLRT("240000",BRTIME);
  204. MIDNITE = SRTMILS + BRTIME;
  205. #
  206.   WRITE NEW DEBUG LOG FILE IF NECESSARY
  207. #
  208. IF ARGFLAG[NFILE]
  209. THEN
  210. BEGIN # HEADER FOR NEW DEBUG LOG FILE #
  211. DLWRT(NFET, TEMPB1, RSIZE);
  212. NMSGCNT = 0;
  213. END
  214.  
  215. #
  216.   BEGIN TIME PROCESSING
  217. #
  218. IF DIRID[ID$BD] NQ 0
  219. THEN
  220. BEGIN # BEGIN DATE SPECIFIED #
  221. DLCND(DIRWD0[ID$BD],OFF$DATE); # COMPUTE BEGIN DATE OFFSET #
  222. IF DIRID[ID$BT] NQ 0
  223. THEN
  224. BEGIN # BEGIN TIME SPECIFIED #
  225. DLRT(DIRWD0[ID$BT],BRTIME); # COMPUTE BEGIN TIME OFFSET #
  226. BRTIME = SRTMILS + OFF$DATE + BRTIME;
  227. END
  228. ELSE
  229. BRTIME = MIDNITE + OFF$DATE - 86400000;
  230. IF BRTIME LS SRTMILS
  231. THEN
  232. BRTIME = SRTMILS;
  233. END
  234. ELSE
  235. BEGIN # BEGIN DATE NOT SPECIFIED #
  236. IF DIRID[ID$BT] NQ 0
  237. THEN
  238. BEGIN # BEGIN TIME SPECIFIED #
  239. DLRT(DIRWD0[ID$BT],BRTIME); # COMPUTE BEGIN TIME OFFSET #
  240. IF BRTIME LS 0
  241. THEN
  242. BRTIME = 0;
  243. BRTIME = SRTMILS + BRTIME;
  244. END
  245. ELSE
  246. BRTIME = 0;
  247. END
  248. #
  249.   END TIME PROCESSING
  250. #
  251. IF DIRID[ID$ED] NQ 0
  252. THEN
  253. BEGIN # END DATE SPECIFIED #
  254. DLCND(DIRWD0[ID$ED],OFF$DATE);# COMPUTE DATE OFFSET #
  255. IF DIRID[ID$ET] NQ 0
  256. THEN
  257. BEGIN # END TIME SPECIFIED #
  258. DLRT(DIRWD0[ID$ET],ERTIME); # COMPUTE TIME OFFSET #
  259. ERTIME = SRTMILS + OFF$DATE + ERTIME;
  260. END
  261. ELSE
  262. ERTIME = MIDNITE + OFF$DATE - 86400000;
  263. IF ERTIME LS SRTMILS
  264. THEN
  265. ERTIME = SRTMILS;
  266. END
  267. ELSE
  268. BEGIN # END DATE NOT SPECIFIED #
  269. IF DIRID[ID$ET] NQ 0
  270. THEN
  271. BEGIN # END TIME SPECIFIED #
  272. DLRT(DIRWD0[ID$ET],ERTIME); # COMPUTE TIME OFFSET #
  273. IF ERTIME LS 0
  274. THEN
  275. ERTIME = SRTMILS ; # END TIME BEFORE NETON TIME #
  276. ELSE
  277. ERTIME = SRTMILS + ERTIME ;
  278. END
  279. ELSE
  280. ERTIME = 0;
  281. END
  282.  
  283. IF NOT NIP
  284. THEN # AIP LOG FILE, ZERO DN, SN #
  285. BEGIN
  286. DIRWD0[ID$DN] = 0;
  287. DIRWD0[ID$SN] = 0;
  288. END
  289. ELSE
  290. BEGIN # NIP LOG FILE, ZERO T,U,B #
  291. DIRWD0[ID$T] = 0;
  292. DIRWD0[ID$U] = 0;
  293. DIRWD0[ID$B] = 0;
  294. FOR I = 0 STEP 1 UNTIL MAXCN
  295. DO
  296. BEGIN # ZERO RESPONSE TIME AVERAGE TABLE #
  297. CNWD0[I] = 0;
  298. CNWD1[I] = 0;
  299. END
  300. END
  301.  
  302. #
  303.   SET MESSAGE PROCESSING TABLE
  304. #
  305. J = 0;
  306. IF DIRID[ID$NM] NQ 0
  307. THEN
  308. BEGIN # NM= DIRECTIVE #
  309. J = J + 1;
  310. DIRMID[J] = ID$NM;
  311. DIRMVAL[J] = DIRVALU[ID$NM];
  312. END
  313. IF ERTIME NQ 0
  314. THEN
  315. BEGIN # SET ET= VALUE #
  316. J = J + 1;
  317. DIRMID[J] = ID$ET;
  318. DIRMVAL[J] = ERTIME;
  319. END
  320. IF DIRID[ID$N] NQ 0
  321. THEN
  322. BEGIN # N DIRECTIVE #
  323. J = J + 1;
  324. DIRMID[J] = ID$N;
  325. END
  326. IF BRTIME NQ 0
  327. THEN
  328. BEGIN # SET BT= VALUE #
  329. J = J + 1;
  330. DIRMID[J] = ID$BT;
  331. DIRMVAL[J] = BRTIME;
  332. END
  333. DIRNUMM = J;
  334.  
  335. #
  336.   SET ABH/NBH PROCESSING TABLE
  337. #
  338. J = 0;
  339. FOR I = ID$B STEP 1 UNTIL ID$CN
  340. DO
  341. IF DIRID[I] NQ 0
  342. THEN
  343. BEGIN
  344. J = J + 1;
  345. DIRHID[J] = DIRID[I];
  346. DIRHVAL[J] = DIRVALU[I];
  347. END
  348. DIRNUMH = J;
  349. #
  350.   SET SUPERVISORY PROCESSING TABLE
  351. #
  352. J = 0;
  353. FOR I = ID$CN STEP 1 UNTIL ID$PS
  354. DO
  355. IF DIRID[I] NQ 0
  356. THEN
  357. BEGIN
  358. J = J + 1;
  359. DIRSID[J] = DIRID[I];
  360. DIRSVAL[J] = DIRVALU[I];
  361. END
  362. DIRNUMS = J;
  363. IF DIRWD0[ID$LE] NQ 0
  364. THEN # MAXIMUM LENGTH OF MESSAGE TO BE OUTPUT #
  365. LENGTH = DIRVALU[ID$LE];
  366. ELSE
  367. LENGTH = TLWMAX;
  368.  
  369. # START MESSAGE AFTER THIS MESSAGE NUMBER #
  370. SM = DIRVALU[ID$SM];
  371.  
  372. #
  373.   PROCESS LOG FILE
  374. #
  375. DLSCAN;
  376. IF EOFFLAG
  377. THEN
  378. BEGIN # (EOF) ENCOUNTERED #
  379. COMPLETE = FALSE; # PROCESS NEXT FILE #
  380. EOFFLAG = FALSE;
  381. PAGE$COUNT = 0 ;
  382. NMSGCNT = 0 ;
  383. OUMSGNO = 0 ;
  384. END
  385.  
  386. IF NTOFF
  387. THEN
  388. BEGIN # NETOFF ENCNTERED, CHK EOR #
  389. DLRDW(ZFET, ZHSIZE, TEMPB1, RSIZE);
  390. IF RSIZE EQ 0
  391. THEN
  392. BEGIN
  393. DLINT(ZFET, READNR); # INTIALIZE READ AFTER EOR #
  394. IF ARGFLAG[NFILE]
  395. THEN
  396. BEGIN
  397. DLFLUSH(NFET);
  398. DLRECL(NFET);
  399. END
  400. COMPLETE = FALSE;
  401. END
  402. END
  403. END
  404.  
  405. IF NOT ARGFLAG[NFILE]
  406. THEN
  407. BEGIN # N= OPTION NOT SELECTED #
  408. IF MSG$COUNT EQ 0
  409. THEN
  410. BEGIN
  411. P<DUMMY> = LOC(D$EM0[D$NMF]);# NO MESSAGES FOUND #
  412. DLWRT(OFET,DUMMY,5);
  413. END
  414. ELSE
  415. IF NIP
  416. THEN # NIP TRACE FILE #
  417. DLREST; # WRITE NIP RESP TIME AVG #
  418. DLFLUSH(OFET); # WRITER ON FILE #
  419. END
  420.  
  421. END # DLREP #
  422. TERM
cdc/nos2.source/nam5871/dlrep.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator