User Tools

Site Tools


cdc:nos2.source:opl871:ssval

Table of Contents

SSVAL

Table Of Contents

  • [00001] PRGM SSVAL
  • [00003] SSVAL - SFM VALIDATE PROGRAM.
  • [00524] PROC ABORT
  • [00525] PROC GETPFP
  • [00526] PROC GETSPS
  • [00527] PROC MEMORY
  • [00528] PROC RESTPFP
  • [00530] PROC RPCLOSE
  • [00531] PROC VLERROR
  • [00532] PROC VLFIX
  • [00533] PROC VLMSG
  • [00534] PROC VLPRSET
  • [00535] PROC VLREQEX
  • [00536] PROC VLSUBFM
  • [00676] PROC VLAMSF
  • [00677] VLASFM - ANALYZE THE SFM CATALOG.
  • [00683] VLASFM - ANALYZE THE SFM CATALOG.
  • [00712] PROC VLCFS
  • [00713] PROC VLSMSC
  • [00714] PROC VLNCS
  • [00805] PROC VLAPFC(GROUP)
  • [00806] VLAPFC - ANALYZE THE *PFC* CATALOG.
  • [00812] VLAPFC - ANALYZE THE *PFC* CATALOG DATA.
  • [00850] PROC MESSAGE
  • [00851] PROC VLWFIX
  • [00852] PROC READ
  • [00853] PROC READW
  • [00854] PROC REWIND
  • [00855] PROC VLAPFC2
  • [00856] PROC VLERROR
  • [00857] PROC VLWPROB
  • [00858] FUNC XCOD C(10)
  • [00859] PROC ZSETFET
  • [01127] PROC VLAPFC2(CNT,GROUP)
  • [01128] VLAPFC2 - ANALYZE *PFC* PASS 2.
  • [01134] VLAPFC2 - ANALYZE THE *PFC* PASS 2.
  • [01162] PROC READ
  • [01163] PROC READW
  • [01164] PROC REWIND
  • [01165] PROC VLWPROB
  • [01262] PROC VLBFILL(FLD,NWDS)
  • [01263] VLBFILL - BLANK FILL.
  • [01268] VLBFILL - BLANK FILL.
  • [01320] PROC VLBICT(E1,E2)
  • [01321] VLBICT - INTERSECTING CHAIN REPORT.
  • [01330] VLBICT - INTERSECTING CHAIN REPORT.
  • [01365] PROC RPLINE
  • [01367] PROC VLERROR
  • [01368] FUNC VLNTC C(10)
  • [01370] PROC VLSUBHD
  • [01438] PROC VLBLDVT(GROUP)
  • [01440] VLBLDVT - BUILD VALIDATION TABLE.
  • [01445] VLBLDVT - BUILD THE VALIDATION TABLE.
  • [01496] PROC CGETFCT
  • [01497] PROC VLCMAP
  • [01498] PROC VLERROR
  • [01756] PROC VLCFS
  • [01757] VLCFS - CHAIN FRAGMENT SCAN.
  • [01763] VLCFS - CHAIN FRAGMENT SCAN.
  • [01815] PROC VLBICT
  • [02045] PROC VLCMAP(CMERR)
  • [02046] VLCMAP - *SM* MAP LOOKUP.
  • [02052] VLCMAP - SMMAP LOOKUP.
  • [02093] PROC MGETENT
  • [02095] PROC VLERROR
  • [02096] PROC VLWPROB
  • [02097] PROC ZFILL
  • [02209] PROC VLSMSC
  • [02210] VLSMSC - *SM* MAP SCAN.
  • [02216] VLSMSC - SMMAP SCAN.
  • [02242] PROC MGETENT
  • [02244] PROC VLERROR
  • [02245] PROC VLWPROB
  • [02313] PROC VLERROR1)
  • [02314] VLERROR - ISSUE ERROR MESSAGE.
  • [02320] VLERROR - ISSUE ERROR MESSAGE.
  • [02360] PROC MESSAGE
  • [02361] PROC RESTPFP
  • [02363] PROC RPCLOSE
  • [02364] PROC RPLINE
  • [02366] PROC VLMSG
  • [02367] FUNC VLNTC C(10)
  • [02369] PROC VLPFILL
  • [02531] PROC VLFIX
  • [02532] VLFIX - FIX CATALOGS.
  • [02538] VLFIX - FIX CATALOGS.
  • [02605] PROC READ
  • [02606] PROC READW
  • [02607] PROC RETERN
  • [02608] PROC REWIND
  • [02609] PROC RPEJECT
  • [02610] PROC VLFIXP
  • [02611] PROC VLERROR
  • [02612] PROC VLLPDT
  • [02613] PROC VLMSG
  • [02614] FUNC VLNTC C(10)
  • [02616] PROC VLREQEX
  • [02617] PROC WRITEW
  • [02618] PROC WRITEF
  • [02972] PROC VLFIXP(ACTION)
  • [02973] VLFIXP - ATTACHES PERMANENT FILE AND RESETS THE ASA.
  • [02978] VLFIXP - RESETS THE *ASA*.
  • [03001] PROC BZFILL
  • [03002] PROC MESSAGE
  • [03003] PROC SETAF
  • [03004] PROC RECALL
  • [03005] PROC RETERN
  • [03006] PROC SETASA
  • [03007] PROC UATTACH
  • [03008] PROC UGET
  • [03140] PROC VLLPDT(SUBPAR,SMPAR,LPDT)
  • [03141] VLLPDT - GET LAST PURGE DATE AND TIME.
  • [03147] VLLPDT - GET LAST PURGE DATE AND TIME.
  • [03171] PROC VLREQEX
  • [03213] PROC VLMSG(MNUM)
  • [03214] VLMSG - ISSUE INFORMATIONAL MESSAGE.
  • [03219] VLMSG - ISSUE INFORMATIONAL MESSAGE.
  • [03249] PROC MESSAGE
  • [03250] PROC RPLINE
  • [03252] PROC VLPFILL
  • [03365] PROC VLNCS
  • [03366] VLNCS - NORMAL CHAIN SCAN.
  • [03372] VLNCS - NORMAL CHAIN SCAN.
  • [03424] PROC VLBICT
  • [03645] FUNC VLNTC2) C(10)
  • [03646] VLNTC - NUMERIC TO CHARACTER CONVERSION.
  • [03651] VLNTC - NUMERIC TO CHARACTER CONVERSION.
  • [03684] PROC VLBFILL
  • [03685] FUNC XCDD
  • [03687] FUNC XCOD
  • [03734] PROC VLPFC
  • [03736] VLPFC - READ PFC.
  • [03741] VLPFC - READ THE *PFC*.
  • [03774] PROC LOFPROC
  • [03775] PROC RDPFC
  • [03776] PROC REWIND
  • [03777] PROC RPLINE
  • [03779] PROC VLERROR
  • [03780] PROC VLMSG
  • [03781] FUNC VLNTC C(10)
  • [03783] PROC WRITEF
  • [03784] PROC WRITEW
  • [03785] PROC ZSETFET
  • [04017] PROC VLPFILL(FLD,(PARAM))
  • [04018] VLPFILL - FILL PARAMETER IN MESSAGE TEXT.
  • [04023] VLPFILL - FILL PARAMETER INTO MESSAGE TEXT.
  • [04094] PROC VLPRSET
  • [04095] VLPRSET - PRESET PARAMETERS AND FILES.
  • [04100] VLPRSET - PRESET PARAMETERS AND FILES.
  • [04143] PROC BZFILL
  • [04144] PROC GETFAM
  • [04145] PROC LOFPROC
  • [04146] PROC PFD
  • [04147] PROC SETPFP
  • [04148] PROC RETERN
  • [04149] PROC REWIND
  • [04150] PROC RPLINE
  • [04152] PROC RPOPEN
  • [04153] PROC VLBFILL
  • [04154] PROC VLERROR
  • [04155] FUNC VLNTC C(10)
  • [04157] PROC VLPFC
  • [04158] PROC VLRDF
  • [04159] PROC VLTAB
  • [04160] PROC VLTITLE
  • [04161] PROC XARG
  • [04162] FUNC XDXB
  • [04163] PROC ZSETFET
  • [04598] PROC VLRCL(COUNT)
  • [04599] VLRCL - RECALL.
  • [04604] VLRCL - RECALL.
  • [04623] PROC RECALL
  • [04648] PROC VLRDF
  • [04650] VLRDF - READ RDF FILE.
  • [04655] VLRDF - READ THE *RDF* FILE.
  • [04740] FUNC EDATE C(10)
  • [04741] FUNC ETIME C(10)
  • [04742] PROC LOFPROC
  • [04743] PROC READ
  • [04744] PROC READO
  • [04745] PROC READW
  • [04746] PROC REWIND
  • [04747] PROC RPLINE
  • [04749] PROC WRITEF
  • [04750] PROC VLERROR
  • [04751] PROC VLMSG
  • [04752] FUNC VLNTC C(10)
  • [04754] PROC VLRDF2
  • [04755] PROC WRITEW
  • [04756] PROC ZSETFET
  • [04957] PROC VLRDF2(BFLG,EFLG,L)
  • [04959] VLRDF2 - PROCESS RDF FILE RECORDS.
  • [04964] VLRDF2 - PROCESS THE *RDF* FILE RECORDS.
  • [05014] FUNC EDATE C(10)
  • [05015] FUNC ETIME C(10)
  • [05016] PROC REWIND
  • [05017] PROC RPLINE
  • [05019] PROC VLERROR
  • [05020] PROC VLMSG
  • [05021] FUNC VLNTC C(10)
  • [05023] PROC WRITEF
  • [05024] PROC WRITEW
  • [05214] PROC VLREQEX(RTYP,RFUNC)
  • [05215] VLREQEX - REQUEST TO EXEC.
  • [05221] VLREQEX - SEND REQUEST TO THE M860 EXEC SUBSYSTEM.
  • [05267] PROC CALLSS
  • [05269] PROC VLERROR
  • [05270] PROC VLMSG
  • [05271] PROC VLRCL
  • [05272] PROC ZFILL
  • [05460] PROC VLRPT(GROUP)
  • [05461] VLRPT - VALIDATION REPORT.
  • [05467] VLRPT - VALIDATION REPORT.
  • [05522] FUNC EDATE C(10)
  • [05523] FUNC ETIME C(10)
  • [05524] PROC READ
  • [05525] PROC READW
  • [05526] PROC REWIND
  • [05527] PROC RPEJECT
  • [05528] PROC VLRPTL
  • [05529] PROC VLSUBHD
  • [05530] FUNC VLNTC C(10)
  • [05532] PROC VLSCH
  • [05533] PROC VLWFIX
  • [05901] PROC VLRPTL(P1,P2,P3,P4,P5)
  • [05903] VLRPTL - ISSUE REPORT LINE.
  • [05908] VLRPTL - ISSUE REPORT LINE.
  • [05951] PROC RPLINE
  • [05953] PROC VLSUBHD
  • [05991] PROC VLSCH(LISTOPT,GROUP)
  • [05992] VLSCH - SCAN CHAIN FOR REPORT.
  • [06005] PROC RPLINE
  • [06007] PROC VLERROR
  • [06008] FUNC VLNTC C(10)
  • [06194] PROC VLSUBFM
  • [06196] VLSUBFM - SUBFAMILY VALIDATION.
  • [06201] VLSUBFM - SUBFAMILY VALIDATION.
  • [06269] PROC SSINIT
  • [06270] PROC CINTLK
  • [06271] PROC COPEN
  • [06272] PROC CCLOSE
  • [06273] PROC CRDAST
  • [06274] PROC LOFPROC
  • [06275] PROC MCLOSE
  • [06277] PROC MOPEN
  • [06279] PROC MEMORY
  • [06280] PROC PFD
  • [06281] PROC REWIND
  • [06282] PROC RPEJECT
  • [06283] PROC SETPFP
  • [06284] PROC VLAMSF
  • [06285] PROC VLAPFC
  • [06286] PROC VLBLDVT
  • [06287] PROC VLERROR
  • [06288] PROC VLMSG
  • [06289] PROC VLSMSC
  • [06290] PROC VLRCL
  • [06291] PROC VLREQEX
  • [06292] PROC VLRPT
  • [06293] PROC VLSUBHD
  • [06294] PROC WRITEF
  • [06295] PROC ZFILL
  • [06610] PROC VLSUBHD(RTYP)
  • [06611] VLSUBHD - ISSUE REPORT SUBHEADING.
  • [06616] VLSUBHD - ISSUE SUBCATALOG HEADING.
  • [06642] PROC RPLINE
  • [06644] PROC VLBFILL
  • [06645] PROC VLSUBTD
  • [06777] PROC VLSUBTD
  • [06778] VLSUBTD - GET SUB-HEADING TIME AND DATE.
  • [06783] VLSUBTD - GET SUBCATALOG HEADING TIME AND DATE.
  • [06817] PROC CGETPD
  • [06818] FUNC EDATE C(10)
  • [06819] FUNC ETIME C(10)
  • [06820] PROC VLLPDT
  • [06877] PROC VLTITLE
  • [06878] VLTITLE - ISSUE REPORT TITLE.
  • [06883] VLTITLE - ISSUE REPORT TITLES.
  • [06899] PROC RPLINEX
  • [06900] PROC VLBFILL
  • [06901] PROC VLSUBHD
  • [06955] PROC VLWFIX(TYP)
  • [06956] VLWFIX - WRITE FIX FILE RECORD.
  • [06962] VLWFIX - WRITE A FIXIT FILE RECORD.
  • [06993] PROC WRITEW
  • [07044] PROC VLWPROB(TYP)
  • [07045] VLWPROB - WRITE PROBLEM FILE RECORD.
  • [07051] VLWPROB - WRITE THE PROBLEM FILE RECORD.
  • [07083] PROC VLERROR
  • [07084] PROC WRITEW

Source Code

SSVAL.txt
  1. PRGM SSVAL;
  2.  
  3. # TITLE SSVAL - SFM VALIDATE PROGRAM. #
  4.  
  5. BEGIN # SSVAL #
  6.  
  7. #
  8. ***** SSVAL - M860 CATALOG VALIDATION UTILITY.
  9. *
  10. * THE FUNCTION OF *SSVAL* IS TO EXAMINE THE SFM CATALOG AND
  11. * THE PERMANENT FILE CATALOG FOR THE SPECIFIED FAMILY, OPTIONALLY
  12. * EXAMINE SPECIFIED SMMAP FILES, AND ISSUE A REPORT DETAILING
  13. * ANY IRREGULARITIES OR DISCREPANCIES FOUND. A COUNT OF THE
  14. * NUMBER OF VALIDATION ERRORS DETECTED, IF ANY, IS PLACED IN
  15. * THE DAYFILE. IF SELECTED, *SSVAL* WILL RELEASE SFM SPACE
  16. * FOR PURGED FILES. WHEN ERROR CONDITIONS ARE FOUND, *SSVAL*
  17. * WILL OPTIONALLY SET FLAGS IN AFFECTED ENTRIES OF THESE FILES
  18. * TO PROTECT A PERMANENT FILE FROM BEING SUBJECT TO BEING
  19. * LOST AND TO PERMIT THE SITE TO RECOVER FROM THE ERROR VIA
  20. * THE *SSDEBUG* UTILITY.
  21. *
  22. * RUN TIME PARAMETERS ALLOW SELECTED SUBFAMILIES OR ALL
  23. * SUBFAMILIES AND SELECTED SUBCATALOGS OR ALL SUBCATALOGS
  24. * TO BE ANALYZED.
  25. *
  26. * THERE ARE TWO TYPES OF VALIDATION RUNS. THEY ARE -
  27. * 1) TO VALIDATE THE "LIVE" CATALOGS TO DETECT ERRORS AND
  28.   ALLOW REPAIR OF THE CATALOGS. REPAIR REFERS TO THE
  29.   PROCESS OF SETTING FLAGS WHICH, DEPENDING ON THE FLAG SET
  30.   MAY OR MAY NOT CORRECT THE PROBLEM.
  31. * 2) TO VALIDATE THE COPIES OF THE CATALOGS FROM THE RELEASE
  32. * DATA FILE TO ALLOW RELEASE OF THE "FREE SPACE" IN THE
  33. * SFM CATALOG FOR FILES THAT WERE PURGED BY THE USER.
  34. *
  35. * THE REQUIREMENTS AND RESULTS OF THESE RUNS ARE -
  36. *
  37. * FOR TYPE 1 -
  38. * . THE SFM CATALOG PERMANENT FILE MUST BE ATTACHABLE.
  39. * . THE PERMANENT FILE CATALOG MUST BE ACCESSIBLE.
  40. * . THE SMMAP FILE MUST BE ATTACHABLE ( IF SELECTED ).
  41. * . THE CATALOGS ARE EXAMINED FOR VALIDATION ERRORS.
  42. * . THE VALIDATION REPORT IS ISSUED.
  43. * . THE CATALOGS ARE REPAIRED FOR ERRORS DETECTED TO
  44. * ALLOW CORRECTIVE ACTION.
  45. *
  46. * FOR TYPE 2 -
  47. * . NO LIVE CATALOGS ARE USED.
  48. * . NO VALIDATION OF THE SMMAP FILE OCCURS.
  49. * . COPIES OF THE SFM CATALOG AND THE *PFC* ARE
  50. * EXAMINED FOR VALIDATION ERRORS.
  51. * . THE VALIDATION REPORT IS ISSUED.
  52. * . THE "FREE SPACE" IN THE SFM CATALOG IS RELEASED. THIS
  53.   CONSEQUENTLY RELEASES SPACE IN THE APPROPRIATE
  54.   CARTRIDGE(S).
  55. *
  56. * THE REPAIR/RELEASE FUNCTION OF *SSVAL* CANNOT OCCUR IF THE
  57. * M860 *EXEC* SUBSYSTEM IS NOT RUNNING.
  58. *
  59.  
  60.  
  61.  
  62.  
  63. *** *SSVAL* IS THE M860 UTILITY THAT VALIDATES THE SFM CATALOG,
  64. * PERMANENT FILE CATALOG (*PFC*) AND THE SMMAP FILE, REPAIRS
  65. * THE CATALOGS AND RELEASES SPACE IN THE SFM CATALOG FOR PURGED
  66. * USER FILES.
  67. *
  68.  
  69. *** INPUT DATA IS FROM THE SFM CATALOG FILE AND THE PERMANENT
  70. * FILE CATALOG FOR A SINGLE FAMILY. THESE TWO INPUT FILES MAY
  71. * EITHER BE FROM THEIR PERMANENT LOCATION ON THE FAMILY
  72. * PACKS ("LIVE") OR FROM THE RELEASE DATA FILE (*RDF*)
  73. * PRODUCED BY THE *PFDUMP* UTILITY. *SSVAL* WILL PRODUCE A *PFC
  74. * EXTRACT FILE* FROM EITHER OF THE ABOVE SOURCES.
  75. *
  76. * THE SMMAP FILE IS AN INPUT IF SPECIFIED BY AN OPTION ON
  77. * THE CONTROL CARD. IT IS ACCESSED ONLY FROM ITS PERMANENT
  78. * LOCATION ON THE SYSTEM DEFAULT FAMILY.
  79. *
  80. * SFM CATALOG FILE - CONTAINS THE CONTROL INFORMATION ABOUT
  81. * THE FILES ON THE MSF. THE FILE AND CARTRIDGE TABLE (*FCT*)
  82. * PORTION OF THE CATALOG CONTAINS THE ALLOCATION AND STATUS
  83. * INFORMATION FOR EACH CARTRIDGE. THE *FCT*
  84. * IS EXAMINED FOR IRREGULARITIES AND ERRORS.
  85. *
  86. * PERMANENT FILE CATALOG - CONTAINS CONTROL INFORMATION ABOUT
  87. * USER PERMANENT FILES RESIDING ON THE MSF. THE ALTERNATE
  88. * STORAGE ALLOCATION FIELD (*ASA*) CONTAINS THE POINTER
  89. * SPECIFIYING THE *SM* INDEX, *FCT* ORDINAL.
  90. *
  91. * SMMAP FILE - CONTAINS CONTROL INFORMATION ABOUT ALL CUBES
  92. * AND CARTRIDGES IN A GIVEN SM.
  93. *
  94. * RDF FILE - (RELEASE DATA FILE) CONTAINS A HEADER, *PFC* EXTRACT
  95. * RECORDS, AND COPIES OF SFM CATALOGS. IT IS PRODUCED BY
  96. * *PFDUMP*. THE DATE AND TIME WHEN THE FILE WAS CREATED IS
  97. * RECORDED IN THE HEADER. THE RDF FILE IS USED FOR BACKUP
  98. * PURPOSES ONLY. A DESCRIPTION OF THE FIELDS IN THE RDF FILE
  99. * MAY BE FOUND IN *COMSPFM*.
  100. *
  101. *
  102.  
  103. *** CONTROL CARD CALL.
  104. *
  105. * SSVAL(P1,P2,...,PN)
  106. *
  107. * PARAMETER DESCRIPTION
  108. * --------- -----------
  109. *
  110. * L LISTABLE OUTPUT ON FILE *OUTPUT*.
  111. * L = *LFN* LISTABLE OUTPUT ON FILE *LFN*.
  112. * L = 0 NO OUTPUT FILE GENERATED.
  113. * L OMITTED SAME AS L.
  114. *
  115. * RF RELEASE DATA FILE ON LOCAL FILE *ZZZZRDF*.
  116. * RF = *LFN* RELEASE DATA FILE ON FILE *LFN*.
  117. * RF OMITTED USE THE CURRENT VERSION OF THE SFM CATALOGS
  118. * FOR ANALYSIS.
  119. *
  120. * FM USE DEFAULT FAMILY. NOT PERMITTED IF *RF*
  121. * IS SPECIFIED.
  122. * FM=FAMILY FAMILY TO BE ANALYZED. NOT PERMITTED IF
  123. * *RF* IS SPECIFIED.
  124. * FM OMITTED SAME AS *FM* IF *RF* IS NOT SPECIFIED. USE
  125. * THE FAMILY ON THE RELEASE DATA FILE IF *RF*
  126. * IS SPECIFIED.
  127. *
  128. * SB ALL SUBFAMILIES ARE TO BE PROCESSED.
  129. * SB = CHARS SELECT UP TO EIGHT SUBFAMILIES. THERE
  130. * ARE EIGHT POSSIBLE SUBFAMILIES NUMBERED FROM
  131. * 0 THROUGH 7 (E.G. SB=723 SELECTS SUBFAMILIES
  132. * 2,3,AND 7).
  133. * SB OMITTED SAME AS *SB*.
  134. *
  135. * SM ALL *SM-S* PROCESSED.
  136. * SM = CHARS SELECT UP TO EIGHT *SM*-S INDICATED
  137. * BY THE LETTERS A-H (E.G. SM=ACHG SELECTS
  138. * *SM-S* A, C, AND H).
  139. * SM OMITTED SAME AS *SM*.
  140. *
  141. * AM ANALYZE THE SFM SMMAP. THIS OPTION MAY
  142. * ONLY BE USED IF *RF* IS NOT SPECIFIED.
  143. * *SSVAL* WILL ONLY EXAMINE A PARTICULAR
  144. * SMMAP IF THE SFM CATALOG HAS A SUBCATALOG
  145. * FOR THE CORRESPONDING *SM* AND IS THAT
  146. * *SM* WAS SELECTED BY THE *CS* PARAMETER.
  147. * AM OMITTED DO NOT ANALYZE THE SFM SMMAP.
  148. *
  149. * FX *PFC* AND SFM CATALOGS WILL NOT BE
  150. * AUTOMATICALLY FLAGGED OR FIXED AND RELEASE
  151. * PROCESSING WILL NOT BE PERFORMED IF THERE
  152. * ARE ANY ERRORS (SAME AS FX=0).
  153. * FX = N *PFC* AND SFM CATALOGS WILL ONLY BE
  154. * AUTOMATICALLY FIXED OR RELEASE PROCESSING
  155. * WILL BE PERFORMED ONLY IF THE TOTAL ERROR
  156. * COUNT IS LESS THAN OR EQUAL TO N.
  157. * FX OMITTED SAME AS *FX*.
  158. *
  159. * RL RELEASE PROCESSING IS TO BE PERFORMED.
  160. * THIS OPTION MAY ONLY BE USED IF *RF*
  161. * IS ALSO SELECTED.
  162. * RL OMITTED NO RELEASE PROCESSING WILL BE PERFORMED.
  163. *
  164. * ST FILES ARE INDICATED AS SCATTERED IF THEY
  165. * SPREAD ACROSS MORE THAN THE MINIMUM NUMBER
  166. * OF CARTRIDGES NEEDED TO CONTAIN THEM.
  167. * ST = N FILES ARE INDICATED AS SCATTERED IF THEY
  168. * SPREAD ACROSS N MORE CARTRIDGES THAN THE
  169. * MINIMUM NUMBER NEEDED TO CONTAIN THEM.
  170. * ST OMITTED SAME AS *ST*.
  171. *
  172. *
  173.  
  174.  
  175.  
  176. *** THE VALIDATION PROCESS EXAMINES THE ALTERNATE STORAGE AND
  177. * PERMANENT FILE CATALOGS AND REPORTS VALIDATION ERRORS DETECTED.
  178. *
  179. * THE CATALOG ENTRIES ARE VALIDATED AS FOLLOWS.
  180. * . ALL *PFC* ENTRIES FOR USER FILES THAT RESIDE ON MSF.
  181. * - THE *ASA* FIELD.
  182. * * ASA NOT HEAD OF CHAIN.
  183. * * ASA OUT OF RANGE.
  184. * * INVALID *SM* IN ASA.
  185. * * MULTIPLE *PFC* ENTRIES OWN THE SFM FILE.
  186. * - THE READ DATA ERROR FLAG.
  187. * * READ ERROR FLAG SET IN *PFC* ENTRY.
  188. * . ALL *FCT* ENTRIES IN THE SFM CATALOG.
  189. * - THE CARTRIDGE STATUS (INHIBIT, LOST, EXCESSIVE
  190. * WRITE PARITY ERROR, START OF FRAGMENT, CONFLICT, SMMAP
  191. * ERROR,CSN AND Y AND Z COORDINATES).
  192. * * *FCT* ENTRIES CONTAIN THE FOLLOWING PROBLEMS -
  193. * - INHIBIT ALLOCATION FLAG SET.
  194. * - FROZEN CHAIN FLAG SET.
  195. * - EXCESSIVE WRITE PARITY ERRORS FLAG SET.
  196. * - START OF FRAGMENT FLAG SET.
  197. * - AU CONFLICT FLAG SET.
  198. * - LOST CARTRIDGE FLAG SET.
  199. * - THE AU CHAIN INFORMATION (CHAIN CONTROL, OFF CARTRIDGE
  200. * LINK FLAG, OFF CARTRIDGE LINKS).
  201. * * CHAINS INTERSECT OR ARE ILL-FORMED.
  202. * * FRAGMENTS DETECTED.
  203. * * SCATTERED FILE DETECTED.
  204. * * NO VALID SMMAP ENTRY FOR THE FCT.
  205. *
  206. * . ALL SMMAP ENTRIES ASSIGNED TO THE SUBFAMILY.
  207. * - THE VSN, FAMILY, SUBFAMILY, *FCT* ORDINAL FIELDS.
  208. * . SMMAP ENTRY ALLOCATED TO THE SUBFAMILY THAT HAS NO
  209. * VALID *FCT* ENTRY IN THE SFM CATALOG.
  210. *
  211.  
  212. *** THE RESULTS OF RUNNING *SSVAL* ARE:
  213. * - THE VALIDATION REPORT.
  214. * - THE RELEASE OF FREE SFM SPACE IN THE SFM CATALOG.
  215. * - THE REPAIRS OF THE CATALOGS FOR VALIDATION ERRORS DETECTED.
  216. *
  217. * FREE SPACE IN THE SFM CATALOG IS RELEASED IF THE RF AND
  218. * RL CONTROL CARD PARAMETERS WERE SPECIFIED AND IF THE
  219. * TOTAL VALIDATION ERRORS DETECTED WERE LESS THAT THE
  220. * THRESHOLD SET BY THE FX CONTROL CARD PARAMETER. IN ADDITION,
  221. * THE RELEASE FOR A SPECIFIC SUBFAMILY AND *SM* OCCURS ONLY
  222. * IF THE RDF FILE DATE AND TIME IS MORE RECENT THAN THE
  223. * LAST PURGE DATE AND TIME RECORDED IN THE PREAMBLE OF THE
  224. * SFM CATALOG.
  225. *
  226. * REPAIRS TO THE CATALOGS OCCUR ONLY IF THE FM CONTROL CARD
  227. * PARAMETER IS ACTIVE AND THE TOTAL VALIDATION ERRORS ARE
  228. * LESS THAN THE THRESHOLD SET BY THE FX CONTROL CARD PARAMETER.
  229. *
  230. * *PFC* ENTRIES CAN ONLY BE REPAIRED IF THE FILE IS DISK RESIDENT.
  231. * - THE *ASA* IS CLEARED IN THE *PFC* ENTRY TO PREVENT THE
  232. * RELEASE OF THE DISK SPACE.
  233. * REPAIRS TO THE SFM CATALOG OCCUR IF ERRORS ARE DETECTED IN
  234. * *FCT* ENTRIES.
  235. * - THE FOLLOWING FLAGS ARE SET IN THE SFM CATALOG *FCT* ENTRY.
  236. * . THE FROZEN FLAG IS SET TO PREVENT AUTOMATIC RELEASE OF THE
  237. * SFM FILE SPACE AND ALLOW INSPECTION OF THE SFM DATA.
  238. * . THE START OF FRAGMENT FLAG IS SET IF A FRAGMENT WAS
  239. * DETECTED.
  240. * . THE SMMAP ERROR FLAG IS SET IF THE *FCT* HAS NO SMMAP
  241. * ENTRY.
  242. * . THE INHIBIT FLAG IS SET IF THE SMMAP ERROR OCCURRED.
  243. * REPAIR TO THE SMMAP FILE OCCURS FOR ERRORS DETECTED IN THE
  244. * SMMAP-*FCT* LINKAGE.
  245. * . THE ERROR FLAG IN THE SMMAP ENTRY IS SET.
  246. *
  247. * THE VALIDATION REPORT CONTAINS INFORMATIONAL AND ERROR LINES
  248. * DESCRIBING WHAT WAS VALIDATED AND WHAT WAS FOUND TO BE IN ERROR.
  249. *
  250. * COLUMN 0 IS RESERVED FOR THE CARRIAGE CONTROL CHARACTER.
  251. *
  252. * THE TITLE, INFORMATIONAL AND HEADING LINES START IN COLUMN 4.
  253. *
  254. * THE DETAIL LINES START IN COLUMN 7 OR BEYOND.
  255. *
  256. * LINE - GENERAL
  257. * TYPE - FORMAT
  258. * ---- - ------
  259. *
  260. * TITLE - SSVAL - VALIDATION REPORT ...VER 1.0
  261. * SUB-TITLE - FAMILY = NAME
  262. *
  263. * PRESET - (CONTROL CARD IMAGE)
  264. * DETAIL - (LIST OF) KEYWORD = VALUE.
  265. *
  266. * RDF DETAIL - RDF FILE FAMILY = NAME
  267. * - RDF FILE BUDT = DATE-TIME
  268. *
  269. * PRESET - *** PF = NAME INVALID SM IN PFC
  270. * ERRORS - UI = VALUE
  271. *
  272. * SUBCATALOG - SUBFAMILY = N *SM* = X "GOOD"
  273. * HEADINGS - "INTERSECTIONS"
  274. * - "PROBLEMS"
  275. *
  276. * SUB-HEADING - -HEAD OF CHAINS-
  277. * INTERSECTIONS - FCTORD-STRM FCTORD-STRM
  278. *
  279. * INTERSECTIONS - (CHAIN-ID) (CHAIN-ID)
  280. * DETAIL -
  281. *
  282. * SUB-HEADING - ERR IDENTIFICATION -CHAIN- ERROR
  283. * PROBLEMS - TYP FCT-STM-A/U-H-E
  284. *
  285. * PROBLEM - 4 PF=NAME
  286. * DETAIL - UI=VALUE
  287. * - BU=DATE-TIME
  288. * - DI=N/Y (CHAIN-ID) TEXT
  289. * (CHAIN-ID) (TEXT)
  290. * TEXT
  291. *
  292. * SUMMARY - FREE M860 FILE = NNN
  293. * - FREE M860 AU-S = NNNN
  294. * - TOTAL VALIDATION ERRORS = NNN
  295. *
  296. * MISCELLANEOUS - ***CONNECT TO EXEC FAILED
  297. * - CATALOGS NOT MODIFIED
  298. * - CATALOGS MODIFIED
  299. * - FREE FILES RELEASED
  300. *
  301. *
  302. * THE INTERSECTIONS REPORT SECTION IS ISSUED FOR THE SUBCATALOG
  303. * WHEN INTERSECTIONS ARE DETECTED.
  304. *
  305. * THE PROBLEM REPORT SECTION IS ISSUED AT THE END OF EACH
  306. * SUBCATALOG-S VALIDATION.
  307. *
  308. * ENOUGH IDENTIFICATION IS GIVEN TO ALLOW THE ANALYST TO LOCATE THE
  309. * ENTRY(S) RELATING TO THE PROBLEM IN THE CATALOGS: SFM CATALOG,
  310. * *PFC* OR SMMAP.
  311. *
  312. * ERROR TYPE VALUES IN THE PROBLEM REPORT SECTION ARE -
  313. * 1 - *FCT* ENTRY WITH NO VALID SMMAP ENTRY.
  314. * 2 - SMMAP ENTRY WITH NO VALID *FCT* ENTRY.
  315. * 3 - *PFC* ENTRY WITH INVALID ASA.
  316. * 4 - *PFC* ENTRY WITH PROBLEMS.
  317. * 5 - ORPHANS WITH PROBLEMS.
  318. * 6 - CHAIN FRAGMENTS.
  319. * 7 - UNALLOCATED SFM ENTRIES WITH PROBLEMS.
  320. *
  321.  
  322.  
  323. *** DAYFILE MESSAGES.
  324. *
  325. * * SSVAL COMPLETED.*
  326. * * SSVAL ABORTED.*
  327. * * FREE FILES RELEASED.*
  328. * * CATALOGS MODIFIED.*
  329. * * CATALOGS NOT MODIFIED.*
  330. * * TOTAL VALIDATION ERRORS = NN.*
  331. * * VALIDATING SB=N SM=X.*
  332. * * CONTROL CARD SYNTAX ERROR.*
  333. * * INVALID CS PARAMETER.*
  334. * * INVALID FX PARAMETER.*
  335. * * INVALID SB PARAMETER.*
  336. * * INVALID ST PARAMETER.*
  337. * * ILLEGAL - L AND RF PARAMETER.*
  338. * * ILLEGAL - RL AND NO RF PARAMETER.*
  339. * * ILLEGAL - RF AND FM PARAMETER.*
  340. * * ILLEGAL - RF AND AM PARAMETER.*
  341. * * SSVAL - MUST BE SYSTEM ORIGIN.*
  342. * * RDF FILE ERROR - MISSING HEADER.*
  343. * * RDF FILE ERROR - BAD RECORD LENGTH.*
  344. * * RDF FILE ERROR - UNIDENTIFIED DATA.*
  345. * * SFM CATALOG OPEN ERROR.*
  346. * * SFM CATALOG READ ERROR.*
  347. * * SMMAP OPEN ERROR.*
  348. * * SMMAP READ ERROR.*
  349. * * REQUIRED FL EXCEEDS JOB MAX.*
  350. * * CONNECT TO EXEC FAILED.*
  351. * * UCP CALL ERROR.*
  352. * * FAMILY NOT FOUND IN SYSTEM.*
  353. * * ERROR READING *PFC*.*
  354. * * SSVAL ABNORMAL* NAME.*
  355. *
  356.  
  357.  
  358. *** OPERATOR MESSAGES.
  359. *
  360. * * WAITING FOR FILE FILENAME.*
  361. * * WAITING FOR EXEC.*
  362. * * VALIDATING SB=N SM=X.*
  363. *
  364.  
  365. *** SSVAL.
  366. *
  367. * *SSVAL* IS THE M860 UTILITY PROGRAM THAT VALIDATES DATA IN THE
  368. * SFM CATALOG, THE PERMANENT FILE CATALOG (PFC) AND THE SMMAP
  369. * FILE. IT CAN ALSO REPAIR THE CATALOGS FOR VALIDATION
  370. * ERRORS DETECTED AND RELEASE FREE SPACE IN THE SFM CATALOG FOR
  371. * PURGED USER FILES.
  372. *
  373. * SSVAL(P1,P2,...,PN)
  374. *
  375. * PRGM SSVAL
  376. *
  377. * MESSAGES * CONNECT TO EXEC FAILED.*
  378. * * SSVAL COMPLETED.*
  379. *
  380. * NOTES *SSVAL* -
  381. * . CALLS VLPRSET TO INITIALIZE FILES AND PARAMETERS.
  382. * . CONNECTS TO M860 *EXEC*.
  383. * . CALLS VLSUBFM FOR EACH SUBFAMILY TO VALIDATE.
  384. * . CALLS VLFIX TO PERFORM REPAIR/RELEASE PROCESSING
  385. * ON THE CATALOGS.
  386. * . DISCONNECTS AND CLOSES.
  387. *
  388.  
  389. **********
  390.  
  391. ** METHOD. OR METHODS....
  392. *
  393. * A NUMBER OF LOCAL FILES ARE USED TO RETAIN INFORMATION
  394. * THROUGHOUT THE VALIDATION PROCESS -
  395. *
  396. * . *PFC* EXTRACT FILES - CONTAIN EXTRACTS FROM THE LIVE
  397. * *PFC* OR FROM THE RDF FILE. THERE IS A SEPARATE
  398. * FILE FOR EACH SUBFAMILY.
  399. *
  400. * . PROBLEM FILE - CONTAINS ENTRIES FOR VALIDATION
  401. * ERRORS DETECTED.
  402. *
  403. * . FIXIT FILE - CONTAINS ENTRIES FOR ALL REPAIRS AND
  404. * RELEASES THAT MAY BE PERFORMED.
  405. *
  406. * . ZZZVALX FILES - CONTAIN COPIES OF THE SFM CATALOGS,
  407. * FROM THE RDF FILE. THERE IS A SEPARATE FILE
  408. * FOR EACH SUBFAMILY.
  409. *
  410. * A VALIDATION TABLE (*VT*) IS USED TO CONTAIN AND EXAMINE
  411. * THE *FCT* DATA FOR A SUBCATALOG IN THE SFM CATALOG. THE
  412. * *VT* HAS A 1 WORD ENTRY.
  413. *
  414. * EACH WORD (REPRESENTING ONE AU IN THE *FCT*) CONTAINS
  415. * STATUS AND LINKAGE INFORMATION ABOUT THE AU -
  416. * . ALLOCATED OR NOT.
  417. * . HEAD OF CHAIN AND/OR END OF CHAIN
  418. * . *PFC* OWNER FLAG
  419. * . VALIDATION ERROR FLAGS.
  420. * . A LINK TO THE NEXT AU IN THE CHAIN.
  421. *
  422. * VALIDATION ERROR FLAGS ARE ASSIGNED PROBLEM TYPES (1,2, OR 4)
  423. * THAT REFLECT THE SUBSEQUENT REPORT AND REPAIR PROCESSING
  424. * THAT SHOULD OCCUR -
  425. * TYPE 1 - REPORT THE PROBLEM AND DO NOT REPAIR.
  426. * TYPE 2 - REPORT THE PROBLEM. REPAIR ONLY IF THERE
  427. * IS AN ASSOCIATED *PFC* ENTRY.
  428. * TYPE 4 - REPORT THE PROBLEM AND REPAIR THE CATALOG(S).
  429. *
  430. * THE *VT* IS USED AS A FAST METHOD TO FOLLOW CHAINS TO
  431. * ENSURE THAT THEY ARE VALID. ERRORS ARE-
  432. * . INTERSECTING CHAINS.
  433. * . ILL-FORMED CHAINS.
  434. *
  435. * AS THE CHAIN IS FOLLOWED, EACH ENTRY IS MARKED BY SETTING
  436. * THE POINTER FIELD TO THE HEAD OF CHAIN ENTRY.
  437. *
  438. ** GENERAL RULES.
  439. *
  440. * *SSVAL* ALWAYS ISSUES A SUBSYSTEM REQUEST USING THE
  441. * SUBSYSTEM ID FOR THE M860 EXEC AND PARAMETERS FOR A
  442. * "CONNECT". IF THE M860 EXEC IS NOT PRESENT OR IF THE
  443. * M860 EXEC RETURNS AN ERROR STATUS, *SSVAL* ISSUES A
  444. * MESSAGE "CONNECT TO EXEC FAILED" AND CONTINUES. BUT
  445. * NO FURTHER SUBSYSTEM REQUESTS ARE MADE. THEREFORE, NO
  446. * REPAIR/RELEASE PROCESSING CAN OCCUR. SSVAL CONTINUES
  447. * IN THIS "LIMITED" MODE TO PRODUCE THE VALIDATION REPORT.
  448. *
  449. * THE CATALOGS ARE ATTACHED IN READ MODE. THIS PROVIDES AN
  450. * INTERLOCK TO ENSURE THAT NO ONE IS MODIFIYING THE DATA
  451. * DURING VALIDATION.
  452. *
  453. * I/O ERRORS WILL BE DETECTED AND PROCESSED BY *CIO*.
  454. *
  455. ** HEIRARCHY.
  456. *
  457. * 3 MAJOR STEPS -
  458. *
  459. * . PRESET - PROCESS THE CONTROL CARD PARAMETERS INTO
  460. * RUN TIME PARAMETERS.
  461. * - PROCESS INPUT FILES TO GENERATE WORKING FILES.
  462. *
  463. * . VALIDATE (THIS STEP REPEATS FOR ALL SELECTED
  464. * SUBCATALOGS WITHIN SELECTED SUBFAMILIES).
  465. * - ANALYZES ALL CATALOG DATA AND GENERATES THE
  466. * PROBLEM FILE.
  467. * - EXAMINES ALL PROBLEM FILE ENTRIES AND GENERATES
  468. * THE VALIDATION REPORT AND THE FIXIT FILE.
  469. *
  470. * . FIX - EXAMINES THE FIXIT FILE ENTRIES AND RELEASES FREE
  471. * SPACE IF THIS MODE IS SELECTED.
  472. * - EXAMINES THE FIXIT FILE ENTRIES AND REPAIRS CATALOG
  473. * ENTRIES IF THIS OPTION IS SELECTED.
  474. *
  475. *
  476. * *SSVAL* MAJOR ROUTINES.
  477. * 1.0 VLPRSET - PRESET PARAMETERS AND FILES.
  478. * 1.1 VLTAB -
  479. * 1.2 VLPFC - READ THE PFC.
  480. * 1.3 VLRDF - READ THE RDF FILE.
  481. * 1.3.1 VLRDF2 - PROCESS THE RDF RECORD.
  482. *
  483. * 2.0 VLSUBFM - SUBFAMILY VALIDATION.
  484. * 2.1 VLBLDVT - BUILD VALIDATION TABLE.
  485. * 2.1.1 VLCMAP - SMMAP LOOKUP.
  486. * 2.2 VLASFM - ANALYZE THE SFM CATALOG.
  487. * 2.2.1 VLNCS - NORMAL CHAIN SCAN.
  488. * 2.2.2 VLCFS - CHAIN FRAGMENT SCAN.
  489. * 2.2.3 VLSMSC - SMMAP SCAN.
  490. * 2.3 VLAPFC - ANALYZE THE *PFC* CATALOG.
  491. * 2.3.1 VLAPFC2 - ANALYZE *PFC* PASS 2.
  492. * 2.4 VLRPT - VALIDATION REPORT.
  493. * 2.4.1 VLRPTL - ISSUE REPORT LINE.
  494. * 2.4.2 VLSCH - SCAN CHAIN FOR REPORT.
  495. *
  496. * 3.0 VLFIX - FIX CATALOGS.
  497. * 3.1 VLFIXP - FIX PFC.
  498. *
  499.  
  500. ** EXTERNAL INTERFACE ROUTINES.
  501. *
  502. * CATALOG/MAP ACCESS ROUTINES.
  503. * M860 REPORT FORMATTER.
  504. * NOS MACROS USING THE SYMPL INTERFACES ON MAC1.
  505. * SPECIAL ROUTINES ON MAC2.
  506. * - XARG
  507. * - CALLSS
  508. * - CINTLK
  509. * - GETFAM
  510. * - RDPFC
  511. * - SETASA
  512. * - SETPFP
  513. * - UATTACH
  514. #
  515.  
  516. CONTROL PRESET;
  517.  
  518. #
  519. **** PROC SSVAL - XREF LIST BEGIN.
  520. #
  521.  
  522. XREF
  523. BEGIN
  524. PROC ABORT; # CALLS *ABORT* MACRO #
  525. PROC GETPFP; # GET USER INDEX AND FAMILY #
  526. PROC GETSPS; # GET SYSTEM ORIGIN STATUS #
  527. PROC MEMORY; # INTERFACE TO *MEMORY* MACRO #
  528. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
  529.   OR RETURN #
  530. PROC RPCLOSE; # CLOSES A PRINT FILE #
  531. PROC VLERROR; # ISSUE ERROR MESSAGE #
  532. PROC VLFIX; # FIX CATALOGS #
  533. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  534. PROC VLPRSET; # PRESET PARAMETERS AND FILES #
  535. PROC VLREQEX; # REQUEST TO EXEC #
  536. PROC VLSUBFM; # SUBFAMILY VALIDATION #
  537. END
  538.  
  539. #
  540. **** PROC SSVAL - XREF LIST END.
  541. #
  542.  
  543. DEF RSLEN #1#; # RETURN STATUS WORD LENGTH #
  544. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTINGS #
  545.  
  546. *CALL COMBFAS
  547. *CALL COMBCMD
  548. *CALL COMBCPR
  549. *CALL COMBMAP
  550. *CALL COMBMCT
  551. *CALL COMBPFP
  552. *CALL COMTFMT
  553. *CALL COMTVLD
  554. *CALL COMTVLF
  555. *CALL COMTVLM
  556. *CALL COMTVLV
  557. *CALL COMTVLX
  558.  
  559.  
  560. ARRAY SCR$FET [0:0] S(SFETL);; # SCRATCH FET #
  561. ARRAY SPSSTAT [0:0] S(RSLEN);
  562. BEGIN
  563. ITEM SPS$STATUS U(00,48,12); # RETURN STATUS #
  564. END
  565. CONTROL EJECT;
  566.  
  567. GETSPS(SPSSTAT); # GET SYSTEM ORIGIN STATUS #
  568. IF SPS$STATUS NQ 0
  569. THEN
  570. BEGIN
  571. VLMSG(VM"NEEDSYOT"); # MUST HAVE SYSTEM PRIVILEGES #
  572. ABORT;
  573. END
  574.  
  575. #
  576. * SAVE THE USER-S CURRENT FAMILY AND USER INDEX IN COMMON.
  577. #
  578.  
  579. GETPFP(PFP[0]);
  580. USER$FAM[0] = PFP$FAM[0];
  581. USER$UI[0] = PFP$UI[0];
  582.  
  583. #
  584. * GET CURRENT JOB FIELD LENGTH.
  585. #
  586.  
  587. MEM$MIN = O"50000"; # SAVE PROGRAM SIZE #
  588. MEM$WDS[0] = MEM$MIN;
  589. MEMORY("CM",MEMRQST,RCL,NA); # SET MEMORY #
  590.  
  591. #
  592. * GET MAXIMUM JOB FIELD LENGTH.
  593. #
  594.  
  595. MEM$WDS[0] = REQMAXFL;
  596. MEMORY("CM",MEMRQST,RCL,NA);
  597. MEM$MAX = MEM$WDS[0]; # SAVE MAXIMUM MEMORY ALLOWED #
  598.  
  599. #
  600. * PRESET - PROCESS CONTROL CARD AND INITIALIZE FILES.
  601. #
  602.  
  603. VLPRSET;
  604.  
  605. #
  606. * CONNECT TO SUBSYSTEM.
  607. #
  608.  
  609. CONNECTED = TRUE; # INITIALIZE FOR VLREQEX CALL #
  610. VLREQEX(TYP"TYP1",REQTYP1"CONNECT");
  611. IF STAT NQ 0
  612. THEN # CONNECT REQUEST FAILED #
  613. BEGIN
  614. VLERROR(VE"NCONNECT",NOABT); # ISSUE ERROR MESSAGE #
  615. CONNECTED = FALSE; # NOT CONNECTED #
  616. END
  617.  
  618. #
  619. * VALIDATE ALL SELECTED SUBFAMILIES. ONLY THOSE SUBFAMILIES
  620. * SELECTED BY THE CONTROL CARD AND WHO HAVE THE SFM CATALOG FILE
  621. * AVAILABLE IN THIS RUN ARE VALIDATED.
  622. #
  623.  
  624. SLOWFOR SBINDX = 0 STEP 1 UNTIL MAXSF
  625. DO
  626. BEGIN
  627. IF (B<SBINDX,1>PAR$SB EQ 1) AND (B<SBINDX,1>SFMCATDEF EQ 1)
  628. THEN
  629. BEGIN
  630. VLSUBFM; # VALIDATE SUBFAMILY #
  631. END
  632.  
  633. END
  634.  
  635. #
  636. * RETURN MEMORY USED IN VALIDATION.
  637. #
  638.  
  639. MEM$WDS[0] = MEM$MIN;
  640. MEMORY("CM",MEMRQST,RCL,NA); # REDUCE FL #
  641.  
  642.  
  643.  
  644. #
  645. * FIX CATALOGS PROCESSING.
  646. #
  647.  
  648. VLFIX;
  649.  
  650. #
  651. * CLOSE THE REPORT FILE AND DISCONNECT.
  652. #
  653.  
  654. RPCLOSE(RPTFADR);
  655.  
  656. VLREQEX(TYP"TYP1",REQTYP1"DISCONNECT"); # DISCONNECT FROM EXEC #
  657.  
  658. VLMSG(VM"VLDONE"); # SSVAL COMPLETED #
  659. IF TOTALERRS - PAR$FX LQ 0
  660. THEN
  661. BEGIN
  662. RESTPFP(PFP$END);
  663. END
  664.  
  665. ELSE
  666. BEGIN
  667. RESTPFP(PFP$ABORT);
  668. END
  669.  
  670.  
  671. STOP;
  672.  
  673. END # SSVAL #
  674.  
  675. TERM
  676. PROC VLAMSF;
  677. # TITLE VLASFM - ANALYZE THE SFM CATALOG. #
  678.  
  679.  
  680. BEGIN # VLASFM #
  681.  
  682. #
  683. ** VLASFM - ANALYZE THE SFM CATALOG.
  684. *
  685. * *VLAMSF* CONTROLS THE VALIDATION PROCESS THAT EXAMINES
  686. * THE SFM CATALOG DATA IN THE *VT* TABLE.
  687. *
  688. * PROC VLASFM
  689. *
  690. * ENTRY (PAR$AM) - AM CONTROL CARD PARAMETER.
  691. * (ARRAY VTTABLE) - VALIDATION TABLE ENTRIES.
  692. *
  693. * EXIT (VTEN$PROB) - THIS FIELD IN EACH VALIDATION TABLE ENTRY
  694. * IS UPDATED TO REFLECT THE TYPE OF
  695. * VALIDATION PROBLEMS ENCOUNTERED SO FAR.
  696. *
  697. * NOTES *VLAMSF* PROCESSES BY -
  698. * . CALLING *VLNCS* TO PERFORM THE NORMAL CHAIN SCAN.
  699. * . CALLING *VLCFS* TO PERFORM THE CHAIN FRAGMENT SCAN.
  700. * . CALLING *VLSMSC* TO SCAN THE SMMAP.
  701. * . SCANNING ALL ENTRIES IN THE *VT* TABLE TO UPDATE THE
  702. * PROBLEM FIELD IN THE ENTRY AND IN ITS ASSOCIATED HEAD
  703. * OF CHAIN ENTRY.
  704. #
  705.  
  706. #
  707. **** PROC VLASFM - XREF LIST BEGIN.
  708. #
  709.  
  710. XREF
  711. BEGIN
  712. PROC VLCFS; # CHAIN FRAGMENT SCAN #
  713. PROC VLSMSC; # *SM* MAP SCAN #
  714. PROC VLNCS; # NORMAL CHAIN SCAN #
  715. END
  716.  
  717. #
  718. **** PROC VLASFM - XREF LIST END.
  719. #
  720.  
  721. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  722.  
  723. *CALL COMBFAS
  724. *CALL COMTVLD
  725. *CALL COMTVLV
  726.  
  727.  
  728.  
  729.  
  730. ITEM I I; # TEMPORARY VARIABLE #
  731. ITEM K I; # TEMPORARY VARIABLE #
  732. ITEM PT U; # PROBLEM TYPE #
  733.  
  734. CONTROL EJECT;
  735.  
  736. #
  737. * PERFORM NORMAL CHAIN SCAN.
  738. #
  739.  
  740. VLNCS;
  741.  
  742. #
  743. * PERFORM CHAIN FRAGMENT SCAN.
  744. #
  745.  
  746. VLCFS;
  747.  
  748. #
  749. * PERFORM SMMAP SCAN IF THE *AM* PARAMETER WAS SPECIFIED.
  750. #
  751.  
  752.  
  753. #
  754. * SCAN ALL *VT* ENTRIES TO UPDATE THE *VT* PROBLEM FIELD IN THE
  755. * ENTRY AND IN THE CORRESPONDING HEAD OF CHAIN ENTRY. THE PROBLEM
  756. * FIELD IS DEFINED TO BE THE LOGICAL SUM OF ALL THE PROBLEM TYPES
  757. * FOR ALL THE VALIDATION ERRORS DETECTED FOR THAT ENTRY. PROBLEM
  758. * TYPES FOR EACH VALIDATION ERROR ARE DEFINED IN THE *VTPTYPES*
  759. * ARRAY IN COMTVLV.
  760. #
  761.  
  762. SLOWFOR I = VTFIRST STEP 1 UNTIL VTLAST
  763. DO
  764. BEGIN # SCAN OF *VT* ENTRIES #
  765. VTEN$WORD[0] = VT$ITEM[I]; # GET *VT* ENTRY #
  766.  
  767. #
  768. * SCAN THE ERROR FLAGS IN THE *VT* ENTRY (BITS *VPS* THRU *VPX*).
  769. * ADD THE PROBLEM TYPE FOR EVERY ACTIVE ERROR FLAG TO THE LOGICAL
  770. * SUM.
  771. #
  772.  
  773. PT = 0;
  774. SLOWFOR K = VPS STEP 1 UNTIL VPX
  775. DO
  776. BEGIN
  777. IF B<K,1>VTEN$WORD[0] EQ 1
  778. THEN
  779. BEGIN
  780. PT = PT LOR VTP$TYP[K]; # OR LOGICAL SUM TOGETHER #
  781. END
  782.  
  783. END
  784.  
  785. #
  786. * LOGICALLY ADD THE COMPUTED PROBLEM TYPES TO THE PROBLEM FIELD IN
  787. * IN THE *VT* ENTRY.
  788. #
  789.  
  790. VTEN$PROB[0] = VTEN$PROB[0] LOR PT;
  791. VT$ITEM[I] = VTEN$WORD[0]; # STORE *VT* ENTRY #
  792.  
  793. #
  794. * UPDATE *HOC* ENTRY PROBLEM FIELD ( LOGICAL SUM OF MEMBERS ).
  795. #
  796.  
  797. VTEN$WORD[0] = VT$ITEM[VTEN$POINT[0]]; # GET *HOC* ENTRY #
  798. VTEN$PROB[0] = VTEN$PROB[0] LOR PT; # ADD VALUE OF MEMBER #
  799. VT$ITEM[VTEN$POINT[0]] = VTEN$WORD[0]; # UPDATE *HOC* ENTRY #
  800. END # SCAN OF *VT* ENTRIES #
  801.  
  802. END # VLASFM #
  803.  
  804. TERM
  805. PROC VLAPFC(GROUP);
  806. # TITLE VLAPFC - ANALYZE THE *PFC* CATALOG. #
  807.  
  808.  
  809. BEGIN # VLAPFC #
  810.  
  811. #
  812. ** VLAPFC - ANALYZE THE *PFC* CATALOG DATA.
  813. *
  814. * *VLAPFC* READ THE *PFC* EXTRACT FILE FOR THE SUBFAMILY
  815. * AND VALIDATES EACH *PFC* ENTRY FOR THE SELECTED *SM*.
  816. *
  817. * PROC VLAPFC
  818. *
  819. * ENTRY (SMINDX) - *SM* NUMBER.
  820. * (PRM$ENTRC) - COUNT OF *FCT* ENTRIES IN PREAMBLE.
  821. * (SBINDX) - SUBFAMILY NUMBER.
  822. * (ARRAY VTTABLE) - VALIDATION TABLE ENTRIES.
  823. *
  824. * EXIT FOR DETECTED ERRORS -
  825. * . SET *VT* ENTRY ERROR FLAGS AND UPDATE THE
  826. * *VTEN$PROB* FIELD.
  827. * . A PROBLEM FILE RECORD IS WRITTEN (RECORD TYPE
  828. * REC"ASA" OR REC"OTHR").
  829. *
  830. * MESSAGES * SSVAL ABNORMAL, VLAPFC.*.
  831. *
  832. * NOTES *VLAPFC* WILL DETECT THE FOLLOWING ERRORS -
  833. * . ILLEGAL *ASA* IN THE *PFC* (NO SFM CATALOG ENTRY
  834. * FOR THE *ASA* IN THE *VT*).
  835. * . MULTIPLE OWNERS.
  836. * . NOT HEAD OF CHAIN.
  837. * . DATA ERROR FLAG ON IN THE *PFC*.
  838. * . *PFC* POINTS TO A CHAIN WITH PROBLEMS.
  839. *
  840. * IF THE MULTIPLE OWNERS COUNTER IS NOT ZERO, *VLAPFC2*
  841. * IS CALLED TO FIND THE FIRST OWNER.
  842. #
  843.  
  844. #
  845. **** PROC VLAPFC - XREF LIST BEGIN.
  846. #
  847.  
  848. XREF
  849. BEGIN
  850. PROC MESSAGE; # MESSAGE TO DAYFILE #
  851. PROC VLWFIX; # WRITE FIXIT FILE RECORD #
  852. PROC READ; # INTERFACE TO *READ* MACRO #
  853. PROC READW; # INTERFACE TO *READW* MACRO #
  854. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  855. PROC VLAPFC2; # ANALYZE *PFC* PASS 2 #
  856. PROC VLERROR; # ISSUE ERROR MESSAGE #
  857. PROC VLWPROB; # WRITE PROBLEM FILE RECORD #
  858. FUNC XCOD C(10); # BINARY TO DISPLAY #
  859. PROC ZSETFET; # INITIALIZES A *FET* FOR *I/O* #
  860. END
  861.  
  862. #
  863. **** PROC VLAPFC - XREF LIST END.
  864. #
  865.  
  866. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  867. *CALL COMBFAS
  868. *CALL COMBCMD
  869. *CALL COMBMCT
  870. *CALL COMTVLD
  871. *CALL COMTVLF
  872. *CALL COMTVLV
  873.  
  874.  
  875. ITEM GROUP I; # GROUP BEING PROCESSED #
  876. ITEM GMO I; # GLOBAL MULTIPLE OWNERS #
  877. ITEM I I; # TEMPORARY VARIABLE #
  878.  
  879. ARRAY BLDLFN [0:0] S(1); # BUILD *LFN* #
  880. BEGIN
  881. ITEM BLDNAME C(00,00,07) = [ EXTLFN ]; # NAME OF FILE #
  882. ITEM BLDLFNX U(00,36,06); # SUBFAMILY NUMBER #
  883. END
  884.  
  885. #
  886. * THIS ARRAY FOR LINK MESSAGE.
  887. #
  888.  
  889. ARRAY LINK [0:0] P(3);
  890. BEGIN # LINK MESSAGE #
  891. ITEM LINK$MG C(00,00,10) = [" UI = "];
  892. ITEM LINK$NO C(01,00,10);
  893. ITEM LINK$Z U(02,00,60) = [0]; # ZERO BYTE #
  894. END
  895.  
  896.  
  897. CONTROL EJECT;
  898.  
  899. P<PREAMBLE> = PRMBADR;
  900.  
  901. GMO = 0; # INITIALIZE MULTIPLE OWNERS
  902.   COUNTER #
  903.  
  904. #
  905. * INITIALIZE THE *PFC* EXTRACT FILE FOR READING.
  906. #
  907.  
  908. EXTFADR = LOC(EXTRACTFIL); # FET ADDRESS #
  909. EXTBADR = LOC(EXTRACBUF); # BUFFER ADDRESS #
  910. BLDLFNX = SBINDX + "0"; # APPEND SUBFAMILY TO *LFN* #
  911. ZSETFET(EXTFADR,BLDLFN,EXTBADR,LEXTBUF,SFETL);
  912.  
  913. REWIND(EXTRACTFIL,RCL);
  914. READ(EXTRACTFIL,NRCL);
  915.  
  916. #
  917. * PROCESS EACH RECORD IN THE *PFC* EXTRACT FILE FOR THE SUBFAMILY.
  918. #
  919.  
  920. STAT = OK;
  921. REPEAT WHILE STAT EQ OK
  922. DO
  923. BEGIN # SCAN SUBFAMILY *PFC* ENTRIES #
  924. READW(EXTRACTFIL,EXTRECORD,RLEXTR,STAT);
  925.  
  926. IF STAT NQ OK
  927. THEN # DETECTED EOR, EOF, EOI OR
  928.   ERROR #
  929. BEGIN
  930. TEST DUMMY; # SKIP, NO RECORD READ #
  931. END
  932.  
  933.  
  934. #
  935. * SKIP THIS RECORD IF THE *SM* IN THE *PFC* IS NOT THE ONE BEING
  936. * PROCESSED.
  937. #
  938.  
  939. IF EXTR$SM[0] NQ SMINDX
  940. THEN
  941. BEGIN
  942. TEST DUMMY;
  943. END
  944. #
  945. * SKIP THIS RECORD IF THE GROUP IN THE *PFC* IS NOT THE ONE
  946. * BEING PROCESSED.
  947. #
  948.  
  949. IF EXTR$GP[0] NQ GROUP
  950. THEN
  951. BEGIN
  952. TEST DUMMY;
  953. END
  954.  
  955.  
  956. #
  957. * CHECK FOR VALID *ASA* IN THE *PFC*.
  958. #
  959.  
  960. IF EXTR$GP[0] GR MAXGP
  961. OR EXTR$GPT[0] GR MAXGRT
  962. OR EXTR$AU[0] GR INAVOT
  963. THEN # *ASA* OUT OF RANGE #
  964. BEGIN
  965. VLWPROB(REC"ASA"); # BUILD PROBLEM ENTRY #
  966. TEST DUMMY;
  967. END
  968.  
  969. #
  970. * DO NOT CHECK THE PFC AGAINST THE SFM CATALOG
  971. * IF THE CATALOG IS EMPTY.
  972. #
  973.  
  974. IF VTLAST LS VTFIRST
  975. THEN
  976. BEGIN
  977. TEST DUMMY;
  978. END
  979.  
  980. #
  981. * USING THE *ASA*, LOCATE AND EDIT THE *VT* ENTRY FOR THIS RECORD.
  982. #
  983.  
  984. P<VTLINK> = LOC(VTPTR); # BUILD LINK TO *VT* ENTRY #
  985. VTL$GRT[0] = EXTR$GPT[0];
  986. VTL$AU[0] = EXTR$AU[0];
  987. IF (VTL$WORD[0] LS VTFIRST) OR (VTL$WORD[0] GR VTLAST)
  988. THEN # INVALID LINK #
  989. BEGIN
  990. LINK$NO = XCOD(EXTR$UI[0]);
  991. MESSAGE(LINK,SYSUDF1);
  992. MP$WD[1] = " VLAPFC INVALID LINK ";
  993. VLERROR(VE"SYSERR",ABRT); # ABORT WITH MESSAGE #
  994. END
  995.  
  996. VTEN$WORD[0] = VT$ITEM[VTPTR]; # GET ENTRY #
  997.  
  998. #
  999. * IF *VT* ENTRY IS ALREADY OWNED AND THE MULTIPLE OWNER FLAG
  1000. * IS NOT SET, 1) SET IT, 2) UPDATE THE PROBLEM TYPE FIELD,
  1001. * AND 3) INCREMENT THE MULTIPLE OWNERS COUNTER. THIS COUNTER
  1002. * WILL BE USED IN VLAPFC2 TO LOCATE THE FIRST OWNER(S).
  1003. #
  1004.  
  1005. IF VTEN$OWN AND NOT VTEN$MULT
  1006. THEN # MULTIPLE OWNER DETECTED #
  1007. BEGIN
  1008. VTEN$MULT = TRUE; # SET MULTIPLE OWNER FLAG #
  1009. VTEN$PROB = VTEN$PROB LOR VTP$TYP[BMUL]; # SET PROBLEM
  1010.   TYPE #
  1011. GMO = GMO + 1; # INCREMENT OWNERS #
  1012. END
  1013.  
  1014. VTEN$OWN = TRUE; # SET OWNER FLAG #
  1015.  
  1016. #
  1017. * IF THE DATA ERROR FLAG IS SET IN THE *PFC*, SET THE ERROR FLAG
  1018. * IN THE *VT* AND UPDATE THE PROBLEM FIELD.
  1019. #
  1020.  
  1021. IF EXTR$DERR[0]
  1022. THEN
  1023. BEGIN
  1024. VTEN$RERR[0] = TRUE;
  1025. VTEN$PROB[0] = VTEN$PROB[0] LOR VTP$TYP[BRER];
  1026. TPFCERRS = TPFCERRS + 1;
  1027. END
  1028.  
  1029. #
  1030. * IF THE SYSTEM ERROR FLAG IS SET IN THE *PFC*, SET THE ERROR FLAG
  1031. * IN THE *VT* AND UPDATE THE PROBLEM FIELD.
  1032. #
  1033.  
  1034. IF EXTR$SYS[0]
  1035. THEN
  1036. BEGIN
  1037. VTEN$SYS[0] = TRUE;
  1038. VTEN$PROB[0] = VTEN$PROB[0] LOR VTP$TYP[BSYS];
  1039. TPFCERRS = TPFCERRS + 1;
  1040. END
  1041.  
  1042. #
  1043. * IF THE *PFC* DOES NOT POINT TO THE HEAD OF CHAIN, SET THE ERROR
  1044. * FLAG AND UPDATE THE PROBLEM TYPE FIELD.
  1045. #
  1046.  
  1047. IF NOT VTEN$HOC[0]
  1048. THEN
  1049. BEGIN
  1050. VTEN$MSH[0] = TRUE;
  1051. VTEN$PROB[0] = VTEN$PROB[0] LOR VTP$TYP[BMSH];
  1052. END
  1053.  
  1054. #
  1055. * IF THE FREE CARTRIDGE FLAG IS SET ON CARTRIDE THEN ADD
  1056. * A RECORD TO THE FIXIT FILE.
  1057. #
  1058.  
  1059. IF VTEN$FCF[0] AND NOT EXTR$FF[0]
  1060. THEN # BUILD FICIT FILE ENTRY #
  1061. BEGIN
  1062. VLWFIX(REC"FCF");
  1063. END
  1064.  
  1065. #
  1066. * IF THE *PFC* POINTS TO A CHAIN WITH PROBLEMS, ADD THIS
  1067. * ENTRY TO THE PROBLEM FILE.
  1068. #
  1069.  
  1070. IF VTEN$PROB[0] NQ 0
  1071. THEN
  1072. BEGIN
  1073. VLWPROB(REC"OTHR"); # BUILD PROBLEM ENTRY #
  1074. END
  1075.  
  1076. VT$ITEM[VTPTR] = VTEN$WORD[0]; # STORE THE *VT* ENTRY #
  1077.  
  1078. #
  1079. * IF THE *VT* ENTRY WAS NOT THE HEAD OF CHAIN, UPDATE THE *HOC*.
  1080. #
  1081.  
  1082. IF VTEN$POINT[0] NQ VTPTR
  1083. THEN
  1084. BEGIN # UPDATE *HOC* ENTRY #
  1085. I = VTEN$PROB[0]; # SAVE PROBLEM OF MEMBER #
  1086. VTEN$WORD[0] = VT$ITEM[VTEN$POINT[0]]; # GET *HOC* ENTRY #
  1087. IF VTEN$OWN[0]
  1088. THEN
  1089. BEGIN
  1090. VTEN$MULT[0] = TRUE;
  1091. VTEN$PROB[0] = VTEN$PROB[0] LOR VTP$TYP[BMUL];
  1092. GMO = GMO + 1;
  1093. END
  1094.  
  1095. VTEN$OWN[0] = TRUE;
  1096. VTEN$PROB[0] = VTEN$PROB[0] LOR I; # PROBLEM OF MEMBER #
  1097. VT$ITEM[VTEN$POINT[0]] = VTEN$WORD[0];
  1098. END # UPDATE *HOC* ENTRY #
  1099.  
  1100. END # SCAN SUBFAMILY *PFC* ENTRIES #
  1101.  
  1102. #
  1103. * IF AN UNEXPECTED *CIO* ERROR OCCURRED, ABORT.
  1104. #
  1105.  
  1106. IF STAT EQ CIOERR
  1107. THEN
  1108. BEGIN
  1109. MP$WD[1] = "VLAPFC"; # NAME FOR MESSAGE #
  1110. VLERROR(VE"SYSERR",ABRT); # ABORT WITH MESSAGE #
  1111. END
  1112.  
  1113. #
  1114. * IF THERE ARE GLOBAL MULTIPLE OWNERS, PERFORM VLAPFC2 TO FIND
  1115. * THE FIRST OWNER OF THE FILE.
  1116. #
  1117.  
  1118. IF GMO GR 0
  1119. THEN
  1120. BEGIN
  1121. VLAPFC2(GMO,GROUP);
  1122. END
  1123.  
  1124. END # VLAPFC #
  1125.  
  1126. TERM
  1127. PROC VLAPFC2(CNT,GROUP);
  1128. # TITLE VLAPFC2 - ANALYZE *PFC* PASS 2. #
  1129.  
  1130.  
  1131. BEGIN # VLAPFC2 #
  1132.  
  1133. #
  1134. ** VLAPFC2 - ANALYZE THE *PFC* PASS 2.
  1135. *
  1136. * *VLAPFC2* READS THE *PFC* EXTRACT FILE TO FIND THE FIRST OWNER
  1137. * SINCE MULTIPLE OWNERS WERE FOUND IN *VLAPFC*. ALL OTHER
  1138. * INTERSECTIONS WITH THIS PARTICULAR CHAIN ARE MARKED IN *VLAPFC*.
  1139. *
  1140. * PROC VLAPFC2(CNT)
  1141. *
  1142. * ENTRY (CNT) - COUNT OF MULTIPLE OWNERS.
  1143. * (SMINDX) - *SM* NUMBER BEING PROCESSED.
  1144. * ARRAY VTTABLE - VALIDATION TABLE ENTRIES.
  1145. * ARRAY EXTRACTFIL - *PFC* EXTRACT FILE *FET*.
  1146. *
  1147. * EXIT FOR THE *PFC* ENTRY THAT IS THE "FIRST" OWNER -
  1148. * . *VT* ENTRY *VTEN$1ST* FLAG IS SET.
  1149. * . A PROBLEM FILE RECORD IS WRITTEN AS "OTHR" RECORD
  1150. * TYPE.
  1151. #
  1152.  
  1153. ITEM GROUP I; # GROUP BEING PROCESSED #
  1154. ITEM CNT I; # COUNT OF MULTIPLE *PFC* OWNERS #
  1155.  
  1156. #
  1157. **** PROC VLAPFC2 - XREF LIST BEGIN.
  1158. #
  1159.  
  1160. XREF
  1161. BEGIN
  1162. PROC READ; # INTERFACE TO *READ* MACRO #
  1163. PROC READW; # INTERFACE TO *READW* MACRO #
  1164. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  1165. PROC VLWPROB; # WRITE PROBLEM FILE RECORD #
  1166. END
  1167.  
  1168. #
  1169. **** PROC VLAPFC2 - XREF LIST END.
  1170. #
  1171.  
  1172. DEF LISTCON #0#; # TURN OFF LISTING #
  1173.  
  1174. *CALL COMBFAS
  1175. *CALL COMTVLD
  1176. *CALL COMTVLF
  1177. *CALL COMTVLV
  1178.  
  1179. CONTROL EJECT;
  1180.  
  1181. #
  1182. * READ THE *PFC* EXTRACT FILE.
  1183. #
  1184.  
  1185. REWIND(EXTRACTFIL,RCL);
  1186. READ(EXTRACTFIL,NRCL);
  1187.  
  1188. #
  1189. * READ THE EXTRACT FILE UNTIL, 1) THE FILE STATUS IS NOT OK,
  1190. * OR 2) THERE ARE NO MORE MULTIPLE OWNERS.
  1191. #
  1192.  
  1193. STAT = 0;
  1194. REPEAT WHILE STAT EQ OK AND (CNT GR 0)
  1195. DO # PROCESS THE EXTRACT RECORD #
  1196. BEGIN # READING EXTRACT FILE #
  1197. READW(EXTRACTFIL,EXTRECORD,RLEXTR,STAT); # GET THE EXTRACT
  1198.   RECORD #
  1199. IF STAT NQ OK
  1200. THEN
  1201. BEGIN
  1202. TEST DUMMY; # DETECTED EOR, EOF, EOI OR ERROR
  1203.   #
  1204. END
  1205.  
  1206.  
  1207. #
  1208. * PROCESS ONLY THE RECORDS FOR THE GIVEN SM.
  1209. #
  1210.  
  1211. IF EXTR$SM[0] NQ SMINDX
  1212. THEN # NOT SELECTED #
  1213. BEGIN
  1214. TEST DUMMY;
  1215. END
  1216.  
  1217. IF EXTR$GP[0] NQ GROUP
  1218. THEN
  1219. BEGIN
  1220. TEST DUMMY;
  1221. END
  1222.  
  1223. #
  1224. * USING THE *ASA* IN THE EXTRACT RECORD, DEVELOP THE INDEX TO
  1225. * THE *VT* ARRAY FOR THIS RECORD.
  1226. #
  1227.  
  1228. P<VTLINK> = LOC(VTPTR); # BUILD LINK TO *VT* ENTRY #
  1229. VTL$GRT[0] = EXTR$GPT[0];
  1230. VTL$AU[0] = EXTR$AU[0];
  1231.  
  1232. IF (VTL$WORD[0] LS VTFIRST) OR (VTL$WORD[0] GR VTLAST)
  1233. THEN
  1234. BEGIN
  1235. TEST DUMMY; # SKIP IF THE INDEX IS BAD #
  1236. END
  1237.  
  1238. #
  1239. * GET THE *VT* ENTRY FOR THIS *PFC* EXTRACT RECORD.
  1240. #
  1241.  
  1242. VTEN$WORD[0] = VT$ITEM[VTPTR]; # GET *VT* ENTRY #
  1243.  
  1244. #
  1245. * DETERMINE IF THIS IS THE 1ST OWNER OF MULTIPLY-OWNED FILE.
  1246. #
  1247.  
  1248. IF VTEN$MULT[0] AND (NOT VTEN$1ST[0])
  1249. THEN
  1250. BEGIN
  1251. VTEN$1ST[0] = TRUE;
  1252. VT$ITEM[VTPTR] = VTEN$WORD[0]; # UPDATE ENTRY #
  1253. VLWPROB(REC"OTHR"); # BUILD PROBLEM ENTRY #
  1254. CNT = CNT - 1;
  1255. END
  1256.  
  1257. END # READING EXTRACT FILE #
  1258.  
  1259. END # VLAPFC2 #
  1260.  
  1261. TERM
  1262. PROC VLBFILL(FLD,NWDS);
  1263. # TITLE VLBFILL - BLANK FILL. #
  1264.  
  1265. BEGIN # VLBFILL #
  1266.  
  1267. #
  1268. ** VLBFILL - BLANK FILL.
  1269. *
  1270. * *VLBFILL* CHANGES ALL BINARY ZERO CHARACTERS STARTING IN *FLD*
  1271. * TO DISPLAY CODE BLANKS FOR A LENGTH OF *NWDS*.
  1272. *
  1273. * PROC VLBFILL
  1274. *
  1275. * ENTRY (FLD) - THE FIELD TO SCAN.
  1276. * (WDS) - NUMBER OF WORDS TO SCAN.
  1277. *
  1278. * EXIT (FLD) - CONTAINS THE BLANK FILLED FIELD.
  1279. #
  1280.  
  1281. ITEM FLD I; # FIELD TO SCAN #
  1282. ITEM NWDS I; # NUMBER OF WORDS TO SCAN #
  1283.  
  1284. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  1285.  
  1286. *CALL COMBFAS
  1287.  
  1288. ITEM CHARINDX I; # INDEX FOR CHARACTERS SCANNED #
  1289. ITEM NCHAR I; # NUMBER OF CHARACTERS TO SCAN #
  1290.  
  1291. BASED
  1292. ARRAY SCAN [0:0] S(200); # TO SCAN FIELD #
  1293. ITEM SCAN$WD C(00,00,200);
  1294.  
  1295. CONTROL EJECT;
  1296.  
  1297. #
  1298. * LOOK FOR A BINARY ZERO CHARACTER IN THE SPECIFIED FIELD AND
  1299. * CHANGE IT TO A BLANK.
  1300. #
  1301.  
  1302.  
  1303. P<SCAN> = LOC(FLD);
  1304.  
  1305. NCHAR = NWDS * 10; # NUMBER OF CHARACTERS TO SCAN #
  1306. SLOWFOR CHARINDX = 0 STEP 1 UNTIL NCHAR - 1
  1307. DO
  1308. BEGIN # CHARINDX #
  1309. IF C<CHARINDX,1>SCAN$WD[0] EQ 00
  1310. THEN # FOUND A BINARY ZERO #
  1311. BEGIN
  1312. C<CHARINDX,1>SCAN$WD[0] = " "; # REPLACE WITH A BLANK #
  1313. END
  1314.  
  1315. END # CHARINDX #
  1316.  
  1317. END # VLBFILL #
  1318.  
  1319. TERM
  1320. PROC VLBICT(E1,E2);
  1321. # TITLE VLBICT - INTERSECTING CHAIN REPORT. #
  1322.  
  1323. #
  1324. ***
  1325. #
  1326.  
  1327. BEGIN # VLBICT #
  1328.  
  1329. #
  1330. ** VLBICT - INTERSECTING CHAIN REPORT.
  1331. *
  1332. * *VLBICT* ISSUES THE INTERSECTING CHAIN DETAIL LINE TO THE
  1333. * REPORT FILE AND ALSO ISSUES THE SUBCATALOG HEADING LINE
  1334. * WHEN CALLED THE FIRST TIME FOR THE SUBCATALOG.
  1335. *
  1336. * PROC VLBICT(E1,E2)
  1337. *
  1338. * ENTRY (E1) - *VT* ENTRY INDEX (*FCT* ORDINAL, AU)
  1339. * FOR ENTRY 1.
  1340. * (E2) - *VT* ENTRY INDEX (*FCT* ORDINAL, AU)
  1341. * FOR ENTRY 2.
  1342. * (RPTFADR) - ADDRESS OF THE REPORT FILE *FET*.
  1343. * (SCDTLH) - SUBCATALOG DETAIL HEADING FLAG.
  1344. *
  1345. * EXIT INTERSECTING CHAIN DETAIL LINE WRITTEN TO THE REPORT
  1346. * FILE.
  1347. * (SCRPTED) - SUBCATALOG REPORTED FLAG.
  1348. * (SCDTLH) - SUBCATALOG DETAIL HEADING FLAG.
  1349. *
  1350. * NOTES TO FORCE LEADING ZEROS ON THE *FCT* NUMBER AND
  1351. * THE AU NUMBER THE *ZFD* VALUE IS ADDED BEFORE
  1352. * CONVERSION.
  1353. *
  1354. #
  1355.  
  1356. ITEM E1 I; # CHAIN ENTRY 1 #
  1357. ITEM E2 I; # CHAIN ENTRY 2 #
  1358.  
  1359. #
  1360. **** PROC VLBICT - XREF LIST BEGIN.
  1361. #
  1362.  
  1363. XREF
  1364. BEGIN
  1365. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  1366.   LINE #
  1367. PROC VLERROR; # ISSUE ERROR MESSAGE #
  1368. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  1369.   CONVERSION #
  1370. PROC VLSUBHD; # ISSUE REPORT SUBHEADING #
  1371. END
  1372.  
  1373. #
  1374. **** PROC VLBICT - XREF LIST END.
  1375. #
  1376.  
  1377.  
  1378.  
  1379. DEF LISTCON #0#; # TURN OFF LISTING #
  1380.  
  1381. *CALL COMBFAS
  1382. *CALL COMTVLD
  1383. *CALL COMTVLF
  1384. *CALL COMTVLV
  1385.  
  1386. #
  1387. * INTERSECTING CHAIN DETAIL LINE FOR THE REPORT FILE.
  1388. #
  1389.  
  1390. ARRAY ICLINE [0:0] S(3); # INTERSECTING CHAIN REPORT LINE
  1391.   #
  1392. BEGIN
  1393. ITEM ICL$DEF C(00,00,30) = ["000-0000 000-0000"];
  1394. ITEM ICL$FCT1 C(00,00,03); # *FCT* OF ENTRY ONE #
  1395. ITEM ICL$AU1 C(00,24,04); # *AU* OF ENTRY ONE #
  1396. ITEM ICL$FCT2 C(01,30,03); # *FCT* OF ENTRY TWO #
  1397. ITEM ICL$AU2 C(01,54,04); # *AU* OF ENTRY TWO #
  1398. END
  1399.  
  1400. CONTROL EJECT;
  1401.  
  1402. #
  1403. * IF THE DETAIL HEADING HAS NOT BEEN PRINTED, PRINT IT.
  1404. #
  1405.  
  1406.  
  1407. IF NOT SCDTLH
  1408. THEN
  1409. BEGIN
  1410. VLSUBHD(SHTYP"ICT"); # PRINT DETAIL HEADING #
  1411. SCRPTED = TRUE; # SUBCATALOG REPORTED FLAG #
  1412. SCDTLH = TRUE; # SET SUBCATALOG DETAIL HEADING
  1413.   FLAG #
  1414. END
  1415.  
  1416. #
  1417. * FORMAT AND PRINT THE INTERSECTING REPORT LINE.
  1418. #
  1419.  
  1420. P<VTLINK> = LOC(E1); # *VT* LINK FOR ENTRY 1 #
  1421. ICL$FCT1[0] = VLNTC(GROUPX*16+VTL$GRT[0]
  1422. +ZFD,"XCDD",3);
  1423. ICL$AU1[0] = VLNTC(VTL$AU[0] # GET AU #
  1424. +ZFD,"XCDD",4);
  1425. P<VTLINK> = LOC(E2); # *VT* LINK FOR ENTRY 2 #
  1426. ICL$FCT2[0] = VLNTC(GROUPX*16+VTL$GRT[0]
  1427. +ZFD,"XCDD",3);
  1428. ICL$AU2[0] = VLNTC(VTL$AU[0] # GET AU #
  1429. +ZFD,"XCDD",4);
  1430.  
  1431. RPLINE(RPTFADR,ICLINE,24,30,EOPL); # ISSUE LINE TO REPORT #
  1432.  
  1433.  
  1434. RETURN;
  1435. END # VLBICT #
  1436.  
  1437. TERM
  1438. PROC VLBLDVT(GROUP);
  1439.  
  1440. # TITLE VLBLDVT - BUILD VALIDATION TABLE. #
  1441.  
  1442. BEGIN # VLBLDVT #
  1443.  
  1444. #
  1445. ** VLBLDVT - BUILD THE VALIDATION TABLE.
  1446. *
  1447. * *VLBLDVT* READS THE *FCT* IN THE SELECTED SUBCATALOG (SM)
  1448. * OF THE SFM CATALOG BEING PROCESSED AND BUILDS A *VT*
  1449. * TABLE ENTRY FOR EACH AU OF EACH *FCT* ENTRY.
  1450. *
  1451. * PROC VLBLDVT
  1452. *
  1453. * ENTRY (SMINDX) - *SM* INDEX CURRENTLY PROCESSING.
  1454. * (PAR$AM) - AM PARAMETER FROM CONTROL CARD.
  1455. * (PAR$FM) - FM PARAMETER FROM CONTROL CARD.
  1456. * (SBINDX) - SUBFAMILY CURRENTLY PROCESSING.
  1457. * P<VTTABLE> - START OF *VT* TABLE IN MEMORY.
  1458. * (GROUP) - GROUP THAT WILL BE PROCESSED.
  1459. *
  1460. * EXIT (VTFIRST) - INDEX OF FIRST ENTRY IN THE TABLE.
  1461. * (VTLAST) - INDEX OF LAST ENTRY IN THE TABLE.
  1462. * (ARRAY VTTABLE) - CONTAINS ENTRIES FOR EACH AU IN
  1463. * THE SUBCATALOG.
  1464. *
  1465. * MESSAGES *SFM CATALOG READ ERROR.*
  1466. *
  1467. * NOTES IF THE AM PARAMETER WAS SELECTED, THE *VLCMAP*
  1468. * ROUTINE IS CALLED TO CHECK THE SMMAP ENTRY FOR EACH
  1469. * *FCT* READ.
  1470. *
  1471. * THESE *VT* ENTRY FIELDS ARE SET DEPENDING ON THE
  1472. * *FCT* ENTRY -
  1473. * . VTEN$NONE - NO CARTRIDGE ( *VSN* = BLANKS ).
  1474. * . VTEN$SM - SMMAP ENTRY ERROR.
  1475. * . VTEN$INHB - INHIBIT FLAG SET.
  1476. * . VTEN$LOST - LOST CARTRIDGE FLAG SET.
  1477. * . VTEN$EWPE - EXCESSIVE WRITE PARITY ERRORS.
  1478. * . VTEN$CONF - AU CONFLICT FLAG SET.
  1479. * . VTEN$FROZ - FROZEN FLAG SET.
  1480. * . VTEN$SOF - START OF FRAGMENT SET.
  1481. * . VTEN$ALOC - AU ALLOCATED.
  1482. * . VTEN$HOC - AU IS HEAD OF CHAIN.
  1483. * . VTEN$EOC - AU IS END OF CHAIN.
  1484. * . VTEN$LINK - INDEX TO NEXT AU IN CHAIN.
  1485. *
  1486. #
  1487.  
  1488. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTINGS #
  1489.  
  1490. #
  1491. **** PROC VLBLDVT - XREF LIST BEGIN.
  1492. #
  1493.  
  1494. XREF
  1495. BEGIN
  1496. PROC CGETFCT; # GET AN *FCT* ENTRY #
  1497. PROC VLCMAP; # *SM* MAP LOOKUP #
  1498. PROC VLERROR; # ISSUE ERROR MESSAGE #
  1499. END
  1500.  
  1501. #
  1502. **** PROC VLBLDVT - XREF LIST END.
  1503. #
  1504.  
  1505.  
  1506.  
  1507.  
  1508. *CALL COMBFAS
  1509. *CALL COMBCMD
  1510. *CALL COMBCMS
  1511. *CALL COMBMAP
  1512. *CALL COMBMCT
  1513. *CALL COMTVLD
  1514. *CALL COMTVLM
  1515. *CALL COMTVLV
  1516.  
  1517. ITEM EOCS B; # SAVE END OF CHAIN BIT #
  1518. ITEM GROUP U; # GROUP TO BE PROCESSED #
  1519. ITEM LINKHS I; # SAVE LINK POINTER HEADER #
  1520. ITEM NEXT I; # INDEX TO *FCT* ORD TABLE #
  1521. ITEM SMERR B; # FLAG RESULTS OF VLCMAP PROCESS #
  1522. ITEM SW U; # AU WORD OFFSET #
  1523. ITEM SP U; # AU POSITION IN WORD #
  1524. ITEM START I; # START OF PROCESSING #
  1525. ITEM TERMX I; # TERMINATION ORDINAL #
  1526. ITEM ITEMP I; # TEMPORARY #
  1527. ITEM I I; # INDUCTION VARIABLE #
  1528. ITEM VPOINT U; # VOLUME HEAD POINTER #
  1529.  
  1530. CONTROL EJECT;
  1531.  
  1532. #
  1533. * INITIALIZE *VT* POINTERS.
  1534. #
  1535.  
  1536. P<VTLINK> = LOC(VTFIRST); # BUILD STARTING LINK ADDRESS #
  1537. VTL$GRT[0] = 0;
  1538. VTL$AU[0] = 1;
  1539. VTPTR = VTL$WORD[0] - 1; # INITIALIZE ENTRY POINTER #
  1540. GRTX = -1;
  1541. EOCS = FALSE;
  1542.  
  1543. #
  1544. * PROCESS FOR EACH *FCT* RECORD.
  1545. #
  1546.  
  1547. START = GROUP * 16;
  1548. TERMX = START + 15;
  1549. SLOWFOR FCTORD = START STEP 1
  1550. WHILE FCTORD LQ TERMX
  1551. AND FCTORD LQ (PRM$ENTRC[SMINDX] + 15)
  1552. DO
  1553. BEGIN # *FCT* PROCESSING #
  1554. GRTX = GRTX + 1;
  1555.  
  1556. #
  1557. * READ THE *FCT* RECORD.
  1558. #
  1559.  
  1560. STAT = 0;
  1561. FB$CWRD[0] = 0;
  1562. CGETFCT(PAR$FM,SBINDX,SMINDX,FCTORD,LOC(VLFCTAREA),0,STAT);
  1563. IF STAT NQ CMASTAT"NOERR"
  1564. THEN
  1565. BEGIN
  1566. VLERROR(VE"CATR",ABRT); # ABORT WITH MESSAGE #
  1567. END
  1568.  
  1569. P<FCT> = LOC(VLFCTAREA);
  1570. SMERR = FALSE; # INITIALIZE TO NO *SM* ERROR #
  1571.  
  1572. #
  1573. * IF THE *AM* OPTION WAS SELECTED, PERFORM A SMMAP CHECK.
  1574. #
  1575.  
  1576. IF PAR$AM NQ 0
  1577. THEN
  1578. BEGIN
  1579. VLCMAP(SMERR);
  1580. END
  1581.  
  1582. #
  1583. * PROCESS FOR EACH AU OF THE *FCT* RECORD.
  1584. #
  1585.  
  1586. SLOWFOR AUINDX = 1 STEP 1 UNTIL INAVOT
  1587. DO
  1588. BEGIN # AU PROCESSING #
  1589.  
  1590. #
  1591. * CALCULATE AU WORD AND OFFSET INTO *FCT* AREA.
  1592. #
  1593.  
  1594. SW = FCT$WD(AUINDX);
  1595. SP = FCT$WP(AUINDX);
  1596.  
  1597. IF FCT$CAUF(SW,SP) EQ 0
  1598. THEN # SAVE POINTER AT VOLUME START #
  1599. BEGIN
  1600. VPOINT = FCT$LINK(SW,SP);
  1601. END
  1602.  
  1603. #
  1604. * BUILD *VT* ENTRY FOR THE AU.
  1605. #
  1606.  
  1607. VTEN$WORD[0] = 0;
  1608. IF FCT$CSND[0] EQ " "
  1609. OR FCT$1ST[0] EQ 0
  1610. THEN
  1611.  
  1612. #
  1613. * BUILD *VT* ENTRY WHEN NO CARTRIDGE.
  1614. #
  1615.  
  1616. BEGIN
  1617. VTEN$NONE[0] = TRUE;
  1618. EOCS = FALSE;
  1619. VPOINT = 0;
  1620. END
  1621.  
  1622. ELSE
  1623.  
  1624. #
  1625. * BUILD *VT* ENTRY WHEN CARTRIDGE EXISTS.
  1626. #
  1627.  
  1628. BEGIN # CARTRIDGE EXISTS #
  1629. VTEN$SME[0] = SMERR;
  1630. VTEN$INHB[0] = FCT$IAF[0];
  1631. VTEN$LOST[0] = FCT$LCF[0];
  1632. VTEN$EWPE[0] = FCT$EEF[0];
  1633. VTEN$CONR[0] = FCT$AUCF(SW,SP);
  1634. VTEN$FROZR[0] = FCT$FRCF(SW,SP);
  1635. VTEN$SOFR[0] = FCT$SFF(SW,SP);
  1636. VTEN$ALOCR[0] = FCT$FBF(SW,SP);
  1637. VTEN$FCF[0] = FCT$FCF[0];
  1638.  
  1639. #
  1640. * PROCESS AN ALLOCATED HEAD OF VOLUME *AU*.
  1641. #
  1642.  
  1643. IF VTEN$ALOC[0] AND FCT$CAUF(SW,SP) EQ 0
  1644. THEN
  1645. BEGIN # AU ALLOCATED #
  1646. ITEMP = FCT$CC(SW,SP);
  1647. IF ITEMP EQ CHAINCON"FIRST"
  1648. THEN
  1649. BEGIN
  1650. VTEN$HOC[0] = TRUE; # HEAD OF CHAIN #
  1651. END
  1652.  
  1653. IF ITEMP EQ CHAINCON"LAST"
  1654. THEN
  1655. BEGIN
  1656. EOCS = TRUE;
  1657. END
  1658.  
  1659. IF ITEMP EQ CHAINCON"ONLY"
  1660. THEN
  1661. BEGIN
  1662. VTEN$HOC[0] = TRUE; # SET BOTH HEAD AND #
  1663. EOCS = TRUE;
  1664. END
  1665.  
  1666. #
  1667. * IF NOT THE END OF THE CHAIN, SET LINK TO NEXT IN CHAIN.
  1668. #
  1669.  
  1670. IF NOT EOCS
  1671. THEN
  1672. BEGIN # LINK TO THE NEXT AU #
  1673. ITEMP = FCT$CLKOCL(SW,SP);
  1674. LINKHS = GRTX;
  1675. IF ITEMP NQ 0
  1676. THEN
  1677. BEGIN
  1678. VTEN$OCL[0] = ITEMP;
  1679. LINKHS = FCT$OCL[0];
  1680. IF ITEMP EQ 2
  1681. THEN
  1682. BEGIN
  1683. LINKHS = FCT$OCL1[0];
  1684. END
  1685.  
  1686. ELSE
  1687. BEGIN
  1688. IF ITEMP EQ 3
  1689. THEN
  1690. BEGIN
  1691. LINKHS = FCT$OCL2[0];
  1692. END
  1693.  
  1694. END
  1695.  
  1696. END
  1697.  
  1698. END # LINK TO THE NEXT AU #
  1699.  
  1700. END # AU ALLOCATED #
  1701.  
  1702. IF VTEN$ALOC[0] AND FCT$LEN(SW,SP) NQ 0
  1703. THEN # *AU*-S REMAIN IN VOLUME #
  1704. BEGIN
  1705. VTEN$LINKL[0] = AUINDX + 1;
  1706. VTEN$LINKH[0] = GRTX;
  1707. END
  1708.  
  1709. IF VTEN$ALOC[0] AND FCT$LEN(SW,SP) EQ 0
  1710. THEN
  1711. BEGIN
  1712. VTEN$LINKL[0] = VPOINT;
  1713. VTEN$LINKH[0] = GRTX;
  1714. VTEN$EOC[0] = EOCS;
  1715. IF EOCS
  1716. THEN
  1717. BEGIN
  1718. VTEN$LINKH[0] = 0;
  1719. END
  1720.  
  1721. IF NOT EOCS
  1722. THEN
  1723. BEGIN
  1724. VTEN$LINKH[0] = LINKHS;
  1725. END
  1726.  
  1727. EOCS = FALSE;
  1728. END
  1729.  
  1730. END # CARTRIDGE EXISTS #
  1731.  
  1732. #
  1733. * PUT *VT* ENTRY INTO TABLE IN MEMORY.
  1734. #
  1735.  
  1736. VTPTR = VTPTR + 1; # ADDRESS FOR NEXT ENTRY #
  1737.  
  1738. VT$ITEM[VTPTR] = VTEN$WORD[0]; # PUT ENTRY IN TABLE #
  1739.  
  1740. END # AU PROCESSING #
  1741.  
  1742. VTPTR = VTPTR + 2048 - INAVOT;
  1743. END # *FCT* PROCESSING #
  1744.  
  1745. #
  1746. * MARK END OF ENTRIES IN *VT* TABLE.
  1747. #
  1748.  
  1749. VTLAST = VTPTR; # SAVE END OF *VT* TABLE #
  1750.  
  1751. RETURN;
  1752.  
  1753. END # VLBLDVT #
  1754.  
  1755. TERM
  1756. PROC VLCFS;
  1757. # TITLE VLCFS - CHAIN FRAGMENT SCAN. #
  1758.  
  1759.  
  1760. BEGIN # VLCFS #
  1761.  
  1762. #
  1763. ** VLCFS - CHAIN FRAGMENT SCAN.
  1764. *
  1765. * *VLCFS* SCANS ALL ENTRIES IN THE *VT* TABLE TO DETECT CHAIN
  1766. * FRAGMENTS. CHAIN FRAGMENTS ARE *VT* ENTRIES THAT ARE ALLOCATED
  1767. * BUT ARE NOT MARKED AS MEMBERS OF NORMAL CHAINS (SEE *VLNCS*).
  1768. *
  1769. * PROC VLCFS
  1770. *
  1771. * ENTRY (VTFIRST) - INDEX TO FIRST ENTRY IN *VT*.
  1772. * (VTLAST) - INDEX TO LAST ENTRY IN *VT*.
  1773. * ARRAY VTTABLE - VALIDATION TABLE ENTRIES.
  1774. *
  1775. * EXIT THE FOLLOWING FIELDS IN THE *VT* ENTRIES MAY BE
  1776. * UPDATED IF FRAGMENTS ARE DETECTED.
  1777. * . VTEN$POINT - INDEX TO HEAD OF CHAIN.
  1778. * . VTEN$SOF - START OF FRAGMENT FLAG SET.
  1779. * . VTEN$ILL - SET IF CHAIN IS ILL-FORMED.
  1780. * . VTEN$INTC - SET IF CHAIN IS INTERSECTING.
  1781. *
  1782. * THE INTERSECTING CHAIN DETAIL LINES ARE ISSUED
  1783. * TO THE REPORT FILE IF INTERSECTIONS ARE DETECTED.
  1784. *
  1785. * NOTES AN ENTRY IS MARKED AS BEING ON A CHAIN BY
  1786. * SETTING THE VTEN$POINT FIELD EQUAL TO *HOC* INDEX.
  1787. *
  1788. * THE CHAIN IS FOLLOWED UNTIL -
  1789. * . AN END-OF-CHAIN ENTRY IS DETECTED.
  1790. * . AN ILL-FORMED CHAIN IS DETECTED.
  1791. * . AN INTERSECTING CHAIN IS DETECTED.
  1792. *
  1793. * AN ILL-FORMED CHAIN HAS AN ENTRY THAT LINKS TO ANOTHER
  1794. * ENTRY ALREADY ON THE CHAIN OR LINKS TO AN ENTRY
  1795. * THAT IS NOT ALLOCATED OR HAS A LINK THAT IS NOT ZERO
  1796. * WHEN THE *EOC* IS SET.
  1797. *
  1798. * AN INTERSECTING CHAIN IS ONE WHOSE ENTRY LINKS TO AN
  1799. * ENTRY ALREADY ON A DIFFERENT CHAIN.
  1800. *
  1801. * IF A FRAGMENT CHAIN RUNS INTO ANOTHER FRAGMENT CHAIN,
  1802. * THE SECOND FRAGMENT IS CONSIDERED A TAIL OF THE
  1803. * FIRST. IT IS FOLLOWED AND RE-MARKED SO THAT ITS
  1804. * POINTER FIELD *VTEN$POINT* CONTAINS THE INDEX OF THE
  1805. * FIRST START OF FRAGMENT ENTRY.
  1806. *
  1807. #
  1808.  
  1809. #
  1810. **** PROC VLCFS - XREF LIST BEGIN.
  1811. #
  1812.  
  1813. XREF
  1814. BEGIN
  1815. PROC VLBICT; # INTERSECTING CHAIN REPORT #
  1816. END
  1817.  
  1818. #
  1819. **** PROC VLCFS - XREF LIST END.
  1820. #
  1821.  
  1822. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  1823.  
  1824. *CALL COMBFAS
  1825. *CALL COMTVLD
  1826. *CALL COMTVLV
  1827.  
  1828.  
  1829. STATUS CHAIN # CHAIN STATUS #
  1830. OK, # GOOD CHAIN #
  1831. ILL, # ILL-FORMED CHAIN #
  1832. INTC; # INTERSECTING CHAIN #
  1833.  
  1834. ITEM ENDCHAIN B; # END OF CHAIN FLAG #
  1835. ITEM HOCSTAT S : CHAIN; # CHAIN STATUS #
  1836. ITEM I I; # TEMPORARY VARIABLE #
  1837. ITEM TAIL B; # TAIL FLAG #
  1838. ITEM TAILPTR I; # *VT* INDEX OF A TAIL #
  1839.  
  1840. CONTROL EJECT;
  1841.  
  1842. #
  1843. * SCAN *VT* FOR ALLOCATED ENTRIES NOT ON CHAINS. THIS VALIDATION
  1844. * STEP IS TO IDENTIFY PROBLEMS WITH AU-S THAT ARE NOT ON VALID
  1845. * CHAINS.
  1846. #
  1847.  
  1848. SLOWFOR I = VTFIRST STEP 1 UNTIL VTLAST
  1849. DO
  1850. BEGIN # *VT* ENTRY #
  1851. VTEN$WORD[0] = VT$ITEM[I]; # GET *VT* ENTRY #
  1852.  
  1853. #
  1854. * FIND AN ALLOCATED AU THAT IS NOT ON A CHAIN.
  1855. * IT IS DEFINED AS A FRAGMENT CHAIN. IF THE ENTRY IS ALREADY
  1856. * ASSIGNED TO A CHAIN, THE VTEN$POINT IS SET.
  1857. #
  1858.  
  1859. IF NOT VTEN$ALOC[0] OR VTEN$POINT[0] NQ 0
  1860. THEN
  1861. BEGIN
  1862. TEST I; # SKIP, NOT A FRAGMENT #
  1863. END
  1864.  
  1865.  
  1866. VTEN$SOF[0] = TRUE; # SET START OF FRAGMENT FLAG #
  1867.  
  1868. #
  1869. * INITIALIZE FIELDS USED TO FOLLOW THE FRAGMENT CHAIN.
  1870. * THE VARIABLE I = INDEX OF FRAGMENT *HOC*.
  1871. #
  1872.  
  1873. VTPTR = I; # START AT THIS *HOC* #
  1874. ENDCHAIN = FALSE;
  1875. HOCSTAT = S"OK";
  1876. TAIL = FALSE;
  1877. TAILPTR = 0;
  1878.  
  1879. #
  1880. * PROCESS EACH ENTRY IN FRAGMENT STARTING WITH *HOC* ENTRY.
  1881. #
  1882.  
  1883. REPEAT WHILE NOT ENDCHAIN
  1884. DO # SCAN FRAGMENT CHAIN #
  1885. BEGIN # FRAGMENT PROCESSING #
  1886.  
  1887. IF (VTEN$POINT[0] EQ 0) OR (VTEN$POINT[0] EQ TAILPTR)
  1888. THEN
  1889.  
  1890. #
  1891. * ENTRY BELONGS TO THIS CHAIN (EITHER A NEW ENTRY OR A TAIL ENTRY).
  1892. #
  1893.  
  1894. BEGIN # ADD ENTRY TO THE FRAGMENT CHAIN #
  1895. VTEN$POINT[0] = I;
  1896. IF NOT VTEN$ALOC[0]
  1897. THEN
  1898. BEGIN
  1899. VTEN$SOF[0] = TRUE;
  1900. END
  1901.  
  1902. IF NOT VTEN$ALOC[0] OR VTEN$EOC[0] AND VTEN$LINK[0] NQ 0
  1903. THEN
  1904. BEGIN
  1905. HOCSTAT = S"ILL"; # ILL-FORMED CHAIN #
  1906. END
  1907.  
  1908. END # ADD ENTRY TO THE FRAGMENT CHAIN #
  1909.  
  1910. ELSE
  1911.  
  1912. #
  1913. * ENTRY ALREADY ON SOME OTHER CHAIN.
  1914. #
  1915.  
  1916. BEGIN # ENTRY ON A CHAIN #
  1917. IF VTEN$SOF[0] AND (VTPTR NQ I) # NOT LOOPING #
  1918. AND VTEN$ALOC[0] AND VTPTR EQ VTEN$POINT[0]
  1919. THEN
  1920.  
  1921. #
  1922. * THE OTHER CHAIN IS A TAIL. THE CHAIN BEING FOLLOWED POINTS TO
  1923. * THE BEGINNING OF A FRAGMENT CHAIN. MAKE THE TWO CHAINS INTO ONE
  1924. * FRAGMENT CHAIN BY FOLLOWING THIS TAIL AND UPDATING THE
  1925. * VTEN$POINT.
  1926. #
  1927.  
  1928. BEGIN # START TAIL #
  1929. TAIL = TRUE;
  1930. VTEN$SOF[0] = FALSE;
  1931. VTEN$INTC[0] = FALSE;
  1932. VTEN$ILL[0] = FALSE;
  1933. TAILPTR = VTEN$POINT[0]; # MARK THIS ONE, MARK REST IN
  1934.   MAIN LOOP #
  1935. VTEN$POINT[0] = I;
  1936. END # START TAIL #
  1937.  
  1938. ELSE
  1939.  
  1940. #
  1941. * CHAIN INTERSECTS OR IS ILL-FORMED.
  1942. #
  1943.  
  1944. BEGIN # PROBLEM CHAIN #
  1945. VTEN$INTS[0] = TRUE;
  1946. IF VTEN$POINT[0] EQ I
  1947. THEN # THE CHAIN IS ILL-FORMED #
  1948. BEGIN
  1949. HOCSTAT = S"ILL";
  1950. VTEN$LOOP[0] = TRUE;
  1951. END
  1952.  
  1953. ELSE # THE CHAIN INTERSECTS #
  1954. BEGIN
  1955. HOCSTAT = S"INTC";
  1956. VLBICT(I,VTEN$POINT[0]); # REPORT CHAINS #
  1957. END
  1958.  
  1959. END # PROBLEM CHAIN #
  1960.  
  1961. END # ENTRY ON A CHAIN #
  1962.  
  1963.  
  1964.  
  1965. #
  1966. * UPDATE THE AU ENTRY.
  1967. #
  1968.  
  1969. VT$ITEM[VTPTR] = VTEN$WORD[0]; # UPDATE ENTRY #
  1970.  
  1971. #
  1972. * AN END OF CHAIN CONDITION IS SET HERE IF:
  1973. * 1) *EOC* FLAG IS SET, OR
  1974. * 2) A LINKAGE PROBLEM HAS BEEN DETECTED.
  1975. #
  1976.  
  1977. ENDCHAIN = VTEN$EOC[0] OR HOCSTAT NQ S"OK"; # BAD CHAIN #
  1978.  
  1979. #
  1980. * GET LINK TO NEXT AU IF NOT AT END OF CHAIN.
  1981. #
  1982.  
  1983. IF NOT ENDCHAIN
  1984. THEN
  1985. BEGIN # GET NEXT LINK #
  1986. VTPTR = VTEN$LINK[0];
  1987.  
  1988. IF VTPTR LS VTFIRST OR VTPTR GR VTLAST
  1989. THEN # LINK IS BAD #
  1990. BEGIN
  1991. HOCSTAT = S"ILL"; # ILL-FORMED CHAIN #
  1992. ENDCHAIN = TRUE;
  1993. END
  1994.  
  1995. END # GET NEXT LINK #
  1996.  
  1997. #
  1998. * GET NEXT AU IN CHAIN.
  1999. #
  2000.  
  2001. IF NOT ENDCHAIN
  2002. THEN
  2003. BEGIN
  2004. VTEN$WORD[0] = VT$ITEM[VTPTR]; # NEXT IN CHAIN #
  2005. END
  2006.  
  2007. END # FRAGMENT PROCESSING #
  2008.  
  2009. #
  2010. * UPDATE OTHER HEAD OF CHAIN IF INTERSECTING.
  2011. #
  2012.  
  2013. IF HOCSTAT EQ S"INTC"
  2014. THEN
  2015. BEGIN
  2016. VTEN$WORD[0] = VT$ITEM[VTEN$POINT[0]]; # GET *HOC* ENTRY #
  2017. VTEN$INTC[0] = TRUE; # SET INTERSECTING FLAG #
  2018. VT$ITEM[VTEN$POINT[0]] = VTEN$WORD[0]; # STORE *HOC* ENTRY #
  2019. END
  2020.  
  2021. #
  2022. * UPDATE HEAD OF CHAIN ENTRY.
  2023. #
  2024.  
  2025. VTEN$WORD[0] = VT$ITEM[I]; # GET *HOC* ENTRY #
  2026. IF HOCSTAT EQ S"ILL"
  2027. THEN
  2028. BEGIN
  2029. VTEN$ILL[0] = TRUE; # SET ILL-FORMED FLAG #
  2030. END
  2031.  
  2032. IF HOCSTAT EQ S"INTC"
  2033. THEN
  2034. BEGIN
  2035. VTEN$INTC[0] = TRUE; # SET INTERSECTING FLAG #
  2036. END
  2037.  
  2038. VT$ITEM[I] = VTEN$WORD[0]; # STORE *HOC* ENTRY #
  2039.  
  2040. END # *VT* ENTRY #
  2041.  
  2042. END # VLCFS #
  2043.  
  2044. TERM
  2045. PROC VLCMAP(CMERR);
  2046. # TITLE VLCMAP - *SM* MAP LOOKUP. #
  2047.  
  2048.  
  2049. BEGIN # VLCMAP #
  2050.  
  2051. #
  2052. ** VLCMAP - SMMAP LOOKUP.
  2053. *
  2054. * *VLCMAP* READS THE SMMAP ENTRY FOR THE GIVEN Y,Z COORDINATES
  2055. * IN THE *FCT* RECORD AND VERIFIES THAT THE ENTRY IS VALID.
  2056. *
  2057. * PROC VLCMAP(CMERR)
  2058. *
  2059. * ENTRY (SMINDX) - *SM* INDEX.
  2060. * (FCTORD) - *FCT* ORDINAL.
  2061. * (PAR$FM) - FAMILY.
  2062. * (SBINDX) - SUBFAMILY INDEX.
  2063. * (ARRAY VLFCTAREA) - CONTAINS *FCT* RECORD.
  2064. *
  2065. * EXIT (CMERR) = TRUE IF ERROR DETECTED.
  2066. * = FALSE IF NO ERROR.
  2067. * (ARRAY VLCMAP) - BIT SET FOR GIVEN Y, Z IF THE
  2068. * SMMAP/FCT ENTRIES POINT TO EACH
  2069. * OTHER.
  2070. *
  2071. * IF AN ERROR IS DETECTED, A PROBLEM FILE
  2072. * RECORD (RT"FCT") IS WRITTEN.
  2073. *
  2074. * MESSAGES * SMMAP READ ERROR.*
  2075. *
  2076. * NOTES AN ERROR IN THE ENTRY IS DETECTED IF -
  2077. * . IT IS NOT ASSIGNED TO THE SUBFAMILY.
  2078. * . FAMILY IN ENTRY IS WRONG.
  2079. * . SUBFAMILY IS WRONG.
  2080. * . *FCT* ORDINAL IS WRONG.
  2081. * . *CSN* IS WRONG.
  2082. *
  2083. #
  2084.  
  2085. ITEM CMERR B; # INDICATES *SM* MAP ERROR #
  2086.  
  2087. #
  2088. **** PROC VLCMAP - XREF LIST BEGIN.
  2089. #
  2090.  
  2091. XREF
  2092. BEGIN
  2093. PROC MGETENT; # RETURN THE MAP ENTRY TO THE
  2094.   CALLER #
  2095. PROC VLERROR; # ISSUE ERROR MESSAGE #
  2096. PROC VLWPROB; # WRITE PROBLEM FILE RECORD #
  2097. PROC ZFILL; # ZERO FILLS A CHARACTER ITEM #
  2098. END
  2099.  
  2100. #
  2101. **** PROC VLCMAP - XREF LIST END.
  2102. #
  2103.  
  2104. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  2105.  
  2106. *CALL COMBFAS
  2107. *CALL COMBCMD
  2108. *CALL COMBCMS
  2109. *CALL COMBMAP
  2110. *CALL COMBMCT
  2111. *CALL COMTVLD
  2112. *CALL COMTVLF
  2113. *CALL COMTVLM
  2114.  
  2115.  
  2116. ITEM ORD U; # TO CALCULATE *SM* MAP ORDINAL #
  2117.  
  2118. CONTROL EJECT;
  2119.  
  2120.  
  2121. P<FCT> = LOC(VLFCTAREA);
  2122.  
  2123. #
  2124. * SAVE Y AND Z COORDINATES.
  2125. #
  2126.  
  2127. Y = FCT$Y[0];
  2128. Z = FCT$Z[0];
  2129.  
  2130. CMERR = FALSE; # ASSUME NO ERROR #
  2131.  
  2132. #
  2133. * IF *FCT* DOES NOT POINT TO A SMMAP ENTRY, RETURN.
  2134. #
  2135.  
  2136. IF Y EQ 0 AND Z EQ 0
  2137. THEN
  2138. BEGIN
  2139. RETURN;
  2140. END
  2141.  
  2142. ZFILL(VLMAPAREA,MAPENTL); # CLEAR MAP ENTRY AREA #
  2143.  
  2144.  
  2145. #
  2146. * READ *SM* MAP ENTRY.
  2147. #
  2148.  
  2149. ORD = MAXORD - Z - (Y * (MAX$Z+1));
  2150. MGETENT(SMINDX,ORD,LOC(VLMAPAREA),STAT); # GET *SM* ENTRY #
  2151.  
  2152. #
  2153. * IF ERROR WHEN READING THE SMMAP, ISSUE MESSAGE AND ABORT.
  2154. #
  2155.  
  2156. IF (STAT NQ CMASTAT"NOERR") AND (STAT NQ CMASTAT"ORDERR")
  2157. THEN
  2158. BEGIN
  2159. VLERROR(VE"MAPR",ABRT); # ABORT WITH MESSAGE #
  2160. END
  2161.  
  2162.  
  2163. P<SMUMAP> = LOC(VLMAPAREA);
  2164. #
  2165. * IF MAP ENTRY IS FOR ANOTHER SUBFAMILY, RETURN.
  2166. #
  2167.  
  2168. IF SBINDX NQ CM$SUB[0]
  2169. THEN ##
  2170. BEGIN
  2171. RETURN;
  2172. END
  2173.  
  2174.  
  2175. #
  2176. * IF THE *FCT* POINTS TO AN INCORRECT SMMAP ENTRY, WRITE THE
  2177. * ENTRY TO THE PROBLEM FILE.
  2178. #
  2179.  
  2180. IF CM$CODE[0] NQ CUBSTAT"SUBFAM" ##
  2181. OR PAR$FM NQ CM$FMLYNM[0] ##
  2182. OR SBINDX NQ CM$SUB[0] ##
  2183. OR FCTORD NQ CM$FCTORD[0] ##
  2184. OR FCT$CSND[0] NQ CM$CSND[0] # #
  2185. THEN
  2186. BEGIN
  2187. CMERR = TRUE;
  2188. CSN = FCT$CSND[0];
  2189. VLWPROB(REC"FCT"); # WRITE PROBLEM ENTRY #
  2190. END
  2191.  
  2192. #
  2193. * IF *FCT* AND *SM* POINT TO EACH OTHER, SET THE BIT IN CMAP
  2194. * ARRAY TO INDICATE THAT A *FCT* ENTRY EXISTS FOR THIS SMMAP
  2195. * ENTRY.
  2196. #
  2197.  
  2198. IF PAR$FM EQ CM$FMLYNM[0] AND SBINDX EQ CM$SUB[0] ##
  2199. AND FCTORD EQ CM$FCTORD[0]
  2200. THEN
  2201. BEGIN
  2202. B<Y,1>VLCM$Z[Z] = 1;
  2203. END
  2204.  
  2205.  
  2206. END # VLCMAP #
  2207.  
  2208. TERM
  2209. PROC VLSMSC;
  2210. # TITLE VLSMSC - *SM* MAP SCAN. #
  2211.  
  2212.  
  2213. BEGIN # VLSMSC #
  2214.  
  2215. #
  2216. ** VLSMSC - SMMAP SCAN.
  2217. *
  2218. * *VLSMSC* READS THE SMMAP FILE TO FIND ALL ENTRIES ASSIGNED
  2219. * TO THE SPECIFIED SUBFAMILY WHICH HAVE NO CORRESPONDING
  2220. * *FCT* ENTRY (THE BIT IN THE *VLCMAP* ARRAY IS OFF).
  2221. *
  2222. * PROC VLSMSC
  2223. *
  2224. * ENTRY (SMINDX) - *SM* INDEX.
  2225. * (PAR$FM) - FAMILY.
  2226. * (SBINDX) - SUBFAMILY INDEX.
  2227. * (ARRAY VLCMAP) - BIT MAP FOR SMMAP ENTRIES THAT
  2228. * HAVE VALID *FCT* ENTRIES.
  2229. *
  2230. * EXIT IF AN ERROR IS DETECTED, THEN A PROBLEM FILE
  2231. * RECORD (RT"SM") IS WRITTEN.
  2232. *
  2233. * MESSAGES * SMMAP READ ERROR.*
  2234. #
  2235.  
  2236. #
  2237. **** PROC VLSMSC - XREF LIST BEGIN.
  2238. #
  2239.  
  2240. XREF
  2241. BEGIN
  2242. PROC MGETENT; # RETURN THE MAP ENTRY TO THE
  2243.   CALLER #
  2244. PROC VLERROR; # ISSUE ERROR MESSAGE #
  2245. PROC VLWPROB; # WRITE PROBLEM FILE RECORD #
  2246. END
  2247.  
  2248. #
  2249. **** PROC VLSMSC - XREF LIST END.
  2250. #
  2251.  
  2252. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  2253.  
  2254. *CALL COMBFAS
  2255. *CALL COMBCMD
  2256. *CALL COMBCMS
  2257. *CALL COMBMAP
  2258. *CALL COMBMCT
  2259. *CALL COMTVLD
  2260. *CALL COMTVLF
  2261. *CALL COMTVLM
  2262.  
  2263.  
  2264. ITEM ORD I; # ORDINAL #
  2265.  
  2266. CONTROL EJECT;
  2267.  
  2268. #
  2269. * READ THE ENTIRE SMMAP FILE.
  2270. #
  2271.  
  2272. SLOWFOR Z = 0 STEP 1 UNTIL MAX$Z
  2273. DO
  2274. BEGIN # Z COORDINATE SCAN #
  2275. SLOWFOR Y = 0 STEP 1 UNTIL MAX$Y
  2276. DO
  2277. BEGIN # Y COORDINATE SCAN #
  2278. ORD = MAXORD - Z - (Y * (MAX$Z+1));
  2279. MGETENT(SMINDX,ORD,LOC(VLMAPAREA),STAT); # READ ENTRY #
  2280. IF STAT NQ CMASTAT"NOERR"
  2281. THEN
  2282. BEGIN
  2283. VLERROR(VE"MAPR",ABRT); # ABORT WITH MESSAGE #
  2284. END
  2285.  
  2286. P<SMUMAP> = LOC(VLMAPAREA);
  2287.  
  2288. #
  2289. * IF THE SMMAP ENTRY IS ASSIGNED TO THE SUBFAMILY BUT THERE
  2290. * WAS NO CORRESPONDING *FCT* ENTRY, WRITE AN ENTRY TO THE PROBLEM
  2291. * FILE.
  2292. #
  2293.  
  2294. IF (CM$CODE[0] EQ CUBSTAT"SUBFAM")
  2295. AND (CM$FMLYNM[0] EQ PAR$FM) AND (CM$SUB[0] EQ SBINDX)
  2296. AND (B<Y,1>VLCM$Z[Z] EQ 0)
  2297. AND CM$FCTORD[0] NQ 0
  2298. AND CM$CSND[0] NQ " "
  2299. THEN
  2300. BEGIN
  2301. CSN = CM$CSND[0]; # FIELDS FOR VLWPROB #
  2302. FCTORD = CM$FCTORD[0];
  2303. VLWPROB(REC"SM"); # WRITE PROBLEM FILE ENTRY #
  2304. END
  2305.  
  2306. END # Y COORDINATE SCAN #
  2307.  
  2308. END # Z COORDINATE SCAN #
  2309.  
  2310. END # VLSMSC #
  2311.  
  2312. TERM
  2313. PROC VLERROR((ERNUM),(ABTFLG));
  2314. # TITLE VLERROR - ISSUE ERROR MESSAGE. #
  2315.  
  2316.  
  2317. BEGIN # VLERROR #
  2318.  
  2319. #
  2320. ** VLERROR - ISSUE ERROR MESSAGE.
  2321. *
  2322. * THE ERROR MESSAGE SPECIFIED BY *ERNUM* IS ISSUED TO THE
  2323. * DAYFILE AND REPORT FILE (IF OPENED). IF SELECTED, PARAMETERS
  2324. * FROM THE *MPARAM* ARRAY MAY BE INSERTED INTO THE MESSAGE TEXT
  2325. * FIRST. ALSO, A DETAIL STATUS FROM *STAT* WILL BE ISSUED IF
  2326. * SPECIFIED. THE OPTIONS FOR A SPECIFIC ERROR ARE DEFINED
  2327. * WITH THE ERROR MESSAGE TEXT (IN COMTVLD) AND RESIDE IN A
  2328. * LOCAL ARRAY.
  2329. *
  2330. * PROC VLERROR(ERNUM,ABTFLG)
  2331. *
  2332. * ENTRY (ABTFLG) - ABORT FLAG (PROGRAM ABORTED IF TRUE)
  2333. * (ERNUM) - ERROR NUMBER (FROM STATUS LIST *VE*
  2334. * IN COMTVLD).
  2335. * (RPTFADR) - REPORT FILE *FET* ADDRESS (ZERO IF
  2336. * NOT OPENED).
  2337. * (STAT) - DETAIL STATUS VALUE (OPTIONAL).
  2338. * (ARRAY MPARAM) - CONTAINS PARAMETERS FOR ERROR MESSAGE
  2339. * TEXT (OPTIONAL).
  2340. *
  2341. * EXIT (CNTPROGERR) - COUNT OF ERRORS.
  2342. *
  2343. * THE ERROR MESSAGE IS ISSUED TO THE REPORT FILE IF THE
  2344. * FILE IS OPENED.
  2345. *
  2346. * MESSAGES * ** ERROR MESSAGE TEXT *
  2347. * * DETAIL STATUS = NNN * (OPTIONAL)
  2348. *
  2349. #
  2350.  
  2351. ITEM ERNUM I; # ERROR NUMBER #
  2352. ITEM ABTFLG I; # ABORT RUN FLAG #
  2353.  
  2354. #
  2355. **** PROC VLERROR - XREF LIST BEGIN.
  2356. #
  2357.  
  2358. XREF
  2359. BEGIN
  2360. PROC MESSAGE; # INTERFACE TO *MESSAGE* MACRO #
  2361. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
  2362.   OR RETURN #
  2363. PROC RPCLOSE; # CLOSES A PRINT FILE #
  2364. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  2365.   LINE #
  2366. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  2367. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  2368.   CONVERSION #
  2369. PROC VLPFILL; # FILL PARAMETER IN MESSAGE
  2370.   TEXT #
  2371. END
  2372.  
  2373. #
  2374. **** PROC VLERROR - XREF LIST END.
  2375. #
  2376.  
  2377. DEF LISTCON #0#;
  2378.  
  2379. *CALL COMBFAS
  2380. *CALL COMTVLD
  2381. *CALL COMTVLF
  2382.  
  2383. ITEM N I; # TEMPORARY VARIABLE #
  2384. ITEM NP I; # TEMPORARY VARIABLE #
  2385.  
  2386. ARRAY TEXT [0:0] S(5); # TO FORMAT ERROR MESSAGE #
  2387. BEGIN
  2388. ITEM TEX$MSG C(00,00,40); # MESSAGE TEXT #
  2389. ITEM TEX$LEAD C(00,00,03); # LEADING CODES #
  2390. ITEM TEX$ZERO U(04,00,60) = [ 0 ]; # ZERO BYTE #
  2391. END
  2392.  
  2393. ARRAY ERRCODES [0:0] S(1); # ERROR OPTION CODES #
  2394. BEGIN
  2395. ITEM ERR$CODES C(00,00,03);
  2396. ITEM ERR$STAT C(00,00,01); # DETAIL STATUS FLAG #
  2397. ITEM ERR$PARN U(00,06,06); # NUMBER OF PARAMETERS #
  2398. END
  2399.  
  2400.  
  2401. ARRAY DTLSTAT [0:0] S(5); # DETAIL STATUS MESSAGE #
  2402. BEGIN
  2403. ITEM DTL$MSG C(00,00,40) = [" DETAIL STATUS = "];
  2404. ITEM DTL$NUM C(02,00,04); # STATUS VALUE #
  2405. ITEM DTL$ZERO U(04,00,60) = [ 0 ];
  2406. END
  2407.  
  2408. #
  2409. * ARRAY OF DEFINED ERROR MESSAGE TEXTS. WARNING - THE ORDER
  2410. * OF THIS LIST IS DEPENDENT ON THE STATUS LIST "VE".
  2411. * THE TEXTS ARE DEFINED IN *COMTVLD*.
  2412. #
  2413.  
  2414. ARRAY ERRTEXT [0:VE"EREND"] S(4); # ERROR MESSAGES ARRAY #
  2415. BEGIN
  2416. ITEM ERRMSG C(00,00,40) = [ " NO ERROR ",
  2417. MSYNTAX,
  2418. MSMPAR,
  2419. MFXPAR,
  2420. MSBPAR,
  2421. MSTPAR,
  2422. MLFRF,
  2423. MRLNRF,
  2424. MRFFM,
  2425. MRFAM,
  2426. MRDFH,
  2427. MRDFL,
  2428. MRDFU,
  2429. MCATO,
  2430. MCATR,
  2431. MMAPO,
  2432. MMAPR,
  2433. MNOFL,
  2434. MNCONN,
  2435. MUCPERR,
  2436. MNOFAM,
  2437. MPFCER,
  2438. MDUPSM,
  2439. MDUPSB,
  2440. MSYSERR,
  2441. MABORT,
  2442. " " ];
  2443. END
  2444.  
  2445. CONTROL EJECT;
  2446. CNTPROGERR = CNTPROGERR + 1;
  2447.  
  2448. #
  2449. * SET UP THE MESSAGE TEXT BASED ON THE ERROR NUMBER.
  2450. #
  2451.  
  2452. TEX$MSG[0] = ERRMSG[ERNUM];
  2453. ERR$CODES[0] = TEX$LEAD[0];
  2454.  
  2455. #
  2456. * INSERT PARAMETERS INTO TEXT IF SPECIFIED.
  2457. #
  2458.  
  2459. IF ERR$PARN[0] NQ " "
  2460. THEN # PARAMETERS SPECIFIED #
  2461. BEGIN
  2462. NP = ERR$PARN[0] - "0"; # CALCULATE THE NUMBER OF
  2463.   PARAMETERS #
  2464. SLOWFOR N = 1 STEP 1 UNTIL NP
  2465. DO
  2466. BEGIN # N #
  2467. VLPFILL(TEXT,MPARAM[N]); # MOVE PARAMETER TO TEXT #
  2468. END # N #
  2469.  
  2470. END
  2471.  
  2472. #
  2473. * ISSUE ERROR TEXT TO DAYFILE.
  2474. #
  2475.  
  2476. TEX$LEAD[0] = " **"; # DAYFILE MSG MUST HAVE 1 BLANK #
  2477. MESSAGE(TEXT,SYSUDF1);
  2478.  
  2479. #
  2480. * ISSUE ERROR TEXT TO REPORT FILE, IF IT IS OPEN.
  2481. #
  2482.  
  2483. IF RPTFADR NQ 0
  2484. THEN
  2485. BEGIN
  2486. RPLINE(RPTFADR," ",0,1,EOPL); # BLANK LINE #
  2487. TEX$LEAD[0] = "***"; # ERROR FLAG #
  2488. RPLINE(RPTFADR,TEXT,4,40,EOPL); # ISSUE ERROR MESSAGE #
  2489. END
  2490.  
  2491. #
  2492. * ISSUE DETAIL STATUS, IF SPECIFIED.
  2493. #
  2494.  
  2495. IF ERR$STAT[0] EQ "S"
  2496. THEN
  2497. BEGIN
  2498. DTL$NUM[0] = VLNTC(STAT,"XCOD",4); # SET NUMBER FROM *STAT* #
  2499. MESSAGE(DTLSTAT,SYSUDF1); # ISSUE DETAIL MESSAGE #
  2500. IF RPTFADR NQ 0
  2501. THEN
  2502. BEGIN
  2503. RPLINE(RPTFADR,DTLSTAT,4,40,EOPL); # ISSUE TO REPORT FILE #
  2504. END
  2505.  
  2506. END
  2507.  
  2508. #
  2509. * IF ABORT FLAG IS SET, ABORT.
  2510. #
  2511.  
  2512. IF (ABTFLG EQ ABRT)
  2513. THEN
  2514. BEGIN
  2515. IF (RPTFADR NQ 0) # CLOSE REPORT FILE IF IT IS
  2516.   OPENED #
  2517. THEN
  2518. BEGIN
  2519. RPCLOSE(RPTFADR);
  2520. END
  2521.  
  2522. VLMSG(VM"VLABT"); # ISSUE SSVAL ABORTED MESSAGE #
  2523. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  2524. END
  2525.  
  2526. RETURN;
  2527.  
  2528. END # VLERROR #
  2529.  
  2530. TERM
  2531. PROC VLFIX;
  2532. # TITLE VLFIX - FIX CATALOGS. #
  2533.  
  2534.  
  2535. BEGIN # VLFIX #
  2536.  
  2537. #
  2538. ** VLFIX - FIX CATALOGS.
  2539. *
  2540. * *VLFIX* READS THE FIXIT FILE AND MODIFIES THE CORRESPONDING
  2541. * CATALOG ENTRIES DEPENDING UPON THE MODE SPECIFIED BY THE
  2542. * CONTROL CARD PARAMETERS.
  2543. *
  2544. * PROC VLFIX
  2545. *
  2546. * ENTRY (CNTORPHANS) - COUNT OF TROUBLE-FREE ORPHANS.
  2547. * (CONNECTED) - CONNECTED TO *EXEC* FLAG.
  2548. * (PAR$FX) - FX CONTROL CARD PARAMETER.
  2549. * (PAR$RF) - RF CONTROL CARD PARAMETER.
  2550. * (PAR$RL) - RL CONTROL CARD PARAMETER.
  2551. * (RDFDT) - *RDF* FILE PACKED DATE AND TIME.
  2552. * (RELEASABLE) - COUNT OF RELEASABLE AU-S.
  2553. * (TOTALERRS) - TOTAL VALIDATION ERRORS.
  2554. * (ARRAY FIXFILE) - FIXIT FILE *FET*.
  2555. *
  2556. * EXIT RELEASE PROCESSING OCCURRED IF MODE IS EQUAL TO
  2557. * RELEASE.
  2558. * REPAIR PROCESSING OCCURRED IF MODE IS EQUAL TO FIX.
  2559. * INFORMATIONAL LINES WERE WRITTEN TO THE REPORT FILE.
  2560. *
  2561. * MESSAGES * TOTAL VALIDATION ERRORS = NNN *
  2562. * * RELEASABLE M860 FILE = NNNN *
  2563. * * RELEASABLE M860 AU-S = NNNN *
  2564. * * CATALOGS NOT MODIFIED *
  2565. * * CATALOGS MODIFIED *
  2566. * * FREE FILES NOT RELEASED *
  2567. * * FREE FILES RELEASED *
  2568. *
  2569. * NOTES THE MODES OF PROCESSING ARE -
  2570. *
  2571. * . RELEASE - RELEASE ORPHANS IN THE SFM CATALOG.
  2572. * THIS MODE IS SET IF -
  2573. * THE *RF* AND *RL* PARAMETERS WERE SPECIFIED AND
  2574. * THE *TOTALERRS* IS LESS THAN THE *FX* PARAMETER.
  2575. *
  2576. * . FIX - SET APPROPRIATE FLAGS IN THE CATALOGS FOR
  2577. * ERRORS DETECTED.
  2578. * THIS MODE IS SET IF -
  2579. * THE *FM* PARAMETER IS SET AND THE *TOTALERRS*
  2580. * IS LESS THAN THE *FX* PARAMETER.
  2581. *
  2582. * . NONE - NO CATALOG MODIFICATIONS.
  2583. * THIS MODE IS SET IF *SSVAL* IS NOT CONNECTED
  2584. * TO *EXEC* OR NOT IN FIX OR RELEASE MODE.
  2585. *
  2586. * RELEASE OF FREE AU-S IN A SPECIFIC SUBCATALOG
  2587. * OCCURS ONLY IF THE DATE AND TIME IN THE *RDF* FILE IS
  2588. * MORE RECENT THAN THE LAST PURGE DATE AND TIME FOR THE
  2589. * SUBCATALOG.
  2590. *
  2591. * THE REPAIRS THAT *SSVAL* CAN PERFORM ARE DEFINED IN
  2592. * THE ARRAY *FIXARRAY*. THE REPAIRS TO BE TAKEN FOR
  2593. * A SPECIFIC FIXIT FILE RECORD ARE DETERMINED BY THE
  2594. * RECORD TYPE WHICH REFLECTS THE TYPE OF ERROR THAT
  2595. * OCCURRED DURING VALIDATION.
  2596. *
  2597. #
  2598.  
  2599. #
  2600. **** PROC VLFIX - XREF LIST BEGIN.
  2601. #
  2602.  
  2603. XREF
  2604. BEGIN
  2605. PROC READ; # INTERFACE TO *READ* MACRO #
  2606. PROC READW; # INTERFACE TO *READW* MACRO #
  2607. PROC RETERN; # RETURN LOCAL FILE #
  2608. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  2609. PROC RPEJECT; # STARTS A NEW REPORT PAGE #
  2610. PROC VLFIXP; # CONNECTS *PF* AND SETS *ASA* #
  2611. PROC VLERROR; # ISSUE ERROR MESSAGE #
  2612. PROC VLLPDT; # GET LAST PURGE DATE AND TIME #
  2613. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  2614. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  2615.   CONVERSION #
  2616. PROC VLREQEX; # REQUEST TO EXEC #
  2617. PROC WRITEW; # WRITE TO WORKING BUFFER #
  2618. PROC WRITEF; # INTERFACE TO *WRITEF* MACRO #
  2619. END
  2620.  
  2621. #
  2622. **** PROC VLFIX - XREF LIST END.
  2623. #
  2624.  
  2625. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  2626.  
  2627. *CALL COMBFAS
  2628. *CALL COMBCPR
  2629. *CALL COMTVLD
  2630. *CALL COMTVLF
  2631. *CALL COMTVLV
  2632.  
  2633. STATUS PROCTYP # PROCESSING TYPE #
  2634. NONE,
  2635. FIX, # FIX CATALOGS #
  2636. RELEASE, # RELEASE FILE SPACE #
  2637. PTEND;
  2638.  
  2639. DEF FREE #0#; # SET FREE FLAG IN PFC #
  2640. DEF ZERO #1#; # ZERO *PFC* ASA #
  2641.  
  2642. ITEM FREFL B; # FREE CARTRIDGE FLAG SET #
  2643. ITEM MODE S : PROCTYP = S"NONE"; # MODE FOR FIX PROCESS #
  2644. ITEM LPDT U; # LAST PURGE DATE-TIME #
  2645. ITEM FIXACTION I; # FIX ACTIONS FOR FIXIT RECORD #
  2646. ITEM RDF$BEFORE B; # RDF BEFORE PURGE DATE #
  2647. ITEM RELEASED B; # FREE FILES RELEASED FLAG #
  2648.  
  2649. #
  2650. * ACTION FLAGS TO DEFINE THE CATALOG REPAIRS THAT *SSVAL* CAN
  2651. * PERFORM.
  2652. #
  2653.  
  2654. DEF ACT$NONE #O"000000"#; # NO ACTION #
  2655. DEF ACT$UMAP #O"000001"#; # UPDATE SMMAP #
  2656. DEF ACT$UPFC #O"000010"#; # UPDATE *PFC* ENTRY #
  2657. DEF ACT$USM #O"000100"#; # UPDATE *SM* FLAG IN SFM
  2658.   CATALOG #
  2659. DEF ACT$UFROZ #O"001000"#; # UPDATE FROZEN AU FLAG #
  2660. DEF ACT$USOF #O"010000"#; # UPDATE *SOF* AU FLAG #
  2661. DEF ACT$INHIB #O"100000"#; # SET INHIBIT FLAG IN *FCT* #
  2662. DEF ACT$P$F$S #O"011010"#;
  2663. DEF ACT$F$S #O"011000"#; # MULTIPLE ACTIONS #
  2664. DEF ACT$UC$INH #O"100100"#; # MULTIPLE ACTIONS #
  2665. DEF ACT$UF$UI #O"101000"#; # MULTIPLE ACTIONS #
  2666.  
  2667. #
  2668. * *CPR* WORKING BUFFER.
  2669. #
  2670.  
  2671. ARRAY CPRARRAY [0:0] S(CPRLEN);;
  2672.  
  2673.  
  2674. #
  2675. * DEFINE ACTIONS TO TAKE FOR THE VARIOUS FIXIT FILE RECORD TYPES.
  2676. * DURING THE VALIDATION PROCESS, RECORDS WERE WRITTEN TO THE FIXIT
  2677. * FILE FOR PROBLEMS DETECTED. THE RECORD TYPE REFLECTS THE TYPE OF
  2678. * REPAIR PROCESSING TO BE DONE.
  2679. #
  2680.  
  2681. ARRAY FIXARRAY [0:REC"REND"] S(1); # FIX ACTIONS FOR FIX
  2682.   RECORDS #
  2683. BEGIN
  2684. ITEM FIXA$WD U(00,00,60);
  2685. ITEM FIXA$TFO U(REC"TFORPH",0,60) = [ACT$NONE];
  2686. ITEM FIXA$FCT U(REC"FCT",0,60) = [ACT$UC$INH];
  2687. ITEM FIXA$SM U(REC"SM",0,60) = [ACT$UMAP];
  2688. ITEM FIXA$ASA U(REC"ASA",0,60) = [ACT$UPFC];
  2689. ITEM FIXA$PFC U(REC"OTHR",0,60) = [ACT$P$F$S];
  2690. ITEM FIXA$ORPH U(REC"BADORPH",0,60) = [ACT$UFROZ];
  2691. ITEM FIXA$FRAG U(REC"FRAG",0,60) = [ACT$F$S];
  2692. ITEM FIXA$HOLE U(REC"BADHOLE",0,60) = [ACT$UF$UI];
  2693. END
  2694.  
  2695. CONTROL EJECT;
  2696.  
  2697. #
  2698. * CLOSE THE FIXIT FILE.
  2699. #
  2700.  
  2701. FREFL = FALSE;
  2702. WRITEF(FIXITFILE,RCL);
  2703. REWIND(FIXITFILE,RCL);
  2704.  
  2705. #
  2706. * ISSUE COUNT OF ORPHANS.
  2707. #
  2708.  
  2709. MP$WD[1] = VLNTC(CNTORPHANS,"XCDD",5);
  2710. VLMSG(VM"NTFO");
  2711.  
  2712. #
  2713. * ISSUE COUNT OF RELEASABLE AU-S.
  2714. #
  2715.  
  2716. MP$WD[1] = VLNTC(RELEASABLE,"XCDD",6);
  2717. VLMSG(VM"RSPACE");
  2718.  
  2719. #
  2720. * ISSUE NUMBER OF PFC SYSTEM AND DATA ERRORS.
  2721. #
  2722.  
  2723. IF TPFCERRS NQ 0
  2724. THEN
  2725. BEGIN
  2726. MP$WD[1] = VLNTC(TPFCERRS,"XCDD",4);
  2727. VLMSG(VM"TPFCER");
  2728. END
  2729.  
  2730. #
  2731. * ISSUE NUMBER OF VALIDATION ERRORS.
  2732. #
  2733.  
  2734. MP$WD[1] = VLNTC(TOTALERRS,"XCDD",4);
  2735. VLMSG(VM"TOTERR");
  2736.  
  2737. #
  2738. * IF NOT CONNECTED TO EXEC, NO FIX/RELEASE PROCESSING CAN BE DONE.
  2739. #
  2740.  
  2741. IF NOT CONNECTED
  2742. THEN
  2743. BEGIN
  2744. VLMSG(VM"NOFIX"); # ISSUE MESSAGE #
  2745. RETURN;
  2746. END
  2747.  
  2748. #
  2749. * DETERMINE MODE OF FIX PROCESSING BASED ON CONTROL CARD
  2750. * PARAMETERS AND VALIDATION TOTAL ERRORS.
  2751. #
  2752.  
  2753. IF (PAR$RF EQ 0) AND (TOTALERRS LQ PAR$FX)
  2754. AND (TOTALERRS NQ 0)
  2755. THEN
  2756. BEGIN
  2757. VLMSG(VM"UPDED"); # ISSUE MESSAGE #
  2758. MODE = S"FIX"; # FIX CATALOG MODE #
  2759. END
  2760.  
  2761. IF (PAR$RF NQ 0) AND (PAR$RL NQ 0) AND (TOTALERRS LQ PAR$FX)
  2762. THEN
  2763. BEGIN
  2764. RELEASED = FALSE; # INITIALIZE FILES RELEASED FLAG #
  2765. RDF$BEFORE = FALSE; # INITIALIZE RDF FLAG #
  2766. MODE = S"RELEASE"; # RELEASE ORPHANS MODE #
  2767. END
  2768.  
  2769. IF MODE EQ S"NONE"
  2770. THEN
  2771. BEGIN
  2772. VLMSG(VM"NOFIX"); # ISSUE MESSAGE #
  2773. END
  2774.  
  2775.  
  2776. #
  2777. * READ THE FIXIT FILE AND PERFORM FIX/RELEASE ACTIONS BASED ON
  2778. * RECORD TYPE.
  2779. #
  2780.  
  2781. READ(FIXITFILE,NRCL);
  2782. STAT = OK;
  2783. REPEAT WHILE STAT EQ OK
  2784. DO
  2785. BEGIN # PROCESS FIXIT FILE #
  2786. READW(FIXITFILE,EXTRECORD,RLFIX,STAT);
  2787. IF STAT NQ 0
  2788. THEN
  2789. BEGIN
  2790. TEST DUMMY; # EXIT, NO RECORD TO PROCESS #
  2791. END
  2792.  
  2793. SMINDX = EXTR$SM[0];
  2794. SBINDX = EXTR$SB[0];
  2795.  
  2796. #
  2797. * FOR RELEASE MODE, PURGE TROUBLE-FREE ORPHANS.
  2798. #
  2799.  
  2800. IF (MODE EQ S"RELEASE") AND (FIX$RT[0] EQ REC"TFORPH")
  2801. THEN
  2802. BEGIN # RELEASE ORPHANS #
  2803. VLLPDT(EXTR$SB[0],EXTR$SM[0],LPDT); # RETURNS LAST PURGE
  2804.   DATE/TIME #
  2805.  
  2806. #
  2807. * RELEASE ONLY IF THE SUBCATALOG LAST PURGE DATE/TIME IS LESS THAN
  2808. * THE RDF FILE DATE/TIME.
  2809. #
  2810.  
  2811. IF LPDT LS RDFDT
  2812. THEN
  2813. BEGIN
  2814. #
  2815. * CONVERT TO *CPR* FORMAT.
  2816. #
  2817.  
  2818. P<CPR> = LOC(CPRARRAY);
  2819. CPR$C[0] = FALSE;
  2820. CPR$CSU[0] = EXTR$SM[0];
  2821. CPR$SUB[0] = EXTR$SB[0];
  2822. CPR$FAM[0] = PAR$FM;
  2823. CPR$FCT[0] = EXTR$FCT[0];
  2824. CPR$AU[0] = EXTR$AU[0];
  2825. CPR$RQT[0] = TYP"TYP3";
  2826. CPR$RQC[0] = REQTYP3"REL$SETUP";
  2827. WRITEW(RELCFILE,CPRARRAY,CPRLEN,STAT);
  2828. RELEASED = TRUE; # FREE FILES RELEASED #
  2829. TEST DUMMY;
  2830. END
  2831.  
  2832. ELSE
  2833. BEGIN
  2834. RDF$BEFORE = TRUE;
  2835. END
  2836.  
  2837. END # RELEASE ORPHANS #
  2838.  
  2839. #
  2840. * UPDATE *PFC* IF FILE IS TO BE REMOVED FROM CARTRIDGE.
  2841. #
  2842.  
  2843. IF FIX$RT[0] EQ REC"FCF"
  2844. AND PAR$RF EQ 0
  2845. THEN # SET FREE CARTRIDGE FLAGS #
  2846. BEGIN
  2847. VLFIXP(FREE);
  2848. IF STAT EQ 0
  2849. THEN
  2850. BEGIN
  2851. FREFL = TRUE;
  2852. END
  2853.  
  2854. END
  2855.  
  2856.  
  2857. #
  2858. * FOR FIX MODE, GET ACTIONS BASED ON THE FIXIT RECORD TYPE.
  2859. #
  2860.  
  2861. IF MODE NQ S"FIX"
  2862. THEN
  2863. BEGIN
  2864. TEST DUMMY; # SKIP IF NOT FIX MODE #
  2865. END
  2866.  
  2867. FIXACTION = FIXA$WD[FIX$RT[0]]; # ACTIONS FOR THIS RECORD #
  2868.  
  2869. #
  2870. * UPDATE THE SMMAP ENTRY.
  2871. #
  2872.  
  2873. IF FIXACTION LAN ACT$UMAP NQ 0
  2874. THEN
  2875. BEGIN
  2876. VLREQEX(TYP"TYP3",REQTYP3"UPD$MAP");
  2877. END
  2878.  
  2879. #
  2880. * UPDATE *PFC* ENTRY IF THE FILE HAS A DISK IMAGE.
  2881. #
  2882.  
  2883. IF FIXACTION LAN ACT$UPFC NQ 0 AND EXTR$D[0] NQ 0
  2884. THEN
  2885. BEGIN
  2886. VLFIXP(ZERO);
  2887. END
  2888.  
  2889. #
  2890. * UPDATE THE SFM CATALOG SMERR FLAG.
  2891. #
  2892.  
  2893. IF FIXACTION LAN ACT$USM NQ 0
  2894. THEN
  2895. BEGIN
  2896. CFIELD = UCF"CMAP"; # CHANGE SMERR FLAG #
  2897. VLREQEX(TYP"TYP3",REQTYP3"UPD$CAT");
  2898. END
  2899.  
  2900. #
  2901. * UPDATE INHIBIT FLAG IN FCT.
  2902. #
  2903.  
  2904. IF FIXACTION LAN ACT$INHIB NQ 0
  2905. OR (FIXACTION LAN ACT$UFROZ NQ 0
  2906. AND NOT VTEN$ALOC[0])
  2907. THEN
  2908. BEGIN
  2909. CFIELD = UCF"INHIB"; # CHANGE INHIBIT FLAG #
  2910. VLREQEX(TYP"TYP3",REQTYP3"UPD$CAT");
  2911. END
  2912.  
  2913. #
  2914. * UPDATE SFM CATALOG *FCT* AU FROZ FLAG.
  2915. #
  2916.  
  2917. IF FIXACTION LAN ACT$UFROZ NQ 0
  2918. THEN
  2919. BEGIN
  2920. CFIELD = UCF"FROZ"; # CHANGE FROZ FLAG #
  2921. VLREQEX(TYP"TYP3",REQTYP3"UPD$CAT");
  2922. END
  2923.  
  2924. #
  2925. * UPDATE SFM CATALOG *FCT* AU *SOF* FLAG IF THE ENTRY IS
  2926. * A START OF FRAGMENT.
  2927. #
  2928.  
  2929. VTEN$WORD[0] = FIX$VT[0]; # GET *VT* ENTRY FROM RECORD #
  2930. IF FIXACTION LAN ACT$USOF NQ 0 AND VTEN$SOF[0]
  2931. THEN
  2932. BEGIN
  2933. CFIELD = UCF"SOF"; # CHANGE *SOF* FLAG #
  2934. VLREQEX(TYP"TYP3",REQTYP3"UPD$CAT");
  2935. END
  2936.  
  2937. END # PROCESS FIXIT FILE #
  2938.  
  2939. IF RELEASED AND MODE EQ S"RELEASE"
  2940. THEN
  2941. BEGIN
  2942. WRITEF(RELCFILE,RCL);
  2943. RETERN(RELCFILE,RCL);
  2944. VLMSG(VM"REL");
  2945. VLREQEX(TYP"TYP3",REQTYP3"REL$SETUP");
  2946. MP$WD[1] = VLNTC(NFILER,"XCDD",5);
  2947. VLMSG(VM"FCREL");
  2948. END
  2949.  
  2950. IF NOT RELEASED AND MODE EQ S"RELEASE"
  2951. THEN
  2952. BEGIN
  2953. VLMSG(VM"FSNREL");
  2954. IF RDF$BEFORE
  2955. THEN
  2956. BEGIN
  2957. VLMSG(VM"RDFBF");
  2958. END
  2959.  
  2960. END
  2961.  
  2962. IF FREFL
  2963. THEN # FREE CARTRIDGE FLAG SET #
  2964. BEGIN
  2965. VLMSG(VM"FFSET");
  2966. END
  2967.  
  2968.  
  2969. END # VLFIX #
  2970.  
  2971. TERM
  2972. PROC VLFIXP(ACTION);
  2973. # TITLE VLFIXP - ATTACHES PERMANENT FILE AND RESETS THE ASA. #
  2974.  
  2975. BEGIN # VLFIXP #
  2976.  
  2977. #
  2978. ** VLFIXP - RESETS THE *ASA*.
  2979. *
  2980. * *VLFIXP* ATTACHES THE USER FILE SPECIFIED IN THE FIXIT
  2981. * FILE ENTRY, VERIFIES THE *ASA* IS CORRECT, RESETS THE
  2982. * *ASA*, THEN RETURNS THE FILE.
  2983. *
  2984. * PROC VLFIXP
  2985. *
  2986. * ENTRY (PAR$FM) - FAMILY.
  2987. * (ACTION) IF ZERO THEN SET FREE FLAG IN *PFC*, ELSE
  2988. * ZERO *ASA* IN *PFC*.
  2989. * ARRAY EXTRECORD - FIXIT FILE RECORD.
  2990. *
  2991. * EXIT THE *ASA* FOR THE FIXIT FILE ENTRY IS SET TO ZERO.
  2992. * THE USER FILE IS RETURNED.
  2993. #
  2994.  
  2995. #
  2996. **** PROC VLFIXP - XREF LIST BEGIN.
  2997. #
  2998.  
  2999. XREF
  3000. BEGIN
  3001. PROC BZFILL; # ZERO FILL STORAGE #
  3002. PROC MESSAGE; # SEND MESSAGE TO DAYFILE #
  3003. PROC SETAF; # SET FLAG IN *PFC* #
  3004. PROC RECALL; # INTERFACE TO RECALL #
  3005. PROC RETERN; # RETURNS SPECIFIED FILE #
  3006. PROC SETASA; # INTERFACE TO *SETASA* ROUTINE #
  3007. PROC UATTACH; # INTERFACE TO *UATTACH* MACRO #
  3008. PROC UGET; # UTILITY GET #
  3009. END
  3010.  
  3011. #
  3012. **** PROC VLFIXP - XREF LIST END.
  3013. #
  3014.  
  3015. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  3016.  
  3017. *CALL COMBFAS
  3018. *CALL COMBBZF;
  3019. *CALL COMSPFM
  3020. *CALL COMTVLD
  3021. *CALL COMTVLF
  3022.  
  3023. DEF ACCMD #1#; # READ MODE #
  3024. DEF RP #4#; # FULL ERROR PROCESSING #
  3025. DEF ZEROASA #0#; # ZERO THE *ASA* #
  3026.  
  3027. ITEM ACTION U; # ZERO OR SET FLAG #
  3028. ITEM FAMILY C(10); # FAMILY NAME #
  3029. ITEM I U; # INDUCTION VARIABLE #
  3030. ITEM J U; # INDUCTION #
  3031. ITEM LFN C(10); # LOCAL FILE NAME #
  3032. ITEM PFNM C(10); # PERMANENT FILE NAME #
  3033. ITEM UFLAG U; # STATUS FLAG #
  3034.  
  3035. ARRAY PFCCAT [0:0] S(16); # TEMPORARY ARRAY FOR *PFC* #
  3036. BEGIN
  3037. ITEM NOITEM U(00,00,60); # DUMMY ITEM #
  3038. END
  3039.  
  3040. ARRAY MSSGE[0:2];; # ARRAY FOR MESSAGE #
  3041.  
  3042. ARRAY MSSG [0:0] P(2);
  3043. BEGIN
  3044. ITEM MSSG1 C(00,00,13); # ARRAY FOR MESSAGE #
  3045. END
  3046.  
  3047. CONTROL EJECT;
  3048.  
  3049. #
  3050. * SET ADDRESS FOR BASED ARRAY, *PFC*.
  3051. #
  3052.  
  3053. P<PFC> = LOC(PFCCAT);
  3054.  
  3055.  
  3056. #
  3057. * ATTACH THE PERMANENT FILE.
  3058. #
  3059.  
  3060. LFN = UTTLFN;
  3061. BZFILL(LFN,TYPFILL"ZFILL",10);
  3062. PFNM= EXTR$PFNC[0];
  3063. BZFILL(PFNM,TYPFILL"ZFILL",10);
  3064. FAMILY = PAR$FM;
  3065. BZFILL(FAMILY,TYPFILL"ZFILL",10);
  3066.  
  3067. #
  3068. * SET THE FREE FLAG IF ACTION = 0.
  3069. #
  3070.  
  3071. IF ACTION EQ 0
  3072. THEN # SET *AFFRE* FLAG IN *PFC* #
  3073. BEGIN
  3074. SETAF(LFN,STAT,RP,EXTR$UI[0],FAMILY,EXTR$PFID[0], ##
  3075. EXTR$ATASA[0],EXTR$CREA[0],AFFRE,MSSGE[0]);
  3076. RETURN;
  3077. END
  3078.  
  3079. #
  3080. * MAKE FILE LOCAL BEFORE SETASA.
  3081. #
  3082.  
  3083. IF EXTR$DA[0]
  3084. THEN # DIRECT ACCESS FILE #
  3085. BEGIN
  3086. UATTACH(LFN,STAT,RP,PFNM,ACCMD,EXTR$UI[0],FAMILY, ##
  3087. EXTR$PFID[0],PFCCAT[0],EXTR$CREA[0],MSSGE[0]);
  3088. END
  3089.  
  3090. ELSE # INDIRECT ACCESS FILE #
  3091. BEGIN
  3092. UFLAG = -1;
  3093. SLOWFOR I = 0 WHILE UFLAG NQ 0
  3094. DO
  3095. BEGIN # WAIT FOR UGET RESPONSE #
  3096. UFLAG = -1;
  3097. UGET(LFN,UFLAG,6,PFNM,EXTR$UI[0],FAMILY,EXTR$PFID[0], ##
  3098. PFCCAT[0],EXTR$CREA[0],MSSGE[0]);
  3099.  
  3100. IF UFLAG EQ PEA # EXCESS ACTIVITY #
  3101. OR UFLAG EQ INA # NO INTERLOCK #
  3102. THEN
  3103. BEGIN
  3104. TEST I;
  3105. END
  3106.  
  3107. IF UFLAG NQ 0
  3108. THEN
  3109. BEGIN
  3110. MSSG1 = " UGET FAILED.";
  3111. MESSAGE(MSSG,UDFL1);
  3112. UFLAG = 0;
  3113. END
  3114.  
  3115. END # WAIT FOR UGET REQUEST #
  3116.  
  3117. END
  3118.  
  3119.  
  3120. #
  3121. * IF THERE WAS NO ERROR, AND IF THE CATALOG MAP *ASA*
  3122. * MATCHES THE EXTRACT FILE *ASA*,
  3123. * THEN -
  3124. * RESET THE *ASA* TO ZERO USING THE *SETASA* MACRO.
  3125. #
  3126.  
  3127. IF (STAT EQ 0) AND (PFC$AA[0] EQ EXTR$ASA[0])
  3128. AND UFLAG EQ 0
  3129. AND ACTION EQ 1
  3130. THEN
  3131. BEGIN
  3132. SETASA(LFN,STAT,RP,EXTR$UI[0],FAMILY,EXTR$PFID[0] ##
  3133. ,ZEROASA,EXTR$CREA[0],MSSGE[0]);
  3134. END
  3135.  
  3136. RETERN(UTTLFN,RCL);
  3137. END # VLFIXP #
  3138.  
  3139. TERM
  3140. PROC VLLPDT(SUBPAR,SMPAR,LPDT);
  3141. # TITLE VLLPDT - GET LAST PURGE DATE AND TIME. #
  3142.  
  3143.  
  3144. BEGIN # VLLPDT #
  3145.  
  3146. #
  3147. ** VLLPDT - GET LAST PURGE DATE AND TIME.
  3148. *
  3149. * *VLLPDT* ISSUES A REQUEST TO *EXEC* TO GET THE "LAST
  3150. * PURGE DATE AND TIME" FOR THE SUBCATALOG FROM THE
  3151. * PREAMBLE IN THE SFM CATALOG FOR THE SPECIFIED SUBFAMILY.
  3152. *
  3153. * PROC VLLPDT(SUBPAR,SMPAR,LPDT)
  3154. *
  3155. * ENTRY (SUBPAR) - SUBFAMILY.
  3156. * (SMPAR) - *SM* DESIGNATOR.
  3157. *
  3158. * EXIT (LPDT) - PACKED DATE AND TIME RETURNED FROM *EXEC*.
  3159. #
  3160.  
  3161. ITEM SUBPAR I; # SUBFAMILY #
  3162. ITEM SMPAR I; # *SM* ID #
  3163. ITEM LPDT I; # LAST PURGE DATE-TIME #
  3164.  
  3165. #
  3166. **** PROC VLLPDT - XREF LIST BEGIN.
  3167. #
  3168.  
  3169. XREF
  3170. BEGIN
  3171. PROC VLREQEX; # REQUEST TO EXEC #
  3172. END
  3173.  
  3174. #
  3175. **** PROC VLLPDT - XREF LIST END.
  3176. #
  3177.  
  3178. DEF LISTCON #0#; # TURN OFF LISTING #
  3179.  
  3180. *CALL COMBFAS
  3181. *CALL COMBCPR
  3182. *CALL COMTVLD
  3183. *CALL COMTVLF
  3184.  
  3185. ITEM CURRSB I = 0; # CURRENT SUBFAMILY #
  3186. ITEM CURRSM I; # CURRENT *SM* #
  3187. ITEM CURRLPDT I; # CURRENT LPDT #
  3188. CONTROL EJECT;
  3189.  
  3190. #
  3191. * CALL *EXEC* TO GET THE LAST PURGE DATE/TIME FOR THE SUBCATALOG,
  3192. * IF IT IS NOT CURRENT.
  3193. #
  3194.  
  3195. IF (CURRSB NQ SUBPAR) OR (CURRSM NQ SMPAR)
  3196. THEN
  3197. BEGIN
  3198. CURRSB = SUBPAR; # SAVE CURRENT SUBFAMILY #
  3199. CURRSM = SMPAR; # SAVE CURRENT *SM* #
  3200. VLREQEX(TYP"TYP3",REQTYP3"GT$PRGDATE");
  3201. CURRLPDT = CPR$DATE[0]; # SAVE LAST PURGE DATE/TIME #
  3202. END
  3203.  
  3204. #
  3205. * RETURN THE LAST PURGE DATE/TIME FOR THE SUBCATALOG.
  3206. #
  3207.  
  3208. LPDT = CURRLPDT;
  3209.  
  3210. END # VLLPDT #
  3211.  
  3212. TERM
  3213. PROC VLMSG(MNUM);
  3214. # TITLE VLMSG - ISSUE INFORMATIONAL MESSAGE. #
  3215.  
  3216. BEGIN # VLMSG #
  3217.  
  3218. #
  3219. ** VLMSG - ISSUE INFORMATIONAL MESSAGE.
  3220. *
  3221. * *VLMSG* ISSUES A SPECIFIED MESSAGE TO THE DAYFILE AND/OR
  3222. * TO THE REPORT FILE.
  3223. *
  3224. * PROC VLMSG(MNUM)
  3225. *
  3226. * ENTRY (MNUM) - MESSAGE NUMBER FROM STATUS LIST *VM*.
  3227. * (ARRAY MPARAM) - CONTAINS PARAMETER(S) TO INSERT IN
  3228. * THE MESSAGE TEXT.
  3229. *
  3230. * EXIT THE MESSAGE IS ISSUED.
  3231. *
  3232. * NOTES OPTIONS ARE SELECTED BY THE FIRST THREE
  3233. * CHARACTERS OF THE MESSAGE TEXT. OPTIONS ARE -
  3234. * . MSG$SYS (B) - ISSUES TO THE DAYFILE OR TO THE *B*
  3235. * DISPLAY LINE 2.
  3236. * . MSG$RPT (Y) - ISSUES TO THE REPORT FILE.
  3237. * . NUMBER OF PARAMETERS TO FILL IN THE MESSAGE TEXT
  3238. * FROM THE *MPARAM* ARRAY (NUMERIC, NOT A CHARACTER).
  3239. #
  3240.  
  3241. ITEM MNUM I;
  3242.  
  3243. #
  3244. **** PROC VLMSG - XREF LIST BEGIN.
  3245. #
  3246.  
  3247. XREF
  3248. BEGIN
  3249. PROC MESSAGE; # INTERFACE TO *MESSAGE* MACRO #
  3250. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  3251.   LINE #
  3252. PROC VLPFILL; # FILL PARAMETER IN MESSAGE
  3253.   TEXT #
  3254. END
  3255.  
  3256. #
  3257. **** PROC VLMSG - XREF LIST END.
  3258. #
  3259.  
  3260. DEF LISTCON #0#;
  3261.  
  3262. *CALL COMBFAS
  3263. *CALL COMTVLD
  3264. *CALL COMTVLF
  3265.  
  3266. ITEM NP I; # NUMBER OF PARAMETERS #
  3267. ITEM N I; # TEMPORARY VARIABLE #
  3268.  
  3269. #
  3270. * ARRAY TO FORMAT THE MESSAGE TO ISSUE.
  3271. #
  3272.  
  3273. ARRAY VMTEXT [0:0] S(5);
  3274. BEGIN
  3275. ITEM VMT$LINE C(00,00,40);
  3276. ITEM VMT$LEAD C(00,00,03); # LEADING CODE CHARACTERS #
  3277. ITEM VMT$TEXT C(00,18,37); # MESSAGE TEXT #
  3278. ITEM VMT$ZERO U(04,00,60); # ZERO BYTE #
  3279. END
  3280.  
  3281. #
  3282. * ANALYZES ACTIONS TO DO BASED ON THE MESSAGE.
  3283. #
  3284.  
  3285. ARRAY MSGCODES [0:0] S(1); # MESSAGE CODES #
  3286. BEGIN
  3287. ITEM MSG$CODES C(00,00,03);
  3288. ITEM MSG$SYS C(00,00,01); # ISSUE TO SYSTEM MACRO #
  3289. ITEM MSG$RPT C(00,06,01); # ISSUE TO REPORT FILE #
  3290. ITEM MSG$PARN U(00,12,06); # NUMBER OF PARAMETERS TO INSERT
  3291.   #
  3292. END
  3293.  
  3294. CONTROL EJECT;
  3295.  
  3296. #
  3297. * GET CODES FROM MESSAGE TEXT.
  3298. #
  3299.  
  3300. VMT$LINE[0] = VMESS$LINE[MNUM]; # GET MESSAGE TEXT REQUESTED #
  3301. MSG$CODES[0] = VMT$LEAD[0]; # EXTRACT CODES FROM TEXT #
  3302. VMT$LEAD[0] = " "; # CLEAR CODES FIELD IN TEXT #
  3303.  
  3304. #
  3305. * PUT PARAMETER(S) INTO MESSAGE IF THE NUMBER OF PARAMETERS IS
  3306. * SPECIFIED IN CODES.
  3307. #
  3308.  
  3309. IF MSG$PARN[0] NQ " "
  3310. THEN
  3311. BEGIN
  3312. NP = MSG$PARN[0] - "0"; # NUMBER CONVERTED TO BINARY #
  3313. SLOWFOR N = 1 STEP 1 UNTIL NP
  3314. DO
  3315. BEGIN
  3316. VLPFILL(VMTEXT,MPARAM[N]); # MOVE PARAMETER INTO TEXT #
  3317. END
  3318.  
  3319. END
  3320.  
  3321. #
  3322. * ISSUE MESSAGE REQUEST TO THE SYSTEM IF SPECIFIED.
  3323. #
  3324.  
  3325. IF MSG$SYS[0] NQ "N"
  3326. THEN
  3327. BEGIN # ISSUE TO SYSTEM #
  3328. IF MSG$SYS[0] EQ "B"
  3329. THEN
  3330. BEGIN
  3331. MESSAGE(VMT$TEXT[0],LINE2); # B ONLY #
  3332. END
  3333.  
  3334. ELSE
  3335. BEGIN
  3336. IF MSG$SYS[0] EQ "S"
  3337. THEN
  3338. BEGIN
  3339. MESSAGE(VMT$TEXT[0],SYSUDF1);
  3340. END
  3341.  
  3342. ELSE
  3343. BEGIN
  3344. MESSAGE(VMT$TEXT[0],UDFL1);
  3345. END
  3346.  
  3347. END
  3348.  
  3349. END # ISSUE TO SYSTEM #
  3350.  
  3351. #
  3352. * ISSUE MESSAGE TO THE REPORT FILE IF REQUESTED.
  3353. #
  3354.  
  3355. IF MSG$RPT[0] NQ "N"
  3356. THEN
  3357. BEGIN
  3358. RPLINE(RPTFADR," ",0,1,EOPL); # BLANK LINE #
  3359. RPLINE(RPTFADR,VMT$TEXT[0],3,37,EOPL); # ISSUE TO REPORT #
  3360. END
  3361.  
  3362. END # VLMSG #
  3363.  
  3364. TERM
  3365. PROC VLNCS;
  3366. # TITLE VLNCS - NORMAL CHAIN SCAN. #
  3367.  
  3368.  
  3369. BEGIN # VLNCS #
  3370.  
  3371. #
  3372. ** VLNCS - NORMAL CHAIN SCAN.
  3373. *
  3374. * *VLNCS* SCANS ALL ENTRIES IN THE *VT* TABLE LOCATING
  3375. * AND MARKING NORMAL CHAINS. THE CHAIN IS SEARCHED
  3376. * BEGINNING WITH THE HEAD OF CHAIN ENTRY AND PROCEEDING
  3377. * THROUGH THE LINKAGE UNTIL *EOC* OR AN ERROR IS DETECTED.
  3378. * ALL ENTRIES ON A CHAIN ARE MARKED BY SETTING THE POINTER
  3379. * FIELD TO THE INDEX OF THE HEAD OF CHAIN (*HOC*) ENTRY.
  3380. * FLAGS ARE SET IN THE *VT* ENTRIES FOR ERRORS DETECTED.
  3381. *
  3382. * PROC VLNCS
  3383. *
  3384. * ENTRY (PAR$ST) - SCATTER FILE PARAMETER.
  3385. * (VTFIRST) - INDEX OF FIRST ENTRY IN *VT*.
  3386. * (VTLAST) - INDEX OF LAST ENTRY IN *VT*.
  3387. * (ARRAY VTTAB) - VALIDATION TABLE.
  3388. *
  3389. * EXIT THE FOLLOWING FIELDS IN THE *VT* ENTRY MAY BE UPDATED.
  3390. * (VTEN$POINT) - INDEX OF THE *HOC* ENTRY.
  3391. * (VTEN$ILL) - ILL-FORMED CHAIN.
  3392. * (VTEN$INTC) - INTERSECTING CHAIN.
  3393. * (VTEN$INTS) - INTERSECTING AU.
  3394. * (VTEN$SCAT) - SCATTERED FILE.
  3395. *
  3396. * INTERSECTING CHAIN DETAIL LINES ARE ISSUED TO THE
  3397. * REPORT FILE IF INTERSECTIONS ARE DETECTED.
  3398. *
  3399. * NOTES CHAINS ARE FOLLOWED UNTIL -
  3400. * . AN END OF CHAIN ENTRY IS DETECTED.
  3401. * . AN ILL-FORMED CHAIN IS DETECTED.
  3402. * . AN INTERSECTING CHAIN IS DETECTED.
  3403. *
  3404. * ILL-FORMED CHAINS ARE THOSE WHICH HAVE A MEMBER
  3405. * THAT LINKS TO AN ENTRY ON THIS CHAIN (LOOPING)
  3406. * OR THAT LINKS TO AN UNALLOCATED ENTRY OR HAS A
  3407. * LINK THAT IS NOT ZERO WHEN THE *EOC* FLAG IS SET.
  3408. *
  3409. * INTERSECTING CHAINS ARE THOSE THAT HAVE A MEMBER
  3410. * THAT LINKS TO AN ENTRY ON A DIFFERENT CHAIN.
  3411. *
  3412. * A SCATTERED FILE CHECK IS PERFORMED. THE SCATTERED
  3413. * FLAG IS SET IF THE NUMBER OF CARTRIDGES FOR THE
  3414. * CHAIN IS GREATER THAN THE *ST* PARAMETER.
  3415. *
  3416. #
  3417.  
  3418. #
  3419. **** PROC VLNCS - XREF LIST BEGIN.
  3420. #
  3421.  
  3422. XREF
  3423. BEGIN
  3424. PROC VLBICT; # INTERSECTING CHAIN REPORT #
  3425. END
  3426.  
  3427. #
  3428. **** PROC VLNCS - XREF LIST END.
  3429. #
  3430.  
  3431. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  3432.  
  3433. *CALL COMBFAS
  3434. *CALL COMTVLD
  3435. *CALL COMTVLV
  3436.  
  3437.  
  3438. STATUS CHAIN # CHAIN STATUS #
  3439. OK, # GOOD CHAIN #
  3440. ILL, # ILL-FORMED CHAIN #
  3441. INTC; # INTERSECTING CHAIN #
  3442.  
  3443. ITEM ENDCHAIN B; # END OF CHAIN FLAG #
  3444. ITEM FREESTAT B; # FREE FLAG STATUS #
  3445. ITEM HOCSTAT S : CHAIN; # HEAD-OF-CHAIN STATUS #
  3446. ITEM I I; # TEMPORARY VARIABLE #
  3447. ITEM AUCNT I; # COUNT OF AU-S IN CHAIN #
  3448. ITEM CARTCNT I; # COUNT OF CARTRIDGES IN CHAIN #
  3449.  
  3450. CONTROL EJECT;
  3451.  
  3452. #
  3453. * SCAN *VT* FOR *HOC* ENTRIES.
  3454. #
  3455.  
  3456. SLOWFOR I = VTFIRST STEP 1 UNTIL VTLAST
  3457. DO
  3458. BEGIN # *VT* SCAN #
  3459. VTEN$WORD[0] = VT$ITEM[I]; # GET ENTRY #
  3460.  
  3461. IF NOT VTEN$HOC[0] # SKIP IF NOT HEAD OF CHAIN #
  3462. THEN
  3463. BEGIN
  3464. TEST I;
  3465. END
  3466.  
  3467.  
  3468. VTPTR = I; # SET TO HEAD OF CHAIN #
  3469.  
  3470.  
  3471. #
  3472. * INITIALIZE.
  3473. #
  3474.  
  3475. AUCNT = 0;
  3476. CARTCNT = 1;
  3477. ENDCHAIN = FALSE;
  3478. FREESTAT = FALSE;
  3479. HOCSTAT = S"OK"; # ASSUME GOOD #
  3480.  
  3481. #
  3482. * PROCESS EACH ENTRY IN THE CHAIN STARTING WITH HEAD OF CHAIN.
  3483. * NOTE - ENTRIES ARE PLACED ON A CHAIN BY SETTING THE VTEN$POINT
  3484. * FIELD EQUAL TO THE INDEX FOR THE HEAD OF CHAIN.
  3485. * I = HEAD OF CHAIN INDEX.
  3486. #
  3487.  
  3488. REPEAT WHILE NOT ENDCHAIN
  3489. DO # NORMAL CHAIN PROCESS #
  3490. BEGIN # NOT END OF CHAIN #
  3491. IF VTEN$POINT[0] EQ 0
  3492. THEN
  3493.  
  3494. #
  3495. * PUT ENTRY ON CHAIN.
  3496. #
  3497.  
  3498. BEGIN # ADD TO CHAIN #
  3499. VTEN$POINT[0] = I; # MARK ENTRY ON CHAIN #
  3500. IF NOT VTEN$ALOC[0]
  3501. THEN
  3502. BEGIN
  3503. VTEN$SOF[0] = TRUE;
  3504. END
  3505.  
  3506. IF NOT VTEN$ALOC[0] OR VTEN$EOC[0] AND VTEN$LINK[0] NQ 0
  3507. THEN
  3508. BEGIN
  3509. HOCSTAT = S"ILL"; # ILL-FORMED CHAIN #
  3510. END
  3511.  
  3512. AUCNT = AUCNT + 1;
  3513. IF VTEN$OCL[0] NQ 0
  3514. THEN # LINK IS OFF CARTRIDGE #
  3515. BEGIN
  3516. CARTCNT = CARTCNT + 1;
  3517. END
  3518.  
  3519. IF VTEN$FCF[0]
  3520. THEN # FREE CARTRIDGE FLAG SET #
  3521. BEGIN
  3522. FREESTAT = TRUE;
  3523. END
  3524.  
  3525. END # ADD TO CHAIN #
  3526.  
  3527. ELSE # VTEN$POINT[0] NOT EQUAL TO 0 #
  3528.  
  3529. #
  3530. * ENTRY ALREADY ASSIGNED TO A CHAIN.
  3531. #
  3532.  
  3533. BEGIN # ENTRY ON A CHAIN #
  3534. VTEN$INTS[0] = TRUE;
  3535. IF VTEN$POINT[0] EQ I
  3536. THEN
  3537. BEGIN
  3538. HOCSTAT = S"ILL"; # ILL-FORMED CHAIN #
  3539. VTEN$LOOP[0] = TRUE;
  3540. END
  3541.  
  3542. ELSE
  3543. BEGIN
  3544. HOCSTAT = S"INTC"; # INTERSECTING CHAIN #
  3545. VLBICT(I,VTEN$POINT[0]); # REPORT INTERSECTIONS #
  3546. END
  3547.  
  3548. END # ENTRY ON A CHAIN #
  3549.  
  3550. #
  3551. * UPDATE AU ENTRY.
  3552. #
  3553.  
  3554. VT$ITEM[VTPTR] = VTEN$WORD[0]; # STORE ENTRY TO *VT* #
  3555.  
  3556. #
  3557. * DETERMINE IF END-OF-CHAIN. THE END IS WHEN THE END OF CHAIN
  3558. * FLAG IS SET OR A CHAIN WITH LINKAGE PROBLEMS HAS BEEN DETECTED.
  3559. #
  3560.  
  3561. ENDCHAIN = VTEN$EOC[0] OR HOCSTAT NQ 0;
  3562.  
  3563. #
  3564. * GET LINK TO NEXT IF NOT AT END.
  3565. #
  3566.  
  3567. IF NOT ENDCHAIN
  3568. THEN
  3569. BEGIN # LINK TO NEXT #
  3570. VTPTR = VTEN$LINK[0];
  3571. IF (VTPTR LS VTFIRST) OR (VTPTR GR VTLAST)
  3572. THEN # BAD LINK #
  3573. BEGIN
  3574. HOCSTAT = S"ILL"; # ILL-FORMED CHAIN #
  3575. ENDCHAIN = TRUE;
  3576. END
  3577.  
  3578. END # LINK TO NEXT #
  3579.  
  3580.  
  3581. #
  3582. * GET NEXT AU IN CHAIN.
  3583. #
  3584.  
  3585. IF NOT ENDCHAIN
  3586. THEN
  3587. BEGIN
  3588. VTEN$WORD[0] = VT$ITEM[VTPTR]; # NEXT AU #
  3589. END
  3590.  
  3591. END # NOT END OF CHAIN #
  3592.  
  3593. #
  3594. * IF INTERSECTING CHAINS, UPDATE OTHER *HOC* ENTRY.
  3595. #
  3596.  
  3597. IF HOCSTAT EQ S"INTC"
  3598. THEN
  3599. BEGIN
  3600. VTEN$WORD[0] = VT$ITEM[VTEN$POINT[0]]; # GET *HOC* ENTRY #
  3601. VTEN$INTC[0] = TRUE; # SET INTERSECTING #
  3602. VT$ITEM[VTEN$POINT[0]] = VTEN$WORD[0]; # STORE *HOC* ENTRY #
  3603. END
  3604.  
  3605. #
  3606. * UPDATE THE *HOC* ENTRY.
  3607. #
  3608.  
  3609. VTEN$WORD[0] = VT$ITEM[I]; # GET *HOC* ENTRY #
  3610. IF HOCSTAT EQ S"ILL"
  3611. THEN
  3612. BEGIN
  3613. VTEN$ILL[0] = TRUE; # SET ILL-FORMED BIT #
  3614. END
  3615.  
  3616. IF HOCSTAT EQ S"INTC"
  3617. THEN
  3618. BEGIN
  3619. VTEN$INTC[0] = TRUE; # SET INTERSECTING BIT #
  3620. END
  3621.  
  3622. #
  3623. * DO SCATTERED FILE CHECK.
  3624. #
  3625.  
  3626. IF CARTCNT GR PAR$ST
  3627. THEN
  3628. BEGIN
  3629. VTEN$SCAT[0] = TRUE; # SET SCATTERED BIT #
  3630. END
  3631.  
  3632. IF FREESTAT
  3633. THEN # FREE CARTRIDGE FLAG WAS SET #
  3634. BEGIN
  3635. VTEN$FCF[0] = TRUE;
  3636. END
  3637.  
  3638. VT$ITEM[I] = VTEN$WORD[0]; # STORE *HOC* ENTRY #
  3639.  
  3640. END # *VT* SCAN #
  3641.  
  3642. END # VLNCS #
  3643.  
  3644. TERM
  3645. FUNC VLNTC((FLD),(CONVTYP),(SIZE)) C(10);
  3646. # TITLE VLNTC - NUMERIC TO CHARACTER CONVERSION. #
  3647.  
  3648. BEGIN # VLNTC #
  3649.  
  3650. #
  3651. ** VLNTC - NUMERIC TO CHARACTER CONVERSION.
  3652. *
  3653. * *VLNTC* CONVERTS THE DECIMAL/OCTAL NUMERIC TYPE DATA FIELD
  3654. * INTO A LEFT-JUSTIFIED CHARACTER TYPE FIELD.
  3655. *
  3656. * THE DATA IN *FLD* IS CONVERTED AS SPECIFIED IN *CONVTYP*.
  3657. * THEN THE NUMBER (*SIZE*) OF RIGHT-JUSTIFIED CONVERTED
  3658. * CHARACTERS IS LEFT-JUSTIFIED INTO THE RESULT FIELD *VLNTC*.
  3659. *
  3660. * FUNC VLNTC(FLD,CONVTYP,SIZE)
  3661. *
  3662. * ENTRY (FLD) - DATA FIELD TO CONVERT (RIGHT JUSTIFIED).
  3663. * (CONVTYP) - "XCDD" FOR DECIMAL DISPLAY CONVERSION.
  3664. * "XCOD" FOR OCTAL DISPLAY CONVERSION.
  3665. * ANYTHING ELSE IMPLIES NO CONVERSION.
  3666. * (SIZE) - NUMBER OF CHARACTERS IN CONVERTED RESULT
  3667. * TO RETURN.
  3668. *
  3669. * EXIT (VLNTC) - CONVERTED DATA, LEFT JUSTIFIED, BLANK
  3670. * FILLED.
  3671. *
  3672. #
  3673.  
  3674. ITEM FLD I; # FIELD TO CONVERT #
  3675. ITEM CONVTYP C(10); # TYPE OF CONVERSION #
  3676. ITEM SIZE I; # SIZE OF RESULT #
  3677.  
  3678. #
  3679. **** FUNC VLNTC - XREF LIST BEGIN.
  3680. #
  3681.  
  3682. XREF
  3683. BEGIN
  3684. PROC VLBFILL; # BLANK FILL #
  3685. FUNC XCDD; # CONVERT INTEGER TO DECIMAL
  3686.   DISPLAY #
  3687. FUNC XCOD; # CONVERT INTEGER TO OCTAL
  3688.   DISPLAY #
  3689. END
  3690.  
  3691. #
  3692. **** FUNC VLNTC - XREF LIST END.
  3693. #
  3694.  
  3695. ITEM NUMBER I; # TEMPORARY VARIABLE #
  3696.  
  3697. CONTROL EJECT;
  3698.  
  3699.  
  3700. NUMBER = FLD;
  3701.  
  3702. #
  3703. * CONVERT FIELD AS SPECIFIED.
  3704. #
  3705.  
  3706. IF CONVTYP EQ "XCDD" # INTEGER TO DECIMAL #
  3707. THEN
  3708. BEGIN
  3709. NUMBER = XCDD(FLD);
  3710. END
  3711.  
  3712. IF CONVTYP EQ "XCOD" # INTEGER TO OCTAL #
  3713. THEN
  3714. BEGIN
  3715. NUMBER = XCOD(FLD);
  3716. END
  3717.  
  3718. #
  3719. * BLANK FILL.
  3720. #
  3721.  
  3722. VLBFILL(NUMBER,1);
  3723.  
  3724. #
  3725. * RETURN THE FIELD WITH THE NUMBER OF CHARACTERS SPECIFIED,
  3726. * LEFT JUSTIFIED, BLANK FILLED.
  3727. #
  3728.  
  3729. VLNTC = C<10-SIZE,SIZE>NUMBER;
  3730.  
  3731. END # VLNTC #
  3732.  
  3733. TERM
  3734. PROC VLPFC;
  3735.  
  3736. # TITLE VLPFC - READ PFC. #
  3737.  
  3738. BEGIN # VLPFC #
  3739.  
  3740. #
  3741. ** VLPFC - READ THE *PFC*.
  3742. *
  3743. * *VLPFC* BUILDS THE *PFC* EXTRACT FILES FROM THE *PFC*
  3744. * CATALOG ENTRIES FOR THE SELECTED SUBFAMILIES AND
  3745. * SELECTED SM(S).
  3746. *
  3747. * PROC VLPFC
  3748. *
  3749. * ENTRY (DEVMASK) - SELECTED SUBFAMILY(S) DEVICE MASK.
  3750. * (PAR$CS) - SELECTED *SM-S*.
  3751. * (PAR$FM) - FAMILY.
  3752. * (PAR$SB) - SELECTED SUBFAMILIES.
  3753. * (RPTFADR) - REPORT FILE *FET* ADDRESS.
  3754. *
  3755. * EXIT THE *PFC* EXTRACT FILES ARE WRITTEN.
  3756. *
  3757. * FOR ERRORS DETECTED -
  3758. * 1) (TOTALERRS) - TOTAL VALIDATION ERRORS INCREMENTED.
  3759. * 2) ERROR DETAIL LINES WRITTEN TO THE REPORT FILE.
  3760. *
  3761. * MESSAGES * ERROR READING *PFC* *
  3762. *
  3763. * NOTES VALIDATION ERRORS DETECTED ARE -
  3764. * . INVALID *SM* IN *ASA*.
  3765. *
  3766. #
  3767.  
  3768. #
  3769. **** PROC VLPFC - XREF LIST BEGIN.
  3770. #
  3771.  
  3772. XREF
  3773. BEGIN
  3774. PROC LOFPROC; # LIST OF FILES PROCESSOR #
  3775. PROC RDPFC; # READ PERMANENT FILE CATALOG #
  3776. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  3777. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  3778.   LINE #
  3779. PROC VLERROR; # ISSUE ERROR MESSAGE #
  3780. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  3781. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  3782.   CONVERSION #
  3783. PROC WRITEF; # INTERFACE TO *WRITEF* MACRO #
  3784. PROC WRITEW; # INTERFACE TO *WRITEW* MACRO #
  3785. PROC ZSETFET; # INITIALIZES A *FET* FOR *I/O* #
  3786. END
  3787.  
  3788. #
  3789. **** PROC VLPFC - XREF LIST END.
  3790. #
  3791.  
  3792. DEF LISTCON #0#; # TURN COMMON DECK LISTING OFF #
  3793. *CALL COMBFAS
  3794. *CALL COMSPFM
  3795. *CALL COMTCTW
  3796. *CALL COMTVLD
  3797. *CALL COMTVLF
  3798. *CALL COMTVLX
  3799.  
  3800. ITEM VPEO I; # *PFC* ENTRY ORDINAL #
  3801. ITEM I I; # TEMPORARY VARIABLE #
  3802. ITEM IWC I; # INCREMENTED WORD COUNT #
  3803. ITEM K I; # TEMPORARY VARIABLE #
  3804. ITEM WDCNT I; # WORD COUNT #
  3805.  
  3806. #
  3807. * BUFFER AREA FOR *PFC* ENTRY.
  3808. #
  3809.  
  3810. ARRAY VPFCBUFFER [0:O"101"] S(1); # *PFC* BUFFER #
  3811. ITEM VPFC$WD U(00,00,60);
  3812.  
  3813. #
  3814. * ERROR LINES FOR REPORT FILE.
  3815. #
  3816.  
  3817. ARRAY BADSM [0:0] S(5); # INVALID *SM* REPORT LINE #
  3818. BEGIN
  3819. ITEM BAD$DESC C(00,00,50) = ["***PF = XXXXXXX "];
  3820. ITEM BAD$PFN C(00,48,07);
  3821. ITEM BAD$ERR C(02,00,20) = ["INVALID SM IN PFC "];
  3822. END
  3823.  
  3824. ARRAY BADSM2 [0:0] S(5); # INVALID *SM* REPORT LINE 2 #
  3825. BEGIN
  3826. ITEM BAD$DESC2 C(00,00,50) = [" UI = NNNNNN "];
  3827. ITEM BAD$UI C(00,48,06);
  3828. END
  3829.  
  3830. CONTROL EJECT;
  3831.  
  3832. #
  3833. * INITIALIZE FETS.
  3834. #
  3835.  
  3836. SLOWFOR I = 0 STEP 1 UNTIL MAXSF
  3837. DO # *PFC* EXTRACT FILES #
  3838. BEGIN
  3839. PEXTFADR = LOC(PFCE$FET[I]);
  3840. PEXTBADR = LOC(PFCE$BUF[I]);
  3841. PFCE$LFN[0] = EXTLFN; # *LFN* OF *PFC* EXTRACT FILES #
  3842. PFCE$LFNX[0] = I + "0"; # APPEND SUBFAMILY TO *LFN* #
  3843. ZSETFET(PEXTFADR,PFCENAME,PEXTBADR,LPFCEBUF,SFETL);
  3844. LOFPROC(PFCENAME); # ADD LFN TO LIST OF FILES #
  3845. REWIND(PFCEXTN[I],RCL);
  3846. END
  3847.  
  3848. LOFPROC("CATS"); # ADD LFN TO LIST OF FILES #
  3849.  
  3850. #
  3851. * READ THE *PFC* FOR THE SELECTED SUBFAMILIES (DEVMASK).
  3852. #
  3853.  
  3854. STAT = 0;
  3855. SLOWFOR I = 0 STEP 1 WHILE STAT EQ 0
  3856. DO
  3857. BEGIN # READ *PFC* ENTRIES #
  3858.  
  3859. RDPFC(PAR$FM,DEVMASK,VPFCBUFFER,WDCNT,STAT);
  3860.  
  3861. #
  3862. * EXIT IF NO SECTOR WAS RETURNED.
  3863. #
  3864.  
  3865. IF STAT NQ 0
  3866. THEN
  3867. BEGIN
  3868. TEST I;
  3869. END
  3870.  
  3871. #
  3872. * ELSE, PROCESS THE *PFC* SECTOR THAT WAS RETURNED.
  3873. #
  3874.  
  3875. P<CNTRWORD> = LOC(VPFCBUFFER) + WDCNT; # RETURN CONTROL WORD #
  3876. VPEO = -1; # INITIALIZE *PFC* ENTRY ORDINAL #
  3877.  
  3878. SLOWFOR IWC = 0 STEP PFCENTL WHILE (IWC LS WDCNT)
  3879. DO
  3880. BEGIN # *PFC* SELECTION #
  3881. VPEO = VPEO + 1;
  3882. P<PFC> = LOC(VPFC$WD[IWC]); # SET POINTER TO A *PFC* ENTRY #
  3883.  
  3884. #
  3885. * SKIP THE *PFC* ENTRY IF IT IS NOT ACTIVE.
  3886. #
  3887.  
  3888. IF PFC$UI[0] EQ 0
  3889. THEN
  3890. BEGIN
  3891. TEST IWC; # *PFC* ENTRY IS NOT ACTIVE #
  3892. END
  3893.  
  3894. #
  3895. * PERMANENT FILE DOES EXIST.
  3896. #
  3897.  
  3898. SBINDX = PFC$SF[0]; # SUBFAMILY INDEX #
  3899. P<ASA> = LOC(PFC$AA); # ASA DEFINITIONS #
  3900. SMINDX = ASASM[0]; # EXTRACT *SM* INDEX #
  3901.  
  3902.  
  3903. #
  3904. * IF NOT *MAS* *PFC*.
  3905. #
  3906.  
  3907. IF PFC$AT NQ ATAS
  3908. THEN
  3909. BEGIN
  3910. TEST IWC;
  3911. END
  3912.  
  3913.  
  3914. #
  3915. * FOR INVALID *SM*, ISSUE DIAGNOSTIC.
  3916. #
  3917.  
  3918. IF (PFC$AA[0] NQ 0) AND ((SMINDX EQ 0) OR (SMINDX GR "H"))
  3919. THEN
  3920. BEGIN
  3921. TOTALERRS = TOTALERRS + 1;
  3922. RPLINE(RPTFADR," ",0,1,EOPL); # BLANK LINE #
  3923. BAD$PFN[0] = VLNTC(PFC$FN[0]," ",10); # *PFN* IN ERROR #
  3924. RPLINE(RPTFADR,BADSM,4,50,EOPL); # ISSUE ERROR LINE #
  3925. BAD$UI[0] = VLNTC(PFC$UI[0],"XCOD",6); # SET UI IN ERROR
  3926.   LINE #
  3927. RPLINE(RPTFADR,BADSM2,4,50,EOPL); # ISSUE ERROR LINE #
  3928. TEST IWC;
  3929. END
  3930.  
  3931. #
  3932. * SKIP *PFC* ENTRIES THAT DO NOT MATCH THE SELECTED SUBFAMILY
  3933. * OR *SM*.
  3934. #
  3935.  
  3936. IF (B<SBINDX,1>PAR$SB EQ 0 ) ##
  3937. OR (B<SMINDX,1>PAR$SM EQ 0) ##
  3938. OR (PFC$AT[0] NQ ATAS)
  3939. THEN
  3940. BEGIN
  3941. TEST IWC;
  3942. END
  3943.  
  3944. #
  3945. * BUILD THE EXTRACT RECORD.
  3946. #
  3947.  
  3948. EXTR$PEO[0] = VPEO; # *PFC* ENTRY ORDINAL #
  3949. EXTR$DN[0] = CNTR$DN[0]; # DEVICE NUMBER #
  3950. EXTR$TRK[0] = CNTR$TRK[0]; # TRACK #
  3951. EXTR$SEC[0] = CNTR$SEC[0]; # SECTOR #
  3952. EXTR$DA[0] = PFC$DA[0];
  3953. EXTR$FLG[0] = PFC$AF[0]; # *ASA* FLAGS #
  3954. EXTR$D[0] = 0; # INITIALIZE DISK IMAGE FLAG #
  3955. IF PFC$BT[0] NQ 0
  3956. THEN # *PFC* TRACK IS NOT ZERO #
  3957. BEGIN
  3958. EXTR$D[0] = 1; # DISK IMAGE EXISTS #
  3959. END
  3960.  
  3961. EXTR$ASA[0] = PFC$AA[0]; # SET THE *ASA* #
  3962. EXTR$AT[0] = PFC$AT[0];
  3963. EXTR$FCT[0] = EXTR$GP[0]*16 + EXTR$GPT[0];
  3964. EXTR$PFN[0] = PFC$FN[0]; # SET THE *PFN* #
  3965. EXTR$UI[0] = PFC$UI[0]; # SET THE *UI* #
  3966. EXTR$BKDT[0] = PFC$UD[0]; # SET THE BACKUP DATE/TIME #
  3967. EXTR$CREA[0] = PFC$CD[0]; # CREATION DATE/TIME #
  3968.  
  3969. #
  3970. * SET THE BACKUP DATE/TIME TO BE THE LATEST DATE/TIME FROM
  3971. * THE UTILITY CONTROL AND CONTROL MODIFICATION DATE/TIME
  3972. * FIELDS.
  3973. #
  3974.  
  3975. IF PFC$UD[0] LS PFC$KD[0]
  3976. THEN # CONTROL IS NEWER THAN UTILITY #
  3977. BEGIN
  3978. EXTR$BKDT[0] = PFC$KD[0]; # BACKUP DATE/TIME #
  3979. END
  3980.  
  3981. WRITEW(PFCEXTN[SBINDX],EXTRECORD,RLEXTR,K);
  3982. END # *PFC* SELECTION #
  3983.  
  3984. END # READ *PFC* ENTRIES #
  3985.  
  3986. #
  3987. * IF ERROR READING PFC, ISSUE MESSAGE AND ABORT.
  3988. #
  3989.  
  3990. IF STAT NQ 1 # IF NOT *EOI* #
  3991. THEN # ERROR TYPE 2, 3, OR 4 #
  3992. BEGIN
  3993. VLERROR(VE"PFCERR",ABRT); # ISSUE MESSAGE AND ABORT #
  3994. END
  3995.  
  3996. #
  3997. * WRITE EOFS ON ALL FILES.
  3998. #
  3999.  
  4000. SLOWFOR I = 0 STEP 1 UNTIL MAXSF
  4001. DO
  4002. BEGIN
  4003. WRITEF(PFCEXTN[I],RCL);
  4004. REWIND(PFCEXTN[I],RCL);
  4005. END
  4006.  
  4007. #
  4008. * SET BITS TO INDICATE ALL SFM CATALOG FILES DO EXIST AND ARE
  4009. * TO BE VALIDATED.
  4010. #
  4011.  
  4012. B<0,8>SFMCATDEF = O"777"; # TURN THE 8 SUBCATALOG FLAGS ON #
  4013.  
  4014. END # VLPFC #
  4015.  
  4016. TERM
  4017. PROC VLPFILL(FLD,(PARAM));
  4018. # TITLE VLPFILL - FILL PARAMETER IN MESSAGE TEXT. #
  4019.  
  4020. BEGIN # VLPFILL #
  4021.  
  4022. #
  4023. ** VLPFILL - FILL PARAMETER INTO MESSAGE TEXT.
  4024. *
  4025. * *VLPFILL* LOCATES THE PARAMETER PLACE-HOLDER IN THE
  4026. * TEXT AND REPLACES IT WITH THE PARAMETER CHARACTERS
  4027. * IN THE *PARAM* WORD.
  4028. *
  4029. * A MAXIMUM OF 40 CHARACTERS IS SCANNED.
  4030. *
  4031. * PROC VLPFILL(FLD,PARAM)
  4032. *
  4033. * ENTRY (FLD) - TEXT TO SCAN.
  4034. * (PARAM) - PARAMETER TO PLACE IN TEXT.
  4035. *
  4036. * EXIT (FLD) - TEXT WITH THE PARAMETER FROM *PARAM* INSERTED.
  4037. *
  4038. #
  4039.  
  4040.  
  4041. ITEM FLD I; # TEXT TO SCAN #
  4042. ITEM PARAM C(10); # PARAMETER TO INSERT #
  4043.  
  4044.  
  4045. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  4046.  
  4047. *CALL COMBFAS
  4048.  
  4049.  
  4050.  
  4051. ITEM PCHAR I; # PARAMETER CHARACTER INDEX #
  4052. ITEM QCHAR I; # Q CHARACTER INDEX #
  4053. ITEM Q I; # Q CHARACTER TEMPORARY #
  4054.  
  4055. BASED
  4056. ARRAY SCAN [0:0] S(4); # TO SCAN TEXT FIELD #
  4057. ITEM SCAN$WD C(00,00,40);
  4058. CONTROL EJECT;
  4059.  
  4060. P<SCAN> = LOC(FLD);
  4061.  
  4062.  
  4063. Q = 0;
  4064. QCHAR = -1; # INITIALIZE #
  4065.  
  4066. #
  4067. * SCAN THE TEXT LOOKING FOR A PARAMETER PLACE-HOLDER.
  4068. #
  4069.  
  4070. REPEAT WHILE QCHAR LQ 40 AND Q NQ "Q"
  4071. DO
  4072. BEGIN # PLACE-HOLDER SEARCH #
  4073. QCHAR = QCHAR + 1;
  4074. Q = C<QCHAR,1>SCAN$WD[0]; # GET A CHARACTER #
  4075. END # PLACE-HOLDER SEARCH #
  4076.  
  4077. #
  4078. * MOVE PARAMETER INTO THE PLACE-HOLDER IF THERE WAS ONE.
  4079. #
  4080.  
  4081. SLOWFOR PCHAR = 0 STEP 1 WHILE Q EQ "Q"
  4082. DO
  4083. BEGIN # PLACE-HOLDER INSERT #
  4084. C<QCHAR,1>SCAN$WD[0] = C<PCHAR,1>PARAM; # REPLACE Q
  4085.   CHARACTER #
  4086. QCHAR = QCHAR + 1;
  4087. Q = C<QCHAR,1>SCAN$WD[0]; # GET NEXT CHARACTER #
  4088. END # PLACE-HOLDER INSERT #
  4089.  
  4090. RETURN;
  4091. END # VLPFILL #
  4092.  
  4093. TERM
  4094. PROC VLPRSET;
  4095. # TITLE VLPRSET - PRESET PARAMETERS AND FILES. #
  4096.  
  4097. BEGIN # VLPRSET #
  4098.  
  4099. #
  4100. ** VLPRSET - PRESET PARAMETERS AND FILES.
  4101. *
  4102. * *VLPRSET* INITIALIZES ALL PARAMETERS AND PERFORMS
  4103. * ALL PRESET FUNCTIONS. THIS INCLUDES -
  4104. * . GET DEFAULT FAMILY AND SUBSYSTEM ID.
  4105. * . CRACK CONTROL CARD AND EDIT PARAMETERS.
  4106. * . LIST THE CONTROL CARD PARAMETERS IN THE REPORT FILE.
  4107. * . OPEN/INITIALIZE FILES.
  4108. *
  4109. * PROC VLPRSET
  4110. *
  4111. * ENTRY THE CONTROL CARD IN *RA* + 70B.
  4112. *
  4113. * EXIT (DEF$FAM) - DEFAULT FAMILY.
  4114. * (DEVMASK) - DEVICE MASK FOR SELECTED
  4115. * SUBFAMILIES.
  4116. * (PAR$XX) - PARAMETER VALUES WHERE XX =
  4117. * KEYWORD.
  4118. * (RPTFILE) - ADDRESS OF REPORT FILE *FET*.
  4119. * (SSID$VL) - SUBSYTEM IDENTIFICATION.
  4120. * (ARRAY FIXITFILE) - FIXIT FILE *FET*.
  4121. * (ARRAY PROBFILE) - PROBLEM FILE *FET*.
  4122. *
  4123. * MESSAGES * INVALID SM PARAMETER.*
  4124. * * INVALID FX PARAMETER.*
  4125. * * ILLEGAL - L AND RF PARAMETERS.*
  4126. * * ILLEGAL - RF AND AM PARAMETERS.*
  4127. * * ILLEGAL - RF AND FM PARAMETERS.*
  4128. * * ILLEGAL - RL AND NO RF PARAMETERS.*
  4129. * * INVALID - SB PARAMETER.*
  4130. * * INVALID - ST PARAMETER.*
  4131. * * CONTROL CARD SYNTAX ERROR.*
  4132. * * ABORT RUN DUE TO ERRORS.*
  4133. *
  4134. #
  4135.  
  4136.  
  4137. #
  4138. **** PROC VLPRSET - XREF LIST BEGIN.
  4139. #
  4140.  
  4141. XREF
  4142. BEGIN
  4143. PROC BZFILL; # BLANK OR ZERO FILL #
  4144. PROC GETFAM; # SET FAMILY TABLE #
  4145. PROC LOFPROC; # LIST OF FILES PROCESSOR #
  4146. PROC PFD; # PERMANENT FILE ACCESS #
  4147. PROC SETPFP; # SET FILE PARAMETERS#
  4148. PROC RETERN; # RETURNS SPECIFIED FILE #
  4149. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  4150. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  4151.   LINE #
  4152. PROC RPOPEN; # OPENS A PRINT FILE #
  4153. PROC VLBFILL; # BLANK FILL #
  4154. PROC VLERROR; # ISSUE ERROR MESSAGE #
  4155. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  4156.   CONVERSION #
  4157. PROC VLPFC; # READ *PFC* #
  4158. PROC VLRDF; # READ RDF FILE #
  4159. PROC VLTAB;
  4160. PROC VLTITLE; # ISSUE REPORT TITLE #
  4161. PROC XARG; # CRACK PARAMETER LIST #
  4162. FUNC XDXB; # CONVERT DISPLAY CODE TO BINARY #
  4163. PROC ZSETFET; # INITIALIZES A *FET* FOR *I/O* #
  4164. END
  4165.  
  4166. #
  4167. **** PROC VLPRSET - XREF LIST END.
  4168. #
  4169.  
  4170.  
  4171. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTINGS #
  4172.  
  4173. *CALL COMBFAS
  4174. *CALL COMBBZF
  4175. *CALL COMBPFP
  4176. *CALL COMSPFM
  4177. *CALL COMTVLD
  4178. *CALL COMTVLF
  4179. *CALL COMTVLP
  4180. *CALL COMTVLX
  4181.  
  4182.  
  4183. ITEM ARGADDR I; # ARGUMENT TABLE ADDRESS #
  4184. ITEM ARGERR I; # CTL CARD ARGUMENT ERROR #
  4185. ITEM CHAR I; # SCRATCH FIELD #
  4186. ITEM I I; # TEMPORARY VARIABLE #
  4187. ITEM J I; # TEMPORARY VARIABLE #
  4188. ITEM K I; # TEMPORARY VARIABLE #
  4189. ITEM PAR I; # SCRATCH FIELD #
  4190.  
  4191.  
  4192. BASED
  4193. ARRAY ARGELEMENT [0:0] S(1); # TO EXTRACT THE ARGUMENTS #
  4194. BEGIN
  4195. ITEM ARGITEM U(00,00,60);
  4196. ITEM ARGITEMC C(00,00,10);
  4197. ITEM ARGSCAN C(00,00,20); # FOR A 2 WORD PARAMETER #
  4198. END
  4199.  
  4200.  
  4201. ARRAY PARIDS [0:VARGL] S(1); # PARAMETER IDS FOR REPORT #
  4202. BEGIN
  4203. ITEM PARNME C(00,30,5);
  4204. ITEM PARNME1 C(VLF,30,5) = [ "L = " ];
  4205. ITEM PARNME2 C(VRF,30,5) = [ "RF = " ];
  4206. ITEM PARNME3 C(VAM,30,5) = [ "AM = " ];
  4207. ITEM PARNME4 C(VSM,30,5) = [ "SM = " ];
  4208. ITEM PARNME6 C(VFM,30,5) = [ "FM = " ];
  4209. ITEM PARNME7 C(VFX,30,5) = [ "FX = " ];
  4210. ITEM PARNME8 C(VRL,30,5) = [ "RL = " ];
  4211. ITEM PARNME9 C(VSB,30,5) = [ "SB = " ];
  4212. ITEM PARNME10 C(VST,30,5) = [ "ST = " ];
  4213. END
  4214.  
  4215. #
  4216. * TO BUILD THE PARAMETER FOR THE REPORT FILE.
  4217. #
  4218.  
  4219. ARRAY PARVALUE [0:0] S(2); # PARAMETER DISPLAY CD VALUE #
  4220. BEGIN
  4221. ITEM PAR$VALUE C(00,00,20); # PARAMETER #
  4222. ITEM PAR$VALEND U(00,42,18); # END OF FIRST PARAMETER #
  4223. ITEM PAR$VAL2 C(01,00,10); # SECOND WORD OF PARAMETER #
  4224. END
  4225. CONTROL EJECT;
  4226.  
  4227. #
  4228. * GET THE SYSTEM DEFAULT FAMILY AND THE SUBSYSTEM IDENTIFICATION.
  4229. #
  4230.  
  4231. SSID$VL = ATAS;
  4232. GETFAM(FAMT,I,J,K,SSID$VL);
  4233. DEF$FAM = FAM$NAME[K];
  4234.  
  4235. #
  4236. * CRACK THE CONTROL CARD.
  4237. #
  4238.  
  4239. VLTAB(ARGADDR); # GET ADDR OF ARGUMENT TABLE #
  4240. XARG(ARGADDR,0,ARGERR); # CRACK PARAMETERS BASED ON
  4241.   TABLE #
  4242.  
  4243. IF ARGERR NQ 0
  4244. THEN # SYNTAX ERROR #
  4245. BEGIN
  4246. VLERROR(VE"SYNTAX",ABRT); # ABORT WITH MESSAGE #
  4247. END
  4248.  
  4249. P<ARGELEMENT> = LOC(VARGUMENTS);
  4250.  
  4251. #
  4252. * MOVE CONTROL CARD ARGUMENTS TO PARAMETERS. PARAMETERS ARE
  4253. * STORED IN PAR$XX (WHERE XX IS THE KEYWORD) FOR SUBSEQUENT
  4254. * PROGRAM ACCESS.
  4255. #
  4256.  
  4257. PAR$LF = VARG$LF[0]; # *L* PARAMETER VALUE #
  4258. PAR$RF = VARG$RF[0]; # *RF* PARAMETER VALUE #
  4259. PAR$AM = VARG$AM[0]; # *AM* PARAMETER VALUE #
  4260.  
  4261. SLOWFOR I = 0 STEP 1 UNTIL 7
  4262. DO # *SM* PARAMETER #
  4263. BEGIN # MOVE ARGUMENTS #
  4264. CHAR = C<I,1>ARGSCAN[VSM]; # A *SM* CHARACTER #
  4265. IF CHAR EQ 0
  4266. THEN # END OF *CS* PARAMETER #
  4267. BEGIN
  4268. TEST I;
  4269. END
  4270.  
  4271. IF CHAR GR "H"
  4272. THEN # ILLEGAL CHARACTER #
  4273. BEGIN
  4274. VLERROR(VE"SMPAR",NOABT); # ISSUE MESSAGE #
  4275. END
  4276.  
  4277. ELSE
  4278. BEGIN # SET *SM* BIT #
  4279. IF B<CHAR,1>PAR$SM EQ 1
  4280. THEN
  4281. BEGIN
  4282. VLERROR(VE"DUPCS",NOABT);
  4283. END
  4284.  
  4285. ELSE
  4286. BEGIN
  4287. B<CHAR,1>PAR$SM = 1;
  4288. END
  4289.  
  4290. END # SET *CS* BIT #
  4291.  
  4292.  
  4293. END # MOVE ARGUMENTS #
  4294.  
  4295. PAR$FM = VARG$FM[0]; # FM PARAMETER VALUE #
  4296.  
  4297. STAT = XDXB(VARG$FX[0],"D",PAR$FX); # CONVERT FX VALUE #
  4298. IF STAT NQ 0
  4299. THEN # ILLEGAL FX VALUE #
  4300. BEGIN
  4301. VLERROR(VE"FXPAR",NOABT); # ISSUE MESSAGE #
  4302. END
  4303.  
  4304. PAR$RL = VARG$RL[0]; # RL PARAMETER VALUE #
  4305.  
  4306. SLOWFOR J = 0 STEP 1 UNTIL 9
  4307. DO # SB PARAMETER #
  4308. BEGIN # SUBFAMILY ARGUMENTS #
  4309. CHAR = C<J,1>ARGITEM[VSB]; # EXTRACT A SUBFAMILY NUMBER #
  4310. IF CHAR EQ 0
  4311. THEN # END OF SB VALUE #
  4312. BEGIN
  4313. TEST J;
  4314. END
  4315.  
  4316. IF CHAR LS "0" OR CHAR GR "7"
  4317. THEN # ILLEGAL SUBFAMILY #
  4318. BEGIN
  4319. VLERROR(VE"SBPAR",NOABT); # ISSUE MESSAGE #
  4320. END
  4321.  
  4322. ELSE
  4323. BEGIN # SET SUBFAMILY BIT #
  4324. IF B<CHAR-"0",1>PAR$SB EQ 1
  4325. THEN
  4326. BEGIN
  4327. VLERROR(VE"DUPSB",NOABT);
  4328. END
  4329.  
  4330. ELSE
  4331. BEGIN
  4332. B<CHAR-"0",1>PAR$SB = 1; # SET *SB* BIT #
  4333. B<59-(CHAR-"0"),1>DEVMASK = 1; # RIGHT JUSTIFIED MASK #
  4334. END
  4335.  
  4336. END # SET SUBFAMILY BIT #
  4337.  
  4338. END # SUBFAMILY ARGUMENTS #
  4339.  
  4340. IF VARG$ST[0] EQ O"30555555555555555555"
  4341. THEN # DEFAULT *ST* #
  4342. BEGIN
  4343. VARG$ST[0] = O"34555555555555555555";
  4344. END
  4345.  
  4346. STAT = XDXB(VARG$ST[0],"D",PAR$ST); # CONVERT ST PARAMETER #
  4347. IF STAT NQ 0
  4348. THEN # ILLEGAL ST VALUE #
  4349. BEGIN
  4350. VLERROR(VE"STPAR",NOABT); # ISSUE MESSAGE #
  4351. END
  4352.  
  4353. #
  4354. * VERIFY THAT THE PARAMETER COMBINATIONS ARE LEGAL.
  4355. * ERRORS ARE -
  4356. * . *RF* AND *AM* PARAMETER TOGETHER,
  4357. * . *RF* AND *FM* PARAMETER TOGETHER,
  4358. * . *RL* AND NO *RF* PARAMETER.
  4359. #
  4360.  
  4361. #
  4362. * L PARAMETER = RF PARAMETER.
  4363. #
  4364.  
  4365. IF (PAR$LF NQ 0) AND (PAR$LF EQ PAR$RF)
  4366. THEN
  4367. BEGIN
  4368. VLERROR(VE"LFRF",NOABT); # ISSUE MESSAGE #
  4369. END
  4370.  
  4371. #
  4372. * RL PARAMETER BUT NO RF.
  4373. #
  4374.  
  4375. IF (PAR$RL NQ 0) AND (PAR$RF EQ 0)
  4376. THEN
  4377. BEGIN
  4378. VLERROR(VE"RLNRF",NOABT); # ISSUE MESSAGE #
  4379. END
  4380.  
  4381. #
  4382. * RF AND FM SPECIFIED.
  4383. #
  4384.  
  4385. IF (PAR$RF NQ 0) AND (PAR$FM NQ 0)
  4386. THEN
  4387. BEGIN
  4388. VLERROR(VE"RFFM",NOABT); # ISSUE MESSAGE #
  4389. END
  4390.  
  4391. #
  4392. * RF AND AM SPECIFIED.
  4393. #
  4394.  
  4395. IF (PAR$RF NQ 0) AND (PAR$AM NQ 0)
  4396. THEN
  4397. BEGIN
  4398. VLERROR(VE"RFAM",NOABT); # ISSUE MESSAGE #
  4399. END
  4400.  
  4401. #
  4402. * IF ANY CONTROL CARD ERRORS, ABORT.
  4403. * (ERRORS ARE COUNTED IN VLERROR).
  4404. #
  4405.  
  4406. IF CNTPROGERR NQ 0
  4407. THEN # SOME ERRORS OCCURRED #
  4408. BEGIN
  4409. VLERROR(VE"ABORT",ABRT); # ABORT WITH MESSAGE #
  4410. END
  4411.  
  4412.  
  4413. #
  4414. * SET THE FAMILY PARAMETER TO THE DEFAULT FAMILY IF THE
  4415. * FM OPTION IS ACTIVE (NO RF PARAMETER) BUT THE FAMILY WAS
  4416. * NOT SPECIFIED.
  4417. #
  4418.  
  4419. IF (PAR$RF EQ 0) AND ((VARG$IFM[0] EQ -1) OR (PAR$FM EQ 0))
  4420. THEN
  4421. BEGIN
  4422. PAR$FM = DEF$FAM;
  4423. VARG$FM[0] = PAR$FM;
  4424. END
  4425.  
  4426. #
  4427. * OPEN REPORT FILE.
  4428. #
  4429.  
  4430. IF PAR$LF NQ 0
  4431. THEN # L PARAMETER ACTIVE #
  4432. BEGIN
  4433. RPTFADR = LOC(RPTFILE); # REPORT FILE FET ADDRESS #
  4434. END
  4435.  
  4436. RPOPEN(PAR$LF,RPTFADR,VLTITLE);
  4437.  
  4438. #
  4439. * ISSUE REPORT OF SPECIFIED AND DEFAULTED PARAMETERS.
  4440. #
  4441.  
  4442. #
  4443. * PRINT THE CONTROL CARD AS IT IS IN THE RA(70) AREA.
  4444. #
  4445.  
  4446. P<RACOM> = 0;
  4447.  
  4448. VLBFILL(RACOM[CCADDR],8); # BLANK FILL #
  4449. RPLINE(RPTFADR," ",0,1,EOPL); # A BLANK LINE #
  4450. RPLINE(RPTFADR,RACOM[CCADDR],12,80,EOPL); # CONTROL CARD #
  4451. RPLINE(RPTFADR," ",0,1,EOPL); # A BLANK LINE #
  4452.  
  4453. #
  4454. * LIST ALL PARAMETERS AND THEIR VALUES.
  4455. #
  4456.  
  4457. SLOWFOR PAR = 0 STEP 1 UNTIL VARGL - 1
  4458. DO
  4459. BEGIN # PARAMETER LISTING #
  4460. IF PAR EQ VSM+1 # 2ND WORD OF *SM* PARAMETER #
  4461. THEN
  4462. BEGIN
  4463. TEST PAR;
  4464. END
  4465.  
  4466. RPLINE(RPTFADR,PARNME[PAR],25,5,COPL); # KEYWORD #
  4467. IF ARGITEM[PAR] EQ -1
  4468. THEN
  4469. BEGIN
  4470. ARGITEMC[PAR] = "Y";
  4471. END
  4472.  
  4473. IF ARGITEM[PAR] EQ 0
  4474. THEN # PARAMETER NOT SPECIFIED #
  4475. BEGIN
  4476. ARGITEMC[PAR] = "0"; # USE A CODED ZERO #
  4477. END
  4478.  
  4479. PAR$VALUE = ARGITEMC[PAR]; # GET PARAMETER VALUE #
  4480. IF PAR EQ VSM
  4481. THEN # INDEX AT CS PARAMETER #
  4482. BEGIN
  4483. PAR$VAL2[0] = ARGITEMC[PAR+1]; # GET 2ND WORD #
  4484. END
  4485.  
  4486. IF PAR EQ VFM
  4487. THEN
  4488. BEGIN
  4489. PAR$VALEND[0] = 0;
  4490. END
  4491.  
  4492. VLBFILL(PARVALUE,2);
  4493. RPLINE(RPTFADR,PARVALUE[0],30,20,EOPL); # PARAMETER VALUE #
  4494.  
  4495. END # PARAMETER LISTING #
  4496.  
  4497. RPLINE(RPTFADR,"0",0,1,EOPL); # 2 BLANK LINES #
  4498.  
  4499.  
  4500. #
  4501. * BUILD *PFC* EXTRACT FILES FROM THE *PFC* IF NO RF PARAMETER
  4502. * WAS SPECIFIED.
  4503. #
  4504.  
  4505. IF PAR$RF EQ 0
  4506. THEN
  4507. BEGIN
  4508. VLPFC;
  4509. END
  4510.  
  4511. #
  4512. * BUILD *PFC* EXTRACT FILES FROM THE RDF FILE IF THE RF PARAMETER
  4513. * WAS SPECIFIED.
  4514. #
  4515.  
  4516. ELSE
  4517. BEGIN
  4518. VLRDF;
  4519. END
  4520.  
  4521. #
  4522. * INITIALIZE INTERNAL FILES.
  4523. #
  4524.  
  4525. PROBFADR = LOC(PROBFILE); # PROBLEM FILE #
  4526. PROBBADR = LOC(PROBBUF);
  4527. ZSETFET(PROBFADR,PROBLFN,PROBBADR,LPROBBUF,SFETL);
  4528. RETERN(PROBFILE[0],RCL);
  4529. LOFPROC(PROBLFN); # ADD LFN TO LIST OF FILES #
  4530.  
  4531. FIXFADR = LOC(FIXITFILE); # FIXIT FILE #
  4532. FIXBADR = LOC(FIXITBUF);
  4533. ZSETFET(FIXFADR,FIXLFN,FIXBADR,LFIXBUF,SFETL);
  4534. RETERN(FIXITFILE[0],RCL);
  4535. LOFPROC(FIXLFN); # ADD LFN TO LIST OF FILES #
  4536. REWIND(FIXITFILE,RCL);
  4537.  
  4538.  
  4539. #
  4540. * INITIALIZE RELEASE FILE.
  4541. #
  4542.  
  4543. PFP$FAM[0] = PAR$FM;
  4544. PFP$UI[0] = DEF$UI;
  4545. PFP$FG1[0] = TRUE;
  4546. PFP$FG4[0] = TRUE;
  4547. SETPFP(PFP);
  4548. IF PFP$STAT[0] NQ 0
  4549. THEN
  4550. BEGIN
  4551. VLERROR(VE"NOFAM",ABRT);
  4552. END
  4553.  
  4554. IF (PAR$RF NQ 0) AND (PAR$RL NQ 0)
  4555. THEN # SET UP *RELCOM* FILE #
  4556. BEGIN
  4557. RELNAME = RELLFN; # ATTACH COMMUNICATION FILE #
  4558. BZFILL(RELNAME,TYPFILL"ZFILL",7);
  4559. PFD("ATTACH",RELNAME,0,"M","W","RC",STAT,"NA",0,0);
  4560. IF STAT NQ OK
  4561. THEN # PROCESS ATTACH ERROR FLAG #
  4562. BEGIN
  4563. IF STAT EQ FBS
  4564. THEN # COMMUNICATION FILE BUSY #
  4565. BEGIN
  4566. VLERROR(VE"ABORT",ABRT);
  4567. END
  4568.  
  4569. IF STAT EQ FNF
  4570. THEN # FILE DOES NOT EXIST #
  4571. BEGIN
  4572. PFD("DEFINE",RELNAME,0,"BR","N","RC",STAT,0);
  4573. IF STAT NQ OK
  4574. THEN # DEFINE ERROR #
  4575. BEGIN
  4576. VLERROR(VE"ABORT",ABRT);
  4577. END
  4578.  
  4579. END
  4580.  
  4581. ELSE # ERROR OTHER THAN FBS OR FNF #
  4582. BEGIN
  4583. VLERROR(VE"ABORT",ABRT);
  4584. END
  4585.  
  4586. END # PROCESS ATTACH ERROR #
  4587.  
  4588. RELFADR = LOC(RELCFILE);
  4589. RELBADR = LOC(RELCBUF);
  4590. ZSETFET(RELFADR,RELNAME,RELBADR,LFIXBUF);
  4591. LOFPROC(RELNAME); # ADD LFN TO LIST OF FILES #
  4592. REWIND(RELCFILE[0],RCL);
  4593. END # SET UP *RELCOM* FILE #
  4594.  
  4595. END # VLPRSET #
  4596.  
  4597. TERM
  4598. PROC VLRCL(COUNT);
  4599. # TITLE VLRCL - RECALL. #
  4600.  
  4601. BEGIN # VLRCL #
  4602.  
  4603. #
  4604. ** VLRCL - RECALL.
  4605. *
  4606. * *VLRCL* ISSUES RECALLS TO THE SYSTEM UNTIL THE *COUNT*
  4607. * EXPIRES.
  4608. *
  4609. * PROC VLRCL(COUNT)
  4610. *
  4611. * ENTRY (COUNT) - NUMBER OF TIMES TO ISSUE THE PERIODIC RECALL.
  4612. *
  4613. #
  4614.  
  4615. ITEM COUNT I; # RECALL LOOP CONTROL #
  4616.  
  4617. #
  4618. **** PROC VLRCL - XREF LIST BEGIN.
  4619. #
  4620.  
  4621. XREF
  4622. BEGIN
  4623. PROC RECALL; # INTERFACE TO *RECALL* MACRO #
  4624. END
  4625.  
  4626. #
  4627. **** PROC VLRCL - XREF LIST END.
  4628. #
  4629.  
  4630. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  4631.  
  4632. *CALL COMBFAS
  4633.  
  4634. ITEM II I; # TEMPORARY LOOP VARIABLE #
  4635.  
  4636. CONTROL EJECT;
  4637.  
  4638. SLOWFOR II = 0 STEP 1 UNTIL COUNT
  4639. DO
  4640. BEGIN
  4641. RECALL(0);
  4642. END
  4643.  
  4644. RETURN;
  4645. END # VLRCL #
  4646.  
  4647. TERM
  4648. PROC VLRDF;
  4649.  
  4650. # TITLE VLRDF - READ RDF FILE. #
  4651.  
  4652. BEGIN # VLRDF #
  4653.  
  4654. #
  4655. ** VLRDF - READ THE *RDF* FILE.
  4656. *
  4657. * *VLRDF* BUILDS THE *PFC* EXTRACT FILES AND THE SFM CATALOG
  4658. * FILES FROM THE *RDF* FILE SELECTED BY THE *RF* CONTROL CARD
  4659. * PARAMETER. THIS ROUTINE CONTROLS THE READING OF THE *RDF*
  4660. * FILE. IT CALLS *VLRDF2* TO PROCESS THE DATA.
  4661. *
  4662. * PROC VLRDF
  4663. *
  4664. * ENTRY (PAR$CS) - SELECTED *SM-S*.
  4665. * (PAR$RF) - LFN OF THE *RDF* FILE.
  4666. * (PAR$SB) - SELECTED SUBFAMILIES.
  4667. * (RPTFADR) - ADDRESS OF THE REPORT FILE *FET*.
  4668. *
  4669. * EXIT THE SFM CATALOG FILES ARE BUILT AS LOCAL FILES.
  4670. *
  4671. * THE *PFC* EXTRACT FILES ARE BUILT AS LOCAL FILES.
  4672. *
  4673. * IF A VALIDATION ERROR IS DETECTED IN THE *PFC* DATA -
  4674. * 1) (TOTALERRS) IS INCREMENTED.
  4675. * 2) DETAIL LINES DESCRIBING THE ERROR ARE WRITTEN TO
  4676. * THE REPORT FILE.
  4677. *
  4678. * MESSAGES * SSVAL ABNORMAL, VLRDF.*
  4679. * * *RDF* FILE ERROR - MISSING HEADER.*
  4680. * * *RDF* FILE ERROR - BAD RECORD LENGTH.*
  4681. *
  4682. * NOTES THE STRUCTURE OF THE *RDF* FILE IS -
  4683. * DATA RECORDS - CONSIST OF A ONE WORD CONTROL WORD
  4684. * AND DATA WORDS.
  4685. * CONTROL WORD - SPECIFIES THE LENGTH AND TYPE OF THE
  4686. * FOLLOWING DATA.
  4687. * DATA TYPES - HEADER RECORD.
  4688. * *PFC* EXTRACT RECORD.
  4689. * SFM CATALOG RECORD(S).
  4690. * DATA LENGTH - LENGTH OF THE DATA IN WORDS. IF THE
  4691. * LENGTH IS ZERO, THE DATA RECORD IS
  4692. * TERMINATED BY A LOGICAL-END-OF-RECORD.
  4693. * *EOR* - (LOGICAL-END-OF-RECORD) MAY BE USED
  4694. * BETWEEN DATA RECORDS AT LOGICAL
  4695. * BREAKS AND SHOULD BE EXPECTED
  4696. * ANYWHERE.
  4697. *
  4698. * A TYPICAL SEQUENCE IS -
  4699. * - HEADER RECORD FOLLOWED BY *EOR*.
  4700. * - *PFC* EXTRACT RECORDS FOR A DEVICE FOLLOWED BY
  4701. * *EOR*
  4702. * - .
  4703. * - .
  4704. * - .
  4705. * - SFM CATALOG RECORD (COPY OF THE PERMANENT FILE)
  4706. * FOR A SUBFAMILY FOLLOWED BY *EOR*.
  4707. * - .
  4708. * - .
  4709. * - .
  4710. * -EOI
  4711. *
  4712. * IF THE *RDF* HEADER RECORD IS INVALID OR MISSING, THE
  4713. * PROGRAM ABORTS WITH A DIAGNOSTIC MESSAGE. AN INVALID
  4714. * HEADER IS DETERMINED BY THE IDENTIFICATION THAT IS
  4715. * PLACED IN THE HEADER BY *PFDUMP*.
  4716. *
  4717. * ONLY THE *PFC* EXTRACT RECORDS FOR THE SELECTED
  4718. * SUBFAMILIES AND SELECTED *SM-S* ARE WRITTEN TO THE
  4719. * *PFC* EXTRACT FILE THE RECORDS ARE SELECTED BY
  4720. * ANALYZING THE *ASA* FIELD. THE *SM* IN THE *ASA* IS
  4721. * INVALID, ERROR DETAIL LINES ARE FORMATTED AND ISSUED
  4722. * TO THE REPORT FILE AND THE ERROR IS INCLUDED IN THE
  4723. * TOTAL ERRORS COUNTER.
  4724. *
  4725. * THE SFM CATALOGS ARE WRITTEN TO LOCAL FILES TO BE
  4726. * ACCESSED LATER VIA THE CATALOG ACCESS ROUTINES. A MASK
  4727. * IS BUILT IDENTIFYING THOSE SUBFAMILIES THAT WERE
  4728. * PRESENT ON THE *RDF* FILE. ONLY THOSE SUBFAMILIES WILL
  4729. * BE USED IN THE VALIDATION PROCESS.
  4730. #
  4731.  
  4732.  
  4733.  
  4734. #
  4735. **** PROC VLRDF - XREF LIST BEGIN.
  4736. #
  4737.  
  4738. XREF
  4739. BEGIN
  4740. FUNC EDATE C(10); # EDIT DATE FROM PACKED FORMAT #
  4741. FUNC ETIME C(10); # EDIT TIME FROM PACKED FORMAT #
  4742. PROC LOFPROC; # LIST OF FILES PROCESSOR #
  4743. PROC READ; # INTERFACE TO *READ* MACRO #
  4744. PROC READO; # INTERFACE TO *READO* MACRO #
  4745. PROC READW; # INTERFACE TO *READW* MACRO #
  4746. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  4747. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  4748.   LINE #
  4749. PROC WRITEF; # INTERFACE TO *WRITEF* MACRO #
  4750. PROC VLERROR; # ISSUE ERROR MESSAGE #
  4751. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  4752. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  4753.   CONVERSION #
  4754. PROC VLRDF2; # PROCESS RDF FILE RECORDS #
  4755. PROC WRITEW; # INTERFACE TO *WRITEW* MACRO #
  4756. PROC ZSETFET; # INITIALIZES A *FET* FOR *I/O* #
  4757. END
  4758.  
  4759. #
  4760. **** PROC VLRDF - XREF LIST END.
  4761. #
  4762.  
  4763. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTINGS #
  4764.  
  4765. *CALL COMBFAS
  4766. *CALL COMBCMD
  4767. *CALL COMBMCT
  4768. *CALL COMBMAP
  4769.  
  4770. *CALL COMTVLD
  4771. *CALL COMTVLF
  4772. *CALL COMTVLM
  4773. *CALL COMTVLP
  4774. *CALL COMTVLX
  4775.  
  4776. ITEM DATA I; # LOGICAL RECORD SIZE #
  4777. ITEM FATEOR B; # FILE AT EOR #
  4778. ITEM I I; # TEMPORARY LOOP VARIABLE #
  4779. ITEM J I; # TEMPORARY LOOP VARIABLE #
  4780. ITEM L I; # TEMPORARY LOOP VARIABLE #
  4781.  
  4782. CONTROL EJECT;
  4783.  
  4784. #
  4785. * INITIALIZE THE FETS.
  4786. #
  4787.  
  4788. SLOWFOR I = 0 STEP 1 UNTIL MAXSF
  4789. DO # *PFC* EXTRACT FILES, 1 PER
  4790.   SUBFAMILY #
  4791. BEGIN # *FET* INITIALIZATION #
  4792. PEXTFADR = LOC(PFCE$FET[I]);
  4793. PEXTBADR = LOC(PFCE$BUF[I]);
  4794. PFCE$LFN[0] = EXTLFN; # *LFN* FOR *PFC* EXTRACT FILE #
  4795. PFCE$LFNX[0] = I + "0"; # APPEND SUBFAMILY TO *LFN* #
  4796. ZSETFET(PEXTFADR,PFCENAME,PEXTBADR,LPFCEBUF,SFETL);
  4797. LOFPROC(PFCENAME); # ADD LFN TO LIST OF FILES #
  4798. REWIND(PFCEXTN[I],RCL);
  4799. END # *FET* INITIALIZATION #
  4800.  
  4801. RDFFADR = LOC(RDFFILE); # RDF FILE #
  4802. RDFBADR = LOC(RDFBUF);
  4803. ZSETFET(RDFFADR,PAR$RF,RDFBADR,LRDFBUF,SFETL);
  4804.  
  4805. ZVALFADR = LOC(ZZZVALX); # SFM CATALOG FILE #
  4806. ZVALBADR = LOC(ZZZVBUF);
  4807. ZSETFET(ZVALFADR,ZVALLFN,ZVALBADR,LZZZVBUF,SFETL);
  4808. LOFPROC(ZVALLFN); # ADD LFN TO LIST OF FILES #
  4809.  
  4810. REWIND(RDFFILE,RCL);
  4811.  
  4812. #
  4813. * PROCESS UNTIL EOI IS ENCOUNTERED ON THE RDF FILE.
  4814. #
  4815.  
  4816. FATEOR = TRUE; # TO FORCE INITIAL READ #
  4817. STAT = 0;
  4818.  
  4819. REPEAT WHILE STAT NQ EOI
  4820. DO
  4821. BEGIN # PROCESS RDF FILE #
  4822. IF FATEOR
  4823. THEN # FILE IS AT EOR CONDITION #
  4824. BEGIN
  4825. READ(RDFFILE,NRCL); # START *CIO* READ #
  4826. FATEOR = FALSE;
  4827. END
  4828.  
  4829. #
  4830. * READ ONE WORD TO GET THE CONTROL WORD.
  4831. #
  4832.  
  4833. RDFC$CTYP[0] = 0;
  4834. READO(RDFFILE,RDFCTLWORD,STAT);
  4835.  
  4836. #
  4837. * IF CIO ERROR ON RDF, ABORT.
  4838. #
  4839.  
  4840. IF STAT EQ CIOERR
  4841. THEN
  4842. BEGIN
  4843. MP$WD[1] = "VLRDF"; # NAME FOR MESSGE #
  4844. VLERROR(VE"SYSERR",ABRT); # ABORT WITH MESSAGE #
  4845. END
  4846.  
  4847. #
  4848. * IF AT EOR, EOF, OR EOI, THEN NO DATA TO PROCESS.
  4849. #
  4850.  
  4851. IF STAT NQ OK
  4852. THEN
  4853. BEGIN
  4854. FATEOR = TRUE; # INDICATE *CIO* HAS STOPPED #
  4855. TEST DUMMY; # EXIT, NO DATA #
  4856. END
  4857.  
  4858. #
  4859. * CHECK CONTENTS OF RDF CONTROL WORD COUNT FIELD.
  4860. #
  4861.  
  4862. IF RDFC$WC[0] GR RDFMAXWC
  4863. THEN # RDF DATA LENGTH ILLEGAL #
  4864. BEGIN
  4865. VLERROR(VE"RDFLEX",ABRT); # ABORT WITH MESSAGE #
  4866. END
  4867.  
  4868. #
  4869. * CALCULATE LENGTH OF DATA FOLLOWING CONTROL WORD.
  4870. #
  4871.  
  4872. DATA = RDFC$WC[0]; # LENGTH OF DATA RECORD #
  4873. IF DATA EQ 0
  4874. THEN # DATA ENDS AT EOR #
  4875. BEGIN
  4876. DATA = 77777777; # SET SIZE TO VERY LARGE #
  4877. END
  4878.  
  4879. #
  4880. * SET THE LENGTH PARAMETER FOR READW TO BE THE MINIMUM OF
  4881. * THE DATA SIZE OR THE RDF BUFFER SIZE.
  4882. #
  4883.  
  4884. L = DATA; # SIZE OF DATA EXPECTED #
  4885. IF L GR LRDFRB
  4886. THEN
  4887. BEGIN
  4888. L = LRDFRB; # SIZE OF RECORD BUFFER #
  4889. END
  4890.  
  4891. #
  4892. * READ THE DATA RECORD (MAY TAKE MORE THAN ONE READ
  4893. * DEPENDING ON THE LENGTH).
  4894. #
  4895.  
  4896. SLOWFOR J = 0 STEP 1 WHILE DATA GR 0
  4897. DO
  4898. BEGIN # READING DATA RECORD #
  4899. DATA = DATA - L; # LENGTH REMAINING #
  4900. READW(RDFFILE,RDFRECORD,L,STAT); # GET RECORD #
  4901.  
  4902. #
  4903. * IF CIO ERROR, ABORT.
  4904. #
  4905.  
  4906. IF STAT EQ CIOERR
  4907. THEN
  4908. BEGIN
  4909. MP$WD[1] = "VLRDF";
  4910. VLERROR(VE"SYSERR",ABRT); # ABORT WITH MESSAGE #
  4911. END
  4912.  
  4913. #
  4914. * IF A SHORT RECORD WAS DETECTED, THEN THE FILE IS AT EOR.
  4915. #
  4916.  
  4917. IF STAT NQ OK
  4918. THEN
  4919. BEGIN
  4920. FATEOR = TRUE; # INDICATE AT EOR #
  4921. DATA = 0; # END OF RECORD CONDITION #
  4922. L = STAT - LOC(RDFRECORD); # LENGTH THAT WAS READ #
  4923. END
  4924.  
  4925. #
  4926. * PROCESS THE DATA IN THE RECORD BUFFER.
  4927. #
  4928.  
  4929. VLRDF2(J,DATA,L); # PROCESS THE DATA RECORD #
  4930.  
  4931. END # READING DATA RECORD #
  4932.  
  4933. END # PROCESS RDF FILE #
  4934.  
  4935. IF NOT RDFHDROK
  4936. THEN # INVALID RDF FILE HEADER #
  4937. BEGIN
  4938. VLERROR(VE"RDFHDR",ABRT); # ABORT WITH MESSAGE #
  4939. END
  4940.  
  4941. #
  4942. * WRITE EOF"S ON *PFC* EXTRACT FILES AND REWIND.
  4943. #
  4944.  
  4945. SLOWFOR I = 0 STEP 1 UNTIL MAXSF
  4946. DO
  4947. BEGIN
  4948. WRITEF(PFCEXTN[I],RCL);
  4949. REWIND(PFCEXTN[I],RCL);
  4950. END
  4951.  
  4952.  
  4953.  
  4954. END # VLRDF #
  4955.  
  4956. TERM
  4957. PROC VLRDF2(BFLG,EFLG,L);
  4958.  
  4959. # TITLE VLRDF2 - PROCESS RDF FILE RECORDS. #
  4960.  
  4961. BEGIN # VLRDF2 #
  4962.  
  4963. #
  4964. ** VLRDF2 - PROCESS THE *RDF* FILE RECORDS.
  4965. *
  4966. * *VLRDF2* VERIFIES THE *RDF* DATA RECORD AND PROCESSES IT
  4967. * ACCORDING TO ITS DATA TYPE. *PFC* EXTRACT DATA RECORDS
  4968. * ARE WRITTEN TO THE APPROPRIATE LOCAL *PFC* EXTRACT FILE.
  4969. * SFM CATALOG DATA RECORDS ARE WRITTEN TO THEIR LOCAL
  4970. * FILE.
  4971. *
  4972. * PROC VLRDF2(BFLG,EFLG,L)
  4973. *
  4974. * ENTRY (BFLG) - INDICATES BEGINNING OF DATA IF
  4975. * ZERO.
  4976. * (EFLG) - INDICATES END OF DATA IF ZERO.
  4977. * (L) - LENGTH OF THE DATA IN THE BUFFER.
  4978. * (PAR$CS) - SELECTED *SM-S*.
  4979. * (PAR$SB) - SELECTED SUBFAMILIES.
  4980. * (ARRAY RDFRECORD) - BUFFER THAT CONTAINS THE DATA
  4981. * READ.
  4982. * (ARRAY RDFCTLWORD) - CONTAINS THE CONTROL WORD.
  4983. *
  4984. * EXIT (PAR$FM) - *RDF* FAMILY FROM THE *RDF* HEADER RECORD.
  4985. * (RDFDT) - PACKED DATE AND TIME OF THE *RDF* FILE.
  4986. * *PFC* EXTRACT FILE(S) CREATED.
  4987. * SFM CATALOG FILE(S) CREATED.
  4988. *
  4989. * THE *RDF* FAMILY AND BACKUP DATE/TIME INFORMATIONAL
  4990. * LINES ARE WRITTEN TO THE REPORT FILE.
  4991. *
  4992. * IF AN INVALID *SM* WAS DETECTED IN THE *PFC* EXTRACT
  4993. * RECORD,
  4994. * . ERROR LINES WERE WRITTEN TO THE REPORT FILE.
  4995. * . (TOTALERRS) - TOTAL VALIDATION ERRORS COUNTER
  4996. * INCREMENTED.
  4997. *
  4998. * MESSAGES * *RDF* FILE ERROR - UNIDENTIFIED DATA.*
  4999. * * *RDF* FILE ERROR - MISSING HEADER.*
  5000. *
  5001. *
  5002. #
  5003.  
  5004. ITEM BFLG I; # BEGINNING OF RECORD IF = 0 #
  5005. ITEM EFLG I; # END OF RECORD IF = 0 #
  5006. ITEM L I; # LENGTH OF DATA RECORD #
  5007.  
  5008. #
  5009. **** PROC VLRDF2 - XREF LIST BEGIN.
  5010. #
  5011.  
  5012. XREF
  5013. BEGIN
  5014. FUNC EDATE C(10); # EDIT DATE FROM PACKED FORMAT #
  5015. FUNC ETIME C(10); # EDIT TIME FROM PACKED FORMAT #
  5016. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  5017. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  5018.   LINE #
  5019. PROC VLERROR; # ISSUE ERROR MESSAGE #
  5020. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  5021. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  5022.   CONVERSION #
  5023. PROC WRITEF; # INTERFACE TO *WRITEF* MACRO #
  5024. PROC WRITEW; # INTERFACE TO *WRITEW* MACRO #
  5025. END
  5026.  
  5027. #
  5028. **** PROC VLRDF2 - XREF LIST END.
  5029. #
  5030.  
  5031.  
  5032. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  5033. *CALL COMBFAS
  5034. *CALL COMBCMD
  5035. *CALL COMBMCT
  5036. *CALL COMBMAP
  5037. *CALL COMSPFM
  5038. *CALL COMTVLD
  5039. *CALL COMTVLF
  5040. *CALL COMTVLX
  5041.  
  5042. ITEM KSTAT I; # TEMPORARY VARIABLE #
  5043. ITEM PROCESSED B; # RECORD PROCESSED OK #
  5044.  
  5045. #
  5046. * ERROR LINES FOR THE REPORT.
  5047. #
  5048.  
  5049. ARRAY BADSM [0:0] S(5); # INVALID *SM* REPORT LINE #
  5050. BEGIN
  5051. ITEM BAD$DESC C(00,00,50) = ["***PF = XXXXXXX "];
  5052. ITEM BAD$PFN C(00,48,07); # *PFN* OF *PFC* #
  5053. ITEM BAD$ERR C(02,00,20) = ["INVALID SM IN PFC "];
  5054. END
  5055.  
  5056. ARRAY BADSM2 [0:0] S(5); # INVALID *SM* REPORT LINE 2 #
  5057. BEGIN
  5058. ITEM BAD$DESC2 C(00,00,50) = [" UI = NNNNNN "];
  5059. ITEM BAD$UI C(00,48,06); # UI OF *PFC* #
  5060. END
  5061.  
  5062. CONTROL EJECT;
  5063.  
  5064.  
  5065. PROCESSED = FALSE;
  5066.  
  5067. #
  5068. * HEADER RECORD PROCESSING OCCURS IF THE CONTROL WORD TYPE
  5069. * INDICATES THAT IT IS A HEADER RECORD. IF THE DATA IS FROM THE
  5070. * FIRST READ OF THE RECORD, IMPORTANT DATA IS EXTRACTED FROM THE
  5071. * RECORD, ELSE THE DATA IS IGNORED.
  5072. #
  5073.  
  5074. IF RDFC$CTYP[0] EQ RDFHDRREC
  5075. THEN
  5076. BEGIN # RDF HEADER #
  5077. IF BFLG EQ 0
  5078. THEN
  5079. BEGIN # EXTRACT DATA #
  5080. IF RDFH$ID[0] NQ "PFDUMP"
  5081. THEN # INVALID FILE #
  5082. BEGIN
  5083. VLERROR(VE"RDFHDR",ABRT); # ABORT WITH MESSAGE #
  5084. END
  5085.  
  5086. RDFDT = RDFC$PDT[0]; # PACKED DATE AND TIME #
  5087. PAR$FM = RDFH$FAM[0]; # RDF FAMILY #
  5088. MP$WD[1] = VLNTC(PAR$FM," ",10); # FAMILY IN MESSAGE #
  5089. VLMSG(VM"RDFFM"); # ISSUE MESSAGE #
  5090. MP$WD[1] = EDATE(B<24,18>RDFDT); # EDITED DATE #
  5091. MP$WD[2] = ETIME(B<42,18>RDFDT); # EDITED TIME #
  5092. VLMSG(VM"RDFDT"); # ISSUE MESSAGE #
  5093. RDFHDROK = TRUE;
  5094. PROCESSED = TRUE;
  5095. END # EXTRACT DATA #
  5096.  
  5097. ELSE
  5098. BEGIN
  5099. PROCESSED = TRUE;
  5100. END
  5101.  
  5102. END # RDF HEADER #
  5103.  
  5104. #
  5105. * *PFC* EXTRACT RECORD PROCESSING OCCURS IF THE CONTROL WORD
  5106. * TYPE INDICATES IT IS A *PFC* RECORD.
  5107. #
  5108.  
  5109. IF RDFC$CTYP[0] EQ RDFPFCREC
  5110. THEN
  5111. BEGIN # *PFC* EXTRACT #
  5112. SBINDX = RDFR$SB[0]; # *PFC* SUBFAMILY #
  5113.  
  5114. #
  5115. * BUILD AN EXTRACT RECORD FOR THE SELECTED SUBFAMILY AND SM.
  5116. #
  5117.  
  5118. IF (B<SBINDX,1>PAR$SB EQ 1) AND (B<RDFR$SM,1>PAR$SM EQ 1)
  5119. AND (RDFR$AT[0] EQ ATAS)
  5120. THEN
  5121. BEGIN # BUILD EXTRACT #
  5122. EXTR$ASA[0] = RDFR$ASA[0];
  5123. EXTR$PFN[0] = RDFR$PFN[0];
  5124. EXTR$UI[0] = RDFR$UI[0];
  5125. EXTR$BKDT[0] = RDFR$UCDT[0]; # BACKUP = UTILITY #
  5126. IF RDFR$UCDT[0] LS RDFR$CMDT[0]
  5127. THEN # CONTROL IS MORE RECENT THAN
  5128.   UTILITY #
  5129. BEGIN
  5130. EXTR$BKDT[0] = RDFR$CMDT[0]; # BACKUP = CONTROL #
  5131. END
  5132.  
  5133. EXTR$D[0] = RDFR$D[0];
  5134. EXTR$FLG[0] = RDFR$ASCF[0];
  5135. WRITEW(PFCEXTN[SBINDX],EXTRECORD,RLEXTR,KSTAT);
  5136. END # BUILD EXTRACT #
  5137.  
  5138. #
  5139. * FOR AN INVALID *SM*, REPORT PROBLEM.
  5140. #
  5141.  
  5142. IF (RDFR$ASA[0] NQ 0)
  5143. AND (RDFR$AT[0] EQ ATAS)
  5144. AND (RDFR$SM[0] EQ 0 OR RDFR$SM[0] GR "H")
  5145. THEN
  5146. BEGIN
  5147. TOTALERRS = TOTALERRS + 1;
  5148. RPLINE(RPTFADR," ",0,1,EOPL); # BLANK LINE #
  5149. BAD$PFN[0] = VLNTC(RDFR$PFN[0]," ",7); # *PFN* INTO LINE #
  5150. RPLINE(RPTFADR,BADSM,4,50,EOPL); # ISSUE ERROR LINE #
  5151. BAD$UI[0] = VLNTC(RDFR$UI[0],"XCOD",6); # UI INTO LINE #
  5152. RPLINE(RPTFADR,BADSM2,4,50,EOPL); # ISSUE ERROR LINE #
  5153. END
  5154.  
  5155. PROCESSED = TRUE;
  5156. END # *PFC* EXTRACT #
  5157.  
  5158. #
  5159. * SFM CATALOG RECORDS.
  5160. #
  5161.  
  5162. IF RDFC$CTYP[0] EQ RDFCATREC
  5163. THEN
  5164. BEGIN # SFM CATALOG #
  5165. IF BFLG EQ 0 # BEGINNING OF CATALOG #
  5166. THEN
  5167. BEGIN
  5168. P<PREAMBLE> = LOC(RDFRECORD);
  5169. ZZZV$LFNX[0] = PRM$SUBF[0]+"0"; # APPEND SUBFAMILY TO
  5170.   *LFN* #
  5171. B<PRM$SUBF[0],1>SFMCATDEF = 1; # FLAG THAT CATALOG EXISTS #
  5172. REWIND(ZZZVALX,RCL);
  5173. END
  5174.  
  5175. IF L GR 0
  5176. THEN
  5177. BEGIN
  5178. WRITEW(ZZZVALX,RDFRECORD,L,KSTAT);
  5179. END
  5180.  
  5181. IF EFLG EQ 0
  5182. THEN # END OF CATALOG, CLOSE IT #
  5183. BEGIN
  5184. WRITEF(ZZZVALX,RCL);
  5185. REWIND(ZZZVALX,RCL);
  5186. END
  5187.  
  5188. PROCESSED = TRUE;
  5189. END # SFM CATALOG #
  5190.  
  5191. #
  5192. * IF AT END OF FILE, SET THE PROCESSED FLAG.
  5193. #
  5194.  
  5195. IF RDFC$CTYP[0] EQ RDFEOF
  5196. THEN # AT END OF FILE #
  5197. BEGIN
  5198. PROCESSED = TRUE;
  5199. END
  5200.  
  5201. #
  5202. * UNIDENTIFIED DATA RECORD IN RDF FILE.
  5203. #
  5204.  
  5205. IF NOT PROCESSED
  5206. THEN
  5207. BEGIN
  5208. VLERROR(VE"RDFUND",NOABT); # ISSUE MESSAGE #
  5209. END
  5210.  
  5211. END # VLRDF2 #
  5212.  
  5213. TERM
  5214. PROC VLREQEX(RTYP,RFUNC);
  5215. # TITLE VLREQEX - REQUEST TO EXEC. #
  5216.  
  5217.  
  5218. BEGIN # VLREQEX #
  5219.  
  5220. #
  5221. ** VLREQEX - SEND REQUEST TO THE M860 EXEC SUBSYSTEM.
  5222. *
  5223. * *VLREQEX* FORMATS AND ISSUES THE REQUEST TO EXEC ACCORDING
  5224. * TO THE REQUEST TYPE AND THE REQUEST FUNCTION. AFTER COMPLETION
  5225. * OF THE SUBSYSTEM REQUEST, *VLREQEX* PROCESSES THE RESPONSE.
  5226. *
  5227. * PROC VLREQEX(RTYP,RFUNC)
  5228. *
  5229. * ENTRY (RTYP) - REQUEST TYPE.
  5230. * (RFUNC) - REQUEST FUNCTION.
  5231. * (CFIELD) - CATALOG FIELD TO MODIFY (OPTIONAL).
  5232. * (CONNECTED) - FLAG INDICATES *SSVAL* CONNECTED TO
  5233. * *EXEC*.
  5234. * (PAR$FM) - FAMILY.
  5235. * (SMINDX) - SM INDEX.
  5236. * (SBINDX) - SUBFAMILY INDEX.
  5237. * (ARRAY EXTRECORD) - CONTAINS THE FIXIT FILE RECORD.
  5238. *
  5239. * EXIT (STAT) - RESPONSE CODE FROM THE SYSTEM OR *EXEC*
  5240. * ON A TYPE 1 REQUEST.
  5241. *
  5242. * IF THE RESPONSE INDICATES AN ERROR ON A TYPE 3 REQUEST,
  5243. * THE PROGRAM ABORTS WITH A MESSAGE.
  5244. *
  5245. * MESSAGES * WAITING FOR EXEC.*
  5246. * * UCP CALL ERROR.*
  5247. *
  5248. * NOTES IF THE "CONNECTED" FLAG IS NOT SET, THE REQUEST IS
  5249. * IGNORED. THIS ALLOWS *SSVAL* TO RUN WHEN EXEC IS NOT
  5250. * PRESENT (IN A LIMITED MODE).
  5251. *
  5252. * FOR TYPE 3 RESPONSES, "RESUBMIT" AND "INTERLOCK", AN
  5253. * INFORMATIVE MESSAGE IS ISSUED TO THE B DISPLAY AND THE
  5254. * REQUEST IS RE-ISSUED.
  5255. *
  5256. #
  5257.  
  5258. ITEM RTYP I; # REQUEST TYPE #
  5259. ITEM RFUNC I; # REQUEST FUNCTION #
  5260.  
  5261. #
  5262. **** PROC VLREQEX - XREF LIST BEGIN.
  5263. #
  5264.  
  5265. XREF
  5266. BEGIN
  5267. PROC CALLSS; # ISSUES A CALLSS REQUEST TO A
  5268.   SUBSYSTEM #
  5269. PROC VLERROR; # ISSUE ERROR MESSAGE #
  5270. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  5271. PROC VLRCL; # RECALL #
  5272. PROC ZFILL; # ZERO FILLS A CHARACTER ITEM #
  5273. END
  5274.  
  5275. #
  5276. **** PROC VLREQEX - XREF LIST END.
  5277. #
  5278.  
  5279. DEF LISTCON #0#; # TURN OFF LISTING #
  5280.  
  5281. *CALL COMBFAS
  5282. *CALL COMBCPR
  5283. *CALL COMBMAP
  5284. *CALL COMBUCR
  5285. *CALL COMTVLD
  5286. *CALL COMTVLF
  5287.  
  5288.  
  5289.  
  5290. ITEM PROCESSED B; # CONTROL FLAG #
  5291.  
  5292. ARRAY CPRARRAY [0:0] S(CPRLEN);
  5293. ; # CALLSS PARAMETER ARRAY #
  5294.  
  5295. CONTROL EJECT;
  5296.  
  5297. #
  5298. * IGNORE THIS REQUEST IF NOT CONNECTED TO EXEC.
  5299. #
  5300.  
  5301. IF NOT CONNECTED
  5302. THEN
  5303. BEGIN
  5304. RETURN; # SKIP IF NOT CONNECTED #
  5305. END
  5306.  
  5307. #
  5308. * BUILD THE PARAMETER ARRAY FOR THE CALLSS MACRO.
  5309. #
  5310.  
  5311. ZFILL(CPRARRAY,CPRLEN); # ZERO FILL THE ARRAY #
  5312. P<CPR> = LOC(CPRARRAY);
  5313.  
  5314. CPR$RQT[0] = RTYP; # SET REQUEST TYPE #
  5315. CPR$RQC[0] = RFUNC; # SET REQUEST FUNCTION #
  5316. CPR$RQI[0] = REQNAME"RQIVALD"; # SET REQUESTOR ID #
  5317. CPR$SSPFLG[0] = TRUE;
  5318. CPR$SSBFLG[0] = TRUE;
  5319. CPR$FAM[0] = PAR$FM;
  5320.  
  5321. #
  5322. * BUILD TYPE1 FIELDS FOR A *TYP1* REQUEST.
  5323. #
  5324.  
  5325. IF RTYP EQ TYP"TYP1"
  5326. THEN
  5327. BEGIN
  5328. CPR$WC[0] = TYP1$WC;
  5329. END
  5330.  
  5331. #
  5332. * BUILD TYPE3 FIELDS FOR A *TYP3* REQUEST.
  5333. #
  5334.  
  5335. IF (RTYP EQ TYP"TYP3")
  5336. THEN # SET WORD COUNT #
  5337. BEGIN
  5338. CPR$WC[0] = TYP3$WC;
  5339. END
  5340.  
  5341. IF (RTYP EQ TYP"TYP3")
  5342. AND (RFUNC NQ REQTYP3"REL$SETUP")
  5343. THEN
  5344. BEGIN # TYP3 REQUEST #
  5345. CPR$WC[0] = TYP3$WC;
  5346. CPR$CSU[0] = SMINDX; # *SM* FROM FIXIT FILE RECORD #
  5347. CPR$SUB[0] = SBINDX; # SUBFAMILY #
  5348. CPR$FAM[0] = PAR$FM;
  5349.  
  5350. CPR$FCT[0] = EXTR$FCT[0];
  5351. CPR$AU[0] = EXTR$AU[0];
  5352.  
  5353. #
  5354. * BUILD SMMAP FIELDS IF IT IS AN *UPDATE MAP* FUNCTION.
  5355. #
  5356.  
  5357. IF RFUNC EQ REQTYP3"UPD$MAP"
  5358. THEN
  5359. BEGIN
  5360. CPR$Y[0] = PROB$Y[0];
  5361. CPR$Z[0] = PROB$Z[0];
  5362. CPR$MAPENT[0] = PROB$MAPEN[0];
  5363. P<SMUMAP> = LOC(CPR$MAPENT[0]);
  5364. CM$FLAG1[0] = TRUE;
  5365. END
  5366.  
  5367. #
  5368. * BUILD CATALOG FIELDS IF IT IS AN "UPDATE CATALOG" FUNCTION.
  5369. #
  5370.  
  5371. IF RFUNC EQ REQTYP3"UPD$CAT"
  5372. THEN
  5373. BEGIN
  5374. CPR$FLD[0] = CFIELD; # CATALOG FIELD NAME FLAG #
  5375. CPR$VAL[0] = 1;
  5376. END
  5377.  
  5378. END # TYP3 REQUEST #
  5379.  
  5380. #
  5381. * ISSUE REQUEST TO EXEC.
  5382. #
  5383.  
  5384. PROCESSED = FALSE;
  5385. REPEAT WHILE NOT PROCESSED
  5386. DO
  5387. BEGIN # EXEC REQUEST #
  5388. CPR$RQR[0] = 0; # INITIALIZE RESPONSE CODE #
  5389. CPR$C[0] = FALSE; # INITIALIZE COMPLETE BIT #
  5390. CALLSS(SSID$VL,CPR,RCL);
  5391.  
  5392. #
  5393. * RE-ISSUE IF EXEC RETURNS A "RE-ISSUE" STATUS.
  5394. #
  5395.  
  5396. IF (RTYP EQ TYP"TYP3") AND (CPR$RQR[0] EQ RESPTYP3"RESUB$REQ")
  5397. THEN
  5398. BEGIN
  5399. VLMSG(VM"WAITEX"); # ISSUE MESSAGE #
  5400. TEST DUMMY; # REPEAT THE REQUEST #
  5401. END
  5402.  
  5403. #
  5404. * DELAY AND RE-ISSUE IF EXEC RETURNS "FILE INTERLOCKED" STATUS.
  5405. #
  5406.  
  5407. IF (RTYP EQ TYP"TYP3") AND (CPR$RQR[0] EQ RESPTYP3"C$M$INTLCK")
  5408. THEN
  5409. BEGIN
  5410. VLMSG(VM"WAITEX"); # ISSUE MESSAGE #
  5411. VLRCL(WAITEX); # DELAY AWHILE #
  5412. TEST DUMMY; # REPEAT THE REQUEST #
  5413. END
  5414.  
  5415. PROCESSED = TRUE;
  5416. END # EXEC REQUEST #
  5417.  
  5418. VLMSG(VM"CLEARB");
  5419.  
  5420. #
  5421. * ABORT IF THE REQUEST WAS A TYPE3 AND EXEC RESPONDED
  5422. * WITH AN ERROR.
  5423. #
  5424.  
  5425. STAT = CPR$RQR[0]; # GET EXEC RESPONSE #
  5426. IF RTYP EQ TYP"TYP3" AND (STAT NQ 0)
  5427. AND STAT NQ RESPTYP3"NO$SUB$CAT"
  5428. AND CPR$RQC[0] NQ REQTYP3"REL$SETUP"
  5429. THEN
  5430. BEGIN
  5431. VLERROR(VE"UCPERR",ABRT); # ABORT WITH MESSAGE #
  5432. END
  5433.  
  5434. #
  5435. * RETURN NUMBER OF FILES RELEASED.
  5436. #
  5437.  
  5438. IF (RTYP EQ TYP"TYP3")
  5439. AND (RFUNC EQ REQTYP3"REL$SETUP")
  5440. THEN
  5441. BEGIN
  5442. NFILER = CPR$RELC[0];
  5443. END
  5444.  
  5445. #
  5446. * RETURN THE SYSTEM RESPONSE CODE IF THE REQUEST WAS A
  5447. * TYPE1 AND THE SYSTEM RETURNED AN ERROR CODE.
  5448. #
  5449.  
  5450. IF CPR$ES[0] NQ 0 AND (RTYP EQ TYP"TYP1")
  5451. THEN
  5452. BEGIN
  5453. STAT = CPR$ES[0]; # RETURN SYSTEM RESPONSE #
  5454. END
  5455.  
  5456. RETURN;
  5457. END # VLREQEX #
  5458.  
  5459. TERM
  5460. PROC VLRPT(GROUP);
  5461. # TITLE VLRPT - VALIDATION REPORT. #
  5462.  
  5463.  
  5464. BEGIN # VLRPT #
  5465.  
  5466. #
  5467. ** VLRPT - VALIDATION REPORT.
  5468. *
  5469. * *VLRPT* GENERATES A REPORT OF PROBLEMS DETECTED IN THE
  5470. * PREVIOUS STEPS. PROBLEMS ARE IDENTIFIED BY THE RECORDS
  5471. * ON THE PROBLEM FILE AND BY ENTRIES IN THE *VT* TABLE
  5472. * THAT HAVE ERROR FLAGS ON. THE PROBLEMS ARE FORMATTED
  5473. * INTO DETAIL LINES AND WRITTEN TO THE REPORT FILE VIA
  5474. * THE REPORT FORMATTER ROUTINES.
  5475. *
  5476. * FOR PROBLEMS/ORPHANS THAT REQUIRE CATALOG FIXES(REPAIRS OR
  5477. * RELEASES), A FIXIT FILE RECORD IS WRITTEN.
  5478. *
  5479. * PROC VLRPT
  5480. *
  5481. * ENTRY (RPTFADR) - ADDRESS OF THE REPORT FILE *FET*.
  5482. * (GROUP) - GROUP BEGIN PROCESSED.
  5483. * (VTFIRST) - INDEX OF FIRST ENTRY IN *VT*.
  5484. * (VTLAST) - INDEX OF LAST ENTRY IN *VT*.
  5485. * (ARRAY PROBFILE) - PROBLEM FILE *FET*.
  5486. *
  5487. * EXIT (CNTORPHANS) - NUMBER OF TROUBLE-FREE ORPHANS DETECTED.
  5488. * (RELEASABLE) - NUMBER OF AU-S ALLOCATED TO ORPHANS.
  5489. * (TOTALERR) - TOTAL VALIDATION ERRORS.
  5490. *
  5491. * RECORDS ARE WRITTEN TO THE FIXIT FILE IF DESIRED.
  5492. *
  5493. * DETAIL LINES ARE ISSUED TO THE REPORT FILE FOR PROBLEMS
  5494. * DETECTED.
  5495. *
  5496. * NOTES SEE *SSVAL* DOCUMENTATION FOR A DESCRIPTION OF THE
  5497. * REPORT FILE ENTRIES.
  5498. *
  5499. * THE DETAIL LINES TO BE ISSUED ARE SELECTED BY THE
  5500. * TYPE OF PROBLEM BEING PROCESSED.
  5501. *
  5502. * THE DETAIL LINES ARE TO IDENTIFY THE PROBLEM TYPE,
  5503. * THE IDENTITY OF THE SPECIFIC ENTRY (Y ORDINAL, Z
  5504. * ORDINAL, PFN, UI, ETC.) AND THE ERROR TEXT.
  5505. *
  5506. * FOR PROBLEM ENTRIES THAT INVOLVE CHAINS, THE CHAIN
  5507. * ENTRIES ARE REPORTED BY CALLING THE ROUTINE *VLSCH*.
  5508. *
  5509. * THE VARIABLE INFORMATION FOR EACH DETAIL LINE IS
  5510. * INSERTED INTO THE LINE USING A CONVERSION ROUTINE
  5511. * *VLNTC* TO GET DISPLAY CODE (LEFT-JUSTIFIED) DATA WHEN
  5512. * NECESSARY.
  5513. *
  5514. #
  5515.  
  5516. #
  5517. **** PROC VLRPT - XREF LIST BEGIN.
  5518. #
  5519.  
  5520. XREF
  5521. BEGIN
  5522. FUNC EDATE C(10); # EDIT DATE FROM PACKED FORMAT #
  5523. FUNC ETIME C(10); # EDIT TIME FROM PACKED FORMAT #
  5524. PROC READ; # INTERFACE TO *READ* MACRO #
  5525. PROC READW; # INTERFACE TO *READW* MACRO #
  5526. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  5527. PROC RPEJECT; # STARTS A NEW REPORT PAGE #
  5528. PROC VLRPTL; # ISSUE REPORT LINE #
  5529. PROC VLSUBHD; # ISSUE REPORT SUBHEADING #
  5530. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  5531.   CONVERSION #
  5532. PROC VLSCH; # SCAN CHAIN FOR REPORT #
  5533. PROC VLWFIX; # WRITE FIX FILE RECORD #
  5534. END
  5535.  
  5536. #
  5537. **** PROC VLRPT - XREF LIST END.
  5538. #
  5539.  
  5540. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTINGS #
  5541. *CALL COMBFAS
  5542. *CALL COMTVLD
  5543. *CALL COMTVLF
  5544. *CALL COMTVLV
  5545.  
  5546. DEF LIST #TRUE#; # SELECT CHAIN LIST #
  5547. DEF NOLIST #FALSE#; # SELECT NO CHAIN LIST #
  5548.  
  5549. ITEM RECHAR C(10); # CHARACTER TYPE TEMPORARY #
  5550. ITEM GROUP U; # GROUP BEING PROCESSED #
  5551. ITEM FCT U; # *FCT* ORDINAL #
  5552.  
  5553.  
  5554. #
  5555. * THE FOLLOWING ARRAYS ARE FORMATTED LINES FOR THE REPORT FILE.
  5556. * THE VARIABLE PORTION IS UPDATED WHEN THE LINE IS TO BE USED
  5557. * DURING THE PROBLEM RECORD PROCESSING.
  5558. #
  5559.  
  5560. ARRAY RLINE1 [0:0] S(2);
  5561. BEGIN
  5562. ITEM RLINE1$DEF C(00,00,20) = ["Y = NN"];
  5563. ITEM RLINE1$YN C(00,30,02);
  5564. END
  5565.  
  5566. ARRAY RLINE2 [0:0] S(2);
  5567. BEGIN
  5568. ITEM RLINE2$DEF C(00,00,20) = ["Z = NN"];
  5569. ITEM RLINE2$ZN C(00,30,02);
  5570. END
  5571.  
  5572. ARRAY RLINE2A [0:0] S(2);
  5573. BEGIN
  5574. ITEM RLINE2A$DEF C(00,00,20) = ["CM = A-"];
  5575. ITEM RLINE2A$CM C(00,30,02);
  5576. END
  5577.  
  5578. ARRAY RLINE3 [0:0] S(2);
  5579. BEGIN
  5580. ITEM RLINE3$DEF C(00,00,20) = ["CSN= CSNNAMEX"];
  5581. ITEM RLINE3$CSN C(00,30,08);
  5582. END
  5583.  
  5584. ARRAY RLINE4 [0:0] S(2);
  5585. BEGIN
  5586. ITEM RLINE4$DEF C(00,00,20) = ["FCT= NNNN"];
  5587. ITEM RLINE4$FCT C(00,30,04);
  5588. END
  5589.  
  5590. ARRAY RLINE5 [0:0] S(2);
  5591. BEGIN
  5592. ITEM RLINE5$DEF C(00,00,20) = ["PF = PFNNAME"];
  5593. ITEM RLINE5$PFN C(00,30,07);
  5594. END
  5595.  
  5596. ARRAY RLINE6 [0:0] S(2);
  5597. BEGIN
  5598. ITEM RLINE6$DEF C(00,00,20) = ["UI = NNNNNN "];
  5599. ITEM RLINE6$UI C(00,30,06);
  5600. END
  5601.  
  5602. ARRAY RLINE7 [0:0] S(2);
  5603. BEGIN
  5604. ITEM RLINE7$DEF C(00,00,20) = ["DI = N"];
  5605. ITEM RLINE7$D C(00,30,01);
  5606. END
  5607.  
  5608. ARRAY RLINE8 [0:0] S(3);
  5609. BEGIN
  5610. ITEM RLINE8$DEF C(00,00,30) = ["BU = MO-DA-YR HR.MN.SC"];
  5611. ITEM RLINE8$BUDA C(00,24,10);
  5612. ITEM RLINE8$BUTI C(01,24,10);
  5613. END
  5614.  
  5615. ARRAY RLINE9 [0:0] S(1);
  5616. BEGIN
  5617. ITEM RLINE9$DEF C(00,00,10) = ["000-0000"];
  5618. ITEM RLINE9$FCT C(00,00,03);
  5619. ITEM RLINE9$AU C(00,24,04);
  5620. END
  5621.  
  5622. CONTROL EJECT;
  5623.  
  5624.  
  5625. #
  5626. * INITIALIZE.
  5627. #
  5628.  
  5629. SCDTLH = FALSE; # DETAIL HEADING FLAG #
  5630.  
  5631. REWIND(PROBFILE,RCL);
  5632. READ(PROBFILE,NRCL);
  5633.  
  5634. #
  5635. * PROCESS EACH PROBLEM FROM THE RECORDS ON THE PROBLEM FILE.
  5636. * THE PROCESS FOR EACH PROBLEM IS TO -
  5637. * - FORMAT THE SELECTED REPORT LINES AND WRITE THEM TO THE
  5638. * REPORT FILE USING THE REPORT FORMATTER VIA THE VLRPTL
  5639. * ROUTINE. THE CALLING SEQUENCE TO VLRPTL IS THE SAME AS FOR
  5640. * THE REPORT FORMATTER.
  5641. * - WRITE A RECORD TO THE FIXIT FILE IDENTIFYING THE TYPE OF
  5642. * CATALOG REPAIR/RELEASE ACTION VIA THE RECORD TYPE.
  5643. * - INCREMENT THE TOTAL ERRORS COUNTER.
  5644. #
  5645.  
  5646. STAT = 0;
  5647. REPEAT WHILE STAT EQ OK
  5648. DO
  5649. BEGIN # PROBLEM PROCESSING #
  5650. READW(PROBFILE,EXTRECORD,RLPROB,STAT); # READ PROBLEM FILE #
  5651. IF STAT NQ OK
  5652. THEN
  5653. BEGIN
  5654. TEST DUMMY; # EOR, EOF, EOI OR ERROR #
  5655. END
  5656.  
  5657. #
  5658. * START THE REPORT LINE WITH THE ERROR TYPE FROM THE FIXIT
  5659. * FILE RECORD TYPE. WRITE THE ERROR TYPE TO THE REPORT FILE
  5660. * USING THE *CONTINUE LINE* OPTION OF THE REPORT FORMATTER.
  5661. #
  5662.  
  5663. VLRPTL(RPTFADR," ",0,1,EOPL); # A BLANK LINE #
  5664. RECHAR = VLNTC(PROB$RT[0],"XCOD",1);
  5665. VLRPTL(RPTFADR,RECHAR,8,1,COPL); # ERROR TYPE #
  5666.  
  5667.  
  5668. #
  5669. * FORMAT IDENTIFICATION LINES IF THE PROBLEM TYPE IS *FCT* OR
  5670. * *SM* BY FILLING THE *FCT*, Y COORDINATE, Z COORDINATE AND CSN
  5671. * INTO THE REPORT LINES.
  5672. #
  5673.  
  5674. IF PROB$RT[0] EQ REC"FCT" OR PROB$RT[0] EQ REC"SM"
  5675. THEN
  5676. BEGIN
  5677. RLINE4$FCT[0] = VLNTC(EXTR$FCT[0] + ZFD,"XCDD",4);
  5678. RLINE1$YN[0] = VLNTC(PROB$Y[0]+ZFD,"XCDD",2);
  5679. RLINE2$ZN[0] = VLNTC(PROB$Z[0]+ZFD,"XCDD",2);
  5680. RLINE2A$CM[0] = VLNTC(PROB$CM[0]," ",2);
  5681. RLINE3$CSN[0] = VLNTC(PROB$CSN[0]," ",8);
  5682. END
  5683.  
  5684.  
  5685. #
  5686. * PROCESS PROBLEM RECORD TYPE *FCT* (*SM* ORDINAL ERROR IN *FCT*
  5687. * ENTRY).
  5688. #
  5689.  
  5690. IF PROB$RT[0] EQ REC"FCT"
  5691. THEN
  5692. BEGIN
  5693. VLRPTL(RPTFADR,RLINE4,11,20,EOPL); # *FCT* ID #
  5694. VLRPTL(RPTFADR,RLINE1,11,20,EOPL); # Y ORD ID #
  5695. VLRPTL(RPTFADR,RLINE2,11,20,EOPL); # Z ORD ID #
  5696. VLRPTL(RPTFADR,RLINE3,11,20,COPL); # CSN ID #
  5697. VLRPTL(RPTFADR,ECORD,50,40,EOPL); # ERROR TEXT #
  5698.  
  5699. VLWFIX(REC"FCT"); # BUILD FIXIT FILE RECORD #
  5700. TOTALERRS = TOTALERRS + 1;
  5701. END
  5702.  
  5703. #
  5704. * PROCESS PROBLEM TYPE *SM* (*FCT* ORDINAL ERROR IN SMMAP
  5705. * ENTRY).
  5706. #
  5707.  
  5708. IF PROB$RT[0] EQ REC"SM"
  5709. THEN
  5710. BEGIN
  5711. VLRPTL(RPTFADR,RLINE1,11,20,EOPL); # Y ORD ID #
  5712. VLRPTL(RPTFADR,RLINE2,11,20,EOPL); # Z ORD ID #
  5713. VLRPTL(RPTFADR,RLINE3,11,20,EOPL); # CSN ID #
  5714. VLRPTL(RPTFADR,RLINE4,11,20,COPL); # *FCT* ID #
  5715. VLRPTL(RPTFADR,EFORD,50,40,EOPL); # ERROR TEXT #
  5716.  
  5717. TOTALERRS = TOTALERRS + 1;
  5718. VLWFIX(REC"SM"); # BUILD FIXIT FILE RECORD #
  5719. END
  5720.  
  5721. #
  5722. * FORMAT THE IDENTIFICATION FIELDS IF THE PROBLEM TYPE IS
  5723. * *ASA* OR *OTHR*.
  5724. #
  5725.  
  5726. IF PROB$RT[0] EQ REC"ASA" OR PROB$RT[0] EQ REC"OTHR"
  5727. THEN
  5728. BEGIN # ISSUE ID LINES #
  5729. IF VTLAST GQ VTFIRST
  5730. THEN
  5731. BEGIN # CHECK *VT* ENTRY #
  5732. P<VTLINK> = LOC(VTPTR); # BUILD LINK TO *VT* ENTRY #
  5733. VTL$GRT[0] = EXTR$GPT[0];
  5734. VTL$AU[0] = EXTR$AU[0];
  5735. VTEN$WORD[0] = VT$ITEM[VTL$WORD[0]]; # GET *VT* ENTRY #
  5736. IF VTEN$PROB[0] EQ VPT1
  5737. THEN
  5738. BEGIN
  5739. VLRPTL(RPTFADR," ",8,1,COPL); # SCATTERED ERROR TYPE #
  5740. END
  5741.  
  5742. END # CHECK *VT* ENTRY #
  5743.  
  5744. RLINE5$PFN[0] = VLNTC(EXTR$PFN[0]," ",7); # *PFN* #
  5745. RLINE6$UI[0] = VLNTC(EXTR$UI[0],"XCOD",6); # UI #
  5746. RLINE7$D[0] = "N"; # DISK IMAGE = NO #
  5747. IF EXTR$D[0] NQ 0
  5748. THEN
  5749. BEGIN
  5750. RLINE7$D[0] = "Y"; # DISK IMAGE = YES #
  5751. END
  5752.  
  5753. RLINE8$BUDA[0] = EDATE(EXTR$BKDA[0]); # BACKUP DATE #
  5754. RLINE8$BUTI[0] = ETIME(EXTR$BKTI[0]); # BACKUP TIME #
  5755.  
  5756. #
  5757. * WRITE THE FORMATTED LINES TO THE REPORT FILE.
  5758. #
  5759.  
  5760. VLRPTL(RPTFADR,RLINE5,11,20,EOPL); # *PFN* ID #
  5761. VLRPTL(RPTFADR,RLINE6,11,20,EOPL); # UI #
  5762. VLRPTL(RPTFADR,RLINE8,11,30,EOPL); # BACK UP DATE-TIME #
  5763. VLRPTL(RPTFADR,RLINE7,11,20,COPL); # DISK IMAGE FLAG #
  5764. END # ISSUE ID LINES #
  5765.  
  5766. #
  5767. * PROCESS THE PROBLEM TYPE *ASA* (INVALID ASA).
  5768. #
  5769.  
  5770. IF PROB$RT[0] EQ REC"ASA"
  5771. THEN
  5772. BEGIN
  5773. FCT = GROUP * 16 + VTL$GRT[0];
  5774. RLINE9$FCT[0] = VLNTC(FCT + ZFD,"XCDD",3);
  5775. RLINE9$AU[0] = VLNTC(EXTR$AU[0]+ZFD,"XCDD",4);
  5776. VLRPTL(RPTFADR,RLINE9,34,7,COPL); # FCT-AU #
  5777. VLRPTL(RPTFADR,EASA,50,20,EOPL); # ERROR TEXT #
  5778.  
  5779. TOTALERRS = TOTALERRS + 1;
  5780. VLWFIX(REC"ASA"); # BUILD FIXIT FILE RECORD #
  5781. END
  5782.  
  5783. #
  5784. * PROCESS THE PROBLEM TYPE *OTHR* (PFC OWNER WITH PROBLEM
  5785. * SFM FILE).
  5786. #
  5787.  
  5788. IF PROB$RT[0] EQ REC"OTHR"
  5789. THEN
  5790. BEGIN
  5791. P<VTLINK> = LOC(VTPTR); # BUILD LINK TO *VT* ENTRY #
  5792. VTL$GRT[0] = EXTR$GPT[0];
  5793. VTL$AU[0] = EXTR$AU[0];
  5794. VTEN$WORD[0] = VT$ITEM[VTL$WORD[0]]; # GET *VT* ENTRY #
  5795. IF VTEN$TYP2[0] OR VTEN$TYP4[0]
  5796. THEN # TYPE 2 OR TYPE 4 VALIDATION
  5797.   ERROR #
  5798. BEGIN
  5799. TOTALERRS = TOTALERRS + 1;
  5800. VLWFIX(REC"OTHR"); # BUILD FIXIT FILE ENTRY #
  5801. END
  5802.  
  5803. VLSCH(LIST,GROUP);
  5804. END
  5805.  
  5806.  
  5807. END # PROBLEM PROCESSING #
  5808.  
  5809. CONTROL EJECT;
  5810.  
  5811. #
  5812. * SCAN THE VALIDATION TABLE (VT) - TO REPORT REMAINING PROBLEMS.
  5813. *
  5814. * - TO DETECT TROUBLE-FREE ORPHANS.
  5815. #
  5816.  
  5817. SLOWFOR VTPTR = VTFIRST STEP 1 UNTIL VTLAST
  5818. DO
  5819. BEGIN # *VT* SCAN #
  5820. VTEN$WORD[0] = VT$ITEM[VTPTR]; # GET *VT* ENTRY #
  5821.  
  5822. #
  5823. * PROCESS TROUBLE-FREE ORPHANS.
  5824. #
  5825.  
  5826. IF VTEN$HOC[0] AND NOT VTEN$OWN[0] AND NOT VTEN$TYP4[0]
  5827. THEN
  5828. BEGIN
  5829. VLWFIX(REC"TFORPH"); # BUILD FIXIT FILE ENTRY #
  5830. VLSCH(NOLIST,GROUP);
  5831.  
  5832. RELEASABLE = RELEASABLE + AUCOUNT;
  5833. CNTORPHANS = CNTORPHANS + 1;
  5834. TEST VTPTR;
  5835. END
  5836.  
  5837. #
  5838. * PROCESS PROBLEM CHAINS. PROBLEM CHAINS ARE -
  5839. * - ORPHAN CHAINS WITH PROBLEMS.
  5840. * - CHAINS THAT ARE OWNED, HAVE PROBLEMS, AND ARE NOT
  5841. * YET REPORTED.
  5842. #
  5843.  
  5844. IF (VTEN$HOC[0] AND NOT VTEN$OWN[0] AND VTEN$TYP4[0]) OR
  5845. (VTEN$OWN[0] AND (VTEN$PROB[0] NQ 0) AND NOT VTEN$RPTED[0])
  5846. THEN
  5847. BEGIN
  5848. TOTALERRS = TOTALERRS + 1;
  5849. VLWFIX(REC"BADORPH"); # BUILD FIXIT FILE ENTRY #
  5850. VLRPTL(RPTFADR,"0",0,1,COPL); # 2 BLANK LINES #
  5851. VLRPTL(RPTFADR,"5",8,1,COPL); # ERROR TYPE #
  5852. VLRPTL(RPTFADR,"ORPHAN",11,6,COPL);
  5853. VLSCH(LIST,GROUP);
  5854. TEST VTPTR;
  5855. END
  5856.  
  5857. #
  5858. * PROCESS FRAGMENT CHAINS. FRAGMENT CHAINS ARE IDENTIFIED BY THE
  5859. * START OF FRAGMENT FLAG.
  5860. #
  5861.  
  5862. IF VTEN$SOF[0] AND VTEN$ALOC[0]
  5863. THEN
  5864. BEGIN
  5865. TOTALERRS = TOTALERRS + 1;
  5866. VLWFIX(REC"FRAG"); # BUILD FIXIT FILE ENTRY #
  5867. VLRPTL(RPTFADR,"0",0,1,COPL);
  5868. VLRPTL(RPTFADR,"6",8,1,COPL);
  5869. VLRPTL(RPTFADR,"FRAGMENT",11,8,COPL);
  5870. VLSCH(TRUE,GROUP);
  5871. TEST VTPTR;
  5872. END
  5873.  
  5874. #
  5875. * PROCESS NOT ALLOCATED ENTRIES (NOT ON CHAIN) THAT CONTAIN
  5876. * TYPE 4 VALIDATION ERRORS.
  5877. #
  5878.  
  5879. IF NOT VTEN$ALOC[0] AND VTEN$TYP4[0]
  5880. THEN
  5881. BEGIN
  5882. TOTALERRS = TOTALERRS + 1;
  5883. VLWFIX(REC"BADHOLE");
  5884. VLRPTL(RPTFADR,"0",0,1,COPL);
  5885. VLRPTL(RPTFADR,"7",8,1,COPL);
  5886. VLRPTL(RPTFADR,"UNALLOCATED",11,11,COPL);
  5887. VTEN$POINT[0] = VTPTR; # INPUT TO *VLSCH* #
  5888. VLSCH(TRUE,GROUP);
  5889. TEST VTPTR;
  5890. END
  5891.  
  5892. END # *VT* SCAN #
  5893.  
  5894. #
  5895. * END OF REPORT PROCESS
  5896. #
  5897.  
  5898. END # VLRPT #
  5899.  
  5900. TERM
  5901. PROC VLRPTL(P1,P2,P3,P4,P5);
  5902.  
  5903. # TITLE VLRPTL - ISSUE REPORT LINE. #
  5904.  
  5905. BEGIN # VLRPTL #
  5906.  
  5907. #
  5908. ** VLRPTL - ISSUE REPORT LINE.
  5909. *
  5910. * *VLRPTL* ISSUES THE REPORT FILE LINES FOR *VLRPT*. THE
  5911. * PURPOSE OF THIS ROUTINE IS TO SIMPLY GET THE SUBCATALOG
  5912. * DETAIL HEADING LINE ISSUED BEFORE THE FIRST DETAIL LINE
  5913. * FROM *VLRPT*.
  5914. *
  5915. * PROC VLRPTL(P1,P2,P3,P4,P5)
  5916. *
  5917. * ENTRY (P1) - PARAMETER 1 ( PARAMETERS TO PASS THROUGH
  5918. * (P2) - PARAMETER 2 TO THE REPORT FORMATTER
  5919. * (P3) - PARAMETER 3 *RPLINE* ).
  5920. * (P4) - PARAMETER 4.
  5921. * (P5) - PARAMETER 5.
  5922. * (SCDTLH) - SUBCATALOG DETAIL HEADING FLAG.
  5923. *
  5924. * EXIT (SCDTLH) - SUBCATALOG DETAIL HEADING FLAG.
  5925. * (SCRPTED) - SUBCATALOG REPORTED FLAG.
  5926. *
  5927. * REPORT LINE WAS WRITTEN TO THE REPORT FILE VIA
  5928. * THE REPORT FORMATTER.
  5929. *
  5930. * NOTES SCDTLH GETS TURNED ON AND OFF IN THE INTERSECTING
  5931. * CHAIN REPORT PROCESS AND IN THE PROBLEM REPORT PROCESS.
  5932. *
  5933. * SCRPTED IS A FLAG TO INDICATE IF EITHER OF THE ABOVE
  5934. * REPORTS OCCURRED WHICH THEN SUPPRESSES THE SUBSEQUENT
  5935. * "GOOD" SUBCATALOG HEADING.
  5936. *
  5937. #
  5938.  
  5939. ITEM P1 I; # PARAMETER 1 FOR RPLINE #
  5940. ITEM P2 I; # PARAMETER 2 FOR RPLINE #
  5941. ITEM P3 I; # PARAMETER 3 FOR RPLINE #
  5942. ITEM P4 I; # PARAMETER 4 FOR RPLINE #
  5943. ITEM P5 I; # PARAMETER 5 FOR RPLINE #
  5944.  
  5945. #
  5946. **** PROC VLRPTL - XREF LIST BEGIN.
  5947. #
  5948.  
  5949. XREF
  5950. BEGIN
  5951. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  5952.   LINE #
  5953. PROC VLSUBHD; # ISSUE REPORT SUBHEADING #
  5954. END
  5955.  
  5956. #
  5957. **** PROC VLRPTL - XREF LIST END.
  5958. #
  5959.  
  5960. DEF LISTCON #0#;
  5961.  
  5962. *CALL COMBFAS
  5963. *CALL COMTVLD
  5964.  
  5965. CONTROL EJECT;
  5966.  
  5967. #
  5968. * IF THE PROBLEM REPORT DETAIL HEADING IS NOT YET PRINTED,
  5969. * PRINT IT.
  5970. #
  5971.  
  5972. IF NOT SCDTLH
  5973. THEN
  5974. BEGIN
  5975. VLSUBHD(SHTYP"PRPT"); # ISSUE DETAIL HEADING #
  5976. SCRPTED = TRUE; # SET SUBCATALOG REPORTED FLAG #
  5977. SCDTLH = TRUE; # SET DETAIL HEADING PRINTED
  5978.   FLAG #
  5979. END
  5980.  
  5981. #
  5982. * PRINT THE REPORT LINE.
  5983. #
  5984.  
  5985. RPLINE(P1,P2,P3,P4,P5);
  5986.  
  5987.  
  5988. END # VLRPTL #
  5989.  
  5990. TERM
  5991. PROC VLSCH(LISTOPT,GROUP);
  5992. # TITLE VLSCH - SCAN CHAIN FOR REPORT. #
  5993.  
  5994.  
  5995. BEGIN # VLSCH #
  5996.  
  5997. ITEM LISTOPT B; # TRUE - LIST EACH CHAIN ENTRY #
  5998.  
  5999. #
  6000. **** PROC VLSCH - XREF LIST BEGIN.
  6001. #
  6002.  
  6003. XREF
  6004. BEGIN
  6005. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  6006.   LINE #
  6007. PROC VLERROR; # ISSUE ERROR MESSAGE #
  6008. FUNC VLNTC C(10); # NUMERIC TO CHARACTER
  6009.   CONVERSION #
  6010. END
  6011.  
  6012. #
  6013. **** PROC VLSCH - XREF LIST END.
  6014. #
  6015.  
  6016. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  6017. *CALL COMBFAS
  6018. *CALL COMTVLD
  6019. *CALL COMTVLF
  6020. *CALL COMTVLV
  6021.  
  6022. ITEM ENDCHAIN B; # END OF CHAIN FLAG #
  6023. ITEM FCT U; # *FCT* ORDINAL #
  6024. ITEM GROUP U; # GROUP PROCESSED #
  6025. ITEM HOCPTR I; # HEAD OF CHAIN POINTER #
  6026. ITEM I I; # TEMPORARY VARIABLE #
  6027. ITEM J I; # TEMPORARY VARIABLE #
  6028. ITEM LFADDR I; # RPT FET ADDR IF LISTOPT = TRUE #
  6029. ITEM PRTFLAG B; # PRINT FLAG #
  6030.  
  6031. #
  6032. * FORMATTED LINE FOR THE REPORT FILE FOR THE CHAIN IDENTIFICATION.
  6033. #
  6034.  
  6035. ARRAY CHAINID [0:0] S(2); # CHAIN ID REPORT LINE #
  6036. BEGIN
  6037. ITEM CHAIN$DEF C(00,00,20) = ["000-0000 A 0"];
  6038. ITEM CHAIN$FCT C(00,00,03); # *FCT* #
  6039. ITEM CHAIN$AU C(00,24,04); # *AU* #
  6040. ITEM CHAIN$AF C(00,54,01);
  6041. ITEM CHAIN$MID C(01,00,02); # CHAIN STATUS #
  6042. ITEM CHAIN$HOC C(01,00,01); # HEAD OF CHAIN #
  6043. ITEM CHAIN$EOC C(01,06,01); # END OF CHAIN #
  6044. END
  6045.  
  6046. BASED
  6047. ARRAY REM [0:0] S(1);
  6048. ; # REPORT ERROR MSG #
  6049.  
  6050. CONTROL EJECT;
  6051. #
  6052. * SET THE REPORT FILE FET ADDRESS IF THE CHAIN ENTRY ID
  6053. * IS TO BE LISTED IN THE REPORT FILE.
  6054. #
  6055.  
  6056. IF LISTOPT
  6057. THEN
  6058. BEGIN
  6059. LFADDR = RPTFADR; # REPORT THE CHAIN ENTRIES #
  6060. END
  6061.  
  6062. ELSE
  6063. BEGIN
  6064. LFADDR = 0; # TURN REPORT OFF #
  6065. END
  6066.  
  6067. I = VTPTR; # STARTING INDEX #
  6068. HOCPTR = VTEN$POINT[0]; # SAVE START OF CHAIN ID #
  6069. AUCOUNT = 0;
  6070.  
  6071. #
  6072. * PROCESS EACH ENTRY IN CHAIN STARTING WITH GIVEN ENTRY (VTPTR).
  6073. #
  6074.  
  6075. ENDCHAIN = FALSE;
  6076. REPEAT WHILE NOT ENDCHAIN
  6077. DO
  6078. BEGIN # *VT* CHAIN PROCESS #
  6079.  
  6080. #
  6081. * CALCULATE SFM SPACE IN CHAIN
  6082. #
  6083.  
  6084. AUCOUNT = AUCOUNT + 1;
  6085.  
  6086. #
  6087. * BUILD THE CHAIN IDENTIFICATION FOR THE REPORT.
  6088. #
  6089.  
  6090. P<VTLINK> = LOC(I); # TO EXTRACT FCT,STRM FROM LINK #
  6091. FCT = GROUP * 16 + VTL$GRT[0];
  6092. CHAIN$FCT[0] = VLNTC(FCT + ZFD,"XCDD",3);
  6093. CHAIN$AU[0] = VLNTC(VTL$AU[0]+ZFD,"XCDD",4);
  6094. CHAIN$AF[0] = "U"; # UNALLOCATED #
  6095. IF VTEN$ALOC[0]
  6096. THEN # CHAIN ENTRY IS ALLOCATED #
  6097. BEGIN
  6098. CHAIN$AF[0] = "A"; # SET ALLOCATED #
  6099. END
  6100.  
  6101. CHAIN$MID[0] = "--"; # SET CHAIN STATUS #
  6102. IF VTEN$HOC[0]
  6103. THEN
  6104. BEGIN
  6105. CHAIN$HOC[0] = "H"; # SET HEAD OF CHAIN #
  6106. END
  6107.  
  6108. IF VTEN$EOC[0]
  6109. THEN
  6110. BEGIN
  6111. CHAIN$EOC[0] = "E"; # SET END OF CHAIN #
  6112. END
  6113.  
  6114. RPLINE(LFADDR,CHAINID,34,14,COPL); # ISSUE CHAIN ID #
  6115.  
  6116. #
  6117. * SCAN THE *VT* ENTRY FOR ERRORS (BITS VPS THRU VPX IN THE
  6118. * *VT* ENTRY). FOR EACH VALIDATION ERROR FLAG THAT IS SET,
  6119. * GET THE ASSOCIATED ERROR MESSAGE AND ISSUE IT TO THE REPORT.
  6120. #
  6121.  
  6122. PRTFLAG = FALSE;
  6123. SLOWFOR J = VPS STEP 1 UNTIL VPX
  6124. DO
  6125. BEGIN
  6126. IF B<J,1>VTEN$WORD[0] EQ 1 AND (VTER$MSG[J] NQ "0")
  6127. THEN
  6128. BEGIN
  6129. P<REM> = LOC(VTER$MSG[J]); # GET ERROR TEXT #
  6130. RPLINE(LFADDR,REM,50,35,EOPL); # ISSUE TO REPORT #
  6131. PRTFLAG = TRUE; # SET LINE PRINTED FLAG #
  6132. END
  6133.  
  6134. END
  6135.  
  6136. #
  6137. * IF NO ERRORS WERE FOUND, THE CHAIN ID LINE HAS NOT YET
  6138. * BEEN PRINTED. (IT WAS ISSUED USING THE "CONTINUE LINE"
  6139. * OPTION).
  6140. #
  6141.  
  6142. IF NOT PRTFLAG
  6143. THEN
  6144. BEGIN
  6145. RPLINE(LFADDR,0,0,0,EOPL); # PRINT THE LINE #
  6146. END
  6147.  
  6148. #
  6149. * DETERMINE IF AT END-OF-CHAIN.
  6150. #
  6151.  
  6152. ENDCHAIN = VTEN$EOC[0] OR NOT VTEN$ALOC[0] ##
  6153. OR VTEN$LINK[0] EQ 0 OR VTEN$LINK[0] EQ HOCPTR;
  6154.  
  6155. #
  6156. * UPDATE THIS ENTRY.
  6157. #
  6158.  
  6159. VTEN$RPTED[0] = TRUE;
  6160. VT$ITEM[I] = VTEN$WORD[0]; # STORE THE *VT* ENTRY #
  6161.  
  6162. #
  6163. * GET NEXT AU IN CHAIN.
  6164. #
  6165.  
  6166. IF NOT ENDCHAIN
  6167. THEN
  6168. BEGIN # GET NEXT AU #
  6169. I = VTEN$LINK[0];
  6170. IF I GR VTLAST
  6171. THEN # INVALID LINK #
  6172. BEGIN
  6173. ENDCHAIN = TRUE; # FORCE END OF CHAIN #
  6174. P<VTLINK> = LOC(I); # TO GET FCT,STRM FROM LINK #
  6175. FCT = GROUP * 16 + VTL$GRT[0];
  6176. CHAIN$FCT[0] = VLNTC(FCT + ZFD,"XCDD",3);
  6177. CHAIN$AU[0] = VLNTC(VTL$AU[0] + ZFD,"XCDD",4);
  6178. RPLINE(LFADDR,CHAINID,34,8,COPL); # REPORT ID #
  6179. RPLINE(LFADDR,ELNK,50,15,EOPL); # INVALID LINK #
  6180. END
  6181.  
  6182. ELSE
  6183. BEGIN
  6184. VTEN$WORD[0] = VT$ITEM[I]; # GET NEXT AU FROM *VT* #
  6185. END
  6186.  
  6187. END # GET NEXT AU #
  6188.  
  6189. END # *VT* CHAIN PROCESS #
  6190.  
  6191. END # VLSCH #
  6192.  
  6193. TERM
  6194. PROC VLSUBFM;
  6195.  
  6196. # TITLE VLSUBFM - SUBFAMILY VALIDATION. #
  6197.  
  6198. BEGIN # VLSUBFM #
  6199.  
  6200. #
  6201. ** VLSUBFM - SUBFAMILY VALIDATION.
  6202. *
  6203. * *VLSUBFM* CONTROLS THE VALIDATION PROCESS FOR A
  6204. * GIVEN SUBFAMILY.
  6205. *
  6206. * PROC VLSUBFM
  6207. *
  6208. * ENTRY (DEF$FAM) - THE DEFAULT FAMILY.
  6209. * (MEM$MAX) - MAXIMUM MEMORY ALLOWED FOR THE JOB.
  6210. * (MEM$MIN) - MEMORY REQUIRED FOR THE PROGRAM.
  6211. * (PAR$AM) - AM OPTION.
  6212. * (PAR$FM) - FAMILY BEING VALIDATED.
  6213. * (PAR$RF) - *RDF* FILE NAME.
  6214. * (SBINDX) - SUBFAMILY BEING PROCESSED.
  6215. * (ARRAY VLCTLFN) - SFM CATALOG LOCAL FILE NAME.
  6216. * (ARRAY VLPFN) - SFM CATALOG PERMANENT FILE NAME.
  6217. *
  6218. * EXIT THE SUBFAMILY WAS VALIDATED AND DESCRIPTIVE LINES
  6219. * WRITTEN TO THE REPORT FILE. THE FIXIT FILE RECORDS
  6220. * (IDENTIFYING REPAIRS/RELEASES FOR THE SUBFAMILY) WERE
  6221. * WRITTEN.
  6222. *
  6223. * MESSAGES * FAMILY NOT FOUND IN SYSTEM.*
  6224. * * WAITING FOR FILE FILENAME.*
  6225. * * SFM CATALOG OPEN ERROR.*
  6226. * * VALIDATING SB=N SM=X.*
  6227. * * SMMAP OPEN ERROR.*
  6228. * * REQUIRED FL EXCEEDS JOB MAX.*
  6229. * * SSVAL ABNORMAL, VLSUBFM.*
  6230. *
  6231. * NOTES *VLSUBFM*:
  6232. *
  6233. * CALLS *ASINIT* TO INITIALIZE FIELDS FOR THE
  6234. * SFM CATALOG AND SMMAP ACCESS ROUTINES.
  6235. *
  6236. * OPENS THE SFM CATALOG FILE FOR THE SUBFAMILY
  6237. * (EITHER THE LIVE CATALOG IS ATTACHED AND OPENED
  6238. * OR THE LOCAL FILE CREATED FROM THE *RDF* FILE IS
  6239. * OPENED).
  6240. *
  6241. * VALIDATES EACH SELECTED *SM* THAT IS SELECTED
  6242. * IN THE *SM* PARAMETER.
  6243. *
  6244. * - OPENS THE PROBLEM FILE.
  6245. * - OPENS THE SMMAP FILE (IF AM PARAMETER).
  6246. * - GETS MEMORY SPACE FOR THE *VT* TABLE.
  6247. * - INITIALIZES THE *VLCMAP* ARRAY.
  6248. * - CALLS *VLBLDVT* TO BUILD THE *VT* TABLE.
  6249. * - CALLS *VLAMSF* TO ANALYZE THE SFM DATA
  6250. * IN THE *VT*.
  6251. * - CALLS *VLAPFC* TO ANALYZE THE *PFC* DATA IN
  6252. * THE *PFC* EXTRACT FILES.
  6253. * - CLOSES THE PROBLEM FILE.
  6254. * - CALLS *VLRPT* TO GENERATE THE PROBLEM REPORT.
  6255. * - CLOSES THE SMMAP (IF OPENED).
  6256. * - ISSUES A SUBCATALOG "GOOD" HEADING ON THE
  6257. * REPORT FILE IF NO ERRORS WERE DETECTED IN
  6258. * PREVIOUS STEPS.
  6259. * CLOSES THE SFM CATALOG FILE.
  6260. #
  6261.  
  6262.  
  6263. #
  6264. **** PROC VLSUBFM - XREF LIST BEGIN.
  6265. #
  6266.  
  6267. XREF
  6268. BEGIN
  6269. PROC SSINIT;
  6270. PROC CINTLK; # GET/RELEASE CATALOG INTERLOCK #
  6271. PROC COPEN; # OPEN CATALOG #
  6272. PROC CCLOSE;
  6273. PROC CRDAST; # READ *AST* #
  6274. PROC LOFPROC; # LIST OF FILES PROCESSOR #
  6275. PROC MCLOSE; # TERMINATE MAP REFERENCE BY
  6276.   CALLER #
  6277. PROC MOPEN; # EXTABLISH CALLER ACCESS TO MAP
  6278.   FILE #
  6279. PROC MEMORY; # REQUEST FIELD LENGTH CHANGE #
  6280. PROC PFD; # *PFM* REQUEST INTERFACE #
  6281. PROC REWIND; # INTERFACE TO *REWIND* MACRO #
  6282. PROC RPEJECT; # STARTS A NEW REPORT PAGE #
  6283. PROC SETPFP; # SET PERMANENT FILE PARAMETERS #
  6284. PROC VLAMSF; # ANALYZE THE SFM CATALOG #
  6285. PROC VLAPFC; # ANALYZE THE *PFC* CATALOG #
  6286. PROC VLBLDVT; # BUILD VALIDATION TABLE #
  6287. PROC VLERROR;
  6288. PROC VLMSG; # ISSUE INFORMATIONAL MESSAGE #
  6289. PROC VLSMSC; # #
  6290. PROC VLRCL; # RECALL #
  6291. PROC VLREQEX; # REQUEST TO EXEC #
  6292. PROC VLRPT; # VALIDATION REPORT #
  6293. PROC VLSUBHD; # ISSUE REPORT SUBHEADING #
  6294. PROC WRITEF; # INTERFACE TO *WRITEF* MACRO #
  6295. PROC ZFILL; # ZERO FILL BLOCK #
  6296. END
  6297.  
  6298. #
  6299. **** PROC VLSUBFM - XREF LIST END.
  6300. #
  6301.  
  6302.  
  6303. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTINGS #
  6304.  
  6305. *CALL COMBFAS
  6306. *CALL COMBCMD
  6307. *CALL COMBCMS
  6308. *CALL COMBCPR
  6309. *CALL COMBMAP
  6310. *CALL COMBMCT
  6311. *CALL COMBPFP
  6312. *CALL COMSPFM
  6313. *CALL COMTVLD
  6314. *CALL COMTVLF
  6315. *CALL COMTVLM
  6316. *CALL COMTVLV
  6317.  
  6318.  
  6319. ITEM J I; # TEMPORARY VARIABLE #
  6320. ITEM FLAG I; # STATUS FLAG #
  6321. ITEM I I; # INDUCTION VARIABLE #
  6322. ITEM PROCESSED B; # FLAG TO CONTROL LOOP #
  6323.  
  6324. CONTROL EJECT;
  6325.  
  6326. #
  6327. * INITIALIZE CATALOG AREAS.
  6328. #
  6329.  
  6330. SSINIT;
  6331.  
  6332.  
  6333. #
  6334. * VALIDATE THE "LIVE" SFM CATALOGS IF THE RF PARAMETER
  6335. * WAS NOT SELECTED.
  6336. #
  6337.  
  6338. IF PAR$RF EQ 0
  6339. THEN
  6340. BEGIN # GET LIVE CATALOG #
  6341.  
  6342. #
  6343. * SET FAMILY AND UI IN JOB ATTRIBUTES FOR THE SFM CATALOG FILES.
  6344. #
  6345.  
  6346. PFP$FAM[0] = PAR$FM;
  6347. PFP$UI[0] = DEF$UI + SBINDX;
  6348. PFP$FG1[0] = TRUE; # SET FAMILY #
  6349. PFP$FG4[0] = TRUE; # SET UI #
  6350. SETPFP(PFP);
  6351. IF PFP$STAT[0] NQ 0
  6352. THEN # FAMILY NOT FOUND IN SYSTEM #
  6353. BEGIN
  6354. VLERROR(VE"NOFAM",ABRT); # ISSUE MESSAGE AND ABORT #
  6355. END
  6356.  
  6357. #
  6358. * ATTACH THE SFM CATALOG FILE FOR SUBFAMILY.
  6359. #
  6360.  
  6361. VLCT$LFNX[0] = SBINDX + "0"; # APPEND SUBFAMILY TO *LFN* #
  6362. VLPF$NAMEX[0] = SBINDX + "0"; # APPEND SUBFAMILY TO *PFN* #
  6363. PROCESSED = FALSE;
  6364. REPEAT WHILE NOT PROCESSED
  6365. DO
  6366. BEGIN # ATTACH SFM CATALOG #
  6367. PFD("ATTACH",VLCTLFN,VLPFN,"M","RM","RC",STAT,"NA",0,0);
  6368. IF STAT EQ FBS OR STAT EQ PFA
  6369. THEN # FILE IS BUSY #
  6370. BEGIN
  6371. MP$WD[1] = VLPF$NAME[0];
  6372. LFUN = (ATAS*8) + LGET;
  6373. CINTLK(LFUN,PAR$FM,2**SBINDX); # GET THE INTERLOCK #
  6374. CINTLK(LGET,PAR$FM,2**SBINDX); # GET THE INTERLOCK #
  6375. VLRCL(WAITPF); # DELAY AWHILE #
  6376. END
  6377.  
  6378. ELSE
  6379. BEGIN
  6380. IF STAT NQ 0
  6381. THEN
  6382. BEGIN
  6383. VLERROR(VE"CATO",ABRT);
  6384. END
  6385.  
  6386. ELSE
  6387. BEGIN
  6388. PROCESSED = TRUE;
  6389. END
  6390.  
  6391. END
  6392.  
  6393. END # ATTACH SFM CATALOG #
  6394.  
  6395. VLMSG(VM"CLEARB");
  6396. END # GET LIVE CATALOG #
  6397.  
  6398. ELSE # PAR$RF DOES NOT EQUAL 0 #
  6399.  
  6400. #
  6401. * OTHERWISE USE THE SFM CATALOG FILE CREATED FROM THE RDF FILE.
  6402. #
  6403.  
  6404. BEGIN
  6405. VLCT$LFNX[0] = SBINDX+"0"; # APPEND SUBFAMILY TO *LFN* #
  6406. END
  6407.  
  6408. #
  6409. * OPEN THE SFM CATALOG FOR THE SUBFAMILY.
  6410. #
  6411.  
  6412. COPEN(PAR$FM,SBINDX,VLCTLFN,"RM",TRUE,STAT);
  6413. LOFPROC(VLCTLFN); # ADD LFN TO LIST OF FILES #
  6414. IF STAT NQ CMASTAT"NOERR"
  6415. THEN # ERROR WHEN OPENING #
  6416. BEGIN
  6417. VLERROR(VE"CATO",ABRT); # ABORT WITH MESSAGE #
  6418. END
  6419.  
  6420.  
  6421. #
  6422. * PERFORM SUBCATALOG VALIDATION FOR EACH SELECTED *SM* THAT
  6423. * EXISTS.
  6424. #
  6425.  
  6426. SLOWFOR SMINDX = 1 STEP 1 UNTIL 8
  6427. DO
  6428. BEGIN # SUBCATALOG VALIDATION #
  6429.  
  6430. #
  6431. * SKIP IF THE *SM* WAS NOT SELECTED IN THE *SM* PARAMETER.
  6432. #
  6433.  
  6434. IF B<SMINDX,1>PAR$SM EQ 0
  6435. THEN
  6436. BEGIN
  6437. TEST SMINDX;
  6438. END
  6439.  
  6440. #
  6441. * BEGIN VALIDATION FOR THE SUBCATALOG.
  6442. #
  6443.  
  6444. MP$WD[1] = SBINDX + "0";
  6445. MP$WD[2] = SMINDX;
  6446. VLMSG(VM"VALX"); # VALIDATING SB = N SM = X #
  6447.  
  6448. SCRPTED = FALSE; # SUB-CATALOG HEADING FLAG #
  6449. SCDTLH = FALSE;
  6450.  
  6451. REWIND(PROBFILE,RCL); # OPEN PROBLEM FILE #
  6452.  
  6453. #
  6454. * ATTACH AND OPEN THE SMMAP FILE IF THE AM OPTION WAS SELECTED.
  6455. #
  6456.  
  6457. IF PAR$AM NQ 0
  6458. THEN
  6459. BEGIN # GET SMMAP FILE #
  6460. PFP$FAM[0] = DEF$FAM;
  6461. PFP$UI[0] = DEF$UI;
  6462. PFP$FG1[0] = TRUE; # SET FAMILY #
  6463. PFP$FG4[0] = TRUE; # SET UI #
  6464. SETPFP(PFP);
  6465.  
  6466. VLCM$LFNX[0] = SMINDX;
  6467. PROCESSED = FALSE;
  6468. REPEAT WHILE NOT PROCESSED
  6469. DO
  6470. BEGIN # SMMAP ACCESS #
  6471. MOPEN(SMINDX,VLCMLFN,"RM",STAT); # OPEN SMMAP #
  6472. LOFPROC(VLCMLFN); # ADD LFN TO LIST OF FILES #
  6473. IF STAT EQ CMASTAT"INTLK"
  6474. THEN # FILE BUSY #
  6475. BEGIN
  6476. MP$WD[1] = VLCM$LFN[0];
  6477. VLMSG(VM"WAITCAT"); # ISSUE MESSAGE TO B DISPLAY #
  6478. VLREQEX(TYP"TYP3",REQTYP3"REL$MPLK"); # GET INTERLOCK #
  6479. VLRCL(WAITPF); # DELAY #
  6480. END
  6481.  
  6482. ELSE
  6483. BEGIN
  6484. PROCESSED = TRUE; # OPEN COMPLETED #
  6485. END
  6486.  
  6487. END # SMMAP ACCESS #
  6488.  
  6489. IF STAT NQ CMASTAT"NOERR"
  6490. THEN # ERROR WHEN OPENING #
  6491. BEGIN
  6492. VLERROR(VE"MAPO",ABRT); # ABORT WITH MESSAGE #
  6493. END
  6494.  
  6495. END # GET SMMAP FILE #
  6496.  
  6497.  
  6498. #
  6499. * CALCULATE THE MEMORY SIZE REQUIRED FOR THE *VT* TABLE AND
  6500. * ISSUE THE MEMORY REQUEST TO THE SYSTEM.
  6501. #
  6502.  
  6503. MEM$WDS[0] = MEM$MIN + 2048*MAXGRT + 64;
  6504. IF MEM$WDS[0] GQ MEM$MAX
  6505. THEN # MEMORY NOT AVAILABLE #
  6506. BEGIN
  6507. VLERROR(VE"NOFL",ABRT); # ABORT WITH MESSAGE #
  6508. END
  6509.  
  6510. MEMORY("CM",MEMRQST,RCL,NA); # REQUEST MEMORY #
  6511.  
  6512. P<VTTABLE> = MEM$MIN; # ARRAY BASED AT MEM$MIN #
  6513. ZFILL(VTTABLE,2048 * MAXGRT);
  6514.  
  6515. SLOWFOR J = 0 STEP 1 UNTIL MAX$Z
  6516. DO # CLEAR VLCMAP ARRAY #
  6517. BEGIN
  6518. VLCM$Z[J] = 0;
  6519. END
  6520.  
  6521. #
  6522. * ANALYZE EACH GROUP OF SUBFAMILY AND WRITE TO PROBLEM FILE.
  6523. #
  6524.  
  6525.  
  6526. SLOWFOR J = 1 STEP 1 ##
  6527. WHILE J LQ MAXGP ##
  6528. AND (J-1) LQ (PRM$ENTRC[SMINDX]/16)
  6529. DO # PROCESS EACH GROUP #
  6530. BEGIN
  6531. GROUPX = J;
  6532. VLBLDVT(J); # BUILD *VT* TABLE #
  6533. VLAMSF; # VALIDATE ENTRIES IN *VT* #
  6534. VLAPFC(J); # VALIDATE THE *PFC* ENTRIES #
  6535. IF (J EQ MAXGP ##
  6536. OR J-1 EQ PRM$ENTRC[SMINDX]/16) ##
  6537. AND PAR$AM NQ 0
  6538. THEN # LAST CARTRIDGE IN GROUP #
  6539. BEGIN
  6540. VLSMSC;
  6541. END
  6542.  
  6543. WRITEF(PROBFILE,RCL);
  6544. VLRPT(J);
  6545. ZFILL(VTTABLE,2048*MAXGRT);
  6546. REWIND(PROBFILE,RCL);
  6547. WRITEF(PROBFILE,RCL);
  6548. REWIND(PROBFILE,RCL);
  6549. END
  6550.  
  6551.  
  6552.  
  6553. #
  6554. * CLOSE THE SMMAP FILE IF IT WAS OPENED.
  6555. #
  6556.  
  6557. IF PAR$AM NQ 0
  6558. THEN
  6559. BEGIN
  6560. MCLOSE(SMINDX,STAT);
  6561. IF STAT NQ CMASTAT"NOERR"
  6562. THEN # ERROR IN CLOSING #
  6563. BEGIN
  6564. MP$WD[1] = "VLSUBFM"; # NAME FOR MESSAGE #
  6565. VLERROR(VE"SYSERR",ABRT); # ABORT WITH MESSAGE #
  6566. END
  6567.  
  6568. VLREQEX(TYP"TYP3",REQTYP3"REC$MPLK"); # RETURN INTERLOCK #
  6569. END
  6570.  
  6571. #
  6572. * ISSUE THE "GOOD" SUBCATALOG HEADING IF NO ERRORS WERE DETECTED.
  6573. #
  6574.  
  6575. IF NOT SCRPTED
  6576. THEN
  6577. BEGIN
  6578. VLSUBHD(SHTYP"OK"); # SUB-CATALOG HEADING #
  6579. END
  6580.  
  6581. END # SUBCATALOG VALIDATION #
  6582.  
  6583. #
  6584. * CLOSE THE SFM CATALOG.
  6585. #
  6586.  
  6587. CCLOSE(PAR$FM,SBINDX,0,STAT);
  6588. IF STAT NQ CMASTAT"NOERR"
  6589. THEN # ERROR IN CLOSING #
  6590. BEGIN
  6591. MP$WD[1] = "VLSUBFM"; # NAME FOR MESSAGE #
  6592. VLERROR(VE"SYSERR",ABRT); # ABORT WITH MESSAGE #
  6593. END
  6594.  
  6595. #
  6596. * IF USING THE LIVE SFM CATALOG, RELEASE THE LOCK.
  6597. #
  6598.  
  6599. IF PAR$RF EQ 0
  6600. THEN
  6601. BEGIN
  6602. LFUN = (ATAS*8) + LREL;
  6603. CINTLK(LFUN,PAR$FM,2**SBINDX); # RELEASE INTERLOCK #
  6604. END
  6605.  
  6606.  
  6607. END # VLSUBFM #
  6608.  
  6609. TERM
  6610. PROC VLSUBHD(RTYP);
  6611. # TITLE VLSUBHD - ISSUE REPORT SUBHEADING. #
  6612.  
  6613. BEGIN # VLSUBHD #
  6614.  
  6615. #
  6616. ** VLSUBHD - ISSUE SUBCATALOG HEADING.
  6617. *
  6618. * *VLSUBHD* FORMATS AND ISSUES THE SUBCATALOG HEADING.
  6619. *
  6620. * PROC VLSUBHD(RTYP)
  6621. *
  6622. * ENTRY (RTYP) - HEADING TYPE.
  6623. *
  6624. * EXIT THE SUBCATALOG HEADING IS WRITTEN TO THE
  6625. * REPORT FILE. THE HEADING WILL BE ONE OF THE FOLLOWING -
  6626. * - "GOOD"
  6627. * - "INTERSECTIONS" AND ITS SUB-HEADING.
  6628. * - "PROBLEMS" AND ITS SUB-HEADING.
  6629. *
  6630. * NOTES SEE *SSVAL* DOCUMENTATION FOR A GENERAL
  6631. * DESCRIPTION OF THE REPORT.
  6632. #
  6633.  
  6634. ITEM RTYP I; # HEADING TYPE #
  6635.  
  6636. #
  6637. **** PROC VLSUBHD - XREF LIST BEGIN.
  6638. #
  6639.  
  6640. XREF
  6641. BEGIN
  6642. PROC RPLINE; # CALLS *RPLINEX* TO PRINT A
  6643.   LINE #
  6644. PROC VLBFILL; # BLANK FILL #
  6645. PROC VLSUBTD; # GET SUB-HEADING TIME AND DATE #
  6646. END
  6647.  
  6648. #
  6649. **** PROC VLSUBHD - XREF LIST END.
  6650. #
  6651.  
  6652. DEF LISTCON #0#;
  6653. *CALL COMBFAS
  6654. *CALL COMTVLD
  6655. *CALL COMTVLF
  6656.  
  6657. ITEM TYP I; # HEADING TYPE #
  6658.  
  6659. #
  6660. * THE FOLLOWING ARRAYS ARE REPORT FILE HEADING LINES.
  6661. #
  6662.  
  6663. ARRAY SUBHEAD1 [0:0] S(8); # SUB-HEADING LINE #
  6664. BEGIN
  6665. ITEM SH$D1 C(00,00,80) = ["0 SUBFAMILY = N SM = X "];
  6666. ITEM SH$SUB C(01,36,01);
  6667. ITEM SH$SM C(02,30,01);
  6668. ITEM SH$DESC C(02,48,14);
  6669. ITEM SH$D2 C(04,24,06) = ["LPDT ="];
  6670. ITEM SH$DATE C(05,00,10);
  6671. ITEM SH$TIME C(06,00,10);
  6672. END
  6673.  
  6674.  
  6675.  
  6676. ARRAY RDTL [0:0] S(8); # PROBLEM HEADING #
  6677. BEGIN
  6678. ITEM RD$DEF C(00,00,80) = [" ERR "];
  6679. ITEM RD$D1 C(01,18,20) = ["IDENTIFICATION"];
  6680. ITEM RD$D2 C(03,30,12) = [" -CHAIN- "];
  6681. ITEM RD$D3 C(05,06,20) = ["ERROR DESCRIPTION"];
  6682. END
  6683.  
  6684. ARRAY RDTL2 [0:0] S(8); # PROBLEM HEADING 2 #
  6685. BEGIN
  6686. ITEM RD$DD1 C(00,00,80) = [" TYP"];
  6687. ITEM RD$DD2 C(03,18,20) = ["FCT - AU - A/U - H/E"];
  6688. END
  6689.  
  6690. ARRAY ICHDR [0:0] S(5); # INTERSECTION HEADING #
  6691. BEGIN
  6692. ITEM ICH$DEF C(00,00,50) = [" "];
  6693. ITEM ICH$D1 C(02,36,20) = ["- HEAD OF CHAINS -"];
  6694. END
  6695.  
  6696. ARRAY ICDTL [0:0] S(5); # INTERSECTION HEADING 2 #
  6697. BEGIN
  6698. ITEM ICD$DEF C(00,00,50) = [" "];
  6699. ITEM ICD$D1 C(02,12,11) = ["FCTORD - AU"];
  6700. ITEM ICD$D2 C(03,42,11) = ["FCTORD - AU"];
  6701. END
  6702.  
  6703. CONTROL EJECT;
  6704.  
  6705. TYP = RTYP; # SET HEADING TYPE #
  6706.  
  6707. #
  6708. * GET THE LAST PURGED DATE/TIME FOR THE SUBCATALOG.
  6709. #
  6710.  
  6711. VLSUBTD(SCPDATE,SCPTIME);
  6712. SH$DATE[0] = SCPDATE; # SUBCATALOG DATE #
  6713. SH$TIME[0] = SCPTIME; # SUBCATALOG TIME #
  6714.  
  6715. #
  6716. * BUILD THE VARIABLE FIELDS OF THE REPORT HEADING.
  6717. #
  6718.  
  6719. SH$SUB[0] = SBINDX + "0";
  6720. SH$SM[0] = SMINDX;
  6721.  
  6722. #
  6723. * FILL IN THE REPORT DESCRIPTION DEPENDING ON THE REQUESTED
  6724. * HEADING TYPE.
  6725. #
  6726.  
  6727. IF TYP EQ SHTYP"OK"
  6728. THEN
  6729. BEGIN
  6730. SH$DESC[0] = " -- GOOD -- ";
  6731. END
  6732.  
  6733. IF TYP EQ SHTYP"ICT"
  6734. THEN
  6735. BEGIN
  6736. SH$DESC[0] = "INTERSECTIONS";
  6737. END
  6738.  
  6739. IF TYP EQ SHTYP"PRPT"
  6740. THEN
  6741. BEGIN
  6742. SH$DESC[0] = " PROBLEMS ";
  6743. END
  6744.  
  6745. #
  6746. * ISSUE THE SUBCATALOG HEADING TO THE REPORT FILE.
  6747. #
  6748.  
  6749. RPLINE(RPTFADR," ",0,1,EOPL); # BLANK LINE #
  6750. RPLINE(RPTFADR,SUBHEAD1,0,80,EOPL);
  6751.  
  6752. #
  6753. * ISSUE THE INTERSECTING CHAIN SUBHEADING IF REQUESTED.
  6754. #
  6755.  
  6756. IF TYP EQ SHTYP"ICT"
  6757. THEN
  6758. BEGIN
  6759. RPLINE(RPTFADR,ICHDR,0,50,EOPL);
  6760. RPLINE(RPTFADR,ICDTL,0,50,EOPL);
  6761. END
  6762.  
  6763. #
  6764. * ISSUE THE PROBLEM REPORT SUBHEADING IF REQUESTED.
  6765. #
  6766.  
  6767. IF TYP EQ SHTYP"PRPT"
  6768. THEN
  6769. BEGIN
  6770. RPLINE(RPTFADR,RDTL,0,80,EOPL);
  6771. RPLINE(RPTFADR,RDTL2,0,80,EOPL);
  6772. END
  6773.  
  6774. END # VLSUBHD #
  6775.  
  6776. TERM
  6777. PROC VLSUBTD;
  6778. # TITLE VLSUBTD - GET SUB-HEADING TIME AND DATE. #
  6779.  
  6780. BEGIN # VLSUBTD #
  6781.  
  6782. #
  6783. ** VLSUBTD - GET SUBCATALOG HEADING TIME AND DATE.
  6784. *
  6785. * THE LAST PURGED TIME AND DATE FOR THE SUBCATALOG
  6786. * IN THE SUBFAMILY IS RETRIEVED AND EDITED.
  6787. *
  6788. * PROC VLSUBTD
  6789. *
  6790. * ENTRY (SMINDX) - *SM* INDEX.
  6791. * (PAR$FM) - FAMILY PARAMETER.
  6792. * (PAR$RF) - *RDF* FILE PARAMETER.
  6793. * (SBINDX) - SUBFAMILY INDEX.
  6794. *
  6795. * EXIT (SCPDATE) - EDITED DATE OR "****".
  6796. * (SCPTIME) - EDITED TIME OR "****".
  6797. *
  6798. * NOTES IF THE SFM CATALOG FROM THE *RDF* FILE IS BEING
  6799. * PROCESSED THE DATE AND TIME IS RETRIEVED BY A *CALLSS*
  6800. * TO *EXEC*.
  6801. *
  6802. * IF THE LIVE *MSF* CATALOG IS BEING PROCESSED, THE DATE
  6803. * AND TIME IS RETRIEVED BY THE CATALOG ACCESS ROUTINE
  6804. * *CGETPD*.
  6805. *
  6806. * IF THE SUBCATALOG DATE AND TIME IS NOT AVAILABLE
  6807. * OR NOT DEFINED, A FILLER "****" IS PLACED IN THE
  6808. * FIELDS TO BE RETURNED.
  6809. #
  6810.  
  6811. #
  6812. **** PROC VLSUBTD - XREF LIST BEGIN.
  6813. #
  6814.  
  6815. XREF
  6816. BEGIN
  6817. PROC CGETPD; # GET PURGE DATE #
  6818. FUNC EDATE C(10); # EDIT DATE FROM PACKED FORMAT #
  6819. FUNC ETIME C(10); # EDIT TIME FROM PACKED FORMAT #
  6820. PROC VLLPDT; # GET LAST PURGE DATE AND TIME #
  6821. END
  6822.  
  6823. #
  6824. **** PROC VLSUBTD - XREF LIST END.
  6825. #
  6826.  
  6827. DEF LISTCON #0#;
  6828. *CALL COMBFAS
  6829. *CALL COMTVLD
  6830.  
  6831. ITEM PDATE I; # DATE/TIME FOR SUBCATALOG #
  6832. ITEM QRADDR I; # TEMPORARY #
  6833.  
  6834. CONTROL EJECT;
  6835.  
  6836. PDATE = 0;
  6837.  
  6838. #
  6839. * IF THE LIVE CATALOG IS ATTACHED AND OPENED, GET THE
  6840. * SUBCATALOG DATE/TIME FROM THE CATALOG ACCESS ROUTINE.
  6841. #
  6842.  
  6843. IF PAR$RF EQ 0
  6844. THEN
  6845. BEGIN
  6846. CGETPD(PAR$FM,SBINDX,SMINDX,PDATE,QRADDR,STAT);
  6847. END
  6848.  
  6849. #
  6850. * OTHERWISE, GET THE SUBCATALOG DATE/TIME FROM THE LIVE
  6851. * CATALOG VIA A REQUEST TO THE *EXEC*.
  6852. #
  6853.  
  6854. ELSE
  6855. BEGIN
  6856. VLLPDT(SBINDX,SMINDX,PDATE);
  6857. END
  6858.  
  6859. IF PDATE EQ 0
  6860. THEN # NO DATE/TIME DEFINED OR
  6861.   AVAILABLE #
  6862. BEGIN
  6863. SCPDATE = " ******** "; # FILL DATE SPACE #
  6864. SCPTIME = " ******** "; # FILL TIME SPACE #
  6865. END
  6866.  
  6867. ELSE # SUBCATALOG LAST PURGED DATE/TIME
  6868.   #
  6869. BEGIN
  6870. SCPDATE = EDATE(B<24,18>PDATE); # EDITED DATE #
  6871. SCPTIME = ETIME(B<42,18>PDATE); # EDITED TIME #
  6872. END
  6873.  
  6874. END # VLSUBTD #
  6875.  
  6876. TERM
  6877. PROC VLTITLE;
  6878. # TITLE VLTITLE - ISSUE REPORT TITLE. #
  6879.  
  6880. BEGIN # VLTITLE #
  6881.  
  6882. #
  6883. ** VLTITLE - ISSUE REPORT TITLES.
  6884. *
  6885. * *VLTITLE* ISSUES THE REPORT FILE TITLE LINE AND, IF THE
  6886. * FAMILY NAME IS DEFINED, ISSUES THE SUB-TITLE LINE.
  6887. *
  6888. * PROC VLTITLE
  6889. *
  6890. * ENTRY (PAR$FM) - FAMILY.
  6891. #
  6892.  
  6893. #
  6894. **** PROC VLTITLE - XREF LIST BEGIN.
  6895. #
  6896.  
  6897. XREF
  6898. BEGIN
  6899. PROC RPLINEX; # PRINTS A REPORT LINE #
  6900. PROC VLBFILL; # BLANK FILL #
  6901. PROC VLSUBHD; # ISSUE REPORT SUBHEADING #
  6902. END
  6903.  
  6904. #
  6905. **** PROC VLTITLE - XREF LIST END.
  6906. #
  6907.  
  6908. DEF LISTCON #0#; # TURN OFF COMDECK LISTINGS #
  6909.  
  6910. *CALL COMBFAS
  6911. *CALL COMTVLD
  6912. *CALL COMTVLF
  6913.  
  6914.  
  6915. #
  6916. * TITLE LINES FOR THE REPORT FILE.
  6917. #
  6918.  
  6919. ARRAY RHDR [0:0] S(8); # TITLE LINE #
  6920. BEGIN
  6921. ITEM RH$LINE C(00,00,80) = ["0"];
  6922. ITEM RH$ID C(00,24,08) = ["SSVAL - "];
  6923. ITEM RH$DESC C(01,12,40) = ["VALIDATION REPORT"];
  6924. ITEM RH$ID2 C(05,36,08) = ["SSVAL - "];
  6925. ITEM RH$VER C(06,24,07) = [VLVER];
  6926. END
  6927.  
  6928. ARRAY RSUBHD [0:0] S(8); # SUB-TITLE LINE #
  6929. BEGIN
  6930. ITEM RS$LINE C(00,00,80) = [" FAMILY ="];
  6931. ITEM RS$FAM C(02,06,07);
  6932. END
  6933. CONTROL EJECT;
  6934.  
  6935. RPLINEX(RPTFADR,RHDR,0,80,EOPL); # ISSUE TITLE LINE #
  6936.  
  6937. #
  6938. * ISSUE THE SUB-TITLE LINE IF THE FAMILY PARAMETER IS DEFINED.
  6939. #
  6940.  
  6941. IF PAR$FM NQ 0
  6942. THEN
  6943. BEGIN
  6944. RS$FAM[0] = PAR$FM;
  6945. VLBFILL(RSUBHD,8);
  6946. RPLINEX(RPTFADR,RSUBHD,0,80,EOPL); # ISSUE SUB-TITLE LINE #
  6947. END
  6948.  
  6949. RPLINEX(RPTFADR,"0",0,1,EOPL); # 2 BLANK LINES #
  6950.  
  6951. RETURN;
  6952. END # VLTITLE #
  6953.  
  6954. TERM
  6955. PROC VLWFIX(TYP);
  6956. # TITLE VLWFIX - WRITE FIX FILE RECORD. #
  6957.  
  6958.  
  6959. BEGIN # VLWFIX #
  6960.  
  6961. #
  6962. ** VLWFIX - WRITE A FIXIT FILE RECORD.
  6963. *
  6964. * WRITE A FIXIT FILE RECORD. FOR SOME RECORD TYPES, THE
  6965. * RECORD DATA IS IN THE *EXTRECORD* ARRAY. FOR OTHER RECORD
  6966. * TYPES, THE RECORD IS BUILT/MODIFIED USING THE ENTRY
  6967. * FIELDS SPECIFIED.
  6968. *
  6969. * PROC VLWFIX(TYP)
  6970. *
  6971. * ENTRY (TYP) - FIXIT FILE RECORD TYPE.
  6972. * (SMINDX) - *SM* (OPTIONAL).
  6973. * (SBINDX) - SUBFAMILY (OPTIONAL).
  6974. * (VTPTR) - INDEX TO CURRENT *VT* ENTRY
  6975. * (OPTIONAL).
  6976. * (ARRAY EXTRECORD) - CURRENT PROBLEM FILE RECORD
  6977. * (OPTIONAL).
  6978. * (ARRAY FIXIT) - FIXIT FILE *FET*.
  6979. * (ARRAY VTENTRY) - CURRENT *VT* ENTRY (OPTIONAL).
  6980. *
  6981. * EXIT A RECORD IS WRITTEN TO THE FIXIT FILE.
  6982. #
  6983.  
  6984. ITEM TYP I; # FIXIT FILE RECORD TYPE #
  6985.  
  6986.  
  6987. #
  6988. **** PROC VLWFIX - XREF LIST BEGIN.
  6989. #
  6990.  
  6991. XREF
  6992. BEGIN
  6993. PROC WRITEW; # INTERFACE TO *WRITEW* MACRO #
  6994. END
  6995.  
  6996. #
  6997. **** PROC VLWFIX - XREF LIST END.
  6998. #
  6999.  
  7000. DEF LISTCON #0#; # TURN OFF COMDECK LISTINGS #
  7001. *CALL COMBFAS
  7002. *CALL COMTVLD
  7003. *CALL COMTVLF
  7004. *CALL COMTVLV
  7005.  
  7006. CONTROL EJECT;
  7007.  
  7008. #
  7009. * BUILD AND WRITE THE FIXIT FILE RECORD. IN MOST CASES
  7010. * THE PROBLEM RECORD IN THE EXTRECORD ARRAY BECOMES THE
  7011. * FIXIT RECORD. BUT FOR SOME RECORD TYPES, ADDITIONAL
  7012. * FIELDS ARE ADDED OR THE WHOLE RECORD IS BUILT.
  7013. #
  7014.  
  7015. FIX$RT[0] = TYP; # RECORD TYPE #
  7016.  
  7017. IF TYP EQ REC"OTHR"
  7018. THEN # ADD THE *VT* ENTRY #
  7019. BEGIN
  7020. FIX$VT[0] = VT$ITEM[VTPTR];
  7021. END
  7022.  
  7023. IF TYP EQ REC"BADORPH" ##
  7024. OR TYP EQ REC"FRAG" ##
  7025. OR TYP EQ REC"BADHOLE" ##
  7026. OR TYP EQ REC"TFORPH"
  7027. THEN # BUILD THE FIXIT RECORD #
  7028. BEGIN
  7029. EXTR$SM[0] = SMINDX;
  7030. EXTR$SB[0] = SBINDX;
  7031. P<VTLINK> = LOC(VTPTR); # TO EXTRACT *FCT* AND AU #
  7032. EXTR$GPT[0] = VTL$GRT[0];
  7033. EXTR$AU[0] = VTL$AU[0];
  7034. FIX$VT[0] = VT$ITEM[VTPTR];
  7035. EXTR$GP[0] = GROUPX;
  7036. EXTR$FCT[0] = EXTR$GP[0] * 16 + EXTR$GPT[0];
  7037. END
  7038.  
  7039. WRITEW(FIXITFILE,EXTRECORD,RLFIX,STAT);
  7040.  
  7041. END # VLWFIX #
  7042.  
  7043. TERM
  7044. PROC VLWPROB(TYP);
  7045. # TITLE VLWPROB - WRITE PROBLEM FILE RECORD. #
  7046.  
  7047.  
  7048. BEGIN # VLWPROB #
  7049.  
  7050. #
  7051. ** VLWPROB - WRITE THE PROBLEM FILE RECORD.
  7052. *
  7053. * WRITE A PROBLEM FILE RECORD. FOR SOME RECORD TYPES, THE
  7054. * RECORD'S DATA IS IN THE *EXTRECORD* ARRAY. FOR OTHER TYPES, THE
  7055. * RECORD IS BUILT / MODIFIED USING THE ENTRY FIELDS SPECIFIED.
  7056. *
  7057. * PROC VLWPROB(TYP)
  7058. *
  7059. * ENTRY (TYP) - RECORD TYPE.
  7060. * (SMINDX) - *SM* (OPTIONAL).
  7061. * (FCTORD) - *FCT* ORDINAL (OPTIONAL).
  7062. * (SBINDX) - SUBFAMILY (OPTIONAL).
  7063. * (CSN) - *CSN* (OPTIONAL).
  7064. * (Y) - Y ORDINAL (OPTIONAL).
  7065. * (Z) - Z ORDINAL (OPTIONAL).
  7066.  
  7067. * (ARRAY SMMAP) - SMMAP ENTRY (OPTIONAL).
  7068. * (ARRAY EXTRECORD) - CURRENT EXTRACT FILE RECORD
  7069. * (ARRAY PROBFILE) - PROBLEM FILE *FET*.
  7070. *
  7071. * EXIT A RECORD IS WRITTEN TO THE PROBLEM FILE.
  7072. *
  7073. #
  7074.  
  7075. ITEM TYP I; # PROBLEM RECORD TYPE #
  7076.  
  7077. #
  7078. **** PROC VLWPROB - XREF LIST BEGIN.
  7079. #
  7080.  
  7081. XREF
  7082. BEGIN
  7083. PROC VLERROR; # ISSUE ERROR MESSAGE #
  7084. PROC WRITEW; # INTERFACE TO *WRITEW* MACRO #
  7085. END
  7086.  
  7087. #
  7088. **** PROC VLWPROB - XREF LIST END.
  7089. #
  7090.  
  7091. DEF LISTCON #0#; # TURN OFF COMMON DECK LISTING #
  7092.  
  7093. *CALL COMBFAS
  7094. *CALL COMBMAP
  7095. *CALL COMTVLD
  7096. *CALL COMTVLF
  7097.  
  7098. CONTROL EJECT;
  7099.  
  7100. #
  7101. * BUILD THE RECORD FOR THE PROBLEM FILE. IN MOST CASES THE
  7102. * EXTRACT FILE RECORD IN THE EXTRECORD ARRAY BECOMES THE
  7103. * PROBLEM FILE RECORD. BUT FOR SOME TYPES, THE WHOLE
  7104. * RECORD MUST BE BUILT.
  7105. #
  7106.  
  7107. PROB$RT[0] = TYP; # RECORD TYPE #
  7108.  
  7109. IF TYP EQ REC"FCT" OR TYP EQ REC"SM"
  7110. THEN # BUILD A PROBLEM FILE RECORD #
  7111. BEGIN
  7112. PROB$Y[0] = Y;
  7113. PROB$Z[0] = Z;
  7114. PROB$CSN[0] = CSN;
  7115. EXTR$FCT[0] = FCTORD;
  7116. EXTR$SB[0] = SBINDX;
  7117. EXTR$SM[0] = SMINDX;
  7118. PROB$SM0[0] = CM$WRD1[0];
  7119. PROB$SM1[0] = CM$WRD2[0];
  7120. PROB$SM2[0] = CM$WRD3[0];
  7121. END
  7122.  
  7123.  
  7124. WRITEW(PROBFILE,EXTRECORD,RLPROB,STAT);
  7125.  
  7126. END # VLWPROB #
  7127.  
  7128. TERM
1)
ERNUM),(ABTFLG
2)
FLD),(CONVTYP),(SIZE
cdc/nos2.source/opl871/ssval.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator