User Tools

Site Tools


cdc:nos2.source:opl871:secart

SECART

Table Of Contents

  • [00003] SECURITY AUDIT REDUCTION TOOL.
  • [00941] DIRECT - SECART DIRECTIVES PROCESSING.
  • [01117] ENTRY - CALL DIRECT [NO ARGUMENTS].
  • [01341] ENTRY - CALL TMCHECK(ETM,HIT)
  • [01383] ENTRY - CALL MSCHECK(TXT,HIT)
  • [01410] ENTRY - CALL PICKJSN(JS,MK)
  • [01428] ENTRY - CALL PICKUJN(JN,MK)
  • [01445] ENTRY - CALL PICKUSR(FN,UN,MK)
  • [01465] ENTRY - CALL PICKTRM(TN,MK)
  • [01484] TMARG - EXPANDS TIME= DIRECTIVE ARGUMENTS TO FIXED FORMAT.
  • [01588] DFSCAN - DAYFILE LOG MESSAGE PROCESSING.
  • [01746] ENTRY - CALL DFSCAN(LFN,*NNN)
  • [01862] ENTRY - CALL DFMSG(*NNN)
  • [02008] ACSCAN - ACCOUNT LOG MESSAGE PROCESSING.
  • [02172] ENTRY - CALL ACSCAN(LFN,*NNN)
  • [02280] ENTRY - CALL ACMSG(*NNN)
  • [02450] LOGTEST - TEST RAW LOG FORMAT & EXTRACT DATE/TIME STAMPS.
  • [02546] JSNLOAD - JSN TRACE TABLE MANAGER.
  • [02740] ENTRY - CALL JSNLOAD [NO ARGUMENTS].
  • [02790] ENTRY - CALL JSNTRAK(JSN,JCL,DTG,N,LOG)
  • [02818] ENTRY - CALL JSNLOOK(JSN,N)
  • [02921] ENTRY - CALL JSNLVL0 [NO ARGUMENTS].
  • [02951] ENTRY - CALL JSNLIST(LFN)
  • [03076] AMSLOAD - ACCOUNT LOG MESSAGE ID MANAGER.
  • [03172] ENTRY - CALL AMSLOAD [NO ARGUMENTS].
  • [03202] ENTRY - CALL AMSMARK(MID,FLAG)
  • [03222] ENTRY - CALL AMSTEST(MID,JCL,HIT)
  • [03316] ENTRY - CALL AMSLIST [NO ARGUMENTS].
  • [03367] PARSE - SIMPLE TEXT STRING PARSER.

Source Code

SECART.txt
  1. *NOSEQ
  2. PROGRAM SECART
  3. *** SECART - SECURITY AUDIT REDUCTION TOOL.
  4. *
  5. * COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  6. *
  7. * T. A. CURETON. 86/06/30.
  8.  
  9. *** OVERVIEW.
  10. *
  11. * *SECART* IS A STAND-ALONE SECURITY ADMINISTRATOR UTILITY WHICH
  12. * DIGESTS BOTH *ACCOUNT* AND *DAYFILE* LOG MESSAGES, REDUCING
  13. * THE VOLUME OF DATA WHICH MUST BE REVIEWED AND PRODUCES
  14. * PRINTOUTS AND FILES USEFUL FOR SECURITY AUDITING PURPOSES.
  15.  
  16. *** FUNCTIONS.
  17. *
  18. * - MERGE BY TIME SEQUENCE MESSAGES FROM RAW *DAYFILE* AND
  19. * *ACCOUNT* LOGS TO PRODUCE A NEAR-NORMAL CAUSE-AND-EFFECT
  20. * SERIAL SEQUENCE AND ESTABLISH EVENT CONTEXT.
  21. *
  22. * - SELECT MESSAGES FROM RAW LOGS FOR SERIAL PRINTOUT BASED ON
  23. * CRITERIA SPECIFIED IN DIRECTIVES.
  24. *
  25. * - EXTRACT JSN-S, USER NAMES, AND OTHER ATTRIBUTES OF EACH JOB
  26. * ENCOUNTERED IN THE RAW LOG INPUT(S).
  27. *
  28. * - RECOGNIZE MESSAGES INDICATING LEVEL 0 DEADSTARTS WHICH RESET
  29. * JSN GENERATION SEQUENCE AND AUGMENT JSN IDENTIFIERS TO
  30. * UNIQUELY IDENTIFY EACH JOB.
  31. *
  32. * - RECOGNIZE JOB RECOVERY EVENTS AND, WHERE POSSIBLE, RECOVER
  33. * JOB ATTRIBUTES FROM PREVIOUS JSN TRACE TABLE ENTRIES.
  34. *
  35. * - COLLECT AND PRINTOUT STATISTICS ON USAGE OF *ACCOUNT* LOG
  36. * MESSAGE IDENTIFIERS.
  37. *
  38. * - SORT AND PRINTOUT JSN TRACE TABLE PER DIRECTIVES.
  39. *
  40. * - SORT COMPOSITE (MERGED) LOG TO GROUP MESSAGES BY UNIQUE JSN.
  41. *
  42. * - SELECT AND PRINTOUT UNIT JOBS PER DIRECTIVES. APPLY SAMPLE
  43. * LIMIT TO NUMBER OF MESSAGES PRINTED FOR EACH JOB TO REDUCE
  44. * RISK OF MASSIVE PRINTOUT OR EXCEEDING RESOURCE LIMITS.
  45.  
  46. *** COMMAND FORMAT.
  47. *
  48. * SECART(P1,P2,...PN)
  49. *
  50. * EACH PARAMETER SPECIFIES THE LFN OF A FILE PROVIDED AS INPUT
  51. * OR TO BE PRODUCED AS AN OUTPUT OF THE PROGRAM. PARAMETERS
  52. * MUST BE IN KEYWORD=VALUE FORMAT AND MAY BE IN ANY ORDER. A
  53. * VALUE OF *0* (ZERO) SPECIFIES NO FILE IS PROVIDED OR PRODUCED.
  54. * A PARAMETER OMITTED OR SPECIFIED WITHOUT A VALUE FIELD WILL
  55. * ASSUME A DEFAULT VALUE AS DEFINED IN THE FOLLOWING TABLE:
  56. *
  57. * PARAM OMIT NO_VALUE DESCRIPTION
  58. *
  59. * *D* 0 DFLOG RAW DAYFILE LOG INPUT.
  60. * *A* 0 ACLOG RAW ACCOUNT LOG INPUT.
  61. * *C* 0 COMBO COMPOSITE LOG OUTPUT/INPUT.
  62. * *J* 0 JOBS UNIT JOBS COMPOSITE LOG OUTPUT/INPUT.
  63. * *M* 0 MSGID ACCOUNT MSG ID REFERENCE INPUT FILE.
  64. * *T* 0 TRACE JSN TRACE TABLE INPUT AND OUTPUT.
  65. * *I* INPUT INPUT DIRECTIVES INPUT FILE.
  66. * *L* OUTPUT OUTPUT PRINTOUTS FILE. REQUIRED OUTPUT.
  67. *
  68. * AT LEAST ONE OF THE FILES IDENTIFIED BY PARAMETERS *D*,*A*,
  69. * C*,*J*,*T* MUST BE SPECIFIED TO PROVIDE INPUT(S) FOR *SECART*
  70. * PROCESSING. SPECIFYING EITHER (OR BOTH) RAW LOGS (*D*,*A*)
  71. * DEFINES AN INITIAL RUN WITH COMPOSITE (*C*) AND UNIT JOB (*J*)
  72. * LOGS AND JSN TRACE TABLE (*T*) PRODUCED AS OUTPUT FILES.
  73. *
  74. * IF NO RAW LOG FILE IS SPECIFIED, *SECART* WILL ASSUME RERUN
  75. * MODE AND LOOK FOR 1) A COMPOSITE LOG OR 2) UNIT JOBS LOG AS
  76. * INPUT. IF A COMPOSITE LOG (*C*) IS PROVIDED, THE UNIT JOBS
  77. * LOG (*J*) WILL BE AN OUTPUT FILE. IF A UNIT JOBS LOG (*J*) IS
  78. * THE LOG INPUT FILE, ONLY PRINTOUTS WILL BE PRODUCED.
  79. *
  80. * THE JSN TRACE TABLE FILE (*T*) IS PRODUCED ONLY DURING AN
  81. * INITIAL RUN. IT CONTAINS AN ENTRY FOR EACH JOB FOUND IN THE
  82. * RAW LOG(S) AND SHOULD BE SAVED TO FACILLITATE RERUNS. ANY
  83. * *SECART* RERUN USING A PRE-PROCESSED LOG FILE REQUIRES
  84. * PROVIDING THE TRACE TABLE FILE WHICH CORRESPONDS TO THE INPUT
  85. * LOG. PROVIDING A JSN TRACE TABLE FILE AS THE ONLY INPUT IS
  86. * USEFUL FOR RE-SORTING AND/OR PRINTOUT OF THE JSN TRACE TABLE.
  87. * TO AID RECOVERY OF JOB ATTRIBUTES FROM A PREVIOUS SET OF RAW
  88. * LOGS, THE TRACE TABLE (OR A SUBSET) FROM THE PREVIOUS RUN MAY
  89. * BE PROVIDED FOR AN INITIAL RAW LOGS *SECART* RUN. SINCE THIS
  90. * FILE WILL BE FIRST READ, THEN REWRITTEN, AN EXPENDABLE COPY OF
  91. * THE TRACE TABLE FILE (OR SUBSET) SHOULD BE PROVIDED.
  92. *
  93. * THE INPUT FILE (*I*) MAY CONTAIN *SECART* DIRECTIVES WHICH
  94. * SPECIFY CRITERIA FOR SELECTING MESSAGES AND/OR UNIT JOBS FOR
  95. * PRINTOUT, SORTING JSN TRACE TABLE ENTRIES, AND LIMITING UNIT
  96. * JOB PRINTOUTS. SEE DIRECTIVES SECTION BELOW FOR DESCRIPTIONS.
  97. *
  98. * A LIST FILE (*L*) IS ALWAYS PRODUCED AND THE *L* PARAMETER MAY
  99. * BE USED TO DIRECT PRINTOUTS TO A FILENAME. THE SEQUENCE OF
  100. * PRINTOUTS MAY INCLUDE:
  101. *
  102. * - *SECART* DIRECTIVES AND ANY DIRECTIVE ERROR MESSAGES.
  103. *
  104. * - TIME SEQUENCED SERIAL PRINTOUT OF SELECTED MESSAGES.
  105. *
  106. * - *ACCOUNT* MESSAGE ID STATISTICS.
  107. *
  108. * - SORTED JSN TRACE TABLE.
  109. *
  110. * - SELECTED UNIT JOBS.
  111.  
  112. *** DIRECTIVES.
  113. *
  114. * *SECART* DIRECTIVES MAY BE USED TO SPECIFY OPTIONS AND TO
  115. * SELECT MESSAGES, TIME WINDOWS, AND JOBS FOR PRINTOUT. ALL
  116. * SELECTIONS ARE ON AN INCLUSIVE OR BASIS. SELECTED *ACCOUNT*
  117. * MESSAGE ID-S ARE FLAGGED AND OCCURRENCES TABULATED IN THE
  118. * STATISTICS PRINTOUT. SELECTED JOBS ARE ANNOTATED TO SHOW
  119. * SELECTION BASIS IN THE JSN TRACE TABLE PRINTOUT.
  120. *
  121. * EACH DIRECTIVE MUST BEGIN IN COLUMN 1 ON A SEPARATE INPUT
  122. * LINE. THE *=* AFTER THE DIRECTIVE NAME IS REQUIRED. SYNTAX
  123. * IS GENERALLY FREEFORM USING A COMMA AND/OR BLANKS TO SEPARATE
  124. * ARGUMENTS. ITEMS SHOWN BELOW IN [BRACKETS] ARE OPTIONAL.
  125. * REPETITIVE ARGUMENTS ARE INDICATED BY TRIPLE PERIODS AND MAY
  126. * MAY BE ENTERED VIA MULTIPLE DIRECTIVES TO A MAXIMUM DEFINED
  127. * BY TABLE SPACE (50 EACH TYPE).
  128. *
  129. * AMSG=MSID,MSID,...
  130. *
  131. * SELECTS FOR SERIAL PRINTOUT ALL MESSAGES CONTAINING
  132. * ANY OF THE SPECIFIED ACCOUNT MESSAGE IDENTIFIERS.
  133. *
  134. * DMSG=[NN:]TEXTSTRING
  135. *
  136. * SELECTS FOR SERIAL PRINTOUT OF ALL DAYFILE
  137. * MESSAGES CONTAINING SPECIFIED TEXT STRING. NN IS
  138. * OPTIONAL AND SPECIFIES A START CHARACTER POSITION
  139. * [1-80] RELATIVE TO MESSAGE PORTION OF DAYFILE. TEXT
  140. * STRING IS UNDELIMITED, BEGINS IMMEDIATELY AFTER THE
  141. * EQUAL OR COLON, AND ENDS WITH LAST NON-BLANK.
  142. *
  143. * TIME=HHMMSS[-HHMMSS] (OR)
  144. * TIME=HH.MM.SS.[-HH.MM.SS]
  145. *
  146. * SPECIFIES TIME WINDOW FOR SERIAL PRINTOUT.
  147. * SECONDS PORTION IS OPTIONAL. END TIME IS OPTIONAL
  148. * BUT REQUIRES '-' SEPARATOR. DEFAULTS TO SAME AS
  149. * START TIME FOR ONE SECOND WINDOW.
  150. *
  151. * TRACE=KEY,KEY,...
  152. *
  153. * SPECIFIES SORT KEYS FOR TRACE TABLE PRINTOUT. VALID
  154. * KEYS: UJN,JSN,JC,SDT,EDT,FM,UN,TRM. DEFAULT IS SDT
  155. * WHICH IS SEQUENCE OF ENCOUNTERING UNIQUE JSN-S.
  156. *
  157. * USER=FAMILY,USER
  158. *
  159. * SELECTS UNIT JOBS FOR PRINTOUT BY USER/FAMILY
  160. * IDENTIFICATION. FAMILY MAY BE BLANK OR OMITTED TO
  161. * SELECT DEFAULT FAMILY. ASTERISK MAY BE SPECIFIED
  162. * FOR WILDCARD MATCH ON FAMILY OR USER. NOTE THAT
  163. * USER=*,* SELECTS ALL JOBS. SINCE *SECART* RECOGNIZES
  164. * THE USER INDEX IN A *SUI* COMMAND AS A USER ID, A
  165. * USER INDEX MAY BE SPECIFIED IN PLACE OF THE USERNAME
  166. * AND WILL BE RECOGNIZED WHEN A *SUI* WITH THAT UI IS
  167. * ENCOUNTERED IN THE DAYFILE LOG.
  168. *
  169. * UJN=JOBNAME,...
  170. *
  171. * SELECTS UNIT JOBS FOR PRINTOUT BY JOBNAME FOUND IN
  172. * FIRST DAYFILE MESSAGE (USUALLY).
  173. *
  174. * JSN=[D.]AAAA,...
  175. *
  176. * SELECTS UNIT JOBS FOR PRINTOUT BY JSN. 'D.' IS
  177. * OPTIONAL AND SPECIFIES AN *SECART*-ASSIGNED PREFIX
  178. * CODE USED TO RESOLVE JSN AMBIGUITY ACROSS LEVEL 0
  179. * DEADSTARTS.
  180. *
  181. * TRM=TERMID,...
  182. *
  183. * SELECTS UNIT JOBS PRINTOUT BY TERMINAL ID.
  184. *
  185. * LIMIT=NNNN
  186. *
  187. * LIMITS UNIT JOB PRINTOUTS TO NNNN LINES EACH. HELPS
  188. * REDUCE/AVOID MASSSIVE PRINTOUTS.
  189.  
  190. *** CALLS.
  191. *
  192. * SORT/MERGE V5 - TO GROUP COMPOSITE LOG INTO UNIT JOBS AND
  193. * - TO SORT TRACE TABLE (OPTIONAL).
  194.  
  195. *** DAYFILE MESSAGES.
  196. *
  197. * *SECART* ISSUES TWO CLASSES OF DAYFILE MESSAGES - STATUS AND
  198. * ERROR MESSAGES.
  199. *
  200. * STATUS MESSAGES MERELY INDICATE PROCESSING PHASES AND ARE
  201. * SELF-EXPLANATORY. ALL STATUS MESSAGES BEGIN WITH ONE LEADING
  202. * BLANK AND OCCUR IN THE FOLLOWING SEQUENCE:
  203. *
  204. * READING DIRECTIVES...
  205. *
  206. * LOADING TRACE TABLE...
  207. *
  208. * DIGESTING RAW LOG(S)...
  209. *
  210. * ACCOUNT MSG STATISTICS...
  211. *
  212. * TRACE TABLE PRINTOUT...
  213. *
  214. * SORTING OUT JOBS...
  215. *
  216. * EXTRACTING SELECTED JOBS...
  217. *
  218. * SECART COMPLETED.
  219. *
  220. * ALL ERROR MESSAGES ARE OFFSET WITH THREE LEADING BLANKS AND
  221. * FLAGGED WITH ASTERISKS TO STAND OUT IN THE DAYFILE SEQUENCE.
  222. * ERROR MESSAGES LEADING TO TERMINATION ALSO HAVE TRAILING
  223. * ASTERISKS. ERROR MESSAGES AND EXPLANATIONS ARE:
  224. *
  225. * *** SECART TERMINATED.
  226. *
  227. * ABNORMAL *SECART* TERMINATION. PRECEEDING MESSAGE
  228. * IDENTIFIES CAUSE.
  229. *
  230. * *** DIRECTIVE ERROR(S).
  231. *
  232. * SEE PRINTOUT FOR ERRORS.
  233. *
  234. * *** [LFN] NOT RAW ACCOUNT LOG.
  235. *
  236. * FIRST AND/OR SECOND LINES NOT IN DATE/TIME FORMAT.
  237. *
  238. * *** [LFN] NOT RAW DAYFILE LOG.
  239. *
  240. * FIRST AND/OR SECOND LINES NOT IN DATE/TIME FORMAT.
  241. *
  242. * *** LIST FILE REQUIRED.
  243. *
  244. * *L=0* PARAMETER IGNORED.
  245. *
  246. * *** LOG DATES MISMATCH.
  247. *
  248. * *ACCOUNT* VS *DAYFILE* SYSTEM DATE MISMATCH. LOG
  249. * TIME PERIODS MAY NOT OVERLAP.
  250. *
  251. * *** MSGID SEQUENCE ERROR(S).
  252. *
  253. * *ACCOUNT* MESSAGE ID TABLE (*M*) OUT OF SEQUENCE.
  254. *
  255. * *** MSGID TABLE FULL ***
  256. *
  257. * *ACCOUNT* MESSAGE ID FILE EXCEEDS TABLE SIZE.
  258. *
  259. * *** SYSTEM ID MISMATCH ***
  260. *
  261. * *ACCOUNT* VS *DAYFILE* SYSTEM TITLE/VERSION
  262. * MISMATCH. LOGS NOT FROM SAME SYSTEM.
  263. *
  264. * *** TRACE TABLE FULL ***
  265. *
  266. * JSN TRACE TABLE OVERFLOW. MAY BE DUE TO COMBINING
  267. * TABLE FROM PREVIOUS LOGS.
  268. *
  269. * *** TRACE TABLE SEQUENCE ERROR(S).
  270. *
  271. * LOADED TRACE TABLE (*T*) NOT IN ASCENDING D.JSN
  272. * SEQUENCE.
  273. *
  274. * *** UNRECOGNIZED PARAMETER: [PARAM]
  275. *
  276. * PROGRAM CALL PARAMETER NOT RECOGNIZED.
  277.  
  278. *** PRINTOUT MESSAGES.
  279. *
  280. * INFORMATIVE AND ERROR MESSAGES INSERTED IN THE PRINTOUT ARE
  281. * FLAGGED WITH === AND *** RESPECTIVELY. ALL ARE INDENTED THREE
  282. * SPACES. A FEW INFORMATIVE MESSAGES ARE ALSO E X P A N D E D
  283. * SO AS TO STAND OUT WHEN EMBEDDED IN LENGTHY SERIAL PRINTOUT.
  284. *
  285. * === EOF ACCOUNT LOG [LFN], NNNN MESSAGES (OR)
  286. * === EOF DAYFILE LOG [LFN], NNNN MESSAGES
  287. *
  288. * MARKS LOG END-OF-FILE POINT AND NUMBER OF MESSAGES.
  289. *
  290. * === JSN NOT FOUND: [JSN] YY/MM/DD. HH.MM.SS.
  291. *
  292. * ORIGINAL JSN NOT IN TRACE TABLE. JOB ATTRIBUTES
  293. * NOT RECOVERED.
  294. *
  295. * === JSN RECOVERED [D.JSN]
  296. *
  297. * JOB RECOVERY LINKED TO ORIGINAL JSN IN TRACE TABLE.
  298. * JOB ATTRIBUTES RECOVERED VIA TRACE TABLE.
  299. *
  300. * ========= L E V E L 0 D / S ( X ) =========
  301. *
  302. * INITIAL LEVEL 0 D/S RESETS JSN SEQUENCE. X IS NEW
  303. * *SECART*-GENERATED PREFIX FOR SUBSEQUENT JOBS.
  304. *
  305. * ========= S A M P L E L I M I T =========
  306. *
  307. * UNIT JOB PRINTOUT TRUNCATED PER *LIMIT* DIRECTIVE.
  308. *
  309. * *** TIME ARGUMENT ERROR.
  310. *
  311. * ERROR IN VALUE OR SYNTAX FOR *TIME* DIRECTIVE.
  312. *
  313. * ====== TIME WINDOW START ======
  314. * ====== TIME WINDOW END ======
  315. *
  316. * INDICATES START/END OF SPECIFIED TIME WINDOW.
  317. *
  318. * *** TOO MANY ARGUMENTS, EXCESS IGNORED.
  319. *
  320. * REPETITIVE ARGUMENT LIST EXCEEDS TABLE SIZE.
  321. *
  322. * *** UNRECOGNIZED DIRECTIVE ***
  323. *
  324. * DIRECTIVE NOT RECOGNIZED - MISPELLED, ETC.
  325.  
  326. ** INTERNAL OVERVIEW.
  327. *
  328. * *SECART* IS WRITTEN IN FORTRAN FOR COMPILATION VIA FTN5. IT
  329. * CONSISTS OF A MAIN PROGRAM, PRIMARY SUBROUTINES, AND SUPPORT
  330. * SUBROUTINES ORGANIZED IN A TOP-DOWN STRUCTURE. THE MAIN
  331. * PROGRAM ESTABLISHES OVERALL PROCESSING SEQUENCE AND CONTROL.
  332. * EACH PRIMARY SUBROUTINE ISOLATES RESPONSIBILITY FOR A MAJOR
  333. * PROGRAM OBJECTIVE TO A SINGLE CODE MODULE AND SUPPORTS
  334. * SEVERAL RELATED FUNCTIONS VIA MULTIPLE ENTRY POINTS. LOW
  335. * LEVEL SUPPORT SUBROUTINES PROVIDE COMMON/REDUNDANT FUNCTIONS
  336. * USED BY ONE OR MORE SUBROUTINES AND/OR THE MAIN PROGRAM.
  337. * THE LIST OF MODULES AND [ENTRY POINTS] , INDENTED TO SHOW
  338. * STRUCTURE, INCLUDES:
  339. *
  340. * SECART - MAIN PROGRAM.
  341. *
  342. * DIRECT - DIRECTIVES AND SELECTION FUNCTIONS.
  343. * [TMCHECK] - TIME WINDOW CHECKING.
  344. * [MSCHECK] - DAYFILE MESSAGE CHECK.
  345. * [PICKJSN] - PICK JOBS BY JSN.
  346. * [PICKUJN] - PICK JOBS BY UJN.
  347. * [PICKUSR] - PICK JOBS BY USER, FAMILY NAME.
  348. * [PICKTRM] - PICK JOBS BY TERMINAL NAME.
  349. *
  350. * TMARG - REDUNDANT TIME ARGUMENT DIRECTIVE CRACKING.
  351. *
  352. * DFSCAN - *DAYFILE* LOG I/O AND MESSAGE PROCESSING.
  353. * [DFMSG] - ROUTINE MESSAGE PROCESSING.
  354. *
  355. * ACSCAN - *ACCOUNT* LOG I/O AND MESSAGE PROCESSING.
  356. * [ACMSG] - ROUTINE MESSAGE PROCESSING.
  357. *
  358. * LOGTEST - CHECK FORMAT, EXTRACT START DATE/TIME.
  359. *
  360. * JSNLOAD - JSN TRACE TABLE MANAGEMENT.
  361. * [JSNTRAK] - MATCH/COLLECT JSN-S, JOB ATTRIBUTES.
  362. * [JSNLOOK] - JSN MATCH ONLY.
  363. * [JSNLVL0] - HANDLE LEVEL 0 D/S EVENTS W/O DUPLICATION.
  364. * [JSNLIST] - TRACE TABLE SORT (OPTIONAL) AND PRINTOUT.
  365. *
  366. * AMSLOAD - *ACCOUNT* MESSAGE ID TABLE AND STATISTICS.
  367. * [AMSMARK] - FLAG ID-S FOR SELECTION.
  368. * [AMSTEST] - ID MATCH, SELECTION TEST, TABULATION.
  369. * [AMSLIST] - MESSAGE ID STATISTICS PRINTOUT.
  370. *
  371. * PARSE - COMMON TEXT PARSER.
  372.  
  373. ** COMMON BLOCKS.
  374. *
  375. * COMMON BLOCKS PROVIDE THE PRIMARY MEANS OF SHARING
  376. * INFORMATION BETWEEN MODULES. AS WITH CODE MODULES, THEY ARE
  377. * ORGANIZED BY FUNCTIONAL AREA AND EACH IS DEFINED ONLY IN
  378. * THOSE MODULES WHICH NEED ACCESS TO ONE OR MORE VARIABLES IN
  379. * THAT BLOCK. OF NECESSITY, EACH BLOCK CONTAINS EXCLUSIVELY
  380. * EITHER NUMERIC OR TEXT STRING VARIABLES WHICH SIGNIFICANTLY
  381. * INFLUENCES ORGANIZATION. DEFINED COMMON BLOCKS ARE:
  382. *
  383. * /ACL/ STRINGS, *ACCOUNT* LOG SPECIFIC VARIABLES.
  384. *
  385. * /CTL/ NUMERIC, PROGRAM-WIDE VARIABLES & PARAMETERS.
  386. *
  387. * /DFL/ STRINGS, *DAYFILE* LOG SPECIFIC VARIABLES.
  388. *
  389. * /SRT/ STRINGS, TRACE TABLE SORT KEY IDENTIFIERS.
  390. *
  391. * /SYS/ STRINGS, PROGRAM-WIDE VARIABLES.
  392. *
  393. * /TRC/ STRINGS, JSN TRACE TABLE.
  394.  
  395. ** SPECIAL TECHNIQUES.
  396. *
  397. * THE PROGRAM INITIALIZATION SEQUENCE IS DESIGNED TO AVOID
  398. * CONFLICTS BETWEEN DIRECTIVES AND INFORMATION CONTAINED IN
  399. * DATA TABLE FILES, AND TO AUTOMATICALLY ACCOMMODATE OMMISSION
  400. * OF INPUT FILES WHICH INDICATE RERUNS VERSUS INITIAL RAW LOGS
  401. * PROCESSING RUNS.
  402. *
  403. * THE USE OF TWO INDEPENDENT SUBROUTINES TO ENCAPSULATE I/O AND
  404. * MESSAGE ANALYSIS FOR EACH RAW LOG ALLOWS THE MAIN PROGRAM TO
  405. * FOCUS ON SYNCHRONIZATION OF MESSAGES FROM BOTH LOGS INTO A
  406. * NEAR CAUSE-AND-EFFECT SEQUENCE FOR SUBSEQUENT PROCESSING.
  407.  
  408. ** KNOWN LIMITATIONS.
  409. *
  410. * THE PROGRAM-S CAPACITY FOR DIRECTIVE ARGUMENTS, MESSAGE ID-S,
  411. * UNIQUE JSN-S, AND JSN TRACE TABLE SORT KEYS ARE LIMITED BY
  412. * THEIR RESPECTIVE TABLE SIZES AND ULTIMATELY BY OVERALL
  413. * PROGRAM SIZE. FOR PERFORMANCE REASONS, NO ATTEMPT HAS BEEN
  414. * MADE TO ACCOMMODATE DYNAMIC TABLE MANAGEMENT OR OVERFLOW TO
  415. * MASS STORAGE.
  416.  
  417.  
  418. IMPLICIT INTEGER(A-Z)
  419.  
  420. PARAMETER (MXJ=1000)
  421. * SIZE OF JSN TRACE TABLE.
  422.  
  423. PARAMETER (NK=8)
  424. * NUMBER OF COMMAND KEYWORD PARAMETERS.
  425.  
  426. EQUIVALENCE (ACSDTG,ACSDATE)
  427. * /ACL/ ACSDTG*20 = ACSDATE*10 // ACSTIME*10.
  428.  
  429. EQUIVALENCE (ACEDTG,ACEDATE)
  430. * /ACL/ ACEDTG*20 = ACEDATE*10 // ACETIME*10.
  431.  
  432. EQUIVALENCE (ACSYSID,ACTITLE)
  433. * /ACL/ ACSYSID*60 = ACTITLE*40//ACVERSN*20.
  434.  
  435. EQUIVALENCE (DFSDTG,DFSDATE)
  436. * /DFL/ DFSDTG*20 = DFSDATE*10 // DFSTIME*10.
  437.  
  438. EQUIVALENCE (DFEDTG,DFEDATE)
  439. * /DFL/ DFEDTG*20 = DFEDATE*10 // DFETIME*10.
  440.  
  441. EQUIVALENCE (DFSYSID,DFTITLE)
  442. * /DFL/ DFSYSID*60 = DFTITLE*40//DFVERSN*20.
  443.  
  444. CHARACTER*10 ACEDATE
  445. * /ACL/ (EQV) ACCOUNT LOG END DATE.
  446.  
  447. CHARACTER*10 ACETIME
  448. * /ACL/ (EQV) ACCOUNT LOG END TIME.
  449.  
  450. CHARACTER*20 ACEDTG
  451. * /ACL/ ACCOUNT LOG END DATE/TIME GROUP.
  452.  
  453. LOGICAL ACEOF
  454. * /CTL/ ACCOUNT LOG EOF FLAG.
  455.  
  456. INTEGER ACIN
  457. * /CTL/ ACCOUNT LOG MESSAGE COUNTER.
  458.  
  459. CHARACTER*10 ACSDATE
  460. * /ACL/ (EQV) ACCOUNT LOG START DATE.
  461.  
  462. CHARACTER*20 ACSDTG
  463. * /ACL/ ACCOUNT LOG START DATE/TIME GROUP.
  464.  
  465. CHARACTER*10 ACSTIME
  466. * /ACL/ (EQV) ACCOUNT LOG START TIME.
  467.  
  468. CHARACTER*60 ACSYSID
  469. * /ACL/ ACCOUNT LOG SYSTEM TITLE/VERSION.
  470.  
  471. CHARACTER*40 ACTITLE
  472. * /ACL/ ACCOUNT LOG SYSTEM TITLE.
  473.  
  474. CHARACTER*100 ACTXT
  475. * /ACL/ ACCOUNT LOG CURRENT MESSAGE TEXT.
  476.  
  477. CHARACTER*20 ACVERSN
  478. * /ACL/ ACCOUNT LOG SYSTEM VERSION.
  479.  
  480. CHARACTER*10 DATE
  481. * TYPING FOR FTN5 FUNCTION.
  482.  
  483. CHARACTER*7 DEF(NK)
  484. * *SECART* COMMAND KEYWORD DEFAULTS.
  485.  
  486. CHARACTER*10 DFEDATE
  487. * /DFL/ (EQV) DAYFILE LOG END DATE.
  488.  
  489. CHARACTER*20 DFEDTG
  490. * /DFL/ DAYFILE LOG END DATE/TIME GROUP.
  491.  
  492. CHARACTER*10 DFETIME
  493. * /DFL/ (EQV) DAYFILE LOG END TIME.
  494.  
  495. LOGICAL DFEOF
  496. * /CTL/ DAYFILE LOG EOF FLAG.
  497.  
  498. INTEGER DFIN
  499. * /CTL/ DAYFILE LOG MESSAGE COUNTER.
  500.  
  501. CHARACTER*10 DFSDATE
  502. * /DFL/ (EQV) DAYFILE LOG START DATE.
  503.  
  504. CHARACTER*20 DFSDTG
  505. * /DFL/ DAYFILE LOG START DATE/TIME GROUP.
  506.  
  507. CHARACTER*10 DFSTIME
  508. * /DFL/ (EQV) DAYFILE LOG START TIME.
  509.  
  510. CHARACTER*60 DFSYSID
  511. * /DFL/ DAYFILE LOG SYSTEM TITLE/VERSION.
  512.  
  513. CHARACTER*40 DFTITLE
  514. * /DFL/ DAYFILE LOG SYSTEM TITLE.
  515.  
  516. CHARACTER*20 DFVERSN
  517. * /DFL/ DAYFILE LOG SYSTEM VERSION.
  518.  
  519. CHARACTER*100 DFTXT
  520. * /DFL/ DAYFILE LOG CURRENT MESSAGE TEXT.
  521.  
  522. CHARACTER*1 DSU
  523. * /TRC/ DEADSTART UNIQUE PREFIX CODE.
  524.  
  525. CHARACTER*7 FN(MXJ)
  526. * /TRC/ FAMILY NAME COLUMN IN TRACE TABLE.
  527.  
  528. CHARACTER*40 HDR
  529. * /SYS/ PRINTOUT HEADER TEXT.
  530.  
  531. INTEGER IPAGE
  532. * LOCAL PRINTOUT PAGE COUNTER.
  533.  
  534. INTEGER JBLIMIT
  535. * /CTL/ UNIT JOB PRINTOUT MESSAGE LIMIT.
  536.  
  537. CHARACTER*1 JC(MXJ)
  538. * /TRC/ JOB CLASS COLUMN IN TRACE TABLE.
  539.  
  540. CHARACTER*7 JN(MXJ)
  541. * /TRC/ UJN COLUMN IN TRACE TABLE.
  542.  
  543. CHARACTER*6 JS(MXJ)
  544. * /TRC/ D.JSN COLUMN IN TRACE TABLE.
  545.  
  546. CHARACTER*6 JSN
  547. * TEMP - D.JSN VARIABLE.
  548.  
  549. CHARACTER*7 KWD(NK)
  550. * *SECART* COMMAND KEYWORD LIST.
  551.  
  552. CHARACTER*7 LFN(NK)
  553. * LFN LIST BUILT FROM *SECART* COMMAND.
  554.  
  555. CHARACTER*5 MK(MXJ)
  556. * /TRC/ JOB SELECTION MARKS IN TRACE TABLE.
  557.  
  558. INTEGER ML(2,MXJ)
  559. * /CTL/ DFL/AFL MSG COUNTS FOR TRACE TABLE.
  560.  
  561. INTEGER NJ
  562. * /CTL/ CURRENT NUMBER JOBS IN TRACE TABLE.
  563.  
  564. CHARACTER*7 P
  565. * TEMP USED IN *SECART* COMMAND PROCESSING.
  566.  
  567. CHARACTER*10 PGM
  568. * /SYS/ *SECART* VERSION ID FOR PRINTOUTS.
  569.  
  570. LOGICAL PICKED
  571. * TEMP FLAG USED IN UNIT JOB PRINTOUT.
  572.  
  573. CHARACTER*10 RUNDT
  574. * /SYS/ *SECART* RUN DATE FOR PRINTOUTS.
  575.  
  576. CHARACTER*10 RUNTM
  577. * /SYS/ *SECART* RUN TIME FOR PRINTOUTS.
  578.  
  579. CHARACTER*3 SKY(12)
  580. * /SRT/ TRACE TABLE SORT KEYS.
  581.  
  582. CHARACTER*20 TE(MXJ)
  583. * /TRC/ JOB DATE/TIME END IN TRACE TABLE.
  584.  
  585. CHARACTER*10 TIME
  586. * TYPING FOR FTN5 FUNCTION.
  587.  
  588. CHARACTER*7 TN(MXJ)
  589. * /TRC/ JOB TERMINAL NAME IN TRACE TABLE.
  590.  
  591. CHARACTER*20 TS(MXJ)
  592. * /TRC/ JOB DATE/TIME START IN TRACE TABLE.
  593.  
  594. CHARACTER*6 UJSN
  595. * TEMP - D.JSN VARIABLE.
  596.  
  597. CHARACTER*7 UN(MXJ)
  598. * /TRC/ JOB USERNAME IN TRACE TABLE.
  599.  
  600. CHARACTER*7 V
  601. * TEMP - VALUE USED IN COMMAND PROCESSING.
  602.  
  603. * ACCOUNT LOG SPECIFIC VARIABLES.
  604.  
  605. COMMON /ACL/ ACSDATE
  606. COMMON /ACL/ ACSTIME
  607. COMMON /ACL/ ACEDATE
  608. COMMON /ACL/ ACETIME
  609. COMMON /ACL/ ACTITLE
  610. COMMON /ACL/ ACVERSN
  611. COMMON /ACL/ ACTXT
  612.  
  613. * GLOBAL NUMERIC/LOGICAL VARIABLES AND PARAMETERS.
  614.  
  615. COMMON /CTL/ NJ
  616. COMMON /CTL/ ACIN
  617. COMMON /CTL/ DFIN
  618. COMMON /CTL/ ACEOF
  619. COMMON /CTL/ DFEOF
  620. COMMON /CTL/ ML
  621. COMMON /CTL/ JBLIMIT
  622.  
  623. * DAYFILE LOG SPECIFIC VARIABLES.
  624.  
  625. COMMON /DFL/ DFSDATE
  626. COMMON /DFL/ DFSTIME
  627. COMMON /DFL/ DFEDATE
  628. COMMON /DFL/ DFETIME
  629. COMMON /DFL/ DFTITLE
  630. COMMON /DFL/ DFVERSN
  631. COMMON /DFL/ DFTXT
  632.  
  633. * JSN TRACE TABLE SORT PARAMETERS.
  634.  
  635. COMMON /SRT/ SKY
  636.  
  637. * GLOBAL STRING VARIABLES.
  638.  
  639. COMMON /SYS/ HDR
  640. COMMON /SYS/ PGM
  641. COMMON /SYS/ RUNDT
  642. COMMON /SYS/ RUNTM
  643.  
  644. * JSN TRACE TABLE STORAGE.
  645.  
  646. COMMON /TRC/ DSU
  647. COMMON /TRC/ MK
  648. COMMON /TRC/ JN
  649. COMMON /TRC/ JS
  650. COMMON /TRC/ JC
  651. COMMON /TRC/ TS
  652. COMMON /TRC/ TE
  653. COMMON /TRC/ FN
  654. COMMON /TRC/ UN
  655. COMMON /TRC/ TN
  656.  
  657. DATA ACEDTG /' '/
  658. DATA ACEOF /.FALSE./
  659. DATA ACIN /0/
  660. DATA ACSDTG /' '/
  661. DATA ACSYSID /' '/
  662. DATA DFEDTG /' '/
  663. DATA DFEOF /.FALSE./
  664. DATA DFIN /0/
  665. DATA DFSDTG /' '/
  666. DATA DFSYSID /' '/
  667. DATA DSU /'A'/
  668. DATA FN /MXJ*' '/
  669. DATA IPAGE /1/
  670. DATA JBLIMIT /99999/
  671. DATA JC /MXJ*' '/
  672. DATA JN /MXJ*' '/
  673. DATA JS /MXJ*' '/
  674. DATA MK /MXJ*' '/
  675. DATA NJ /0/
  676. DATA PGM /' SECART V1'/
  677. DATA SKY /12*' '/
  678. DATA TE /MXJ*' '/
  679. DATA TN /MXJ*' '/
  680. DATA TS /MXJ*' '/
  681. DATA UN /MXJ*' '/
  682. DATA (KWD(I) ,LFN(I) ,DEF(I),I=1,NK)/
  683. . 'D', '0', 'DFLOG',
  684. . 'A', '0', 'ACLOG',
  685. . 'C', '0', 'COMBO',
  686. . 'J', '0', 'JOBS',
  687. . 'M', '0', 'MSGID',
  688. . 'T', '0', 'TRACE',
  689. . 'I', 'INPUT', 'INPUT',
  690. . 'L', 'OUTPUT', 'OUTPUT'/
  691.  
  692. * ----------------------------------------------------------------------
  693. * INITIALIZATION PHASE
  694. * ----------------------------------------------------------------------
  695.  
  696. RUNDT=DATE()
  697. RUNTM=TIME()
  698.  
  699. * PROCESS EXECUTION PARAMETERS.
  700.  
  701. 100 CALL GETPARM(P,V,J)
  702. IF (J.LT.0) GOTO 130
  703. DO 110 I=1,NK
  704. IF (P.EQ.KWD(I)) GOTO 120
  705. 110 CONTINUE
  706. CALL REMARK(' *** UNRECOGNIZED PARAMETER: '//P)
  707. GOTO 100
  708.  
  709. * SET TO VALUE OR DEFAULT.
  710.  
  711. 120 IF (J.EQ.1) THEN
  712. LFN(I)=DEF(I)
  713. ELSE
  714. IF (I.EQ.8 .AND. V.EQ.'0') THEN
  715. CALL REMARK(' *** LIST FILE REQUIRED.')
  716. ELSE
  717. LFN(I)=V
  718. ENDIF
  719. ENDIF
  720. GOTO 100
  721.  
  722. * FIRST, OPEN LIST OUTPUT FILE.
  723.  
  724. 130 OPEN (8,FILE=LFN(8))
  725.  
  726. * SECOND, LOAD ACCOUNT LOG MESSAGE IDENTIFIERS, IF ANY,
  727. * BEFORE DIRECTIVES TO AVOID AMNESIA PROBLEM.
  728.  
  729. IF (LFN(5).NE.'0') THEN
  730. OPEN (5,FILE=LFN(5))
  731. CALL AMSLOAD
  732. CLOSE (5)
  733. ENDIF
  734.  
  735. * THIRD, PROCESS DIRECTIVES, IF ANY.
  736.  
  737. IF (LFN(7).NE.'0') THEN
  738. CALL REMARK(' READING DIRECTIVES...')
  739. HDR='S E C A R T D I R E C T I V E S '
  740. WRITE (8,10) HDR,PGM,RUNDT,RUNTM,IPAGE
  741. 10 FORMAT('1',A40,3A10,' PG',I3)
  742. OPEN (7,FILE=LFN(7))
  743. CALL DIRECT
  744. CLOSE (7)
  745. ENDIF
  746.  
  747. * FOURTH, LOAD PREVIOUS JSN TRACE TABLE, IF ANY.
  748.  
  749. IF (LFN(6).NE.'0') THEN
  750. CALL REMARK(' LOADING TRACE TABLE...')
  751. OPEN (6,FILE=LFN(6))
  752. CALL JSNLOAD
  753. CLOSE (6)
  754. ENDIF
  755.  
  756. * ----------------------------------------------------------------------
  757. * PHASE 1: MERGE AND SCREEN RAW LOGS, BUILD TRACE TABLE AND PICK JOBS.
  758. * ----------------------------------------------------------------------
  759.  
  760.  
  761. * PREVIEW EACH LOG TO OBTAIN SYSID, START DATE/TIME GROUP.
  762.  
  763. IF (LFN(1).NE.'0') THEN
  764. OPEN (1,FILE=LFN(1))
  765. CALL DFSCAN(LFN(1),*140)
  766. ELSE
  767. DFEOF=.TRUE.
  768. ENDIF
  769.  
  770. * NOW, RAW ACCOUNT LOG.
  771.  
  772. 140 IF (LFN(2).NE.'0') THEN
  773. OPEN (2,FILE=LFN(2))
  774. CALL ACSCAN(LFN(2),*150)
  775. ELSE
  776. ACEOF=.TRUE.
  777. ENDIF
  778.  
  779. * CHECK FOR NO RAW LOG INPUT.
  780.  
  781. 150 IF (ACIN+DFIN.EQ.0) GOTO 210
  782. IPAGE=IPAGE+1
  783. HDR='S C R E E N E D M E S S A G E S'
  784. WRITE (8,10) HDR,PGM,RUNDT,RUNTM,IPAGE
  785. IF (.NOT.DFEOF) WRITE (8,11) 'DAYFILE',DFSDTG,DFSYSID
  786. IF (.NOT.ACEOF) WRITE (8,11) 'ACCOUNT',ACSDTG,ACSYSID
  787. 11 FORMAT(5X,A7,' FROM',A20 /5X,'SYSTEM ID: ',A60)
  788.  
  789. * IF BOTH LOGS, CHECK FOR SYSTEM ID OR DATE MISMATCHES.
  790.  
  791. IF (ACIN*DFIN.NE.0) THEN
  792. IF (ACSYSID.NE.DFSYSID) THEN
  793. CALL REMARK(' *** SYSTEM ID MISMATCH ***')
  794. STOP ' *** SECART TERMINATED.'
  795. ENDIF
  796. IF (ACSDATE.NE.DFSDATE) THEN
  797. CALL REMARK(' *** LOG DATES MISMATCH.')
  798. ENDIF
  799. ENDIF
  800.  
  801. * ANNOTATED LOG DATA MUST BE WRITTEN TO COMBO LOG FILE.
  802.  
  803. IF (LFN(3).EQ.'0') LFN(3)='TAPE3'
  804. OPEN (3,FILE=LFN(3))
  805.  
  806. * RECORD SOURCE LOG IDENTIFICATIONS IN COMPOSITE LOG.
  807.  
  808. IF (DFSDATE.NE.' ')
  809. . WRITE (3,13) DFSTIME,'- DAYFILE ',DFSDATE,DFSYSID
  810. IF (ACSDATE.NE.' ')
  811. . WRITE (3,13) ACSTIME,' +ACCOUNT ',ACSDATE,ACSYSID
  812. 13 FORMAT(A10,8X,A12,A10,A60)
  813.  
  814. CALL REMARK(' DIGESTING RAW LOG(S)...')
  815. IF (DFEOF) GOTO 170
  816.  
  817. * SYNCHRONIZE PROCESSING AND MERGE LOGS.
  818.  
  819. 160 CALL DFMSG(*180)
  820. IF (.NOT.ACEOF .AND. ACEDTG.LT.DFEDTG) GOTO 170
  821. GOTO 160
  822.  
  823. * BIAS TO CLUMP DFL MSGS BEFORE ACL MSGS IN SAME SECOND.
  824. * SOME ACCOUNT LOG MSID-S TWEAK DTG TO PRECEDE DAYFILE MSG.
  825.  
  826. 170 CALL ACMSG(*190)
  827. IF (.NOT.DFEOF .AND. DFEDTG.LE.ACEDTG) GOTO 160
  828. GOTO 170
  829.  
  830. * END-OF-FILE DECISIONS.
  831.  
  832. 180 CLOSE (1)
  833. IF (.NOT.ACEOF) GOTO 170
  834. GOTO 200
  835.  
  836. 190 CLOSE (2)
  837. IF (.NOT.DFEOF) GOTO 160
  838.  
  839. * COMPLETED MERGE PASS (BURP!).
  840.  
  841. 200 CLOSE (3)
  842.  
  843. * ----------------------------------------------------------------------
  844. * PHASE 2: INTERMEDIATE PRINTOUTS.
  845. * ----------------------------------------------------------------------
  846.  
  847. * PRINTOUT ACCOUNT MESSAGE STATISTICS.
  848.  
  849. IF (ACIN.GT.0) THEN
  850. CALL REMARK(' ACCOUNT MSG STATISTICS...')
  851. CALL AMSLIST
  852. ENDIF
  853.  
  854. * PRINTOUT JSN/USER/TERMINAL TRACE TABLE (SORT OPTIONAL).
  855.  
  856. 210 IF (NJ.GT.0) THEN
  857. CALL REMARK(' TRACE TABLE PRINTOUT...')
  858.  
  859. * UNIT 6 FILE REQUIRED FOR TRACE TABLE OUTPUT.
  860.  
  861. IF (LFN(6).EQ.'0') LFN(6)='TAPE6'
  862. OPEN (6,FILE=LFN(6))
  863. OPEN (9,STATUS='SCRATCH')
  864. CALL JSNLIST(LFN(6))
  865. CLOSE (6)
  866. CLOSE (9)
  867. ENDIF
  868.  
  869. * ----------------------------------------------------------------------
  870. * PHASE 3: SORT COMPOSITE LOG BY UNIQUE JSN TO GROUP INTO UNIT JOBS.
  871. * ----------------------------------------------------------------------
  872.  
  873. * SORT UNIT 3 COMPOSITE LOG, IF PRODUCED/PROVIDED, TO UNIT 4 JOBS FILE,
  874. * REQUIRED FOR OUTPUT.
  875.  
  876. IF (LFN(3).EQ.'0') GOTO 220
  877. OPEN (3,FILE=LFN(3))
  878. REWIND 3
  879. IF (LFN(4).EQ.'0') LFN(4)='TAPE4'
  880. OPEN (4,FILE=LFN(4))
  881. CALL REMARK(' SORTING OUT JOBS...')
  882. CALL SM5SORT(0)
  883. CALL SM5ENR(ACIN+DFIN)
  884. CALL SM5FROM(LFN(3))
  885. CALL SM5TO(LFN(4))
  886. CALL SM5KEY(11,6,'DISPLAY','A')
  887. CALL SM5RETA('YES')
  888. CALL SM5END
  889. CLOSE (3)
  890. CLOSE (4)
  891.  
  892. * ----------------------------------------------------------------------
  893. * PHASE 4: EXTRACT UNIT JOBS FROM JOBS LOG FOR PRINTOUT.
  894. * ----------------------------------------------------------------------
  895.  
  896. 220 IF (LFN(4).EQ.'0') GOTO 250
  897. OPEN (4,FILE=LFN(4))
  898. REWIND 4
  899. CALL REMARK(' EXTRACTING SELECTED JOBS...')
  900. IPAGE=IPAGE+1
  901. HDR='S E L E C T E D J O B S'
  902. WRITE (8,10) HDR,PGM,RUNDT,RUNTM,IPAGE
  903. UJSN=' '
  904.  
  905. 230 READ (4,14,END=240) DFTXT
  906. 14 FORMAT(A100)
  907. JSN=DFTXT(11:16)
  908. IF (JSN.NE.UJSN) THEN
  909. UJSN=JSN
  910. CALL JSNLOOK(JSN,N)
  911. PICKED=MK(N).NE.' '
  912. IF (PICKED) THEN
  913. WRITE (8,18)
  914. 18 FORMAT('0')
  915. J=JBLIMIT
  916. ENDIF
  917. ENDIF
  918.  
  919. * PRINTOUT JOB TILL SAMPLE LIMIT.
  920.  
  921. IF (PICKED) THEN
  922. IF (J.GT.0) THEN
  923. WRITE (8,14) DFTXT
  924. J=J-1
  925. IF (J.EQ.0) WRITE (8,*)
  926. . ' ========= S A M P L E L I M I T ========='
  927. ENDIF
  928. ENDIF
  929. GOTO 230
  930.  
  931. 240 CLOSE (4)
  932.  
  933. * FINISHED.
  934.  
  935. 250 CALL REMARK(' SECART COMPLETED.')
  936. CLOSE (8)
  937. END
  938.  
  939. * ---------------------------------------------------------------------
  940. SUBROUTINE DIRECT
  941. ** DIRECT - SECART DIRECTIVES PROCESSING.
  942. *
  943. * THIS MODULE HANDLES ALL ASPECTS OF DIRECTIVES PROCESSING AND
  944. * PROVIDES MULTIPLE ENTRY POINT FOR PURPOSES SUCH AS: ACCEPTING
  945. * *SECART* DIRECTIVES DURING INITIALIZATION PHASE AND STORING
  946. * SELECTION ARGUMENTS IN INTERNAL ARRAYS, MARKING ACCOUNT LOG
  947. * MESSAGE ID-S FOR PRINTOUT SELECTION, AND CHECKING LOG DATA
  948. * AGAINST SELECTION ARGUMENTS DURING RAW LOGS PROCESSING.
  949.  
  950.  
  951. IMPLICIT INTEGER(A-Z)
  952. PARAMETER (MXJ=1000)
  953. * SIZE OF JSN TRACE TABLE.
  954.  
  955. PARAMETER (MXP=50)
  956. * SIZE OF DIRECTIVE ARGUMENT TABLES.
  957.  
  958. LOGICAL ACEOF
  959. * /CTL/ ACCOUNT LOG EOF FLAG.
  960.  
  961. INTEGER ACIN
  962. * /CTL/ ACCOUNT LOG MESSAGE COUNTER.
  963.  
  964. LOGICAL DFEOF
  965. * /CTL/ DAYFILE LOG EOF FLAG.
  966.  
  967. INTEGER DFIN
  968. * /CTL/ DAYFILE LOG MESSAGE COUNTER.
  969.  
  970. CHARACTER*80 DIR
  971. * *SECART* DIRECTIVE TEXT STRING.
  972.  
  973. LOGICAL ERR
  974. * DIRECTIVE ERROR(S) FLAG.
  975.  
  976. CHARACTER*10 ETM
  977. * ARG - MESSAGE TIMESTAMP.
  978.  
  979. CHARACTER*7 FAM(MXP)
  980. * USER= DIRECTIVE FAMILYNAME ARGUMENTS.
  981.  
  982. CHARACTER*7 FAMILY
  983. * TEMP - FAMILYNAME VARIABLE.
  984.  
  985. CHARACTER*7 FN
  986. * ARG - FAMILYNAME TO CHECK.
  987.  
  988. LOGICAL HIT
  989. * ARG - FLAG RETURNED TO SHOW SELECTION.
  990.  
  991. INTEGER ITX(MXP)
  992. * DMSG= DIRECTIVE CHARACTER START POSITIONS.
  993.  
  994. INTEGER IW
  995. * LOCAL - CURRENT TIME WINDOW INDEX.
  996.  
  997. INTEGER JBLIMIT
  998. * /CTL/ UNIT JOB PRINTOUT MESSAGE LIMIT.
  999.  
  1000. CHARACTER*7 JN
  1001. * ARG - JOBNAME TO CHECK.
  1002.  
  1003. CHARACTER*7 JOBNAME
  1004. * TEMP - JOBNAME VARIABLE.
  1005.  
  1006. CHARACTER*6 JS
  1007. * ARG - JSN TO CHECK.
  1008.  
  1009. CHARACTER*6 JSN(MXP)
  1010. * JSN= DIRECTIVE ARGUMENTS.
  1011.  
  1012. INTEGER LTX(MXP)
  1013. * DMSG= DIRECTIVE LAST CHARACTER POSITIONS.
  1014.  
  1015. CHARACTER*4 MID
  1016. * TEMP - FOR AMSG= DIRECTIVE MSG ID.
  1017.  
  1018. CHARACTER*5 MK
  1019. * ARG - TRACE TABLE MARKS TO BE UPDATED.
  1020.  
  1021. INTEGER ML(2,MXJ)
  1022. * /CTL/ DFL/AFL MSG COUNTS FOR TRACE TABLE.
  1023.  
  1024. CHARACTER*40 MTX(MXP)
  1025. * DMSG= DIRECTIVE MESSAGE STRINGS.
  1026.  
  1027. INTEGER NJ
  1028. * /CTL/ CURRENT NUMBER JOBS IN TRACE TABLE.
  1029.  
  1030. INTEGER NM
  1031. * NUMBER OF DMSG= ARGUMENTS STORED.
  1032.  
  1033. INTEGER NN
  1034. * NUMBER OF UJN= ARGUMENTS STORED.
  1035.  
  1036. INTEGER NP
  1037. * NUMBER OF UJN= ARGUMENTS STORED.
  1038.  
  1039. INTEGER NS
  1040. * NUMBER OF JSN= ARGUMENTS STORED.
  1041.  
  1042. INTEGER NT
  1043. * NUMBER OF TRM= ARGUMENTS STORED.
  1044.  
  1045. INTEGER NU
  1046. * NUMBER OF USER= ARGUMENTS STORED.
  1047.  
  1048. CHARACTER*3 SKY(12)
  1049. * /SRT/ TRACE TABLE SORT KEYS.
  1050.  
  1051. CHARACTER*7 TERMINL
  1052. * TEMP - TRM= VARIABLE.
  1053.  
  1054. CHARACTER*10 TME(MXP)
  1055. * TIME= DIRECTIVE TIME END ARGUMENTS.
  1056.  
  1057. CHARACTER*10 TMS(MXP)
  1058. * TIME= DIRECTIVE TIME START ARGUMENTS.
  1059.  
  1060. CHARACTER*7 TN
  1061. * ARG - TERMINAL ID TO CHECK.
  1062.  
  1063. CHARACTER*7 TRM(MXP)
  1064. * TRM= DIRECTIVE ARGUMENTS.
  1065.  
  1066. CHARACTER*80 TXT
  1067. * ARG - MESSAGE TEXT TO CHECK.
  1068.  
  1069. CHARACTER*7 UJN(MXP)
  1070. * UJN= DIRECTIVE ARGUMENTS.
  1071.  
  1072. CHARACTER*7 UN
  1073. * ARG - USERNAME TO CHECK.
  1074.  
  1075. CHARACTER*7 USER
  1076. * TEMP - USERNAME VARIABLE.
  1077.  
  1078. CHARACTER*7 USR(MXP)
  1079. * USER= DIRECTIVE ARGUMENTS.
  1080.  
  1081. LOGICAL WINDOW
  1082. * FLAG TO REMEMBER TIME WINDOW IS OPEN.
  1083.  
  1084.  
  1085. * GLOBAL NUMERIC/LOGICAL VARIABLES AND PARAMETERS.
  1086.  
  1087. COMMON /CTL/ NJ
  1088. COMMON /CTL/ ACIN
  1089. COMMON /CTL/ DFIN
  1090. COMMON /CTL/ ACEOF
  1091. COMMON /CTL/ DFEOF
  1092. COMMON /CTL/ ML
  1093. COMMON /CTL/ JBLIMIT
  1094.  
  1095. * JSN TRACE TABLE SORT PARAMETERS.
  1096.  
  1097. COMMON /SRT/ SKY
  1098.  
  1099. DATA FAM /MXP*' '/
  1100. DATA ITX /MXP*0/
  1101. DATA JSN /MXP*' '/
  1102. DATA LTX /MXP*0/
  1103. DATA MTX /MXP*' '/
  1104. DATA NM /0/
  1105. DATA NN /0/
  1106. DATA NP /0/
  1107. DATA NS /0/
  1108. DATA NT /0/
  1109. DATA NU /0/
  1110. DATA TME /MXP*' '/
  1111. DATA TMS /MXP*' '/
  1112. DATA TRM /MXP*' '/
  1113. DATA UJN /MXP*' '/
  1114. DATA USR /MXP*' '/
  1115.  
  1116.  
  1117. ** ENTRY - CALL DIRECT [NO ARGUMENTS].
  1118. * UNIT 7 FILE CONTAINS DIRECTIVES INPUT.
  1119. *
  1120. * EXIT - UNIT 8 FILE CONTAINS PRINTOUT OF DIRECTIVES.
  1121. * ARRAYS WITHIN MODULE CONTAIN SELECTION ARGUMENTS.
  1122. *
  1123. * ERROR - MESSAGES IN PRINTOUT AND DAYFILE:
  1124. * *** UNRECOGNIZED DIRECTIVE ***
  1125. * *** TOO MANY ARGUMENTS, EXCESS IGNORED.
  1126. * *** DIRECTIVE ERROR(S). [DAYFILE]
  1127. *
  1128. * USES - /CTL/ TO SET JBLIMIT.
  1129. * /SRT/ TO STORE JSN TRACE TABLE SORT KEYS IN SKY(I).
  1130. *
  1131. * CALLS - *PARSE* TO EXTRACT WORDS FROM DIRECTIVES.
  1132. * *TMARG* TO EXTRACT TIME ARGUMENTS FROM DIRECTIVES.
  1133. * *AMSMARK* TO MARK ACCOUNT MESSAGE ID-S FOR SELECTION.
  1134. *
  1135. * NOTES - ARRAYS FOR STORAGE OF SELECTION ARGUMENTS ARE ALL
  1136. * SAME SIZE, DEFINED VIA PARAMETER FOR CODE SIMPLICITY.
  1137. *
  1138. *
  1139. * DIRECTIVES -
  1140. *
  1141. * AMSG=MSID,... SCAN ACCOUNT MSG IDENTIFIERS FOR PRINT.
  1142. *
  1143. * DMSG=[NN:]TEXT_STR SCAN DAYFILE TEXT STRING FOR PRINTOUT.
  1144. * NN IS START CHR [1-80] W/IN TEXT FIELD.
  1145. *
  1146. * TIME=HHMMSS[-HHMMSS] SCAN TIME PERIOD FOR PRINTOUT. EITHER
  1147. * (OR) HH.MM.SS. FORMAT ACCEPTED, SECONDS OPTIONAL, END
  1148. * TIME OPTIONAL BUT REQUIRES '-' SEPARATOR.
  1149. *
  1150. * TRACE=KEY,... SORT KEYS FOR TRACE TABLE PRINTOUT.
  1151. * VALID KEYS: UJN,JSN,JC,SDT,EDT,FM,UN,TRM.
  1152. *
  1153. * USER=FAMILY,USER SELECT JOBS FOR PRINTOUT BY USER NAME/
  1154. * INDEX (VIA *SUI* COMMANDS).
  1155. * USE BLANK OR OMIT FOR DEFAULT FAMILY.
  1156. * USE * FOR WILDCARD MATCH. (NOTE THAT
  1157. * USER=*,* SELECTS EVERY JOB!!)
  1158. *
  1159. * UJN=JOBNAME,... SELECT JOBS FOR PRINTOUT BY JOBNAME.
  1160. *
  1161. * JSN=[D.]AAAA,... SELECT UNIT JOBS FOR PRINTOUT BY JSN.
  1162. * OPTIONAL PREFIX IS D/S UNIQUE CODE USED
  1163. * TO RESOLVE JSN AMBIGUITIES ACROSS LEVEL
  1164. * ZERO DEADSTARTS.
  1165. *
  1166. * TRM=TERMID,... SELECT JOBS FOR PRINTOUT BY TERMINAL ID.
  1167. *
  1168. * LIMIT=NNNN LIMIT JOB PRINTOUTS TO NNNN LINES EACH.
  1169.  
  1170. * EACH DIRECTIVE LINE.
  1171.  
  1172. 100 READ (7,10,END=190) DIR
  1173. 10 FORMAT(A80)
  1174. WRITE (8,*) ' //// ',DIR
  1175.  
  1176. * DIRECTIVE: AMSG=MSID,MSID...
  1177. * ACCOUNT LOG MSG ID-S FOR SERIAL PRINTOUT.
  1178.  
  1179. IF (DIR(1:5).EQ.'AMSG=') THEN
  1180. I=6
  1181.  
  1182. 110 CALL PARSE(DIR,I,MID)
  1183. IF (MID.NE.' ') THEN
  1184. CALL AMSMARK(MID,'*')
  1185. GOTO 110
  1186. ENDIF
  1187.  
  1188. * DIRECTIVE: DMSG=NN:TEXT STRING...[40].
  1189. * DAYFILE LOG TEXT STRING FOR SERIAL PRINTOUT.
  1190.  
  1191. ELSE IF (DIR(1:5).EQ.'DMSG=') THEN
  1192. NM=NM+1
  1193. I=6
  1194. N=INDEX('0123456789',DIR(I:I))
  1195. IF (N.GT.0) THEN
  1196. ITX(NM)=N-1
  1197. I=I+1
  1198. N=INDEX('0123456789',DIR(I:I))
  1199. IF (N.GT.0) THEN
  1200. ITX(NM)=10*ITX(NM)+(N-1)
  1201. I=I+1
  1202. ENDIF
  1203.  
  1204. * COLON REQUIRED WITH CHAR POSITION.
  1205.  
  1206. IF (DIR(I:I).EQ.':') THEN
  1207. I=I+1
  1208.  
  1209. * OTHERWISE USE AS TEXT STRING.
  1210.  
  1211. ELSE
  1212. I=6
  1213. ITX(NM)=0
  1214. ENDIF
  1215. ENDIF
  1216. MTX(NM)=DIR(I:I+39)
  1217. LTX(NM)=1
  1218. DO 120 I=1,40
  1219. IF (MTX(NM)(I:I).NE.' ') LTX(NM)=I
  1220. 120 CONTINUE
  1221.  
  1222. * DIRECTIVE: TIME=START[,END]
  1223. * TIME PERIOD FOR SERIAL PRINTOUT.
  1224.  
  1225. ELSE IF (DIR(1:5).EQ.'TIME=') THEN
  1226. I=6
  1227. IF (NP.GE.MXP) GOTO 180
  1228. CALL TMARG(DIR,I,TMS(NP+1))
  1229. TME(NP)=TMS(NP)
  1230. IF (DIR(I-1:I-1).EQ.'-') CALL TMARG(DIR,I,TME(NP+1))
  1231. IF (TMS(NP+1).NE.' '.AND.TME(NP+1).NE.' ') NP=NP+1
  1232. WINDOW=.FALSE.
  1233.  
  1234. * DIRECTIVE: TRACE=KEY,KEY,...
  1235. * SORT KEYS FOR TRACE TABLE PRINTOUT.
  1236. * VALID KEYS: UJN,JSN,JC,SDT,EDT,FM,UN,TRM.
  1237.  
  1238. ELSE IF (DIR(1:6).EQ.'TRACE=') THEN
  1239. I=7
  1240. DO 130 N=1,12
  1241. CALL PARSE(DIR,I,SKY(N))
  1242. 130 CONTINUE
  1243.  
  1244. * DIRECTIVE: USER=FAMILY,USER.
  1245. * FAMILY & USERNAME PAIR W/WILDCARDS.
  1246.  
  1247. ELSE IF (DIR(1:5).EQ.'USER=') THEN
  1248. I=6
  1249. CALL PARSE(DIR,I,FAMILY)
  1250. CALL PARSE(DIR,I,USER)
  1251. IF (NU.GE.MXP) GOTO 180
  1252. NU=NU+1
  1253. FAM(NU)=FAMILY
  1254. USR(NU)=USER
  1255.  
  1256. * DIRECTIVE: UJN=JOBNAME,...
  1257. * USER JOB NAME FOR JOB SELECTION.
  1258.  
  1259. ELSE IF (DIR(1:4).EQ.'UJN=') THEN
  1260. I=5
  1261. 140 CALL PARSE(DIR,I,JOBNAME)
  1262. IF (JOBNAME.NE.' ') THEN
  1263. IF (NN.GE.MXP) GOTO 180
  1264. NN=NN+1
  1265. UJN(NN)=JOBNAME
  1266. GOTO 140
  1267. ENDIF
  1268.  
  1269. * DIRECTIVE: JSN=[D.]AAAA,...
  1270. * JOB SEQUENCE NAME (AAAA) W/ OPTIONAL D/S UNIQUE CODE (D.).
  1271.  
  1272. ELSE IF (DIR(1:4).EQ.'JSN=') THEN
  1273. I=5
  1274. 150 IF(NS.GE.MXP) GOTO 180
  1275. JSN(NS+1)=' '
  1276. CALL PARSE(DIR,I,JSN(NS+1)(3:6))
  1277. IF (JSN(NS+1).NE.' ') THEN
  1278. NS=NS+1
  1279. IF (JSN(NS)(2:2).EQ.' ' .AND. DIR(I-1:I-1).EQ.'.') THEN
  1280. JSN(NS)(1:1)=JSN(NS)(3:3)
  1281. JSN(NS)(2:2)='.'
  1282. CALL PARSE(DIR,I,JSN(NS)(3:6))
  1283. ELSE
  1284. JSN(NS)(1:2)='*.'
  1285. ENDIF
  1286. GOTO 150
  1287. ENDIF
  1288.  
  1289. * DIRECTIVE: TRM=TERMID,...
  1290. * TERMINAL NAMES SELECTION DIRECTIVE.
  1291.  
  1292. ELSE IF (DIR(1:4).EQ.'TRM=') THEN
  1293. I=5
  1294.  
  1295. 160 CALL PARSE(DIR,I,TERMINL)
  1296. IF (TERMINL.NE.' ') THEN
  1297. IF (NT.GE.MXP) GOTO 180
  1298. NT=NT+1
  1299. TRM(NT)=TERMINL
  1300. GOTO 160
  1301. ENDIF
  1302.  
  1303. * DIRECTIVE: LIMIT=NNNN
  1304. * SAMPLE LIMIT FOR PRINTOUTS.
  1305.  
  1306. ELSE IF (DIR(1:6).EQ.'LIMIT=') THEN
  1307. I=7
  1308. JBLIMIT=0
  1309.  
  1310. 170 N=ICHAR(DIR(I:I))-16
  1311. IF(N.GE.0.AND.N.LE.9.AND.I.LE.12) THEN
  1312. JBLIMIT=JBLIMIT*10+N
  1313. I=I+1
  1314. GOTO 170
  1315. ENDIF
  1316.  
  1317. * UNRECOGNIZED DIRECTIVE VERB.
  1318.  
  1319. ELSE
  1320. WRITE (8,*) ' *** UNRECOGNIZED DIRECTIVE ***'
  1321. ERR=.TRUE.
  1322. ENDIF
  1323. GOTO 100
  1324.  
  1325. * ARGUMENT TABLE FULL, IGNORE ADDITIONAL ARGUMENTS.
  1326.  
  1327. 180 WRITE (8,*) ' *** TOO MANY ARGUMENTS, EXCESS IGNORED.'
  1328. ERR=.TRUE.
  1329. GOTO 100
  1330.  
  1331. * FINISHED WITH DIRECTIVES, REPORT IF ERRORS.
  1332.  
  1333. 190 IF (ERR) CALL REMARK(' *** DIRECTIVE ERROR(S).')
  1334. RETURN
  1335.  
  1336.  
  1337. * ---------------------------------------------------------------------
  1338. * SERIAL PRINTOUT SELECTIONS.
  1339. * ---------------------------------------------------------------------
  1340.  
  1341. ** ENTRY - CALL TMCHECK(ETM,HIT)
  1342. * *ETM* CONTAINS TIMESTAMP FROM LOG MESSAGE.
  1343. *
  1344. * EXIT - *HIT* SET TO .TRUE. IF *ETM* FALLS WITHIN ANY TIME
  1345. * WINDOW, OTHERWISE UNCHANGED (AVOID CONFLICT WITH
  1346. * OTHER SELECTION IN CALLING ROUTINE).
  1347. *
  1348. * PRINTOUT (UNIT 8) MESSAGES:
  1349. * ====== TIME WINDOW START ======
  1350. * ====== TIME WINDOW END ======
  1351. *
  1352. * NOTES - THIS ROUTINE REMEMBERS INDEX OF OPEN TIME WINDOW IN
  1353. * *IW* TO SHORTCUT SEARCH AND TEST.
  1354.  
  1355.  
  1356. ENTRY TMCHECK(ETM,HIT)
  1357.  
  1358. IF (NP.LE.0) RETURN
  1359.  
  1360. * CHECK FOR END OF CURRENT WINDOW, IF ANY.
  1361.  
  1362. IF (WINDOW) THEN
  1363. IF (ETM.LE.TME(IW)) THEN
  1364. HIT=.TRUE.
  1365. RETURN
  1366. ELSE
  1367. WINDOW=.FALSE.
  1368. WRITE (8,*) ' ====== TIME WINDOW END ======'
  1369. ENDIF
  1370. ENDIF
  1371.  
  1372. * CHECK FOR START OF ANY TIME WINDOW.
  1373.  
  1374. DO 200 I=1,NP
  1375. IF (ETM.LT.TMS(I) .OR. ETM.GT.TME(I)) GOTO 200
  1376. IW=I
  1377. WINDOW=.TRUE.
  1378. WRITE (8,*) ' ====== TIME WINDOW START ======'
  1379. 200 CONTINUE
  1380. RETURN
  1381.  
  1382.  
  1383. ** ENTRY - CALL MSCHECK(TXT,HIT)
  1384. * *TXT* IS MESSAGE FIELD FROM DAYFILE MESSAGE.
  1385. *
  1386. * EXIT - *HIT* SET TO .TRUE. IF *TXT* CONTAINS SELECTED TEXT
  1387. * STRING, .FALSE. OTHERWISE.
  1388.  
  1389. ENTRY MSCHECK(TXT,HIT)
  1390.  
  1391. IF (NM.EQ.0) RETURN
  1392. DO 210 N=1,NM
  1393. IF (ITX(N).EQ.0) THEN
  1394. IF (INDEX(TXT,MTX(N)(1:LTX(N))).NE.0) HIT=.TRUE.
  1395. ELSE
  1396. IF (TXT(ITX(N):ITX(N)+LTX(N)-1).EQ.MTX(N)(1:LTX(N)))
  1397. . HIT=.TRUE.
  1398. ENDIF
  1399. IF (HIT) RETURN
  1400. 210 CONTINUE
  1401. RETURN
  1402.  
  1403.  
  1404. * ---------------------------------------------------------------------
  1405. * JOB SELECTION ENTRY POINTS.
  1406. * CALLED DURING 1ST PASS TO TAG PICKS IN TRACE TABLE.
  1407. * ---------------------------------------------------------------------
  1408.  
  1409.  
  1410. ** ENTRY - CALL PICKJSN(JS,MK)
  1411. * *JS* IS JSN FROM LOG MESSAGE.
  1412. * *MK* IS MARKS FIELD FOR JOB IN JSN TRACE TABLE.
  1413. *
  1414. * EXIT - *MK(1:1)* SET TO 'J' IF JSN WAS SELECTED.
  1415.  
  1416. ENTRY PICKJSN(JS,MK)
  1417.  
  1418. * CHECK NEW JSN AGAINST EACH SELECTED JSN, IF ANY.
  1419.  
  1420. IF (NS.EQ.0) RETURN
  1421. DO 220 I=1,NS
  1422. IF ( (JS(3:6).EQ.JSN(I)(3:6)) .AND.
  1423. . (JS(1:1).EQ.JSN(I)(1:1) .OR. JSN(I)(1:1).EQ.'*') )MK(1:1)='J'
  1424. 220 CONTINUE
  1425. RETURN
  1426.  
  1427.  
  1428. ** ENTRY - CALL PICKUJN(JN,MK)
  1429. * *JN* IS UJN FROM LOG MESSAGE.
  1430. * *MK* IS MARKS FIELD FOR JOB IN JSN TRACE TABLE.
  1431. *
  1432. * EXIT - *MK(2:2)* SET TO 'N' IF UJN WAS SELECTED.
  1433.  
  1434. ENTRY PICKUJN(JN,MK)
  1435.  
  1436. * CHECK EACH NEW UJN AGAINST EACH SELECTED UJN-S, IF ANY.
  1437.  
  1438. IF (NN.EQ.0) RETURN
  1439. DO 230 I=1,NN
  1440. IF (JN.EQ.UJN(I)) MK(2:2)='N'
  1441. 230 CONTINUE
  1442. RETURN
  1443.  
  1444.  
  1445. ** ENTRY - CALL PICKUSR(FN,UN,MK)
  1446. * *FN* IS FAMILYNAME FROM LOG MESSAGE.
  1447. * *UN* IS USERNAME FROM LOG MESSAGE.
  1448. * *MK* IS MARKS FIELD FOR JOB IN JSN TRACE TABLE.
  1449. *
  1450. * EXIT - *MK(3:3)* SET TO 'U' IF FAMILY/USER WAS SELECTED.
  1451.  
  1452. ENTRY PICKUSR(FN,UN,MK)
  1453.  
  1454. * CHECK NEW USERID AGAINST EACH SELECTED FAMILY AND USER PAIR.
  1455. * WILDCARD (*) MATCHES ANYTHING. BLANK FAMILY MATCHES DEFAULT FAMILY.
  1456.  
  1457. IF (NU.EQ.0) RETURN
  1458. DO 240 I=1,NU
  1459. IF ( (FAM(I).EQ.'*'.OR.FN.EQ.FAM(I)) .AND.
  1460. . (USR(I).EQ.'*'.OR.USR(I).EQ.UN) ) MK(3:3)='U'
  1461. 240 CONTINUE
  1462. RETURN
  1463.  
  1464.  
  1465. ** ENTRY - CALL PICKTRM(TN,MK)
  1466. * *TN* IS TERMINAL ID FROM LOG MESSAGE.
  1467. * *MK* IS MARKS FIELD FOR JOB IN JSN TRACE TABLE.
  1468. *
  1469. * EXIT - *MK(4:4)* SET TO 'T' IF TERMINAL ID WAS SELECTED.
  1470.  
  1471. ENTRY PICKTRM(TN,MK)
  1472.  
  1473. * CHECK NEW TERMINAL ID AGAINST EACH SELECTED TERMINAL ID, IF ANY.
  1474.  
  1475. IF (NT.EQ.0) RETURN
  1476. DO 250 I=1,NT
  1477. IF (TN.EQ.TRM(I)) MK(4:4)='T'
  1478. 250 CONTINUE
  1479. RETURN
  1480. END
  1481.  
  1482. * ---------------------------------------------------------------------
  1483. SUBROUTINE TMARG(DIR,IS,TIMEX)
  1484. ** TMARG - EXPANDS TIME= DIRECTIVE ARGUMENTS TO FIXED FORMAT.
  1485. *
  1486. * *TMARG* ACCEPTS TIME ARGUMENTS IN A VARIETY OF FORMATS AND
  1487. * EXPANDS INTO A CANONICAL FIXED FORMAT FOR USE IN TIME WINDOW
  1488. * SELECTION OF MESSAGES FOR SERIAL PRINTOUT.
  1489. *
  1490. * ENTRY - CALL TMARG(DIR,IS,TIMEX)
  1491. * *DIR* IS DIRECTIVE CONTAINING TIME= ARGS.
  1492. * *IS* IS STRING POSITION OF TIME ARGUMENT.
  1493. *
  1494. * EXIT - *TIMEX* WILL CONTAIN FIXED FORMAT TIME ARGUMENT.
  1495. *
  1496. * ERROR - PRINTOUT (UNIT 8):
  1497. * *** TIME ARGUMENT ERROR.
  1498. *
  1499. * NOTES - FTN5 INDEX FUNCTION IS USED TO TEST FOR DIGITS AND
  1500. * NUMERIC RANGE AT SAME TIME. ACCEPTED FORMS ARE:
  1501. * HOURS - HH- HH. REQUIRED.
  1502. * MINUTES - MM- MM. OPTIONAL.
  1503. * SECONDS - SS- SS. OPTIONAL W/MINUTES.
  1504. * ----------------------------
  1505. * EXPANDED TO => ' HH.MM.SS.' CANONICAL FORM.
  1506.  
  1507. IMPLICIT INTEGER(A-Z)
  1508.  
  1509. CHARACTER*80 DIR
  1510. * ARG - DIRECTIVE TEXT STRING.
  1511.  
  1512. INTEGER IS
  1513. * ARG - START POSITION FOR TIME ARGUMENT.
  1514.  
  1515. CHARACTER*10 TIMEX
  1516. * ARG - FIXED FORMAT TIME RETURNED.
  1517.  
  1518. * SET DEFAULT RESULT.
  1519.  
  1520. TIMEX=' 00.00.00.'
  1521.  
  1522. * HOURS PORTION OF TIMESTAMP.
  1523.  
  1524. IF (INDEX('012',DIR(IS:IS)).NE.0) THEN
  1525. TIMEX(2:2)=DIR(IS:IS)
  1526. IS=IS+1
  1527. ELSE
  1528. GOTO 110
  1529. ENDIF
  1530.  
  1531. IF (INDEX('0123456789',DIR(IS:IS)).NE.0) THEN
  1532. TIMEX(3:3)=DIR(IS:IS)
  1533. IS=IS+1
  1534. ELSE
  1535. GOTO 110
  1536. ENDIF
  1537. IF (DIR(IS:IS).EQ.'.') IS=IS+1
  1538. IF (DIR(IS:IS).EQ.'-') GOTO 100
  1539.  
  1540. * MINUTES PORTION OF TIMESTAMP.
  1541.  
  1542. IF (INDEX('012345',DIR(IS:IS)).NE.0) THEN
  1543. TIMEX(5:5)=DIR(IS:IS)
  1544. IS=IS+1
  1545. ELSE
  1546. GOTO 110
  1547. ENDIF
  1548.  
  1549. IF (INDEX('0123456789',DIR(IS:IS)).NE.0) THEN
  1550. TIMEX(6:6)=DIR(IS:IS)
  1551. IS=IS+1
  1552. ELSE
  1553. GOTO 110
  1554. ENDIF
  1555. IF (DIR(IS:IS).EQ.'.') IS=IS+1
  1556. IF (DIR(IS:IS).EQ.'-') GOTO 100
  1557.  
  1558. * SECONDS PORTION OF TIMESTAMP.
  1559.  
  1560. IF (INDEX('012345',DIR(IS:IS)).NE.0) THEN
  1561. TIMEX(8:8)=DIR(IS:IS)
  1562. IS=IS+1
  1563. ELSE
  1564. GOTO 110
  1565. ENDIF
  1566.  
  1567. IF (INDEX('0123456789',DIR(IS:IS)).NE.0) THEN
  1568. TIMEX(9:9)=DIR(IS:IS)
  1569. IS=IS+1
  1570. ELSE
  1571. GOTO 110
  1572. ENDIF
  1573. IF (DIR(IS:IS).EQ.'.') IS=IS+1
  1574. IF (DIR(IS:IS).NE.'-') RETURN
  1575.  
  1576. 100 IS=IS+1
  1577. RETURN
  1578.  
  1579. * TIMESTAMP ARGUMENT ERROR.
  1580.  
  1581. 110 WRITE (8,*) ' *** TIME ARGUMENT ERROR.'
  1582. TIMEX=' '
  1583. RETURN
  1584. END
  1585.  
  1586. * ---------------------------------------------------------------------
  1587. SUBROUTINE DFSCAN(LFN,*)
  1588. ** DFSCAN - DAYFILE LOG MESSAGE PROCESSING.
  1589. *
  1590. * *DFSCAN* PROVIDES THE PRIMARY ROUTINES FOR PROCESSING DAYFILE
  1591. * LOG MESSAGES. IT PROVIDES AN ENTRY POINT TO PRE-SCAN THE LOG
  1592. * FILE TO VALIDATE FORMAT AND EXTRACT CRITICAL SYSTEM ID AND
  1593. * DATE/TIME DATA, AND ANOTHER FOR ROUTINE PROCESSING OF EACH
  1594. * LOG MESSAGE IN THE SEQUENCE CONTROLLED BY *SECART*. ANNOTATED
  1595. * MESSAGES ARE WRITTEN TO COMPOSITE LOG FILE ON UNIT 3.
  1596.  
  1597.  
  1598. IMPLICIT INTEGER(A-Z)
  1599.  
  1600. PARAMETER (MXJ=1000)
  1601. * SIZE OF JSN TRACE TABLE.
  1602.  
  1603. EQUIVALENCE (DFEDTG,DFEDATE)
  1604. * /DFL/ DFEDTG*20 = DFEDATE*10//DFETIME*10.
  1605.  
  1606.  
  1607. LOGICAL ACEOF
  1608. * /CTL/ ACCOUNT LOG EOF FLAG.
  1609.  
  1610. INTEGER ACIN
  1611. * /CTL/ ACCOUNT LOG MESSAGE COUNTER.
  1612.  
  1613. LOGICAL DFEOF
  1614. * /CTL/ DAYFILE LOG EOF FLAG.
  1615.  
  1616. CHARACTER*10 DFEDATE
  1617. * /DFL/ (EQV) DAYFILE LOG END DATE.
  1618.  
  1619. CHARACTER*20 DFEDTG
  1620. * /DFL/ (EQV) DAYFILE LOG END DATE/TIME.
  1621.  
  1622. CHARACTER*10 DFETIME
  1623. * /DFL/ (EQV) DAYFILE LOG END TIME.
  1624.  
  1625. INTEGER DFIN
  1626. * /CTL/ DAYFILE LOG MESSAGE COUNTER.
  1627.  
  1628. CHARACTER*10 DFSDATE
  1629. * /DFL/ (EQV) DAYFILE LOG START DATE.
  1630.  
  1631. CHARACTER*10 DFSTIME
  1632. * /DFL/ (EQV) DAYFILE LOG START TIME.
  1633.  
  1634. CHARACTER*40 DFTITLE
  1635. * /DFL/ DAYFILE SYSTEM TITLE.
  1636.  
  1637. CHARACTER*100 DFTXT
  1638. * /DFL/ CURRENT DAYFILE MESSAGE TEXT.
  1639.  
  1640. CHARACTER*20 DFVERSN
  1641. * /DFL/ SYSTEM VERSION (PART OF SYID).
  1642.  
  1643. CHARACTER*1 DSU
  1644. * /TRC/ DEADSTART UNIQUE PREFIX CODE.
  1645.  
  1646. CHARACTER*7 FAM
  1647. * TEMP - FAMILYNAME VARIABLE.
  1648.  
  1649. CHARACTER*7 FN(MXJ)
  1650. * /TRC/ FAMILY NAME COLUMN IN TRACE TABLE.
  1651.  
  1652. INTEGER JBLIMIT
  1653. * /CTL/ UNIT JOB PRINTOUT MESSAGE LIMIT.
  1654.  
  1655. CHARACTER*1 JC(MXJ)
  1656. * /TRC/ JOB CLASS COLUMN IN TRACE TABLE.
  1657.  
  1658. CHARACTER*1 JCL
  1659. * TEMP - JOB CLASS VARIABLE.
  1660.  
  1661. CHARACTER*7 JN(MXJ)
  1662. * /TRC/ UJN COLUMN IN TRACE TABLE.
  1663.  
  1664. CHARACTER*6 JS(MXJ)
  1665. * /TRC/ D.JSN COLUMN IN TRACE TABLE.
  1666.  
  1667. CHARACTER*6 JSN
  1668. * TEMP - JSN VARIABLE.
  1669.  
  1670. CHARACTER*7 LFN
  1671. * ARG - LFN OF DAYFILE LOG FILE.
  1672.  
  1673. CHARACTER*5 MK(MXJ)
  1674. * /TRC/ JOB SELECTION MARKS IN TRACE TABLE.
  1675.  
  1676. INTEGER ML(2,MXJ)
  1677. * /CTL/ DFL/AFL MSG COUNTS FOR TRACE TABLE.
  1678.  
  1679. INTEGER NJ
  1680. * /CTL/ CURRENT NUMBER JOBS IN TRACE TABLE.
  1681.  
  1682. CHARACTER*7 NUL
  1683. * TEMP - FOR IGNORED WORD FROM *PARSE*.
  1684.  
  1685. LOGICAL PRT
  1686. * FLAG SET TO PRINTOUT DAYFILE MESSAGE.
  1687.  
  1688. INTEGER SM
  1689. * LOCAL COUNTER FOR DFL SYSTEM MESSAGES.
  1690.  
  1691. CHARACTER*20 TE(MXJ)
  1692. * /TRC/ JOB DATE/TIME END IN TRACE TABLE.
  1693.  
  1694. CHARACTER*7 TN(MXJ)
  1695. * /TRC/ JOB TERMINAL NAME IN TRACE TABLE.
  1696.  
  1697. CHARACTER*20 TS(MXJ)
  1698. * /TRC/ JOB DATE/TIME START IN TRACE TABLE.
  1699.  
  1700. CHARACTER*7 UN(MXJ)
  1701. * /TRC/ JOB USERNAME IN TRACE TABLE.
  1702.  
  1703. CHARACTER*7 USR
  1704. * TEMP - USERNAME VARIABLE.
  1705.  
  1706. CHARACTER*7 VERB
  1707. * TEMP - COMMAND CRACKING VARIABLE.
  1708.  
  1709.  
  1710. * GLOBAL NUMERIC/LOGICAL VARIABLES AND PARAMETERS.
  1711.  
  1712. COMMON /CTL/ NJ
  1713. COMMON /CTL/ ACIN
  1714. COMMON /CTL/ DFIN
  1715. COMMON /CTL/ ACEOF
  1716. COMMON /CTL/ DFEOF
  1717. COMMON /CTL/ ML
  1718. COMMON /CTL/ JBLIMIT
  1719.  
  1720. * DAYFILE LOG SPECIFIC VARIABLES.
  1721.  
  1722. COMMON /DFL/ DFSDATE
  1723. COMMON /DFL/ DFSTIME
  1724. COMMON /DFL/ DFEDATE
  1725. COMMON /DFL/ DFETIME
  1726. COMMON /DFL/ DFTITLE
  1727. COMMON /DFL/ DFVERSN
  1728. COMMON /DFL/ DFTXT
  1729.  
  1730. * JSN TRACE TABLE STORAGE.
  1731.  
  1732. COMMON /TRC/ DSU
  1733. COMMON /TRC/ MK
  1734. COMMON /TRC/ JN
  1735. COMMON /TRC/ JS
  1736. COMMON /TRC/ JC
  1737. COMMON /TRC/ TS
  1738. COMMON /TRC/ TE
  1739. COMMON /TRC/ FN
  1740. COMMON /TRC/ UN
  1741. COMMON /TRC/ TN
  1742.  
  1743. DATA SM/0/
  1744.  
  1745.  
  1746. ** ENTRY - CALL DFSCAN(LFN,*NNN)
  1747. * *LFN* IS LFN OF DAYFILE LOG FILE.
  1748. * *NNN IS ALTERNATE EXIT STATEMENT NUMBER.
  1749. *
  1750. * EXIT - FILE REWOUND AND FIRST RECORD READ FOR PROCESSING.
  1751. *
  1752. * ERROR - ALTERNATE EXIT TAKEN IF FILE FAILS FORMAT TEST OR
  1753. * EOF FOUND BEFORE FIRST 3 SYSJOB MESSAGES FOUND.
  1754. *
  1755. * USES - COMMON /CTL/ FOR GLOBAL VARIABLES DFEOF, DFIN.
  1756. * COMMON /DFL/ FOR DAYFILE-SPECIFIC VARIABLES.
  1757. *
  1758. * CALLS - *LOGTEST* TO TEST LOG FORMAT, EXTRACT DATE/TIME.
  1759. *
  1760. * NOTES - DAYFILE LOG PRE-SCAN ROUTINE REQUIRES:
  1761. * 1) THAT FILE BE FORMATTED AS A RAW DAYFILE LOG.
  1762. * 2) FINDING A START DATE VIA -
  1763. * A) 1ST RECORD DATE STAMP -OR-
  1764. * B) DATE IN 1ST SYSJOB MESSAGE -OR-
  1765. * C) A DEAD START MSG -OR-
  1766. * D) AN HOURLY DATE STAMP MSG.
  1767. * 3) ESTABLISHING SYSTEM ID VIA -
  1768. * A) TITLE IN 2ND SYSJOB MSG -AND-
  1769. * B) VERSION IN 3RD SYSJOB MSG.
  1770. * IF SUCCESSFUL, FILE WILL BE REWOUND AND FIRST RECORD
  1771. * WILL BE READ IN ADVANCE TO START PROCESSING.
  1772.  
  1773. SM=0
  1774. DFEOF=.FALSE.
  1775.  
  1776. * CHECK LOG FORMAT AND EXTRACT START [DATE]/TIME STAMPS.
  1777.  
  1778. CALL LOGTEST(1,DFTXT,DFEDATE,DFETIME,*130)
  1779. IF (DFETIME.EQ.' ') THEN
  1780. CALL REMARK(' *** '//LFN//' NOT RAW DAYFILE LOG.')
  1781. DFEOF=.TRUE.
  1782. RETURN 1
  1783. ENDIF
  1784.  
  1785. * ACCEPT TIME, COUNT DATE STAMP RECORD AND REMEMBER TO SKIP OVER.
  1786.  
  1787. DFSTIME=DFETIME
  1788. IF (DFEDATE.NE.' ') DFIN=1
  1789. GOTO 110
  1790.  
  1791. * READ NEXT DAYFILE LOG RECORD.
  1792.  
  1793. 100 READ (1,10,END=130) DFTXT
  1794. 10 FORMAT(A100)
  1795.  
  1796. * SCAN FOR SYSJOB MESSAGES ONLY.
  1797.  
  1798. 110 DFETIME=DFTXT(1:10)
  1799. IF (DFTXT(13:17).NE.'SYS S') GOTO 100
  1800.  
  1801. * FIRST THREE SYSJOB MESSAGES HAVE SYSTEM DATE, TITLE, & VERSION.
  1802.  
  1803. SM=SM+1
  1804. IF (SM.EQ.1) THEN
  1805. L=INDEX(DFTXT,'/')
  1806. IF (L.GT.3 .AND. DFTXT(L+3:L+3).EQ.'/') THEN
  1807. DFEDATE=DFTXT(L-3:L+6)
  1808. ENDIF
  1809.  
  1810. ELSE IF (SM.EQ.2) THEN
  1811. DFTITLE=DFTXT(21:60)
  1812.  
  1813. ELSE IF (SM.EQ.3) THEN
  1814. DFVERSN=DFTXT(21:40)
  1815.  
  1816. * OTHER SYSJOB MSG-S INCLUDE DEAD START DATE MESSAGE WITH DATE.
  1817.  
  1818. ELSE IF (DFTXT(32:41).EQ.'DEAD START') THEN
  1819. DFEDATE=DFTXT(21:30)
  1820.  
  1821. * HOURLY LOG DATE MESSAGE.
  1822.  
  1823. ELSE IF (DFTXT(5:9).EQ.'00.00' .AND.
  1824. . DFTXT(21:31).EQ.'SYSTEM DATE') THEN
  1825. DFEDATE=DFTXT(35:44)
  1826. ENDIF
  1827.  
  1828. * ACCEPT START DATE, IF FOUND.
  1829.  
  1830. IF (DFSDATE.EQ.' ' .AND. DFEDATE.NE.' ') DFSDATE=DFEDATE
  1831.  
  1832. * NEED DATE, SYSTEM TITLE AND VERSION TO PROCESS LOG.
  1833.  
  1834. IF (DFSDATE.EQ.' '.OR.DFTITLE.EQ.' '.OR.DFVERSN.EQ.' ') GOTO 100
  1835.  
  1836. * REWIND FOR ROUTINE PROCESSING AND SKIP OVER DATE STAMP.
  1837.  
  1838. REWIND 1
  1839. IF (DFIN.EQ.1) READ (1,10,END=130) DFTXT
  1840. PRT=.FALSE.
  1841.  
  1842. * DROP THROUGH TO READ FIRST USABLE MESSAGE.
  1843.  
  1844. * ---------------------------------------------------------------------
  1845. * ROUTINE DAYFILE MESSAGE PROCESSING.
  1846. * ---------------------------------------------------------------------
  1847.  
  1848. * GET MSG, COUNT & MARK AS TO SOURCE ('-' IN COL 19 = DAYFILE).
  1849.  
  1850. 120 READ (1,10,END=130) DFTXT
  1851. DFIN=DFIN+1
  1852. DFTXT(19:19)='-'
  1853. DFETIME=DFTXT(1:10)
  1854. RETURN
  1855.  
  1856. * EOF ALTERNATE EXIT.
  1857.  
  1858. 130 DFEOF=.TRUE.
  1859. WRITE (8,*) ' === EOF DAYFILE LOG ',LFN,', ',DFIN,' MESSAGES'
  1860. RETURN 1
  1861.  
  1862. ** ENTRY - CALL DFMSG(*NNN)
  1863. * *NNN IS ALTERNATE EXIT TAKEN WHEN DFEOF = .TRUE. AT
  1864. * TIME OF CALL.
  1865. *
  1866. * EXIT - ANNOTATED DAYFILE MESSAGE IS WRITTEN TO COMPOSITE
  1867. * LOG FILE ON UNIT 3 AND NEXT RECORD IS READ, OR
  1868. * *DFEOF* IS SET .TRUE.
  1869. *
  1870. * ERROR - NONE.
  1871. *
  1872. * PRINTOUT -
  1873. * ANNOTATED COPIES OF CERTAIN DAYFILE LOG MESSAGES:
  1874. * - LEVEL ZERO DEADSTART MESSAGES,
  1875. * - ALL WITH TIMESTAMP WITHIN TIME WINDOW,
  1876. * - ALL *SUI* MESSAGES,
  1877. * - ALL CONSOLE OPERATOR COMMAND MESSAGES,
  1878. * - ANY CONTAINING SELECTED TEXT STRING.
  1879. *
  1880. * CALLS - *JSNLVL0* TO UPDATE D/S UNIQUE JSN PREFIX CODE.
  1881. * *TMCHECK* TO CHECK FOR TIME WINDOWS.
  1882. * *JSNTRAK* TO COLLECT ATTRIBUTES IN JSN TRACE TABLE.
  1883. * *PARSE* TO EXTRACT DATA ITEMS FROM LOG MESSAGES.
  1884. * *PICKUSR* TO CHECK NEW USERIDS FOR SELECTION.
  1885. * *MSCHECK* TO CHECK FOR SELECTED TEXT STRINGS.
  1886. *
  1887. * USES - COMMON /CTL/ FOR GLOBAL VARIABLES.
  1888. * COMMON /DFL/ FOR DAYFILE-SPECIFIC VARIABLES.
  1889. * COMMON /TRC/ FOR JSN TRACE TABLE DATA.
  1890. *
  1891. * NOTES - THIS ROUTINE PROCESSES MESSAGE READ DURING PREVIOUS
  1892. * CALL AND THEN READS NEXT RECORD BEFORE RETURNING.
  1893. * THIS ALLOWS *SECART* TO SEE TIMESTAMP OF NEXT RECORD
  1894. * AND DECIDE WHEN TO PROCESS VIS A VIS ACCOUNT LOG.
  1895.  
  1896. ENTRY DFMSG(*)
  1897.  
  1898. * WATCH FOR SYSJOB MSGS W/ DATE.
  1899.  
  1900. IF (DFTXT(13:17).EQ.'SYS S') THEN
  1901.  
  1902. * SYSJOB HOURLY DATE MESSAGES.
  1903.  
  1904. IF (DFTXT(5:9).EQ.'00.00' .AND.
  1905. . DFTXT(21:31).EQ.'SYSTEM DATE') THEN
  1906. DFEDATE=DFTXT(35:44)
  1907.  
  1908. * SYSJOB DEAD START MESSAGE W/ DATE.
  1909.  
  1910. ELSE IF (DFTXT(32:41).EQ.'DEAD START') THEN
  1911. DFEDATE=DFTXT(21:30)
  1912.  
  1913. * LEVEL 0 REQUIRES UPDATE D/S UNIQUE CODE.
  1914.  
  1915. IF (DFTXT(43:51).EQ.'LEVEL 0.') CALL JSNLVL0
  1916. ENDIF
  1917.  
  1918. * DETECT SPECIAL JSN FOR LEVEL 0 DEADSTART TOO.
  1919.  
  1920. ELSE IF (DFTXT(13:17).EQ.'AAAAA') THEN
  1921. PRT=.TRUE.
  1922. CALL JSNLVL0
  1923. ENDIF
  1924.  
  1925. * INSERT D/S UNIQUE CODE LETTER AS JSN PREFIX.
  1926.  
  1927. DFTXT(11:12)=DSU//'.'
  1928.  
  1929. * CHECK FOR TIME WINDOW PRINTOUT.
  1930.  
  1931. CALL TMCHECK(DFETIME,PRT)
  1932.  
  1933. * MATCH/COLLECT JSN AND DATE/TIME GROUP (DTG).
  1934.  
  1935. JSN=DFTXT(11:16)
  1936. JCL=DFTXT(17:17)
  1937. CALL JSNTRAK(JSN,JCL,DFEDTG,N,1)
  1938.  
  1939. * CRACK 1ST WORD TO PICK OUT UJN OR USER, SUI, OPERATOR COMMANDS.
  1940. * SHORTSTOP COMMENT LINES.
  1941.  
  1942. I=21
  1943. CALL PARSE(DFTXT,I,VERB)
  1944. IF (VERB.EQ.'*') GOTO 140
  1945.  
  1946. * ACCOMMODATE USE OF $ AND / COMMAND PREFIXES ONLY.
  1947.  
  1948. IF (VERB.EQ.' ') THEN
  1949. IF (INDEX('$/',DFTXT(I-1:I-1)).NE.0) THEN
  1950. CALL PARSE(DFTXT,I,VERB)
  1951. ELSE
  1952. GOTO 140
  1953. ENDIF
  1954. ENDIF
  1955.  
  1956. * TRY TO EXTRACT UJN FROM FIRST DAYFILE MESSAGE FOR EACH JOB.
  1957.  
  1958. IF ((ML(1,N).EQ.1) .AND. JN(N).EQ.' ') THEN
  1959. JN(N)=VERB
  1960. CALL PICKUJN(JN(N),MK(N))
  1961. ENDIF
  1962.  
  1963. * WATCH FOR USER COMMAND TO EXTRACT FM,UN & CHECK FOR SELECTION.
  1964.  
  1965. IF (VERB.EQ.'USER') THEN
  1966. CALL PARSE(DFTXT,I,USR)
  1967. CALL PARSE(DFTXT,I,NUL)
  1968. CALL PARSE(DFTXT,I,FAM)
  1969. IF (UN(N).EQ.' ' .AND .FN(N).EQ.' ') THEN
  1970. UN(N) = USR
  1971. FN(N) = FAM
  1972. ENDIF
  1973. CALL PICKUSR(FAM,USR,MK(N))
  1974.  
  1975. * SPECIAL CASE 'SUI' COMMAND AS USERNAME.
  1976.  
  1977. ELSE IF (VERB.EQ.'SUI') THEN
  1978. CALL PARSE(DFTXT,I,USR)
  1979. IF (UN(N).EQ.' ') UN(N) = USR
  1980. CALL PICKUSR(FN(N),USR,MK(N))
  1981.  
  1982. * SPECIAL CASE PRINTOUT OF OPERATOR COMMANDS.
  1983.  
  1984. ELSE IF (VERB.EQ.'DS'.AND.DFTXT(I-1:I).EQ.', ') THEN
  1985. PRT=.TRUE.
  1986. ENDIF
  1987.  
  1988. * FINAL CHECK FOR DIRECTIVE SELECTED TEXT STRING(S).
  1989.  
  1990. 140 CALL MSCHECK(DFTXT(21:100),PRT)
  1991.  
  1992. * PRINTOUT MESSAGE FOR ANY REASON.
  1993.  
  1994. IF (PRT) THEN
  1995. WRITE (8,10) DFTXT
  1996. PRT=.FALSE.
  1997. ENDIF
  1998.  
  1999. * PUT ANNOTATED MESSAGE INTO MERGED LOG FILE.
  2000.  
  2001. WRITE (3,10) DFTXT
  2002. GOTO 120
  2003.  
  2004. END
  2005.  
  2006. * ---------------------------------------------------------------------
  2007. SUBROUTINE ACSCAN(LFN,*)
  2008. ** ACSCAN - ACCOUNT LOG MESSAGE PROCESSING.
  2009. *
  2010. * *ACSCAN* PROVIDES THE PRIMARY ROUTINES FOR PROCESSING ACCOUNT
  2011. * LOG MESSAGES. IT PROVIDES AN ENTRY POINT TO PRE-SCAN THE LOG
  2012. * FILE TO VALIDATE FORMAT AND EXTRACT CRITICAL SYSTEM ID AND
  2013. * DATE/TIME DATA, AND ANOTHER FOR ROUTINE PROCESSING OF EACH
  2014. * LOG MESSAGE IN THE SEQUENCE CONTROLLED BY *SECART*. ANNOTATED
  2015. * ACCOUNT LOG MESSAGES ARE WRITTEN TO COMPOSITE LOG ON UNIT 3.
  2016.  
  2017. IMPLICIT INTEGER(A-Z)
  2018.  
  2019. PARAMETER (MXJ=1000)
  2020. * SIZE OF JSN TRACE TABLE.
  2021.  
  2022. EQUIVALENCE (ACEDTG,ACEDATE)
  2023. * /ACL/ ACEDTG*20 = ACEDATE*10 // ACETIME*10.
  2024.  
  2025.  
  2026. CHARACTER*10 ACEDATE
  2027. * /ACL/ (EQV) ACCOUNT LOG END DATE.
  2028.  
  2029. CHARACTER*20 ACEDTG
  2030. * /ACL/ (EQV) ACCOUNT LOG END DATE/TIME.
  2031.  
  2032. LOGICAL ACEOF
  2033. * /CTL/ ACCOUNT LOG EOF FLAG.
  2034.  
  2035. CHARACTER*10 ACETIME
  2036. * /ACL/ (EQV) ACCOUNT LOG END TIME.
  2037.  
  2038. INTEGER ACIN
  2039. * /CTL/ ACCOUNT LOG MESSAGE COUNTER.
  2040.  
  2041. CHARACTER*10 ACSDATE
  2042. * /ACL/ (EQV) ACCOUNT LOG START DATE.
  2043.  
  2044. CHARACTER*10 ACSTIME
  2045. * /ACL/ (EQV) ACCOUNT LOG START TIME.
  2046.  
  2047. CHARACTER*40 ACTITLE
  2048. * /ACL/ ACCOUNT LOG SYSTEM TITLE.
  2049.  
  2050. CHARACTER*100 ACTXT
  2051. * /ACL/ CURRENT ACCOUNT LOG MESSAGE TEXT.
  2052.  
  2053. CHARACTER*20 ACVERSN
  2054. * /ACL/ ACCOUNT LOG SYSTEM VERSION.
  2055.  
  2056. LOGICAL DFEOF
  2057. * /CTL/ DAYFILE LOG EOF FLAG.
  2058.  
  2059. INTEGER DFIN
  2060. * /CTL/ DAYFILE LOG MESSAGE COUNTER.
  2061.  
  2062. CHARACTER*1 DSU
  2063. * /TRC/ DEADSTART UNIQUE PREFIX CODE.
  2064.  
  2065. CHARACTER*7 FAM
  2066. * TEMP - FAMILYNAME VARIABLE.
  2067.  
  2068. CHARACTER*7 FN(MXJ)
  2069. * /TRC/ FAMILY NAME COLUMN IN TRACE TABLE.
  2070.  
  2071. INTEGER JBLIMIT
  2072. * /CTL/ UNIT JOB PRINTOUT MESSAGE LIMIT.
  2073.  
  2074. CHARACTER*1 JC(MXJ)
  2075. * /TRC/ JOB CLASS COLUMN IN TRACE TABLE.
  2076.  
  2077. CHARACTER*1 JCL
  2078. * TEMP - JOB CLASS VARIABLE.
  2079.  
  2080. CHARACTER*7 JN(MXJ)
  2081. * /TRC/ UJN COLUMN IN TRACE TABLE.
  2082.  
  2083. CHARACTER*6 JS(MXJ)
  2084. * /TRC/ D.JSN COLUMN IN TRACE TABLE.
  2085.  
  2086. CHARACTER*6 JSN
  2087. * TEMP JSN VARIABLE.
  2088.  
  2089. CHARACTER*7 LFN
  2090. * ARG - LFN FOR ACCOUNT LOG FILE.
  2091.  
  2092. CHARACTER*4 MID
  2093. * TEMP - ACCOUNT MESSAGE ID.
  2094.  
  2095. CHARACTER*5 MK(MXJ)
  2096. * /TRC/ JOB SELECTION MARKS IN TRACE TABLE.
  2097.  
  2098. INTEGER ML(2,MXJ)
  2099. * /CTL/ DFL/AFL MSG COUNTS FOR TRACE TABLE.
  2100.  
  2101. INTEGER NJ
  2102. * /CTL/ CURRENT NUMBER JOBS IN TRACE TABLE.
  2103.  
  2104. CHARACTER*20 NUDTG
  2105. * TEMP - NEW DATE/TIME GROUP VARIABLE.
  2106.  
  2107. CHARACTER*6 NUJSN
  2108. * TEMP - NEW JSN VARIABLE.
  2109.  
  2110. LOGICAL PRT
  2111. * FLAG TO PRINTOUT ACCOUNT LOG MESSAGE.
  2112.  
  2113. CHARACTER*2 SC
  2114. * TEMP - IGNORED WORD FROM *PARSE*.
  2115.  
  2116. CHARACTER*20 TE(MXJ)
  2117. * /TRC/ JOB DATE/TIME END IN TRACE TABLE.
  2118.  
  2119. CHARACTER*7 TN(MXJ)
  2120. * /TRC/ JOB TERMINAL NAME IN TRACE TABLE.
  2121.  
  2122. CHARACTER*7 TRM
  2123. * TEMP - TERMINAL ID VARIABLE.
  2124.  
  2125. CHARACTER*20 TS(MXJ)
  2126. * /TRC/ JOB DATE/TIME START IN TRACE TABLE.
  2127.  
  2128. CHARACTER*7 UN(MXJ)
  2129. * /TRC/ JOB USERNAME IN TRACE TABLE.
  2130.  
  2131. CHARACTER*7 USR
  2132. * TEMP - USERNAME VARIABLE.
  2133.  
  2134. CHARACTER*1 X
  2135. * TEMP - USED IN D.JSN ATTRIBUTES RECOVERY.
  2136.  
  2137.  
  2138. * ACCOUNT LOG SPECIFIC VARIABLES.
  2139.  
  2140. COMMON /ACL/ ACSDATE
  2141. COMMON /ACL/ ACSTIME
  2142. COMMON /ACL/ ACEDATE
  2143. COMMON /ACL/ ACETIME
  2144. COMMON /ACL/ ACTITLE
  2145. COMMON /ACL/ ACVERSN
  2146. COMMON /ACL/ ACTXT
  2147.  
  2148. * GLOBAL NUMERIC/LOGICAL VARIABLES AND PARAMETERS.
  2149.  
  2150. COMMON /CTL/ NJ
  2151. COMMON /CTL/ ACIN
  2152. COMMON /CTL/ DFIN
  2153. COMMON /CTL/ ACEOF
  2154. COMMON /CTL/ DFEOF
  2155. COMMON /CTL/ ML
  2156. COMMON /CTL/ JBLIMIT
  2157.  
  2158. * JSN TRACE TABLE STORAGE.
  2159.  
  2160. COMMON /TRC/ DSU
  2161. COMMON /TRC/ MK
  2162. COMMON /TRC/ JN
  2163. COMMON /TRC/ JS
  2164. COMMON /TRC/ JC
  2165. COMMON /TRC/ TS
  2166. COMMON /TRC/ TE
  2167. COMMON /TRC/ FN
  2168. COMMON /TRC/ UN
  2169. COMMON /TRC/ TN
  2170.  
  2171.  
  2172. ** ENTRY - CALL ACSCAN(LFN,*NNN)
  2173. * *LFN* IS LFN OF ACCOUNT LOG FILE.
  2174. * *NNN IS ALTERNATE EXIT STATEMENT NUMBER.
  2175. *
  2176. * EXIT - FILE REWOUND AND FIRST RECORD READ FOR PROCESSING.
  2177. *
  2178. * ERROR - ALTERNATE EXIT TAKEN IF FILE FAILS FORMAT TEST OR
  2179. * EOF FOUND BEFORE LOG DATE AND SYSTEM ID ARE FOUND.
  2180. *
  2181. * USES - COMMON /CTL/ FOR GLOBAL VARIABLES DFEOF, DFIN.
  2182. * COMMON /ACL/ FOR ACCOUNT-SPECIFIC VARIABLES.
  2183. *
  2184. * CALLS - *LOGTEST* TO CHECK FORMAT, EXTRACT START DATE/TIME.
  2185. *
  2186. * NOTES - ACCOUNT LOG PRE-SCAN ROUTINE REQUIRES:
  2187. * 1) THAT FILE BE FORMATTED AS A RAW ACCOUNT LOG.
  2188. * 2) FINDING A START DATE VIA SYSJOB MESSAGE -
  2189. * A) 'ABSY' OR 'SIDT' MESSAGE, -OR-
  2190. * B) 'ACDT' MESSAGE.
  2191. * 3) ESTABLISHING SYSTEM ID VIA SYSJOB MESSAGES,
  2192. * A) 'ABST' MESSAGE FOR TITLE, -AND-
  2193. * B) 'ABSV' MESSAGE FOR VERSION.
  2194. * IF SUCCESSFUL, FILE WILL BE REWOUND AND FIRST RECORD
  2195. * WILL BE READ IN ADVANCE TO START PROCESSING.
  2196.  
  2197. ACEOF=.FALSE.
  2198.  
  2199. * CHECK LOG FORMAT AND EXTRACT START [DATE]/TIME STAMPS.
  2200.  
  2201. CALL LOGTEST(2,ACTXT,ACEDATE,ACETIME,*130)
  2202. IF (ACETIME.EQ.' ' .OR. ACTXT(25:26).NE.', ') THEN
  2203. CALL REMARK(' *** '//LFN//' NOT RAW ACCOUNT LOG.')
  2204. ACEOF=.TRUE.
  2205. RETURN 1
  2206. ENDIF
  2207.  
  2208. * ACCEPT TIME, COUNT DATE STAMP RECORD AND REMEMBER TO SKIP OVER.
  2209.  
  2210. ACSTIME=ACETIME
  2211. IF (ACEDATE.NE.' ') ACIN=1
  2212. GOTO 110
  2213.  
  2214. * READ NEXT ACCOUNT LOG RECORD.
  2215.  
  2216. 100 READ (2,10,END=130) ACTXT
  2217. 10 FORMAT(A100)
  2218.  
  2219. 110 ACETIME=ACTXT(1:10)
  2220. MID=ACTXT(21:24)
  2221.  
  2222. * SCAN FOR SYSJOB MESSAGES ONLY.
  2223.  
  2224. IF (ACTXT(13:17).NE.'SYS S') GOTO 100
  2225.  
  2226. * WATCH FOR SYSJOB MSGS W/ DATE, TITLE AND VERSION.
  2227.  
  2228. IF (MID.EQ.'ABST') THEN
  2229. ACTITLE=ACTXT(27:66)
  2230. ELSE IF (MID.EQ.'ABSV') THEN
  2231. ACVERSN=ACTXT(27:46)
  2232. ELSE IF (MID.EQ.'ABSY' .OR. MID.EQ.'SIDT')THEN
  2233. ACEDATE=ACTXT(27:36)
  2234. ELSE IF (MID.EQ.'ACDT' .AND. ACTXT(27:36).EQ.'DS, DATE. ') THEN
  2235. ACEDATE=ACTXT(37:46)
  2236. ENDIF
  2237.  
  2238. * ACCEPT START DATE, IF FOUND.
  2239.  
  2240. IF (ACSDATE.EQ.' ' .AND. ACEDATE.NE.' ') ACSDATE=ACEDATE
  2241.  
  2242. * NEED DATE, SYSTEM TITLE AND VERSION TO PROCESS LOG.
  2243.  
  2244. IF (ACSDATE.EQ.' '.OR.ACTITLE.EQ.' '.OR.ACVERSN.EQ.' ') GOTO 100
  2245.  
  2246. * REWIND FOR ROUTINE PROCESSING AND SKIP OVER DATE STAMP.
  2247.  
  2248. REWIND 2
  2249. IF (ACIN.EQ.1) READ (2,10,END=130) ACTXT
  2250. PRT=.FALSE.
  2251.  
  2252. * DROP THROUGH TO READ FIRST USABLE MESSAGE.
  2253.  
  2254. * ---------------------------------------------------------------------
  2255. * ROUTINE ACCOUNT LOG MESSAGE PROCESSING.
  2256. * ---------------------------------------------------------------------
  2257.  
  2258. * GET MSG, COUNT & MARK AS TO SOURCE ('+' IN COL 20 = ACCOUNT).
  2259.  
  2260. 120 READ (2,10,END=130) ACTXT
  2261. ACIN=ACIN+1
  2262. ACETIME=ACTXT(1:10)
  2263. MID=ACTXT(21:24)
  2264. ACTXT(20:20)='+'
  2265.  
  2266. * SPECIAL CASE BIAS SOME MSG ID-S TO PRECEDE DFL MSGS.
  2267.  
  2268. IF (INDEX('AB AC AR AS',MID(1:2)).NE.0
  2269. . .OR. MID.EQ.'SIDT') ACETIME(10:10)=' '
  2270. RETURN
  2271.  
  2272.  
  2273. * EOF ALTERNATE EXIT.
  2274.  
  2275. 130 ACEOF=.TRUE.
  2276. WRITE (8,*) ' === EOF ACCOUNT LOG ',LFN,', ',ACIN,' MESSAGES'
  2277. RETURN 1
  2278.  
  2279.  
  2280. ** ENTRY - CALL ACMSG(*NNN)
  2281. * *NNN IS ALTERNATE EXIT TAKEN WHEN ACEOF = .TRUE. AT
  2282. * TIME OF CALL.
  2283. *
  2284. * EXIT - ANNOTATED ACCOUNT LOG MESSAGE WRITTEN TO COMPOSITE
  2285. * LOG FILE ON UNIT 3 AND NEXT RECORD IS READ, OR
  2286. * *ACEOF* IS SET TO .TRUE.
  2287. *
  2288. * ERROR - NONE.
  2289. *
  2290. * PRINTOUT -
  2291. * ANNOTATED COPIES OF CERTAIN ACCOUNT LOG MESSAGES:
  2292. * - ALL WITH TIMESTAMP WITHIN TIME WINDOW.
  2293. * - JOB RECOVERY MESSAGES.
  2294. * - CHANGES TO USERNAME ASSOCIATED WITH A JOB.
  2295. * - CHANGES TO JOB'S JSN.
  2296. *
  2297. * CALLS - *JSNLVL0* TO UPDATE D/S UNIQUE JSN PREFIX CODE.
  2298. * *TMCHECK* TO CHECK FOR TIME WINDOWS.
  2299. * *JSNTRAK* TO COLLECT ATTRIBUTES IN JSN TRACE TABLE.
  2300. * *AMSTEST* TO COLLECT ACCOUNT MSG ID STATISTICS AND
  2301. * DETECT FLAGGED ID-S.
  2302. * *JSNLOOK* TO FIND RECOVERED JOB ATTRIBUTES.
  2303. * *PICKUSR* TO CHECK NEW USERID-S FOR SELECTION.
  2304. * *PICKTRM* TO CHECK NEW TERMINAL ID-S FOR SELECTION.
  2305. * *PARSE* TO EXTRACT DATA ITEMS FROM LOG MESSAGES.
  2306. *
  2307. * NOTES - THIS ROUTINE PROCESSES MESSAGE READ DURING PREVIOUS
  2308. * CALL AND THEN READS NEXT RECORD BEFORE RETURNING.
  2309. * THIS ALLOWS *SECART* TO SEE TIMESTAMP OF NEXT RECORD
  2310. * AND DECIDE WHEN TO PROCESS VIS A VIS DAYFILE LOG.
  2311. * TO INSURE THAT MESSAGE ID-S BEGINNING WITH 'AB',
  2312. * 'AC', 'AR', AND 'AS' PRECEEDE DAYFILE MESSAGES IN
  2313. * SAME SECOND, A SPECIAL CASE BIAS IS APPLIED BY
  2314. * BLANKING FINAL PERIOD IN TIMESTAMP.
  2315.  
  2316. ENTRY ACMSG(*)
  2317.  
  2318. * RESET SPECIAL CASE BIAS, IF ANY.
  2319.  
  2320. ACETIME(10:10)='.'
  2321.  
  2322. * WATCH FOR NEW DATE AND LEVEL 0 DEADSTART MSGS.
  2323.  
  2324. IF (INDEX('ABSY AESY SIDT',MID).NE.0) THEN
  2325. ACEDATE=ACTXT(27:36)
  2326. ELSE IF (MID.EQ.'ACDT') THEN
  2327. IF (ACTXT(27:36).EQ.'DS, DATE. ') ACEDATE=ACTXT(37:46)
  2328. ELSE IF (MID.EQ.'ARSY') THEN
  2329. ACEDATE=ACTXT(29:38)
  2330. IF (ACTXT(27:28).EQ.'0,') CALL JSNLVL0
  2331. ENDIF
  2332.  
  2333. * INSERT D/S UNIQUE CODE LETTER AS JSN PREFIX.
  2334.  
  2335. ACTXT(11:12)=DSU//'.'
  2336.  
  2337. * CHECK FOR TIME WINDOW START OR END.
  2338.  
  2339. CALL TMCHECK(ACETIME,PRT)
  2340.  
  2341. * COLLECT/MATCH JSN-S.
  2342.  
  2343. JSN=ACTXT(11:16)
  2344. JCL=ACTXT(17:17)
  2345. CALL JSNTRAK(JSN,JCL,ACEDTG,N,2)
  2346.  
  2347. * COLLECT/MATCH MESSAGE IDS & DETECT FLAGGED MSG ID-S.
  2348.  
  2349. CALL AMSTEST(MID,JCL,PRT)
  2350.  
  2351. * WATCH FOR RECOVERED JOBS. TRY TO RETRIEVE ATTRIBUTES.
  2352.  
  2353. IF (MID.EQ.'ARRQ' .AND. ACTXT(27:28).EQ.'C1'
  2354. . .AND. ACTXT(53:54).EQ.'IN' ) THEN
  2355. NUDTG=' 00/00/00. 00.00.00.'
  2356. NUDTG(2:3)=ACTXT(37:38)
  2357. NUDTG(5:6)=ACTXT(39:40)
  2358. NUDTG(8:9)=ACTXT(41:42)
  2359. NUDTG(12:13)=ACTXT(45:46)
  2360. NUDTG(15:16)=ACTXT(47:48)
  2361. NUDTG(18:19)=ACTXT(49:50)
  2362. X=DSU
  2363.  
  2364. 165 NUJSN=X//'.'//ACTXT(31:34)
  2365. CALL JSNLOOK(NUJSN,L)
  2366. IF (L.NE.0.AND.TS(L).EQ.NUDTG) THEN
  2367. FN(N)=FN(L)
  2368. UN(N)=UN(L)
  2369. JN(N)=JN(L)
  2370. WRITE (8,*) ' === JSN RECOVERED ',JS(L)
  2371. PRT=.TRUE.
  2372. ELSE
  2373. X=CHAR(ICHAR(X)-1)
  2374. IF (X.GE.'A') GOTO 165
  2375. WRITE (8,*) ' === JSN NOT FOUND: ',NUJSN(3:6),NUDTG
  2376. PRT=.TRUE.
  2377. ENDIF
  2378. ENDIF
  2379.  
  2380. * COLLECT/CHANGE ATTRIBUTES IN TRACE TABLE.
  2381. * GET USER ID & TERMINAL AND CHECK FOR SELECTION.
  2382.  
  2383. IF (MID.EQ.'ABUN') THEN
  2384. I=27
  2385. CALL PARSE(ACTXT,I,USR)
  2386. CALL PARSE(ACTXT,I,FAM)
  2387. CALL PARSE(ACTXT,I,TRM)
  2388. TN(N)=TRM
  2389. IF (FN(N).EQ.' ' .AND. UN(N).EQ.' ' ) THEN
  2390. UN(N)=USR
  2391. FN(N)=FAM
  2392. ENDIF
  2393. CALL PICKUSR(FAM,USR,MK(N))
  2394. CALL PICKTRM(TRM,MK(N))
  2395.  
  2396. ELSE IF (MID.EQ.'ACUN') THEN
  2397. I=27
  2398. CALL PARSE(ACTXT,I,USR)
  2399. CALL PARSE(ACTXT,I,FAM)
  2400. CALL PICKUSR(FAM,USR,MK(N))
  2401. PRT=.TRUE.
  2402.  
  2403. ELSE IF (MID.EQ.'ARUN') THEN
  2404. I=27
  2405. CALL PARSE(ACTXT,I,USR)
  2406. CALL PARSE(ACTXT,I,FAM)
  2407. IF (UN(N).EQ.' ') UN(N)=USR
  2408. IF (FN(N).EQ.' ') FN(N)=FAM
  2409. CALL PICKUSR(FAM,USR,MK(N))
  2410. CALL PARSE(ACTXT,I,TRM)
  2411. IF (TRM.NE.'TERMNAM') TN(N)=TRM
  2412. CALL PICKTRM(TRM,MK(N))
  2413.  
  2414. * CHANGE SC/JSN W/ LINK-BACK IF NEW JSN SELECTED.
  2415. * RECORDS NEW JSN W/ INHERITED ATTRIBUTES.
  2416.  
  2417. ELSE IF (MID.EQ.'ACSC') THEN
  2418. I=27
  2419. CALL PARSE(ACTXT,I,SC)
  2420. NUJSN=DSU//'. '
  2421. CALL PARSE(ACTXT,I,NUJSN(3:6))
  2422. IF (NUJSN(3:6).NE.' ' .AND. NUJSN(3:6).NE.JSN) THEN
  2423. L=N
  2424. CALL JSNTRAK(NUJSN,JCL,ACEDTG,N,2)
  2425. MK(N)=MK(L)
  2426. JN(N)=JN(L)
  2427. FN(N)=FN(L)
  2428. UN(N)=UN(L)
  2429. TN(N)=TN(L)
  2430. PRT=.TRUE.
  2431. ENDIF
  2432. ENDIF
  2433.  
  2434. * PRINTOUT MESSAGE FOR ANY REASON.
  2435.  
  2436. IF (PRT) THEN
  2437. WRITE (8,10) ACTXT
  2438. PRT=.FALSE.
  2439. ENDIF
  2440.  
  2441. * PUT ANNOTATED MESSAGE INTO MERGED LOG FILE.
  2442.  
  2443. WRITE (3,10) ACTXT
  2444. GOTO 120
  2445.  
  2446. END
  2447.  
  2448. * ---------------------------------------------------------------------
  2449. SUBROUTINE LOGTEST(LF,TXT,DT,TM,*)
  2450. ** LOGTEST - TEST RAW LOG FORMAT & EXTRACT DATE/TIME STAMPS.
  2451. *
  2452. * *LOGTEST* READS FIRST LINE OF LOG FILE, TESTS FOR SYNTAX OF
  2453. * OPTIONAL DATESTAMP AND, IF CORRECT, EXTRACTS LOG START DATE.
  2454. * (DATE STAMP IS OPTIONAL TO PERMIT PROCESSING LOG FRAGMENTS.)
  2455. * IF DATE STAMP IS MISSING, FIRST LINE IS CHECKED FOR PROPER
  2456. * SYNTAX AND LOG START TIME EXTRACTED. IF DATE STAMP IS
  2457. * PRESENT, 2ND LINE WILL BE READ, CHECKED AND TIME EXTRACTED.
  2458. *
  2459. * ENTRY - CALL LOGTEST(LFN,TXT,OK)
  2460. * *LF* IS UNIT NUMBER OF FILE BEING TESTED.
  2461. *
  2462. * EXIT - *TXT* WILL CONTAIN FIRST USABLE RECORD FROM FILE.
  2463. * *DT* WILL CONTAIN DATE STAMP OR BLANKS.
  2464. * *TM* WILL CONTAIN TIMESTAMP OF USABLE RECORD.
  2465. *
  2466. * ERROR - ALTERNATE RETURN 1 IF EOF OR LOG FAILS FORMAT TESTS.
  2467. *
  2468. * NOTES - USES CHARACTER STRING CATENATION TO SIMPLIFY SYNTAX
  2469. * CHECK AND INDEX FUNCTION TO CHECK FOR NON-NUMERIC
  2470. * CHARACTERS EFFICIENTLY. SPECIFIC TESTS ARE:
  2471. * --------------------------------------------
  2472. * CHAR POSITION: 1234567890123456789012345
  2473. * TARGET FORMAT: ' NN.NN.NN. XXXXX. XXXX...'
  2474. * TEST SYNTAX : = = = === ===
  2475. * TEST NUMERIC : == == ==
  2476. * --------------------------------------------
  2477.  
  2478. IMPLICIT INTEGER(A-Z)
  2479.  
  2480. INTEGER LF
  2481. * ARG - UNIT # LOG FILE TO TEST FORMAT.
  2482.  
  2483. CHARACTER*10 DT
  2484. * ARG - LOG START DATE RETURNED.
  2485.  
  2486. LOGICAL OK
  2487. * TEMP - USED IN SYNTAX CHECKING.
  2488.  
  2489. CHARACTER*10 TM
  2490. * ARG - LOG START TIME RETURNED
  2491.  
  2492. CHARACTER*6 TST
  2493. * TEMP - USED IN SYNTAX CHECK.
  2494.  
  2495. CHARACTER*100 TXT
  2496. * ARG - FIRST RECORD TEXT STRING.
  2497.  
  2498. DT=' '
  2499. TM=' '
  2500. OK=.TRUE.
  2501.  
  2502. * READ FIRST LINE OF LOG, CHECK FOR OPTIONAL DATE STAMP.
  2503.  
  2504. READ (LF,10,END=130) TXT
  2505. 10 FORMAT(A100)
  2506. IF (TXT(1:1).EQ.' ') GOTO 100
  2507.  
  2508. * 1 6
  2509. * CHECK FOR DATE STAMP SYNTAX: YYMMDD.
  2510.  
  2511. IF (INDEX('8901',TXT(1:1)).EQ.0) OK=.FALSE.
  2512. IF (INDEX('0123456789',TXT(2:2)).EQ.0) OK=.FALSE.
  2513. IF (INDEX('01',TXT(3:3)).EQ.0) OK=.FALSE.
  2514. IF (INDEX('0123456789',TXT(4:4)).EQ.0) OK=.FALSE.
  2515. IF (INDEX('0123',TXT(5:5)).EQ.0) OK=.FALSE.
  2516. IF (INDEX('0123456789',TXT(6:6)).EQ.0) OK=.FALSE.
  2517. IF (.NOT.OK) GOTO 130
  2518.  
  2519. * ACCEPT DATE STAMP, READ SECOND LINE FOR TIME STAMP.
  2520.  
  2521. DT=' '//TXT(1:2)//'/'//TXT(3:4)//'/'//TXT(5:6)//'.'
  2522. READ (LF,10,END=130) TXT
  2523.  
  2524.  
  2525. * COLLECT AND TEST TIME STAMP SYNTAX CHARACTERS.
  2526.  
  2527. 100 IF (TXT(1:1)//TXT(4:4)//TXT(7:7)//TXT(10:12)//TXT(18:20)
  2528. . .NE. ' ... . ') GOTO 130
  2529.  
  2530. * COLLECT AND TEST NUMERIC CHARACTERS.
  2531.  
  2532. TST=TXT(2:3)//TXT(5:6)//TXT(8:9)
  2533. DO 110 I=1,6
  2534. IF(INDEX('0123456789',TST(I:I)).EQ.0) OK=.FALSE.
  2535. 110 CONTINUE
  2536. IF (OK) TM=TXT(1:10)
  2537. RETURN
  2538.  
  2539. * ALTERNATE EXIT ON EOF OR FAILED SYNTAX CHECK.
  2540.  
  2541. 130 RETURN 1
  2542. END
  2543.  
  2544. * ---------------------------------------------------------------------
  2545. SUBROUTINE JSNLOAD
  2546. ** JSNLOAD - JSN TRACE TABLE MANAGER.
  2547. *
  2548. * THIS PROGRAM UNIT MANAGES THE JSN TRACE TABLE WHICH RECORDS
  2549. * JOB ATTRIBUTES DATA EXTRACTED FROM BOTH DAYFILE AND ACCOUNT
  2550. * LOGS. MULTIPLE ENTRY POINTS ARE PROVIDED FOR PURPOSES OF:
  2551. * PRE-LOADING TRACE TABLE DATA FROM PREVIOUS *SECART* RUNS,
  2552. * MAINTAINING A JSN PREFIX CODE TO AVOID AMBIGUITIES ACROSS
  2553. * LEVEL ZERO DEADSTARTS, AUTOMATICALLY CREATING NEW TABLE
  2554. * ENTRIES FOR EACH UNIQUE JSN, THEN MATCHING JSN-S ON
  2555. * SUBSEQUENT CALLS AND COLLECTING JOB ATTRIBUTES, OPTIONALLY
  2556. * SORTING TRACE TABLE ENTRIES ON A SPECIFIED SET OF DATA ITEMS,
  2557. * AND FINALLY PRINTING THE TRACE TABLE. IT ALSO PRODUCES THE
  2558. * TRACE TABLE FILE WHICH MAY BE LOADED ON A SUBSEQUENT RUN.
  2559.  
  2560.  
  2561. IMPLICIT INTEGER(A-Z)
  2562.  
  2563. PARAMETER (MXJ=1000)
  2564. * SIZE OF JSN TRACE TABLE.
  2565.  
  2566.  
  2567. CHARACTER*20 ACEDTG
  2568. * /ACL/ ACCOUNT LOG END DATE/TIME GROUP.
  2569.  
  2570. LOGICAL ACEOF
  2571. * /CTL/ ACCOUNT LOG EOF FLAG.
  2572.  
  2573. INTEGER ACIN
  2574. * /CTL/ ACCOUNT LOG MESSAGE COUNTER.
  2575.  
  2576. CHARACTER*20 ACSDTG
  2577. * /ACL/ ACCOUNT LOG START DATE/TIME GROUP.
  2578.  
  2579. CHARACTER*60 ACSYSID
  2580. * /ACL/ ACCOUNT LOG SYSTEM TITLE/VERSION.
  2581.  
  2582. CHARACTER*20 DFEDTG
  2583. * /DFL/ DAYFILE LOG END DATE/TIME GROUP.
  2584.  
  2585. LOGICAL DFEOF
  2586. * /CTL/ DAYFILE LOG EOF FLAG.
  2587.  
  2588. INTEGER DFIN
  2589. * /CTL/ DAYFILE LOG MESSAGE COUNTER.
  2590.  
  2591. CHARACTER*20 DFSDTG
  2592. * /DFL/ DAYFILE LOG START DATE/TIME GROUP.
  2593.  
  2594. CHARACTER*60 DFSYSID
  2595. * /DFL/ DAYFILE LOG SYSTEM TITLE/VERSION.
  2596.  
  2597. CHARACTER*1 DSU
  2598. * /TRC/ DEADSTART UNIQUE PREFIX CODE.
  2599.  
  2600. CHARACTER*20 DTG
  2601. * ARG - DATE/TIME GROUP.
  2602.  
  2603. LOGICAL ERR
  2604. * FLAG FOR MSGID SEQUENCE ERROR(S).
  2605.  
  2606. CHARACTER*7 FN(MXJ)
  2607. * /TRC/ FAMILY NAME COLUMN IN TRACE TABLE.
  2608.  
  2609. CHARACTER*40 HDR
  2610. * /SYS/ PRINTOUT HEADER TEXT.
  2611.  
  2612. INTEGER IPAGE
  2613. * LOCAL PRINTOUT PAGE COUNTER.
  2614.  
  2615. INTEGER JBLIMIT
  2616. * /CTL/ UNIT JOB PRINTOUT MESSAGE LIMIT.
  2617.  
  2618. CHARACTER*1 JC(MXJ)
  2619. * /TRC/ JOB CLASS COLUMN IN TRACE TABLE.
  2620.  
  2621. CHARACTER*1 JCL
  2622. * ARG - JOB CLASS.
  2623.  
  2624. CHARACTER*7 JN(MXJ)
  2625. * /TRC/ UJN COLUMN IN TRACE TABLE.
  2626.  
  2627. CHARACTER*6 JS(MXJ)
  2628. * /TRC/ D.JSN COLUMN IN TRACE TABLE.
  2629.  
  2630. CHARACTER*6 JSN
  2631. * ARG - D.JSN ARGUMENT.
  2632.  
  2633. INTEGER LF
  2634. * TEMP - FILE NUMBER FOR TRACE TABLE SORT.
  2635.  
  2636. CHARACTER*7 LFN
  2637. * ARG - LFN FOR TRACE TABLE SORT LISTING.
  2638.  
  2639. INTEGER LOG
  2640. * ARG - INDEX FOR DFL/AFL MESSAGE COUNTS.
  2641.  
  2642. LOGICAL LOOK
  2643. * FLAG FOR *JSNTRAK* VERSUS *JSNLOOK*.
  2644.  
  2645. INTEGER LST
  2646. * TEMP - HOLDS INDEX OF LAST JOB MATCHED.
  2647.  
  2648. CHARACTER*5 MK(MXJ)
  2649. * /TRC/ JOB SELECTION MARKS IN TRACE TABLE.
  2650.  
  2651. INTEGER ML(2,MXJ)
  2652. * /CTL/ DFL/AFL MSG COUNTS FOR TRACE TABLE.
  2653.  
  2654. INTEGER N
  2655. * ARG - INDEX TO JOB IN TRACE TABLE.
  2656.  
  2657. INTEGER NJ
  2658. * /CTL/ CURRENT NUMBER JOBS IN TRACE TABLE.
  2659.  
  2660. INTEGER NS
  2661. * COUNT OF JOBS SELECTED.
  2662.  
  2663. CHARACTER*10 PGM
  2664. * /SYS/ *SECART* VERSION ID FOR PRINTOUTS.
  2665.  
  2666. CHARACTER*10 RUNDT
  2667. * /SYS/ *SECART* RUN DATE FOR PRINTOUTS.
  2668.  
  2669. CHARACTER*10 RUNTM
  2670. * /SYS/ *SECART* RUN TIME FOR PRINTOUTS.
  2671.  
  2672. CHARACTER*3 SKY(12)
  2673. * /SRT/ TRACE TABLE SORT KEYS.
  2674.  
  2675. CHARACTER*20 TE(MXJ)
  2676. * /TRC/ JOB DATE/TIME END IN TRACE TABLE.
  2677.  
  2678. CHARACTER*7 TN(MXJ)
  2679. * /TRC/ JOB TERMINAL NAME IN TRACE TABLE.
  2680.  
  2681. CHARACTER*20 TS(MXJ)
  2682. * /TRC/ JOB DATE/TIME START IN TRACE TABLE.
  2683.  
  2684. CHARACTER*100 TXT
  2685. * TEMP - BUFFER FOR TRACE SORT PRINTOUT.
  2686.  
  2687. CHARACTER*7 UN(MXJ)
  2688. * /TRC/ JOB USERNAME IN TRACE TABLE.
  2689.  
  2690.  
  2691. * ACCOUNT LOG SPECIFIC VARIABLES.
  2692.  
  2693. COMMON /ACL/ ACSDTG
  2694. COMMON /ACL/ ACEDTG
  2695. COMMON /ACL/ ACSYSID
  2696.  
  2697. * GLOBAL NUMERIC/LOGICAL VARIABLES AND PARAMETERS.
  2698.  
  2699. COMMON /CTL/ NJ
  2700. COMMON /CTL/ ACIN
  2701. COMMON /CTL/ DFIN
  2702. COMMON /CTL/ ACEOF
  2703. COMMON /CTL/ DFEOF
  2704. COMMON /CTL/ ML
  2705. COMMON /CTL/ JBLIMIT
  2706.  
  2707. * DAYFILE LOG SPECIFIC VARIABLES.
  2708.  
  2709. COMMON /DFL/ DFSDTG
  2710. COMMON /DFL/ DFEDTG
  2711. COMMON /DFL/ DFSYSID
  2712.  
  2713. * JSN TRACE TABLE SORT PARAMETERS.
  2714.  
  2715. COMMON /SRT/ SKY
  2716.  
  2717. * GLOBAL STRING VARIABLES.
  2718.  
  2719. COMMON /SYS/ HDR
  2720. COMMON /SYS/ PGM
  2721. COMMON /SYS/ RUNDT
  2722. COMMON /SYS/ RUNTM
  2723.  
  2724. * JSN TRACE TABLE STORAGE.
  2725.  
  2726. COMMON /TRC/ DSU
  2727. COMMON /TRC/ MK
  2728. COMMON /TRC/ JN
  2729. COMMON /TRC/ JS
  2730. COMMON /TRC/ JC
  2731. COMMON /TRC/ TS
  2732. COMMON /TRC/ TE
  2733. COMMON /TRC/ FN
  2734. COMMON /TRC/ UN
  2735. COMMON /TRC/ TN
  2736.  
  2737. DATA LST /1/
  2738.  
  2739.  
  2740. ** ENTRY - CALL JSNLOAD [NO ARGUMENTS].
  2741. * THIS ENTRY PERFORMS OPTIONAL LOAD OF TRACE TABLE
  2742. * DATA PRODUCED BY PREVIOUS RUN, WHICH ALLOWS *SECART*
  2743. * TO RECOVER ATTRIBUTES OF JOBS RECOVERED ACROSS A
  2744. * LEVEL ZERO DEADSTART WITH A NEW JSN. SINCE IT CLEARS
  2745. * ANY JOB SELECTION MARKS AND CHECKS FOR SELECTIONS
  2746. * BASED ON CURRENT SELECTION DIRECTIVES, IN RERUN MODE
  2747. * THIS ALSO PERMITS NEW UNIT JOB SELECTIONS TO BE MADE
  2748. * WITHOUT REPROCESSING FROM RAW LOGS DATA. THE TRACE
  2749. * TABLE DATA MUST BE ON FILE NUMBER 6.
  2750. *
  2751. * EXIT - NORMAL IF LOADED JSN-S IN ASCENDING ORDER.
  2752. *
  2753. * ERROR - JOB DAYFILE MESSAGE:
  2754. * *** TRACE TABLE SEQUENCE ERROR(S).
  2755. *
  2756. * USES - COMMON /TRC/ FOR TRACE TABLE STRING DATA.
  2757. * COMMON /CTL/ FOR TRACE TABLE NUMERIC DATA.
  2758. *
  2759. * CALLS - *PICKUJN* FOR NEW UJN SELECTIONS.
  2760. * *PICKJSN* FOR NEW JSN SELECTIONS.
  2761. * *PICKUSR* FOR NEW USERNAME SELECTIONS.
  2762. * *PICKTRM* FOR NEW TERMINAL SELECTIONS.
  2763. *
  2764. * NOTES - FILE 6, WHICH IS INITIALLY READ TO OBTAIN OLD TRACE
  2765. * TABLE DATA, WILL SUBSEQUENTLY BE WRITTEN WITH THE
  2766. * NEW DATA PRODUCED IN THE CURRENT *SECART* RUN. THUS
  2767. * IT MUST BE A READ/WRITE FILE AND, IF PREVIOUS DATA
  2768. * IS TO BE PRESERVED, SHOULD BE AN EXPENDABLE COPY.
  2769.  
  2770. L=1
  2771. ERR=.FALSE.
  2772.  
  2773. 60 READ (6,62,END=69) MK(L),JN(L),JS(L),JC(L),TS(L),TE(L)
  2774. . ,ML(1,L),ML(2,L),FN(L),UN(L),TN(L)
  2775. MK(L)=' '
  2776. DSU=JS(L)(1:1)
  2777. IF ((L.GT.1).AND.JS(L).LE.JS(L-1)) ERR=.TRUE.
  2778. CALL PICKUJN(JN(L),MK(L))
  2779. CALL PICKJSN(JS(L),MK(L))
  2780. CALL PICKUSR(FN(L),UN(L),MK(L))
  2781. CALL PICKTRM(TN(L),MK(L))
  2782. NJ=L
  2783. L=L+1
  2784. GOTO 60
  2785.  
  2786. 69 IF (ERR) CALL REMARK(' *** TRACE TABLE SEQUENCE ERROR(S).')
  2787. RETURN
  2788.  
  2789.  
  2790. ** ENTRY - CALL JSNTRAK(JSN,JCL,DTG,N,LOG)
  2791. * *JSN* IS JSN FIELD FROM LOG MESSAGE.
  2792. * *JCL* IS JOB CLASS CODE FROM LOG MESSAGE.
  2793. * *DTG* IS DATE/TIME FOR MESSAGE.
  2794. * *LOG* IS SOURCE LOG INDEX (1=DAYFILE, 2=ACCOUNT).
  2795. *
  2796. * EXIT - *N* WILL BE SET TO INDEX OF JOB IN TRACE TABLE.
  2797. *
  2798. * ERROR - JOB DAYFILE MESSAGES:
  2799. * *** TRACE TABLE FULL ***
  2800. * STOP *** SECART TERMINATED.
  2801. *
  2802. * USES - COMMON /TRC/ FOR TRACE TABLE STRING DATA.
  2803. * COMMON /CTL/ FOR TRACE TABLE NUMERIC DATA.
  2804. *
  2805. * CALLS - *PICKJSN* FOR NEW JSN SELECTION TEST.
  2806. *
  2807. * NOTES - BOTH *JSNTRAK* AND *JSNLOOK* USE SAME BINARY SEARCH
  2808. * CODE TO FIND JSN MATCH AND REMEMBER INDEX OF LAST
  2809. * MATCH TO ALLOW SHORTCUT FOR CONSECUTIVE MESSAGES BY
  2810. * SAME JOB WHICH OCCURS ABOUT 2 OUT OF 3 TIMES.
  2811.  
  2812. ENTRY JSNTRAK(JSN,JCL,DTG,N,LOG)
  2813.  
  2814. LOOK=.FALSE.
  2815. GOTO 100
  2816.  
  2817.  
  2818. ** ENTRY - CALL JSNLOOK(JSN,N)
  2819. * *JSN* IS JSN FIELD FROM LOG MESSAGE.
  2820. *
  2821. * EXIT - *N* WILL BE SET TO TRACE TABLE JOB INDEX.
  2822. *
  2823. * ERROR - NONE.
  2824. *
  2825. * USES - COMMON /TRC/ FOR TRACE TABLE STRING DATA.
  2826. * COMMON /CTL/ FOR TRACE TABLE NUMERIC DATA.
  2827. *
  2828. * CALLS - *PICKJSN* FOR NEW JSN SELECTION TEST.
  2829. *
  2830. * NOTES - BOTH *JSNLOOK* AND *JSNTRAK* USE SAME BINARY SEARCH
  2831. * CODE TO FIND JSN MATCH AND REMEMBER INDEX OF LAST
  2832. * MATCH TO ALLOW SHORTCUT FOR CONSECUTIVE MESSAGES BY
  2833. * SAME JOB WHICH OCCURS ABOUT 2 OUT OF 3 TIMES.
  2834.  
  2835. ENTRY JSNLOOK(JSN,N)
  2836.  
  2837. LOOK=.TRUE.
  2838. GOTO 100
  2839.  
  2840. * SHORTCUT FOR REDUNDANT JSN SAME AS LAST CALL [2/3 TIMES].
  2841.  
  2842. 100 IF (JSN.EQ.JS(LST)) THEN
  2843. N=LST
  2844. GOTO 120
  2845. ENDIF
  2846.  
  2847. * BINARY SEARCH FOR MATCH W/ UNIQUE JSN.
  2848.  
  2849. L=1
  2850. H=NJ
  2851.  
  2852. 105 IF (L.LE.H) THEN
  2853. N=(L+H)/2
  2854. IF (JSN.LT.JS(N)) THEN
  2855. H=N-1
  2856. ELSE IF (JSN.GT.JS(N)) THEN
  2857. L=N+1
  2858. ELSE
  2859. IF (LOOK) RETURN
  2860. GOTO 120
  2861. ENDIF
  2862. GOTO 105
  2863. ENDIF
  2864.  
  2865. IF (LOOK) THEN
  2866. N=0
  2867. RETURN
  2868. ELSE
  2869. N=L
  2870. ENDIF
  2871.  
  2872. * CREATE NEW ROW IN TABLE.
  2873.  
  2874. 110 IF (NJ.GE.MXJ) GOTO 190
  2875. NJ=NJ+1
  2876. IF (N.EQ.NJ) GOTO 113
  2877.  
  2878. * OPEN UP ROW IN TABLE.
  2879.  
  2880. DO 112 L=NJ,N,-1
  2881. MK(L)=MK(L-1)
  2882. JN(L)=JN(L-1)
  2883. JS(L)=JS(L-1)
  2884. JC(L)=JC(L-1)
  2885. TS(L)=TS(L-1)
  2886. TE(L)=TE(L-1)
  2887. ML(1,L)=ML(1,L-1)
  2888. ML(2,L)=ML(2,L-1)
  2889. FN(L)=FN(L-1)
  2890. UN(L)=UN(L-1)
  2891. TN(L)=TN(L-1)
  2892. 112 CONTINUE
  2893.  
  2894. * INITIALIZE NEW TABLE ROW.
  2895.  
  2896. 113 MK(N)=' '
  2897. JN(N)=' '
  2898. JS(N)=JSN
  2899. JC(N)=JCL
  2900. TS(N)=DTG
  2901. ML(1,N)=0
  2902. ML(2,N)=0
  2903. FN(N)=' '
  2904. UN(N)=' '
  2905. TN(N)=' '
  2906. CALL PICKJSN(JSN,MK(N))
  2907.  
  2908. * UPDATE DATE/TIME GROUP AND MESSAGE COUNT/LOG.
  2909.  
  2910. 120 TE(N)=DTG
  2911. ML(LOG,N)=ML(LOG,N)+1
  2912. LST=N
  2913. RETURN
  2914.  
  2915. * JSN TRACE TABLE OVERFLOW.
  2916.  
  2917. 190 CALL REMARK(' *** TRACE TABLE FULL ***')
  2918. STOP ' *** SECART TERMINATED.'
  2919.  
  2920.  
  2921. ** ENTRY - CALL JSNLVL0 [NO ARGUMENTS].
  2922. * MAINTAINS DEADSTART UNIQUE CODE FOR JSN PREFIX.
  2923. *
  2924. * EXIT - DSU IN /TRC/ "INCREMENTED" TO NEXT LETTER UNLESS
  2925. * REDUNDANT CALL.
  2926. *
  2927. * ERROR - NONE.
  2928. *
  2929. * USES - COMMON /TRC/ FOR TRACE TABLE STRING DATA.
  2930. * COMMON /CTL/ FOR TRACE TABLE NUMERIC DATA.
  2931. *
  2932. * CALLS - NONE.
  2933. *
  2934. * NOTES - THIS CODE ALLOWS FOR REDUNDANT CALLS TRIGGERED BY
  2935. * MULTIPLE MESSAGES RELATING TO THE SAME DEADSTART
  2936. * EVENT. CHECKS FOR AT LEAST 2 JSN-S WITH SAME PREFIX.
  2937.  
  2938. ENTRY JSNLVL0
  2939.  
  2940. * ALLOW FOR MULTIPLE DFL & ACL MSGS ON DEADSTART.
  2941.  
  2942. IF (NJ.LE.2) RETURN
  2943. IF (JS(NJ-2)(1:1).NE.DSU) RETURN
  2944. DSU=CHAR(ICHAR(DSU)+1)
  2945. WRITE (8,11) DSU
  2946. 11 FORMAT(/'0 ========= L E V E L 0 D / S ( ',A1,
  2947. . ' ) =========')
  2948. RETURN
  2949.  
  2950.  
  2951. ** ENTRY - CALL JSNLIST(LFN)
  2952. * *LFN* CONTAINS LFN OF FILE TO WRITE UNSORTED TRACE
  2953. * TABLE DATA.
  2954. *
  2955. * EXIT - FILE 8 WILL CONTAIN TRACE TABLE PRINTOUT, OPTIONALLY
  2956. * SORTED PER DIRECTIVE.
  2957. *
  2958. * ERROR - NONE.
  2959. *
  2960. * USES - COMMON /TRC/ FOR TRACE TABLE STRING DATA.
  2961. * COMMON /CTL/ FOR TRACE TABLE NUMERIC DATA.
  2962. * COMMON /SYS/ FOR PRINTOUT HEADER TEXT.
  2963. * COMMON /ACL/ FOR ACCOUNT LOG IDENTIFICATION.
  2964. * COMMON /DFL/ FOR DAYFILE LOG IDENTIFICATION.
  2965. * COMMON /SRT/ FOR TRACE TABLE SORT KEYS.
  2966. *
  2967. * CALLS - *SM5SORT* ET AL FOR SORT PROCESSING.
  2968. *
  2969. * NOTES - THIS ROUTINE WRITES TRACE TABLE DATA ONTO FILE 6,
  2970. * CALLS SORT/MERGE TO SORT ONTO *TAPE9*, READS DATA
  2971. * FROM *TAPE9* AND PRINTS TO FILE 8 WITH HEADER TEXT,
  2972. * PAGINATION, AND SUMMARY DATA. IF NO SORT KEYS ARE
  2973. * SPECIFIED, THE SORT IS BYPASSED AND FILE 6 IS USED
  2974. * AS INPUT FOR THE PRINTOUT.
  2975.  
  2976. ENTRY JSNLIST(LFN)
  2977.  
  2978. IF (NJ.LE.1) RETURN
  2979.  
  2980. * OUTPUT JSN TRACE TABLE FILE & COUNT SELECTIONS.
  2981.  
  2982. NS=0
  2983. DO 605 I=1,NJ
  2984. WRITE (6,62) MK(I),JN(I),JS(I),JC(I),TS(I),TE(I)
  2985. . ,ML(1,I),ML(2,I),FN(I),UN(I),TN(I)
  2986. 62 FORMAT(1X,A5,1X,A7,1X,A6,1X,A1,2A20,2I5,3A8)
  2987. IF (MK(I).NE.' ') NS=NS+1
  2988. 605 CONTINUE
  2989. LF=6
  2990.  
  2991. * SORT JSN TRACE TABLE FILE, IF DIRECTED.
  2992.  
  2993. IF (SKY(1).EQ.' ') GOTO 900
  2994. CALL SM5SORT(0)
  2995. CALL SM5ENR(NJ)
  2996. CALL SM5FROM(LFN)
  2997. CALL SM5TO('TAPE9')
  2998. DO 850 I=1,12
  2999.  
  3000. * PICKS 2, 5 NOT SORT KEY.
  3001.  
  3002. IF (SKY(I).EQ.'UJN') CALL SM5KEY( 8, 7,'DISPLAY','A')
  3003. IF (SKY(I).EQ.'JSN') CALL SM5KEY(16, 6,'DISPLAY','A')
  3004. IF (SKY(I).EQ.'JC' ) CALL SM5KEY(23, 1,'DISPLAY','A')
  3005. IF (SKY(I).EQ.'SDT') CALL SM5KEY(24,20,'DISPLAY','A')
  3006. IF (SKY(I).EQ.'EDT') CALL SM5KEY(44,20,'DISPLAY','A')
  3007.  
  3008. * MSG COUNTS 64,10 NOT SORT KEYS.
  3009.  
  3010. IF (SKY(I).EQ.'FM' ) CALL SM5KEY(74, 7,'DISPLAY','A')
  3011. IF (SKY(I).EQ.'UN' ) CALL SM5KEY(82, 7,'DISPLAY','A')
  3012. IF (SKY(I).EQ.'TRM') CALL SM5KEY(90, 7,'DISPLAY','A')
  3013. 850 CONTINUE
  3014. CALL SM5END
  3015. LF=9
  3016.  
  3017. * PRINTOUT (SORTED) JSN TRACE TABLE.
  3018.  
  3019. 900 REWIND LF
  3020. HDR='J S N T R A C E T A B L E'
  3021.  
  3022. 910 IPAGE=IPAGE+1
  3023. WRITE (8,1) HDR,PGM,RUNDT,RUNTM,IPAGE
  3024. 1 FORMAT('1',A40,3A10,' PG',I3)
  3025. L=59
  3026. IF (DFSYSID.NE.' ') THEN
  3027. WRITE (8,91) DFSYSID
  3028. L=L-1
  3029. ELSE IF (ACSYSID.NE.' ') THEN
  3030. WRITE (8,91) ACSYSID
  3031. L=L-1
  3032. ENDIF
  3033.  
  3034. IF (DFSDTG.NE.' ') THEN
  3035. WRITE (8,92) 'DAYFILE',DFSDTG,DFEDTG
  3036. L=L-1
  3037. ENDIF
  3038.  
  3039. IF (ACSDTG.NE.' ') THEN
  3040. WRITE (8,92) 'ACCOUNT',ACSDTG,ACEDTG
  3041. L=L-1
  3042. ENDIF
  3043.  
  3044. IF (SKY(1).NE.' ') THEN
  3045. WRITE (8,93) SKY
  3046. L=L-1
  3047. ENDIF
  3048.  
  3049. WRITE (8,94)
  3050. 91 FORMAT(' SYSTEM ID: ',A60)
  3051. 92 FORMAT(' ',A7, ' LOG ',A20,' THRU ',A20)
  3052. 93 FORMAT(' SORT KEYS=',12A4)
  3053. 94 FORMAT(' PICKS UJN---- --JSN-JC '
  3054. . ,'SDT--------------- EDT---------------- DFL ACL '
  3055. . ,'FM----- UN[/UI] TRM----')
  3056.  
  3057. * COPY (SORTED) FILE TO PRINTOUT & COUNT FOR PAGINATION.
  3058.  
  3059. 920 READ (LF,95,END=930) TXT
  3060. WRITE (8,95) TXT
  3061. 95 FORMAT(A100)
  3062. L=L-1
  3063. IF (L.GT.0) GOTO 920
  3064. GOTO 910
  3065.  
  3066. * FOOTNOTE AND SUMMARY TO FINISH PRINTOUT.
  3067.  
  3068. 930 WRITE (8,97) NJ,NS
  3069. 97 FORMAT(/' PICKS: N=UJN, J=JSN, U=USER, T=TERMINAL.'
  3070. . /I5,' TRACE TABLE ENTRIES'/I5,' SELECTED JSN-S')
  3071. RETURN
  3072. END
  3073.  
  3074. * ---------------------------------------------------------------------
  3075. SUBROUTINE AMSLOAD
  3076. ** AMSLOAD - ACCOUNT LOG MESSAGE ID MANAGER.
  3077. *
  3078. * THIS PROGRAM UNIT HANDLES ALL ASPECTS OF ACCOUNT LOG MSG ID
  3079. * PROCESSING INCLUDING: TABLE INITIALIZATION VIA REFERENCE FILE,
  3080. * MARKING AND SELECTION FOR PRINTOUT, AND COLLECTION AND
  3081. * PRINTOUT OF USAGE STATISTICS. MULTIPLE ENTRY POINTS ARE
  3082. * PROVIDED FOR THESE FUNCTIONS.
  3083.  
  3084. IMPLICIT INTEGER(A-Z)
  3085.  
  3086. PARAMETER (MXI=200)
  3087. * MAX NUMBER OF MSG ID-S.
  3088.  
  3089. CHARACTER*15 CL(MXI)
  3090. * JOB CLASS USAGE STRING FOR PRINTOUT.
  3091.  
  3092. LOGICAL ERR
  3093. * FLAG FOR MSG ID SEQUENCE ERROR(S).
  3094.  
  3095. CHARACTER*1 FLAG
  3096. * ARG - CHARACTER TO FLAG MSG ID FOR PRINT.
  3097.  
  3098. INTEGER H
  3099. * TEMP - HIGH POINTER IN BINARY SEARCH.
  3100.  
  3101. CHARACTER*40 HDR
  3102. * /SYS/ PRINTOUT HEADER TEXT.
  3103.  
  3104. LOGICAL HIT
  3105. * ARG - FLAG RETURNED FOR MSG PRINTOUT.
  3106.  
  3107. INTEGER HITS
  3108. * COUNT OF MSGS SELECTED FOR PRINTOUT.
  3109.  
  3110. CHARACTER*4 ID(MXI)
  3111. * ACCOUNT MESSAGE IDENTIFIERS.
  3112.  
  3113. INTEGER IPAGE
  3114. * LOCAL PAGINATION COUNTER.
  3115.  
  3116. CHARACTER*1 JCL
  3117. * ARG - JOB CLASS CODE.
  3118.  
  3119. CHARACTER*20 JCLASS
  3120. * CONSTANT - STRING OF JOB CLASS CODES.
  3121.  
  3122. INTEGER L
  3123. * TEMP - LOW POINTER IN BINARY SEARCH.
  3124.  
  3125. INTEGER MC(MXI)
  3126. * OCCURRENCE COUNTERS FOR MSG ID-S.
  3127.  
  3128. CHARACTER*4 MID
  3129. * ARG - MESSAGE IDENTIFIER.
  3130.  
  3131. CHARACTER*1 MK(MXI)
  3132. * MSG ID SELECTION MARKS.
  3133.  
  3134. INTEGER MODE
  3135. * LOAD/MARK/TEST MODE SWITCH.
  3136.  
  3137. INTEGER N
  3138. * TEMP - INDEX VARIABLE.
  3139.  
  3140. INTEGER NI
  3141. * NUMBER OF MSG ID-S STORED IN TABLE.
  3142.  
  3143. CHARACTER*10 PGM
  3144. * /SYS/ *SECART* VERSION ID FOR PRINTOUTS.
  3145.  
  3146. INTEGER PICKED
  3147. * COUNT OF MSG ID-S PICKED FOR PRINTOUT.
  3148.  
  3149. CHARACTER*10 RUNDT
  3150. * /SYS/ *SECART* RUN DATE FOR PRINTOUTS.
  3151.  
  3152. CHARACTER*10 RUNTM
  3153. * /SYS/ *SECART* RUN TIME FOR PRINTOUTS.
  3154.  
  3155. INTEGER TOTAL
  3156. * COUNT OF ALL ACCOUNT MSG ID-S.
  3157.  
  3158. CHARACTER*40 TX(MXI)
  3159. * DESCRIPTIONS FOR ACCOUNT MSG ID-S.
  3160.  
  3161.  
  3162. * GLOBAL STRING VARIABLES.
  3163.  
  3164. COMMON /SYS/ HDR
  3165. COMMON /SYS/ PGM
  3166. COMMON /SYS/ RUNDT
  3167. COMMON /SYS/ RUNTM
  3168.  
  3169. DATA JCLASS /'ABCDMNRSTX0123 '/
  3170.  
  3171.  
  3172. ** ENTRY - CALL AMSLOAD [NO ARGUMENTS].
  3173. * LOADS MSG ID TABLE FROM FILE 5 AND CHECKS FOR
  3174. * SEQUENCE ERRORS. NON-BLANK MARK FIELDS MAY BE USED
  3175. * FOR DEFAULT SELECTION OF MSG ID-S.
  3176. *
  3177. * EXIT - PRINTOUT (FILE 8) MESSAGE:
  3178. * NNN ACCOUNT MSG ID-S LOADED.
  3179. *
  3180. * ERROR - JOB DAYFILE MESSAGE:
  3181. * *** MSGID SEQUENCE ERROR(S).
  3182. *
  3183. * CALLS - NONE.
  3184.  
  3185. NI=0
  3186. ERR=.FALSE.
  3187. 50 READ (5,51,END=59) ID(NI+1),MK(NI+1),TX(NI+1)
  3188. 51 FORMAT(1X,A4,A1,A40)
  3189. NI=NI+1
  3190. MC(NI)=0
  3191. CL(NI)='...............'
  3192. IF (NI.LT.2) GOTO 50
  3193. IF (ID(NI).LE.ID(NI-1)) ERR=.TRUE.
  3194. IF (NI.LT.MXI) GOTO 50
  3195. GOTO 190
  3196.  
  3197. 59 IF (ERR) CALL REMARK(' *** MSGID SEQUENCE ERROR(S).')
  3198. WRITE (8,*) NI,' ACCOUNT MSG ID-S LOADED.'
  3199. RETURN
  3200.  
  3201.  
  3202. ** ENTRY - CALL AMSMARK(MID,FLAG)
  3203. * *MID* CONTAINS MSG ID TO BE MARKED FOR PRINTOUT.
  3204. * WILL ADD TO TABLE IF NOT FOUND.
  3205. * *FLAG* CONTAINS SINGLE FLAG CHARACTER:
  3206. * NON-BLANK TRIGGERS PRINTOUT ON OCCURRENCE.
  3207. * BLANK SUPPRESSES PRINTOUT (OVERRIDE DEFAULT).
  3208. *
  3209. * EXIT - NO CHANGE TO INPUT ARGUMENTS.
  3210. *
  3211. * ERROR - JOB DAYFILE MESSAGE:
  3212. * *** MSGID TABLE FULL ***
  3213. * STOP *** SECART TERMINATED.
  3214. *
  3215. * CALLS - NONE.
  3216.  
  3217. ENTRY AMSMARK(MID,FLAG)
  3218. MODE=2
  3219. GOTO 100
  3220.  
  3221.  
  3222. ** ENTRY - CALL AMSTEST(MID,JCL,HIT)
  3223. * *MID* CONTAINS MSG ID TO TEST FOR SELECTION AND
  3224. * RECORD USAGE STATISTICS. UNKNOWN ID-S WILL BE
  3225. * AUTOMATICALLY ADDED TO TABLE W/O DEFINITION.
  3226. * *JCL* CONTAINS 1-CHAR JOB CLASS OF SUBJECT JOB.
  3227. * *HIT* LOGICAL FLAG SET TO INDICATE SELECTION.
  3228. *
  3229. * EXIT - *HIT* .TRUE. IF MSG ID MARK FIELD IS NON-BLANK.
  3230. * *HIT* .FALSE. IF MSG ID MARK FIELD IS BLANK.
  3231. *
  3232. * ERROR - JOB DAYFILE MESSAGE:
  3233. * *** MSGID TABLE FULL ***
  3234. * STOP *** SECART TERMINATED.
  3235. *
  3236. * CALLS - NONE.
  3237.  
  3238. ENTRY AMSTEST(MID,JCL,HIT)
  3239. MODE=3
  3240.  
  3241. * SAFETY CHECK FOR EMPTY TABLE.
  3242.  
  3243. 100 IF (NI.EQ.0) THEN
  3244. N=NI+1
  3245. GOTO 130
  3246. ENDIF
  3247.  
  3248. * BINARY SEARCH FOR MATCH/INSERT POINT.
  3249.  
  3250. L=1
  3251. H=NI
  3252. 110 N=(L+H)/2
  3253. IF (MID.GT.ID(N)) THEN
  3254. L=N+1
  3255. ELSE IF (MID.LT.ID(N)) THEN
  3256. H=N-1
  3257. ELSE
  3258. GOTO 140
  3259. ENDIF
  3260.  
  3261. IF (L.LE.H) GOTO 110
  3262. N=L
  3263.  
  3264. * INSERT ID IN ALPHABETIC SEQUENCE.
  3265.  
  3266. IF (NI.GE.MXI) GOTO 190
  3267. NI=NI+1
  3268. IF (N.EQ.NI) GOTO 130
  3269.  
  3270. * OPEN UP ROW IN TABLE.
  3271.  
  3272. DO 125 L=NI,N,-1
  3273. ID(L)=ID(L-1)
  3274. CL(L)=CL(L-1)
  3275. MC(L)=MC(L-1)
  3276. MK(L)=MK(L-1)
  3277. TX(L)=TX(L-1)
  3278. 125 CONTINUE
  3279. GOTO 135
  3280.  
  3281. * ADD NEW ID ONTO BOTTOM.
  3282.  
  3283. 130 IF (NI.GE.MXI) GOTO 190
  3284. NI=N
  3285.  
  3286. * CREATE NEW ENTRY.
  3287.  
  3288. 135 ID(N)=MID
  3289. CL(N)='...............'
  3290. MC(N)=0
  3291. MK(N)=' '
  3292. TX(N)=' '
  3293.  
  3294. * MARK MSG ID FOR PRINTOUT.
  3295.  
  3296. 140 IF (MODE.EQ.2) THEN
  3297. MK(N)=FLAG
  3298.  
  3299. * COUNT, RECORD JCL DIST, & TEST FOR FLAGGED MID.
  3300.  
  3301. ELSE
  3302. MC(N)=MC(N)+1
  3303. L=INDEX(JCLASS,JCL)
  3304. IF (L.GT.0) CL(N)(L:L)=JCL
  3305. IF (L.EQ.0) CL(N)(15:15)='?'
  3306. IF (MK(N).NE.' ') HIT=.TRUE.
  3307. ENDIF
  3308. RETURN
  3309.  
  3310. * ERROR EXIT.
  3311.  
  3312. 190 CALL REMARK(' *** MSGID TABLE FULL ***')
  3313. STOP ' *** SECART TERMINATED.'
  3314.  
  3315.  
  3316. ** ENTRY - CALL AMSLIST [NO ARGUMENTS].
  3317. * PRODUCES LISTING CONTAINING ALL PRE-DEFINED AND
  3318. * ENCOUNTERED ACCOUNT LOG MESSAGE ID-S WITH COUNT OF
  3319. * OCCURRENCES, USAGE BY JOB CLASS, PRINTOUT SELECTION
  3320. * FLAGS, AND DESCRIPTIONS. BLANK DESCRIPTION FIELD
  3321. * TYPICALLY INDICATES NO MATCHING ID IN REFERENCE FILE.
  3322. *
  3323. * EXIT - NORMAL RETURN ONLY.
  3324. *
  3325. * ERROR - NONE.
  3326. *
  3327. * USES - COMMON /SYS/ FOR PRINTOUT HEADER TEXT.
  3328. *
  3329. * CALLS - NONE.
  3330.  
  3331. ENTRY AMSLIST
  3332. IPAGE=0
  3333. TOTAL=0
  3334. PICKED=0
  3335. HITS=0
  3336. N=0
  3337.  
  3338. 150 IPAGE=IPAGE+1
  3339. HDR='A C C O U N T M E S S A G E I D - S'
  3340. WRITE (8,1) HDR,PGM,RUNDT,RUNTM,IPAGE
  3341. 1 FORMAT('1',A40,3A10,' PG',I3)
  3342. WRITE (8,15)
  3343. 15 FORMAT(' MSID COUNT JOB CLASSES S DESCRIPTION'
  3344. . /' ==== ====== =============== = =======================')
  3345. L=58
  3346. 160 N=N+1
  3347. IF (N.GT.NI) GOTO 170
  3348. WRITE (8,16) ID(N),MC(N),CL(N),MK(N),TX(N)
  3349. 16 FORMAT(1X,A4,I7,1X,A15,1X,A1,1X,A40)
  3350. TOTAL=TOTAL+MC(N)
  3351. IF (MK(N).NE.' ') THEN
  3352. PICKED=PICKED+1
  3353. HITS=HITS+MC(N)
  3354. ENDIF
  3355. L=L-1
  3356. IF (L)150,150,160
  3357.  
  3358. 170 WRITE (8,17) TOTAL,NI,HITS,PICKED
  3359. 17 FORMAT(' =========='
  3360. . /I12,' MESSAGES ',I3,' TYPES TOTAL'
  3361. . /I12,' FOUND OF ',I3,' TYPES SELECTED')
  3362. RETURN
  3363. END
  3364.  
  3365. * ---------------------------------------------------------------------
  3366. SUBROUTINE PARSE(TXT,IT,WORD)
  3367. ** PARSE - SIMPLE TEXT STRING PARSER.
  3368. *
  3369. * *PARSE* SCANS STRING *TXT*, STARTING AT POSITION *IT*,
  3370. * EXTRACTING NON-BLANKS TO BUILD *WORD*, STOPS AT DELIMITER,
  3371. * AND SETS *IT* JUST PAST DELIMITER FOR NEXT TIME.
  3372. *
  3373. * ENTRY - CALL PARSE(TXT,IT,WORD)
  3374. * *TXT* CONTAINS TEXT STRING TO BE SCANNED.
  3375. * *IT* SPECIFIES STARTING POSITION (1-XX) IN *TXT*
  3376. *
  3377. * EXIT - *IT* WILL BE SET TO POSITION AFTER DELIMITER.
  3378. * *WORD* WILL BE CONTAIN WORD FOUND OR BLANKS.
  3379. *
  3380. * ERROR - NONE.
  3381. *
  3382. * COMMON - NONE.
  3383. *
  3384. * CALLS - NONE.
  3385. *
  3386. * NOTES - *PARSE* PRECHECKS LENGTH OF *TXT* STRING AND CHECKS
  3387. * FOR *IT* PAST EOL. RECOGNIZED DELIMITERS INCLUDE
  3388. * BOTH SEPARATORS AND TERMINATORS. THE FTN5 *INDEX*
  3389. * FUNCTION IS USED FOR FAST DELIMITER MATCHING.
  3390.  
  3391. IMPLICIT INTEGER(A-Z)
  3392.  
  3393. CHARACTER*25 DELIM
  3394. * CONSTANT - RECOGNIZED DELIMITERS.
  3395.  
  3396. INTEGER IT
  3397. * ARGUMENT - START/FINISH STRING POSITION.
  3398.  
  3399. CHARACTER*(*) TXT
  3400. * ARGUMENT - TEXT STRING TO SCAN.
  3401.  
  3402. CHARACTER*(*) WORD
  3403. * ARGUMENT - RETURNED TEXT STRING.
  3404.  
  3405. DATA DELIM /'$/.)(,=+-#[]%"_!&''?<>@\^;'/
  3406.  
  3407. * SIMPLE TEXT PARSER ROUTINE.
  3408.  
  3409. L=LEN(TXT)
  3410. M=LEN(WORD)
  3411. WORD=' '
  3412. J=0
  3413.  
  3414. * PRE-CHECK FOR EOL.
  3415.  
  3416. IF (IT.GT.L) RETURN
  3417.  
  3418. * WATCH FOR DELIMITER.
  3419.  
  3420. 100 IF (INDEX(DELIM,TXT(IT:IT)).EQ.0) THEN
  3421.  
  3422. * EXTRACT NON-BLANKS AND CATENATE INTO *WORD*.
  3423.  
  3424. IF (TXT(IT:IT).NE.' '.AND.J.LT.M) THEN
  3425. J=J+1
  3426. WORD(J:J)=TXT(IT:IT)
  3427. ENDIF
  3428.  
  3429. * ADVANCE AND CHECK FOR EOL.
  3430.  
  3431. IT=IT+1
  3432. IF (IT.LE.L) GOTO 100
  3433. RETURN
  3434. ELSE
  3435.  
  3436. * FOUND DELIMITER.
  3437.  
  3438. IT=IT+1
  3439. RETURN
  3440. ENDIF
  3441. END
cdc/nos2.source/opl871/secart.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator