User Tools

Site Tools


cdc:nos2.source:opl871:ssdebug
1)
REQCODE),RESPCODE)
  • [00405] DBCALL1 - ISSUES A TYPE 1 UCP CALL TO EXEC.
  • [00410] DBCALL1 - ISSUES A TYPE 1 UCP CALL TO EXEC.
  • [00436] PROC CALLSS
  • [00480] PROC DBCALL3((REQCODE),MAPENT,(FCTORD),(CATFLD),(CATVALUE),RESPCODE)
    • [00481] DBCALL3 - ISSUES TYPE 3 UCP CALL TO EXEC.
    • [00486] DBCALL3 - ISSUES TYPE 3 UCP CALL TO EXEC.
    • [00537] PROC CALLSS
    • [00538] PROC MESSAGE
    • [00539] PROC RESTPFP
    • [00649] PROC DBCALL4((REQCODE),(Y),(Z),(SL),(SH),(FAMLY),(UI),RESPCODE)
      • [00650] DBCALL4 - ISSUES A TYPE 4 UCP REQUEST TO EXEC.
      • [00655] DBCALL4 - ISSUES A TYPE 4 UCP REQUEST TO EXEC.
      • [00704] PROC CALLSS
      • [00705] PROC MESSAGE
      • [00706] PROC RESTPFP
      • [00817] PROC DBCMAP
      • [00818] DBCMAP - REMOVE SMMAP ENTRY.
      • [00823] DBCMAP - REMOVE SMMAP ENTRY.
      • [00849] PROC DBCALL3
      • [00850] PROC DBCALL4
      • [00851] PROC DBERR
      • [00852] PROC DBRESP
      • [00853] PROC MCLOSE
      • [00854] PROC MESSAGE
      • [00855] PROC MGETENT
      • [00856] PROC RESTPFP
      • [00980] PROC DBCONV(FLAG)
      • [00981] DBCONV - CONVERTS CRACKED PARAMETERS TO INTEGERS.
      • [00986] DBCONV - CONVERTS CRACKED PARAMETERS TO INTEGERS.
      • [01013] FUNC XDXB I
      • [01264] PROC DBERR(ERRCODE)
      • [01265] DBERR - ERROR PROCESSOR.
      • [01270] DBERR - ERROR PROCESSOR.
      • [01308] PROC BZFILL
      • [01309] PROC MESSAGE
      • [01310] PROC RESTPFP
      • [01312] PROC RPCLOSE
      • [01313] PROC RPLINE
      • [01314] PROC RPSPACE
      • [01315] FUNC XCDD C(10)
      • [01555] PROC DBFLAG
      • [01556] DBFLAG - SET OR CLEAR SPECIFIED FLAGS.
      • [01561] DBFLAG - SET OR CLEAR SPECIFIED FLAGS.
      • [01586] PROC CCLOSE
      • [01587] PROC CGETFCT
      • [01588] PROC DBCALL3
      • [01589] PROC DBERR
      • [01590] PROC DBRESP
      • [01591] PROC DBVSN
      • [01592] PROC MCLOSE
      • [01593] PROC MGETENT
      • [01594] PROC MESSAGE
      • [01595] PROC RESTPFP
      • [01779] PROC DBFMAP
      • [01780] DBFMAP - REMOVE *FCT* ENTRY.
      • [01785] DBFMAP - REMOVE *FCT* ENTRY.
      • [01810] PROC CCLOSE
      • [01811] PROC CGETFCT
      • [01812] PROC DBCALL3
      • [01813] PROC DBERR
      • [01814] PROC DBRESP
      • [01885] PROC DBHEAD((FETP
      2)
      ARGLIST),ERRFLAG)
      • [01936] DBLOOP - CRACK AND SYNTAX CHECK *SSDEBUG* DIRECTIVES.
      • [01941] DBLOOP - CRACK AND SYNTAX CHECK *SSDEBUG* DIRECTIVES.
      • [01981] PROC BZFILL
      • [01982] PROC DBCONV
      • [01983] PROC DBERR
      • [01984] PROC DBOPT
      • [01985] PROC LOFPROC
      • [01986] PROC MESSAGE
      • [01987] PROC READC
      • [01988] PROC RESTPFP
      • [01990] PROC RETERN
      • [01991] PROC REWIND
      • [01992] PROC RPLINE
      • [01993] PROC RPSPACE
      • [01994] PROC WRITER
      • [01995] PROC WRITEW
      • [01996] PROC XARG
      • [01997] FUNC XCDD C(10)
      • [01998] PROC ZFILL
      • [01999] PROC ZSETFET
      • [02208] PROC DBMAIN
      • [02209] DBMAIN - PROCESS *SSDEBUG* DIRECTIVES.
      • [02214] DBMAIN - PROCESS *SSDEBUG* DIRECTIVES.
      • [02243] PROC COPEN
      • [02244] PROC DBCMAP
      • [02246] PROC DBFLAG
      • [02247] PROC DBFMAP
      • [02249] PROC DBRDFIL
      • [02250] PROC DBRDSTM
      • [02251] PROC DBREL
      • [02253] PROC DBRESP
      • [02254] PROC LOFPROC
      • [02255] PROC MESSAGE
      • [02256] PROC MOPEN
      • [02257] PROC READ
      • [02258] PROC READW
      • [02259] PROC RESTPFP
      • [02261] PROC RETERN
      • [02262] PROC RPLINE
      • [02263] PROC RPSPACE
      • [02264] PROC SETPFP
      • [02265] PROC SSINIT
      • [02266] FUNC XCOD C(10)
      • [02502] PROC DBOPT(FLAG)
      • [02503] DBOPT - CHECKS CRACKED PARAMETERS FOR VALID OPTIONS.
      • [02508] DBOPT - CHECKS CRACKED PARAMETERS FOR VALID OPTIONS.
      • [02555] PROC DBERR
      • [02857] PROC DBRDFIL
      • [02858] DBRDFIL - PROCESS READ FILE DIRECTIVE.
      • [02863] DBRDFIL - PROCESS READ FILE DIRECTIVE.
      • [02896] PROC CCLOSE
      • [02897] PROC CGETFCT
      • [02898] PROC DBCALL4
      • [02899] PROC DBERR
      • [02900] PROC DBRESP
      • [02901] PROC MESSAGE
      • [02902] PROC PFD
      • [02903] PROC RESTPFP
      • [02905] PROC RETERN
      • [02906] PROC SETPFP
      • [02907] PROC ZSETFET
      • [03192] PROC DBRDSTM
      • [03193] DBRDSTM - PROCESS READ AU DIRECTIVE.
      • [03198] DBRDSTM - PROCESS READ AU DIRECTIVE.
      • [03226] PROC DBCALL4
      • [03227] PROC DBERR
      • [03228] PROC DBRESP
      • [03229] PROC DBVSN
      • [03230] PROC MCLOSE
      • [03231] PROC MESSAGE
      • [03232] PROC PFD
      • [03233] PROC RESTPFP
      • [03235] PROC RETERN
      • [03236] PROC SETPFP
      • [03237] PROC ZSETFET
      • [03369] PROC DBREL
      • [03370] DBREL - RELEASE PROBLEM CHAIN AND CLEAR FLAGS.
      • [03375] DBREL - RELEASE PROBLEM CHAIN AND CLEAR FLAGS.
      • [03400] PROC CCLOSE
      • [03401] PROC CGETFCT
      • [03402] PROC DBCALL3
      • [03403] PROC DBERR
      • [03404] PROC DBRESP
      • [03476] PROC DBRESP((RESPCODE),(REQTYPE
      3)

      SSDEBUG

      Table Of Contents

      • [00001] PRGM SSDEBUG
      • [00002] SSDEBUG - INITIALIZES *SSDEBUG* UTILITY.
      • [00007] INITIALIZES *SSDEBUG* UTILITY.
      • [00200] PROC ABORT
      • [00201] PROC BZFILL
      • [00202] PROC DBCALL1
      • [00203] PROC DBERR
      • [00204] PROC DBHEAD
      • [00205] PROC DBLOOP
      • [00207] PROC DBMAIN
      • [00208] PROC DBTAB
      • [00209] PROC GETFAM
      • [00211] PROC GETPFP
      • [00212] PROC GETSPS
      • [00213] PROC MESSAGE
      • [00214] PROC READ
      • [00215] PROC RESTPFP
      • [00217] PROC RPCLOSE
      • [00218] PROC RPLINE
      • [00219] PROC RPOPEN
      • [00220] PROC RPSPACE
      • [00221] PROC XARG
      • [00222] PROC XZAP
      • [00223] PROC ZSETFET
      • [00404] PROC DBCALL11)
      • [01886] DBHEAD - PRINT HEADER LINE ON THE REPORT.
      • [01891] DBHEAD - PRINT HEADER LINE ON THE REPORT.
      • [01911] PROC RPLINEX
      • [01935] PROC DBLOOP2) [03477] DBRESP - PROCESS RESPONSE FROM EXEC. [03482] DBRESP - PROCESS RESPONSE FROM EXEC. [03507] PROC DBERR [03508] PROC MESSAGE [03509] PROC RESTPFP [03761] PROC DBVSN(Y,Z,MAPENT,FLAG) [03762] DBVSN - SEARCH SMMAP FOR THE CSN. [03767] DBVSN - SEARCH SMMAP FOR CSN. [03799] PROC MESSAGE [03800] PROC MGETENT [03801] PROC RESTPFP </WRAP> === Source Code ===
        SSDEBUG.txt
        1. PRGM SSDEBUG;
        2. # TITLE SSDEBUG - INITIALIZES *SSDEBUG* UTILITY. #
        3.  
        4. BEGIN # SSDEBUG #
        5.  
        6. #
        7. *** SSDEBUG - INITIALIZES *SSDEBUG* UTILITY.
        8. *
        9. * THIS PRGM INITIALIZES *SSDEBUG* UTILITY BY
        10. * CRACKING THE CONTROL CARD AND CHECKING THE
        11. * SYNTAX OF THE PARAMETERS.
        12. *
        13. * SSDEBUG,I,L=REPORT.
        14. *
        15. * PRGM SSDEBUG.
        16. *
        17. * ENTRY. INPUTS TO SSDEBUG ARE -
        18. *
        19. * CM CARTRIDGE MANUFACTURER CODE IS *A *,
        20. * INDICATING *IBM *.
        21. *
        22. * CM = A CARTRIDGE MANUFACTURE CODE IS *A *,
        23. * INDICATING *IBM *.
        24. *
        25. * CM OMITTED CARTRIDGE MANUFACTURER CODE IS *A *,
        26. * INDICATING *IBM *.
        27. *
        28. * CM = ANYTHING ELSE IS CURRENTLY ILLEGAL.
        29. *
        30. * CN NOT PERMITTED.
        31. *
        32. * CN = CSN DIGIT PORTION OF CARTRIDGE SERIAL NUMBER
        33. * IS *CSN*.
        34. *
        35. * CN OMITTED FOR OP=RS, ONE AND ONE OF THE FOLLOWING
        36. * MUST BE SPECIFIED: *YI* OR *CN*.
        37. * FOR OP=CF, ONE AND ONLY ONE OF THE FOLLOWING
        38. * MUST BE SPECIFIED: *FO*, *YI*, OR *CN*.
        39. *
        40. * I SOURCE OF DIRECTIVES IS ON FILE
        41. * *INPUT*.
        42. * I = LFN SOURCE OF DIRECTIVES IS ON FILE
        43. * *LFN*.
        44. * I OMITTED SOURCE OF DIRECTIVES IS ON FILE
        45. * *INPUT*.
        46. *
        47. * Z SOURCE OF DIRECTIVES IS ON THE
        48. * CONTROL CARD.
        49. *
        50. * L LISTABLE OUTPUT ON FILE *OUTPUT*.
        51. * L = LFN LISTABLE OUTPUT ON FILE *LFN*.
        52. * L = 0 NO OUTPUT FILE GENERATED.
        53. * L OMITTED SAME AS *L*.
        54. *
        55. * *SSDEBUG* DIRECTIVE OPTIONS ARE-
        56. * OP NOT PERMITTED.
        57. * OP = XX WHERE *XX* IS THE DIRECTIVE TO BE PROCESSED.
        58. * *XX* MAY BE ONE OF THE FOLLOWING.
        59. * *RS*--READ SELECTED RAW AU.
        60. * *RF*--READ SELECTED RAW FILES.
        61. * *RP*--RELEASE SPACE FOR PROBLEM CHAINS.
        62. * *RL*--REMOVE FCT ENTRY NOT LINKED PROPERLY
        63. * TO THE SMMAP.
        64. * *RC*--REMOVE SMMAP ENTRY WHERE THERE IS NO
        65. * CORRESPONDING FCT ENTRY.
        66. * *CF*--CHANGE FLAG IN SFMCAT OR SMMAP.
        67. * OP OMITTED NOT PERMITTED.
        68. *
        69. * PF USE PERMANENT FILE NAME *MMMMBUG* FOR
        70. * RAW MSF IMAGE.
        71. * PF = PFN USE PERMANENT FILE NAME *PFN* FOR RAW
        72. * MSF IMAGE.
        73. * PF OMITTED SAME AS *PF*.
        74. * *NOTE* - *PF* IS ONLY USED WITH OP=RS
        75. * OR OP=RF. THE PERMANENT FILE-S FAMILY
        76. * AND USER INDEX WILL BE TAKEN FROM THE
        77. * USER-S CURRENT PERMANENT FILE PARAMETERS.
        78. *
        79. * FO NOT PERMITTED.
        80. * FO = N *FCT* ORDINAL.
        81. * FO OMITTED MUST BE SPECIFIED FOR OP=RF, OP=RP, AND
        82. * OP=RL.
        83. * FOR OP=CF, ONE AND ONLY ONE OF THE FOLLOWING
        84. * MUST BE SPECIFIED: *FO* , *YI* , OR *CN*.
        85. *
        86. * ST NOT PERMITTED.
        87. * ST = N AU NUMBER. FOR OP=RF AND OP=RP, *N* IS
        88. * THE STARTING AU OF A FILE OR FRAGMENT.
        89. * FOR OP=CF, *N* IS THE AU NUMBER OF AN
        90. * *FCT* FLAG TO BE CHANGED, AND TAKES PRIORITY
        91. * OVER THE RANGE OF AU INDICATED BY THE
        92. * *SL* AND *SU* PARAMETERS. AU NUMBERS
        93. * ARE MEANINGFUL WITH OP=CF ONLY FOR AU
        94. * DETAIL FLAGS (FL=SF, FL=FC, OR FL=SC).
        95. * ST OMITTED MUST BE SPECIFIED FOR OP=RF AND OP=RP.
        96. * FOR OP=CF, VALUES OF *SL* AND *SU* ARE USED.
        97. *
        98. * FM USE DEFAULT FAMILY.
        99. * FM = FAM PROCESS THE FAMILY *FAM*.
        100. * FM OMITTED SAME AS *FM*.
        101. *
        102. * SB NOT PERMITTED.
        103. * SB = SUB SELECT A SUBFAMILY *SUB*.
        104. * SB OMITTED NOT PERMITTED.
        105. *
        106. * SM USE A
        107. * SM = N USE SM *N* WHERE *N* IS A LETTER FROM
        108. * A TO H.
        109. * SM OMITTED SAME AS *SM*.
        110. *
        111. * SL COPY, OR CHANGE FLAGS FOR, AU 1
        112. * THROUGH *SU* (FROM THE *SU* PARAMETER).
        113. * SL = Z COPY, OR CHANGE FLAGS FOR, AU *Z*
        114. * THROUGH *SU* (FROM THE *SU* PARAMETER).
        115. * SL OMITTED SAME AS *SL*.
        116. *
        117. * SU COPY, OR CHANGE FLAGS FOR, AU *SL*
        118. * (FROM THE *SL* PARAMETER) THROUGH 1.
        119. * SU = J COPY, OR CHANGE FLAGS FOR, AU *SL*
        120. * (FROM THE *SL* PARAMETER) THROUGH *J*.
        121. * SU OMITTED SAME AS *SU*.
        122. * *NOTE* - *SL* AND *SU* MUST BE IN
        123. * THE RANGE 1 THROUGH 1931. *SL* MUST BE
        124. * LESS THAN OR EQUAL TO *SU*.
        125. * FOR OP=CF, IF *ST* IS SPECIFIED, THEN
        126. * *SL* AND *SU* ARE NOT USED.
        127. *
        128. * FL NOT PERMITTED.
        129. * FL = XX SET OR CLEAR FLAG *XX* IN SMMAP OR MSF
        130. * CATALOG (VALID ONLY FOR OP=CF). *XX* MUST
        131. * BE ONE OF THE FOLLOWING -
        132. * *ME* - LINKAGE ERROR FLAG (IN SMMAP).
        133. * *FE* - LINKAGE ERROR FLAG (IN MSF CATALOG
        134. * *FCT*).
        135. * *IB* - INHIBIT ALLOCATION FLAG.
        136. * *LC* - LOST CARTRIDGE FLAG.
        137. * *EW* - EXCESSIVE WRITE PARITY ERROR FLAG.
        138. * *SF* - START OF FRAGMENT FLAG.
        139. * *FC* - FROZEN CHAIN FLAG.
        140. * *AC* - AU CONFLICT FLAG.
        141. * FL OMITTED *FL* MUST BE SPECIFIED FOR OP=CF.
        142. *
        143. * ON FLAG SPECIFIED BY *FL* IS TO BE SET
        144. * (VALID ONLY FOR OP=CF).
        145. * OF FLAG SPECIFIED BY *FL* IS TO BE CLEARED
        146. * (VALID ONLY FOR OP=CF).
        147. *
        148. * YI NOT PERMITTED.
        149. * YI = N USE *N* AS THE Y COORDINATE WHERE
        150. * *N* IS FROM 0 TO 21.
        151. * *NOTE* - THERE ARE NO CUBES ON THE
        152. * COLUMN Z=6.
        153. * *ZI* MUST BE SPECIFIED WHEN *YI*=N
        154. * IS USED.
        155. * YI OMITTED FOR OP=RS, ONE AND ONLY ONE OF THE FOLLOWING
        156. * MUST BE SPECIFIED: *YI* OR *CN*.
        157. * FOR OP=CF, ONE AND ONLY ONE OF THE FOLLOWING
        158. * MUST BE SPECIFIED: *FO*, *YI*, OR *CN*.
        159. * *YI* AND *ZI* ARE REQUIRED FOR OP=RC.
        160. *
        161. * ZI NOT PERMITTED.
        162. * ZI = N USE *N* AS THE ZI COORDINATE WHERE
        163. * *N* IS FROM 0 TO 15.
        164. * *YI* MUST BE SPECIFIED WHEN *ZI*=N
        165. * IS USED.
        166. * ZI OMITTED *ZI* MUST BE SPECIFIED IF *YI* IS USED.
        167. * *YI* AND *ZI* ARE REQUIRED FOR OP=RC.
        168. *
        169. * EXIT. *SSDEBUG* DIRECTIVES WERE PROCESSED OR AN
        170. * ERROR CONDITION WAS ENCOUNTERED.
        171. *
        172. * MESSAGES. SSDEBUG COMPLETE.
        173. * SSDEBUG - MUST BE SYSTEM ORIGIN.
        174. * UNABLE TO CONNECT WITH EXEC.
        175. *
        176. * NOTES. PRGM *SSDEBUG* INITIALIZES THE *SSDEBUG*
        177. * UTILITY. *SSDEBUG* IS A DIRECTIVE
        178. * ORIENTED UTILITY. THE DIRECTIVES CAN
        179. * BE SPECIFIED ON THE CONTROL CARD OR VIA
        180. * A FILE. THE CONTROL CARD IS CRACKED AND
        181. * THE DIRECTIVES ARE READ INTO A BUFFER.
        182. * PROC *DBLOOP* IS CALLED TO CRACK AND
        183. * SYNTAX CHECK EACH DIRECTIVE. THE CRACKED
        184. * DIRECTIVES ARE WRITTEN TO A SCRATCH FILE.
        185. * ANY ERROR IN THE DIRECTIVES CAUSES *SSDEBUG*
        186. * TO ABORT. IF THERE ARE NO ERRORS IN THE
        187. * DIRECTIVES, A CONNECT IS SET UP WITH EXEC.
        188. * PROC *DBMAIN* IS CALLED TO PROCESS EACH
        189. * DIRECTIVE. A DISCONNECT IS DONE WITH EXEC
        190. * AFTER ALL THE DIRECTIVES HAVE BEEN PROCESSED
        191. * SUCCESSFULLY.
        192. #
        193.  
        194. #
        195. **** PRGM SSDEBUG - XREF LIST BEGIN.
        196. #
        197.  
        198. XREF
        199. BEGIN
        200. PROC ABORT; # CALLS *ABORT* MACRO #
        201. PROC BZFILL; # BLANK/ZERO FILLS A BUFFER #
        202. PROC DBCALL1; # ISSUES TYPE 1 REQUESTS TO EXEC #
        203. PROC DBERR; # ERROR PROCESSOR #
        204. PROC DBHEAD; # WRITES HEADER LINE #
        205. PROC DBLOOP; # CRACKS AND SYNTAX CHECKS
        206.   DIRECTIVES #
        207. PROC DBMAIN; # PROCESSES EACH DIRECTIVE #
        208. PROC DBTAB; # SETS UP ARGUMENT LIST #
        209. PROC GETFAM; # GETS DEFAULT FAMILY AND SUB
        210.   SYSTEM ID #
        211. PROC GETPFP; # GET USER-S FAMILY AND UI #
        212. PROC GETSPS; # GET SYSTEM ORIGIN STATUS #
        213. PROC MESSAGE; # DISPLAYS MESSAGES #
        214. PROC READ; # READS A FILE #
        215. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        216.   OR RETURN #
        217. PROC RPCLOSE; # CLOSES REPORT FILE #
        218. PROC RPLINE; # WRITES A REPORT LINE #
        219. PROC RPOPEN; # OPENS REPORT FILE #
        220. PROC RPSPACE; # WRITES A BLANK LINE #
        221. PROC XARG; # CRACK PARAMETER LIST #
        222. PROC XZAP; # *Z* ARGUMENT PROCESSOR #
        223. PROC ZSETFET; # INITIALIZES A FET #
        224. END
        225.  
        226. #
        227. **** PRGM SSDEBUG - XREF LIST END.
        228. #
        229.  
        230. DEF RSLEN #1#; # RETURN STATUS WORD LENGTH #
        231. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        232.  
        233. CONTROL PRESET;
        234. *CALL COMBFAS
        235. *CALL COMBBZF
        236. *CALL COMBCMD
        237. *CALL COMBCPR
        238. *CALL COMBPFP
        239. *CALL COMBUCR
        240. *CALL COMSPFM
        241. *CALL COMTDBG
        242. *CALL COMTDBP
        243. *CALL COMTDER
        244. *CALL COMTFMT
        245. *CALL COMTOUT
        246.  
        247. ITEM ARGLIST U; # FWA OF ARGUMENT TABLE #
        248. ITEM BUFP U; # FWA OF *CIO* BUFFER #
        249. ITEM DEFORD I; # DEFAULT FAMILY ORDINAL #
        250. ITEM ERRFLAG B; # ERROR FLAG #
        251. ITEM FETP U; # FWA OF FET #
        252. ITEM FLAG I; # ERROR FLAG #
        253. ITEM LFN C(7); # FILE NAME #
        254. ITEM LNKORD I; # LINKED FAMILY ORDINAL #
        255. ITEM NUM I; # NUMBER OF FAMILIES #
        256. ITEM RESPCODE U; # RESPONSE CODE FROM EXEC #
        257.  
        258. ARRAY CALL$SS [0:0] P(CPRLEN);; # CALLSS REQUEST BLOCK #
        259. ARRAY OUTFET [0:0] S(SFETL);; # FET FOR OUTPUT FILE #
        260. BASED
        261. ARRAY RA [0:0];; # TO ACCESS CONTROL CARD AREA #
        262. ARRAY SPSSTAT [0:0] S(RSLEN);
        263. BEGIN
        264. ITEM SPS$STATUS U(00,48,12); # RETURN STATUS #
        265. END
        266.  
        267. CONTROL EJECT;
        268.  
        269. GETSPS(SPSSTAT); # GET SYSTEM ORIGIN STATUS #
        270. IF SPS$STATUS NQ 0
        271. THEN
        272. BEGIN
        273. DBMSG$LN[0] = " SSDEBUG - MUST BE SYSTEM ORIGIN.";
        274. MESSAGE(DBMSG[0],SYSUDF1);
        275. ABORT;
        276. END
        277.  
        278. DBREQID = REQNAME"RQIDBUG"; # SET REQUESTOR ID #
        279.  
        280. #
        281. * SAVE THE USER-S PERMANENT FILE PARAMETERS.
        282. #
        283.  
        284. GETPFP(PFP[0]);
        285. USER$FAM[0] = PFP$FAM[0];
        286. USER$UI[0] = PFP$UI[0];
        287. USER$PACK[0] = PFP$PACK[0];
        288.  
        289. #
        290. * CRACK THE CONTROL CARD.
        291. #
        292.  
        293. DBTAB(ARGLIST); # SET UP ARGUMENT TABLE #
        294. XARG(ARGLIST,0,FLAG);
        295. IF FLAG NQ OK
        296. THEN # PROCESS SYNTAX ERROR #
        297. BEGIN
        298. DBERRCODE = S"DSYNT$CRD";
        299. OUT$FETP = 0;
        300. DBERR(DBERRCODE);
        301. END
        302.  
        303. #
        304. * READ THE DIRECTIVES.
        305. #
        306.  
        307. FETP = LOC(DB$FET[0]);
        308. BUFP = LOC(DB$CBUF[0]);
        309. LFN = DBARG$I[0];
        310. ZSETFET(FETP,LFN,BUFP,DBUFL,SFETL);
        311.  
        312. IF DBARG$Z[0] NQ 0
        313. THEN # *Z* OPTION SPECIFIED #
        314. BEGIN
        315. XZAP(DB$FET[0]);
        316. END
        317.  
        318. ELSE
        319. BEGIN
        320. READ(DB$FET[0],RCL); # READ DIRECTIVE FILE #
        321. END
        322.  
        323. #
        324. * SET UP THE OUTPUT FILE.
        325. #
        326.  
        327. IF DBARG$WL[0] EQ 0
        328. THEN # NO OUTPUT FILE SPECIFIED #
        329. BEGIN
        330. OUT$FETP = 0;
        331. END
        332.  
        333. ELSE # OUTPUT FILE IS SPECIFIED #
        334. BEGIN
        335. OUT$FETP = LOC(OUTFET[0]);
        336. END
        337.  
        338. RPOPEN(DBARG$L[0],OUT$FETP,DBHEAD); # OPEN OUTPUT FILE #
        339.  
        340. #
        341. * WRITE THE CONTROL CARD IMAGE TO THE OUTPUT FILE.
        342. #
        343.  
        344. P<RA>= 0;
        345. BZFILL(RA[O"70"],TYPFILL"BFILL",80);
        346. RPLINE(OUT$FETP,RA[O"70"],2,80,0);
        347. RPSPACE(OUT$FETP,SP"SPACE",1);
        348.  
        349. #
        350. * CRACK AND SYNTAX CHECK THE DIRECTIVES.
        351. #
        352.  
        353. DBLOOP(ARGLIST,ERRFLAG);
        354. IF ERRFLAG
        355. THEN # SYNTAX ERROR IN DIRECTIVES #
        356. BEGIN
        357. DBERRCODE = S"DSYNT$CRD";
        358. DBERR(DBERRCODE);
        359. END
        360.  
        361. #
        362. * GET THE DEFAULT FAMILY AND SUBSYSTEM ID.
        363. #
        364.  
        365. DBSSID = ATAS;
        366. GETFAM(FAMT,NUM,LNKORD,DEFORD,DBSSID);
        367. DEF$FAM = FAM$NAME[DEFORD];
        368.  
        369. #
        370. * CONNECT TO EXEC.
        371. #
        372.  
        373. P<CPR> = LOC(CALL$SS[0]);
        374. DBCALL1(REQTYP1"CONNECT",RESPCODE);
        375. IF RESPCODE NQ OK
        376. THEN
        377. BEGIN
        378. DBMSG$LN[0] = " UNABLE TO CONNECT WITH EXEC.";
        379. MESSAGE(DBMSG[0],SYSUDF1);
        380. RPCLOSE(OUT$FETP); # CLOSE OUTPUT FILE #
        381. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        382. END
        383.  
        384. #
        385. * PROCESS EACH DIRECTIVE.
        386. #
        387.  
        388. DBMAIN;
        389.  
        390. #
        391. * DISCONNECT FROM EXEC.
        392. #
        393.  
        394. DBCALL1(REQTYP1"DISCONNECT",RESPCODE);
        395.  
        396. RPCLOSE(OUT$FETP);
        397. DBMSG$LN[0] = " SSDEBUG COMPLETE."; # END WITH DAYFILE MESSAGE #
        398. MESSAGE(DBMSG[0],UDFL1);
        399. RESTPFP(PFP$END); # RESTORE USER-S *PFP* #
        400.  
        401. END # SSDEBUG #
        402.  
        403. TERM
        404. PROC DBCALL1((REQCODE),RESPCODE);
        405. # TITLE DBCALL1 - ISSUES A TYPE 1 UCP CALL TO EXEC. #
        406.  
        407. BEGIN # DBCALL1 #
        408.  
        409. #
        410. ** DBCALL1 - ISSUES A TYPE 1 UCP CALL TO EXEC.
        411. *
        412. * PROC DBCALL1((REQCODE),RESPCODE)
        413. *
        414. * ENTRY (REQCODE) = REQUEST CODE.
        415. * (DBREQID) = REQUESTOR ID.
        416. * (DBSSID) = SUBSYSTEM ID.
        417. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        418. *
        419. * EXIT (RESPCODE) = RESPONSE FROM EXEC.
        420. *
        421. * NOTES THE CALLSS PARAMETER BLOCK IS SET UP FOR
        422. * A TYPE 1 REQUEST AND THE REQUEST IS ISSUED
        423. * TO EXEC. TYPE 1 REQUESTS ARE THE UCP
        424. * LINKAGE REQUESTS, CONNECT AND DISCONNECT.
        425. #
        426.  
        427. ITEM REQCODE I; # REQUEST CODE #
        428. ITEM RESPCODE I; # RESPONSE FROM EXEC #
        429.  
        430. #
        431. **** PROC DBCALL1 - XREF LIST BEGIN.
        432. #
        433.  
        434. XREF
        435. BEGIN
        436. PROC CALLSS; # ISSUES A UCP/SCP REQUEST #
        437. END
        438.  
        439. #
        440. **** PRDC DBCALL1 - XREF LIST END.
        441. #
        442.  
        443. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        444. *CALL COMBFAS
        445. *CALL COMBCPR
        446. *CALL COMTDBG
        447.  
        448. ITEM I I; # LOOP INDUCTION VARIABLE #
        449.  
        450. CONTROL EJECT;
        451.  
        452. #
        453. * SET UP THE PARAMETER BLOCK.
        454. #
        455.  
        456. FASTFOR I = 0 STEP 1 UNTIL CPRLEN-1
        457. DO
        458. BEGIN
        459. CPR1[I] = 0; # ZERO FILL PARAMETER BLOCK #
        460. END
        461.  
        462. CPR$RQT[0] = TYP"TYP1";
        463. CPR$RQC[0] = REQCODE;
        464. CPR$RQI[0] = DBREQID;
        465. CPR$SSPFLG[0] = TRUE;
        466. CPR$WC[0] = TYP1$WC;
        467.  
        468. #
        469. * ISSUE THE CALL.
        470. #
        471.  
        472. CALLSS(DBSSID,CPR[0],RCL);
        473. RESPCODE = CPR$ES[0];
        474.  
        475. RETURN;
        476.  
        477. END # DBCALL1 #
        478.  
        479. TERM
        480. PROC DBCALL3((REQCODE),MAPENT,(FCTORD),(CATFLD),(CATVALUE),RESPCODE);
        481. # TITLE DBCALL3 - ISSUES TYPE 3 UCP CALL TO EXEC. #
        482.  
        483. BEGIN # DBCALL3 #
        484.  
        485. #
        486. ** DBCALL3 - ISSUES TYPE 3 UCP CALL TO EXEC.
        487. *
        488. * PROC DBCALL3((REQCODE),MAPENT,(FCTORD),(CATFLD),(CATVALUE),
        489. * RESPCODE)
        490. *
        491. * ENTRY (REQCODE) = REQUEST CODE.
        492. * (MAPENT) = UPDATED SMMAP ENTRY.
        493. * (FCTORD) = *FCT* ORDINAL.
        494. * (CATFLD) = CATALOG FIELD TO BE UPDATED.
        495. * (CATVALUE) = NEW VALUE FOR UPDATED CATALOG FIELD.
        496. * (DBREQID) = REQUESTOR ID.
        497. * (DBSSID) = SUBSYSTEM ID.
        498. * (DBARG$FM) = FAMILY NAME.
        499. * (DBARG$SB) = SUBFAMILY IDENTIFIER.
        500. * (DBARG$SMID) = SM IDENTIFIER.
        501. * (DBARG$Y) = Y COORDINATE.
        502. * (DBARG$Z) = Z COORDINATE.
        503. * (DBARG$ST) = STARTING AU NUMBER.
        504. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        505. *
        506. * EXIT (RESPCODE) = RESPONSE FROM EXEC.
        507. *
        508. * MESSAGES SSDEBUG ABNORMAL, DBCALL3.
        509.  
        510. * NOTES THE PARAMETER BLOCK IS SET UP FOR A TYPE 3
        511. * REQUEST AND THE REQUEST IS ISSUED TO EXEC.
        512. * TYPE 3 REQUESTS ARE THE REQUESTS TO MODIFY
        513. * MSF CATALOGS AND MAPS. THE SPECIFIC REQUEST
        514. * ISSUED DEPENDS ON THE REQUEST CODE. PARAMETERS
        515. * NOT NEEDED FOR THE REQUEST ARE IGNORED. THE
        516. * RESPONSE CODE FROM EXEC IS RETURNED TO THE
        517. * CALLING PROC.
        518. #
        519.  
        520. ITEM REQCODE I; # REQUEST CODE #
        521. ARRAY MAPENT [0:0] P(3); # SMMAP ENTRY #
        522. BEGIN
        523. ITEM MAPENTRY C(00,00,30); # 3 WORD SMMAP ENTRY #
        524. END
        525.  
        526. ITEM FCTORD I; # *FCT* ORDINAL #
        527. ITEM CATFLD I; # CATALOG FIELD TO BE UPDATED #
        528. ITEM CATVALUE I; # CATALOG VALUE FOR UPDATE #
        529. ITEM RESPCODE I; # RESPONSE FROM EXEC #
        530.  
        531. #
        532. **** PROC DBCALL3 - XREF LIST BEGIN.
        533. #
        534.  
        535. XREF
        536. BEGIN
        537. PROC CALLSS; # ISSUES A UCP/SCP REQUEST #
        538. PROC MESSAGE; # DISPLAYS MESSAGES #
        539. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        540.   OR RETURN #
        541. END
        542.  
        543. #
        544. **** PROC DBCALL3 - XREF LIST END.
        545. #
        546.  
        547. DEF PROCNAME #"DBCALL3."#; # PROC NAME #
        548.  
        549. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        550. *CALL COMBFAS
        551. *CALL COMBCPR
        552. *CALL COMTDBG
        553. *CALL COMTDBP
        554.  
        555. ITEM COMPLETE B; # COMPLETION STATUS #
        556. ITEM I I; # LOOP INDUCTION VARIABLE #
        557.  
        558. SWITCH CALL3ACT: REQTYP3 # TYPE 3 REQUESTS #
        559. UPDCAT: UPD$CAT, # UPDATE CATALOG FIELD #
        560. UPDMAP: UPD$MAP, # UPDATE SMMAP ENTRY #
        561. PURGFRAG: PURG$FRAG, # PURGE FRAGMENT #
        562. PURGFCT: PURG$FCT; # PURGE *FCT* ENTRY #
        563.  
        564. CONTROL EJECT;
        565.  
        566. #
        567. * CHECK FOR A VALID REQUEST CODE.
        568. #
        569.  
        570. IF REQCODE LS REQTYP3"UPD$CAT"
        571. OR REQCODE GR REQTYP3"PURG$FCT" ##
        572. OR REQCODE EQ REQTYP3"REL$SETUP"
        573. THEN # ILLEGAL REQUEST CODE #
        574. BEGIN
        575. DBMSG$PROC[0] = PROCNAME;
        576. MESSAGE(DBMSG[0],SYSUDF1);
        577. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        578. END
        579.  
        580. #
        581. * SET UP THE FIELDS COMMON TO ALL THE REQUESTS.
        582. #
        583.  
        584. FASTFOR I = 0 STEP 1 UNTIL CPRLEN-1
        585. DO
        586. BEGIN
        587. CPR1[I] = 0; # ZERO FILL PARAMETER BLOCK #
        588. END
        589.  
        590. CPR$RQT[0] = TYP"TYP3";
        591. CPR$RQC[0] = REQCODE;
        592. CPR$RQI[0] = DBREQID;
        593. CPR$FAM[0] = DBARG$FM[0];
        594. CPR$SUB[0] = DBARG$SB[0];
        595. CPR$CSU[0] = DBARG$SMID[0];
        596. CPR$WC[0] = TYP3$WC;
        597.  
        598. #
        599. * SET UP THE FIELDS NEEDED FOR SPECIFIC REQUESTS.
        600. #
        601.  
        602. GOTO CALL3ACT[REQCODE];
        603.  
        604. UPDCAT: # UPDATE CATALOG ENTRY #
        605. CPR$FCT[0] = FCTORD;
        606. CPR$AU[0] = DBARG$ST[0];
        607. CPR$FLD[0] = CATFLD;
        608. CPR$VAL[0] = CATVALUE;
        609. GOTO ISSUECALL;
        610.  
        611. UPDMAP: # UPDATE SMMAP ENTRY #
        612. CPR$Y[0] = DBARG$YI[0];
        613. CPR$Z[0] = DBARG$ZI[0];
        614. CPR$MAPENT[0] = MAPENTRY[0];
        615. GOTO ISSUECALL;
        616.  
        617. PURGFRAG: # PURGE FRAGMENT #
        618. CPR$FCT[0] = FCTORD;
        619. CPR$AU[0] = DBARG$ST[0];
        620. GOTO ISSUECALL;
        621.  
        622. PURGFCT: # PURGE *FCT* ENTRY #
        623. CPR$FCT[0] = FCTORD;
        624. GOTO ISSUECALL;
        625.  
        626. ISSUECALL: # ISSUE REQUEST TO EXEC #
        627. COMPLETE = FALSE;
        628. REPEAT WHILE NOT COMPLETE
        629. DO
        630. BEGIN
        631. CALLSS(DBSSID,CPR[0],RCL);
        632. IF CPR$RQR[0] NQ RESPTYP3"RESUB$REQ"
        633. THEN # REQUEST COMPLETE #
        634. BEGIN
        635. COMPLETE = TRUE;
        636. TEST DUMMY;
        637. END
        638.  
        639. CPR$RQR[0] = 0; # RESUBMIT THE REQUEST #
        640. CPR$C[0] = FALSE;
        641. END
        642.  
        643. RESPCODE = CPR$RQR[0];
        644. RETURN;
        645.  
        646. END # DBCALL3 #
        647.  
        648. TERM
        649. PROC DBCALL4((REQCODE),(Y),(Z),(SL),(SH),(FAMLY),(UI),RESPCODE);
        650. # TITLE DBCALL4 - ISSUES A TYPE 4 UCP REQUEST TO EXEC. #
        651.  
        652. BEGIN # DBCALL4 #
        653.  
        654. #
        655. ** DBCALL4 - ISSUES A TYPE 4 UCP REQUEST TO EXEC.
        656. *
        657. * PROC DBCALL4((REQCODE),(Y),(Z),(STRM),(FAMLY),(UI),RESPCODE)
        658. *
        659. * ENTRY (REQCODE) = REQUEST CODE.
        660. * (Y) = Y COORDINATE.
        661. * (Z) = Z COORDINATE.
        662. * (SL) = STRIPE LOW.
        663. * (SH) = STRIPE HIGH.
        664. * (FAMLY) = USER-S FAMILY NAME.
        665. * (UI) = USER INDEX.
        666. * (DBREQID) = REQUESTOR ID.
        667. * (TRNSPORT) = TRANSPORT ID.
        668. * (ADDRSENSE) = FWA OF BUFFER TO HOLD SENSE BYTES.
        669. * (DBARG$SMID) = SM ID.
        670. * (DBARG$PF) = FILE NAME TO WHICH DATA IS WRITTEN.
        671. * P<CPR> = FWA OF PARAMETER BLOCK.
        672. *
        673. * EXIT (RESPCODE) = RESPONSE FROM EXEC.
        674. * (CPR$DRD) = TRANSPORT ID (ONLY FOR LOAD CARTRIDGE
        675. * REQUEST).
        676. * (ADDRSENSE) = FWA OF BUFFER CONTAINING SENSE BYTES
        677. * (ONLY FOR GET DRAWER STATUS REQUEST).
        678. *
        679. * MESSAGES SSDEBUG ABNORMAL, DBCALL4.
        680. *
        681. * NOTES THE PARAMETER BLOCK IS SET UP FOR A TYPE 4
        682. * UCP REQUEST AND THE REQUEST IS ISSUED TO EXEC.
        683. * TYPE 4 REQUESTS ARE THE REQUESTS THAT REQUIRE
        684. * SM OR MST ACTIONS PERFORMED. PARAMETERS NOT
        685. * NEEDED FOR THE REQUEST ARE IGNORED. THE RESPONSE
        686. * CODE FROM EXEC IS RETURNED TO THE CALLING PROC.
        687. #
        688.  
        689. ITEM REQCODE I; # REQUEST CODE #
        690. ITEM Y I; # Y COORDINATE #
        691. ITEM Z I; # Z COORDINATE #
        692. ITEM SL I; # STRIPE LOW #
        693. ITEM SH I; # STRIPE HIGH #
        694. ITEM FAMLY C(7); # USER-S FAMILY NAME #
        695. ITEM UI U; # USER INDEX #
        696. ITEM RESPCODE I; # RESPONSE CODE FROM EXEC #
        697.  
        698. #
        699. **** PROC DBCALL4 - XREF LIST BEGIN.
        700. #
        701.  
        702. XREF
        703. BEGIN
        704. PROC CALLSS; # ISSUES A UCP/SCP REQUEST #
        705. PROC MESSAGE; # DISPLAYS MESSAGES #
        706. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        707.   OR RETURN #
        708. END
        709.  
        710. #
        711. **** PROC DBCALL4 - XREF LIST END.
        712. #
        713.  
        714. DEF PROCNAME #"DBCALL4."#; # PROC NAME #
        715.  
        716. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        717. *CALL COMBFAS
        718. *CALL COMBCPR
        719. *CALL,COMBLBL
        720. *CALL COMTDBG
        721. *CALL COMTDBP
        722. *CALL,COMTLAB
        723.  
        724. ITEM I I; # LOOP INDUCTION VARIABLE #
        725.  
        726. #
        727. * ARRAY TO HOLD CARTRIDGE LABEL.
        728. #
        729.  
        730. ARRAY CARTLABEL[0:0]S(LABLEN);;
        731.  
        732. SWITCH CALL4ACT: REQTYP4 # TYPE 4 REQUESTS #
        733. LOADCART: LOAD$CART, # LOAD CARTRIDGE #
        734. UNLDCART: UNLD$CART, # UNLOAD CARTRIDGE #
        735. WRITELAB: WRT$LAB, # WRITE CARTRIDGE LABEL #
        736. CPRAWSTR: CP$RAW$AU; # COPY RAW AU #
        737.  
        738. CONTROL EJECT;
        739.  
        740. #
        741. * CHECK FOR A VALID REQUEST CODE.
        742. #
        743.  
        744. IF REQCODE NQ REQTYP4"LOAD$CART" ##
        745. AND REQCODE NQ REQTYP4"UNLD$CART" ##
        746. AND REQCODE NQ REQTYP4"CP$RAW$AU" ##
        747. AND REQCODE NQ REQTYP4"WRT$LAB"
        748. THEN # ILLEGAL REQUEST CODE #
        749. BEGIN
        750. DBMSG$PROC[0] = PROCNAME;
        751. MESSAGE(DBMSG[0],SYSUDF1);
        752. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        753. END
        754.  
        755. #
        756. * SET UP THE FIELDS COMMON TO ALL REQUESTS.
        757. #
        758.  
        759. FASTFOR I = 0 STEP 1 UNTIL CPRLEN-1
        760. DO
        761. BEGIN
        762. CPR1[I] = 0; # ZERO FILL PARAMETER BLOCK #
        763. END
        764.  
        765. CPR$RQT[0] = TYP"TYP4";
        766. CPR$RQC[0] = REQCODE;
        767. CPR$RQI[0] = DBREQID;
        768. CPR$CSU[0] = DBARG$SMID[0];
        769. CPR$WC[0] = TYP4$WC;
        770.  
        771. #
        772. * SET UP THE FIELDS FOR SPECIFIC REQUESTS.
        773. #
        774.  
        775. GOTO CALL4ACT[REQCODE];
        776.  
        777. LOADCART: # LOAD CARTRIDGE FROM Y,Z #
        778. CPR$Y[0] = Y;
        779. CPR$Z[0] = Z;
        780. CPR$ADDR2[0] = LOC(CARTLABEL[0]);
        781. GOTO ISSUECALL;
        782.  
        783. UNLDCART: # UNLOAD CARTRIDGE TO Y,Z #
        784. CPR$Y[0] = Y;
        785. CPR$Z[0] = Z;
        786. CPR$DRD[0] = TRNSPORT;
        787. GOTO ISSUECALL;
        788.  
        789. CPRAWSTR: # COPY RAW AU #
        790. CPR$Y[0] = Y;
        791. CPR$Z[0] = Z;
        792. CPR$DRD[0] = TRNSPORT;
        793. CPR$ST$LW = SL;
        794. CPR$ST$HI = SH;
        795. CPR$FAM[0] = FAMLY;
        796. CPR$PFN[0] = DBARG$PF[0];
        797. CPR$UI[0] = UI;
        798. GOTO ISSUECALL;
        799.  
        800. WRITELAB:
        801. CPR$Y[0] = Y;
        802. CPR$Z[0] = Z;
        803. CPR$ADDR2[0] = LOC(CARTLABEL[0]);
        804. P<LABEL$CART> = LOC(CARTLABEL[0]);
        805. LAB$CARTTP[0] = LABTYPE"SCR$LAB";
        806. LAB$SMID[0] = " ";
        807. LAB$FMLY[0] = " ";
        808. GOTO ISSUECALL;
        809. ISSUECALL: # ISSUE REQUEST TO EXEC #
        810. CALLSS(DBSSID,CPR[0],RCL);
        811. RESPCODE = CPR$RQR[0];
        812. RETURN;
        813.  
        814. END # DBCALL4 #
        815.  
        816. TERM
        817. PROC DBCMAP;
        818. # TITLE DBCMAP - REMOVE SMMAP ENTRY. #
        819.  
        820. BEGIN # DBCMAP #
        821.  
        822. #
        823. ** DBCMAP - REMOVE SMMAP ENTRY.
        824. *
        825. * PROC DBCMAP.
        826. *
        827. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        828. * ARE SET UP IN THE COMMON AREA DEFINED IN *COMTDBP*.
        829. * THE SMMAP IS OPEN FOR THE SPECIFIED SM.
        830. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        831. *
        832. * EXIT THE DIRECTIVE WAS PROCESSED AND MAP WAS
        833. * CLOSED OR AN ERROR CONDITION WAS DETECTED.
        834. *
        835. * MESSAGES SSDEBUG ABNORMAL, DBCMAP.
        836. *
        837. * NOTES THE SELECTED SMMAP ENTRY IS CHECKED FOR THE
        838. * ERROR FLAG. IF SET, THE CARTRIDGE FROM THAT
        839. * LOCATION IS MOVED TO THE OUTPUT DRAWER AND THE
        840. * SMMAP ENTRY IS UPDATED TO BE EMPTY AND UNASSIGNED.
        841. #
        842.  
        843. #
        844. **** PROC DBCMAP - XREF LIST BEGIN.
        845. #
        846.  
        847. XREF
        848. BEGIN
        849. PROC DBCALL3; # ISSUES A TYPE 3 UCP REQUEST #
        850. PROC DBCALL4; # ISSUES A TYPE 4 UCP REQUEST #
        851. PROC DBERR; # ERROR PROCESSOR #
        852. PROC DBRESP; # PROCESS RESPONSE FROM EXEC #
        853. PROC MCLOSE; # CLOSES SMMAP #
        854. PROC MESSAGE; # DISPLAYS MESSAGES #
        855. PROC MGETENT; # GET SMMAP ENTRY #
        856. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        857.   OR RETURN #
        858. END
        859.  
        860. #
        861. **** PROC DBCMAP - XREF LIST END.
        862. #
        863.  
        864. DEF PROCNAME #"DBCMAP."#; # PROC NAME #
        865.  
        866. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        867. *CALL COMBFAS
        868. *CALL COMBCPR
        869. *CALL COMBCMS
        870. *CALL COMBMAP
        871. *CALL COMTDBG
        872. *CALL COMTDBP
        873. *CALL COMTDER
        874. *CALL COMTLAB
        875.  
        876. ITEM CMAPADR I; # FWA OF MAP ENTRY #
        877. ITEM FLAG I; # ERROR STATUS #
        878. ITEM ORD I; # SMMAP ENTRY ORDINAL #
        879. ITEM RESPCODE I; # RESPONSE FROM EXEC #
        880. ITEM UNLOAD B; # UNLOAD REQUIRED FLAG #
        881. ITEM Y I; # Y COORDINATE #
        882. ITEM Z I; # Z COORDINATE #
        883.  
        884. ARRAY CMAPENT [0:0] P(MAPENTL);; # SMMAP ENTRY #
        885.  
        886. CONTROL EJECT;
        887.  
        888. #
        889. * CHECK THE SMMAP ENTRY FOR THE ERROR FLAG.
        890. #
        891.  
        892. CMAPADR = LOC(CMAPENT[0]);
        893. ORD = MAXORD - DBARG$ZI[0] - ( DBARG$YI[0]*16 );
        894. MGETENT(DBARG$SMID[0],ORD,CMAPADR,FLAG);
        895. IF FLAG NQ CMASTAT"NOERR"
        896. THEN # ABNORMAL TERMINATION #
        897. BEGIN
        898. DBMSG$PROC[0] = PROCNAME;
        899. MESSAGE(DBMSG[0],SYSUDF1);
        900. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        901. END
        902.  
        903. P<SMUMAP> = CMAPADR;
        904. IF NOT CM$FLAG1[0]
        905. THEN # SMMAP ERROR FLAG NOT SET #
        906. BEGIN
        907. DBERRCODE = S"DMAP$NSET";
        908. DBERR(DBERRCODE);
        909. RETURN;
        910. END
        911.  
        912. #
        913. * UPDATE THE SMMAP ENTRY TO BE EMPTY AND UNASSIGNED.
        914. #
        915.  
        916. UNLOAD = CM$CSND[0] NQ ""; # SET FLAG IF UNLOAD REQUIRED #
        917. CM$CODE[0] = CUBSTAT"UNASGN";
        918. CM$TCSN[0] = " ";
        919. CM$FMLYNM[0] = " ";
        920. CM$SUB[0] = 0;
        921. CM$FCTORD[0] = 0;
        922. CM$FLAG1[0] = FALSE;
        923. DBCALL3(REQTYP3"UPD$MAP",CMAPENT[0],0,0,0,RESPCODE);
        924. IF RESPCODE NQ RESPTYP3"OK3"
        925. THEN # UNABLE TO UPDATE ENTRY #
        926. BEGIN
        927. DBRESP(RESPCODE,TYP"TYP3");
        928. RETURN;
        929. END
        930.  
        931. MCLOSE(DBARG$SMID[0],FLAG);
        932. IF FLAG NQ CMASTAT"NOERR"
        933. THEN # UNABLE TO CLOSE MAP #
        934. BEGIN
        935. DBRESP(FLAG,0);
        936. END
        937.  
        938. #
        939. * MOVE THE CARTRIDGE TO THE OUTPUT DRAWER.
        940. #
        941.  
        942. IF UNLOAD
        943. THEN
        944. BEGIN # MOVE CARTRIDGE TO OUTPUT DRAWER #
        945. DBCALL4(REQTYP4"LOAD$CART",DBARG$YI[0],DBARG$ZI[0],0,0,0,0,
        946. RESPCODE);
        947. IF RESPCODE EQ RESPTYP4"CELL$EMP"
        948. THEN # EMPTY CUBE #
        949. BEGIN
        950. DBERRCODE = S"DEMPTYCUBE";
        951. DBERR(DBERRCODE); # ISSUE INFORMATIVE MESSAGE #
        952. RETURN;
        953. END
        954.  
        955. IF RESPCODE NQ RESPTYP4"OK4"
        956. THEN # OTHER ERROR ON LOAD #
        957. BEGIN
        958. DBRESP(RESPCODE,TYP"TYP4");
        959. RETURN;
        960. END
        961.  
        962. TRNSPORT = CPR$DRD[0]; # SET UP TRANSPORT ID #
        963. Z = 0;
        964. Y = SM$EXIT$TY; # SET EXIT TRAY #
        965. DBCALL4(REQTYP4"WRT$LAB",Y,Z,0,0,0,0,RESPCODE);
        966. IF RESPCODE NQ RESPTYP4"OK4"
        967. THEN # *CHANGE* FAILS #
        968. BEGIN
        969. DBRESP(RESPCODE,TYP"TYP4");
        970. RETURN;
        971. END
        972.  
        973. END # MOVE CARTRIDGE TO OUTPUT DRAWER #
        974.  
        975. RETURN;
        976.  
        977. END # DBCMAP #
        978.  
        979. TERM
        980. PROC DBCONV(FLAG);
        981. # TITLE DBCONV - CONVERTS CRACKED PARAMETERS TO INTEGERS. #
        982.  
        983. BEGIN # DBCONV #
        984.  
        985. #
        986. ** DBCONV - CONVERTS CRACKED PARAMETERS TO INTEGERS.
        987. *
        988. * PROC DBCONV(FLAG)
        989. *
        990. * ENTRY THE CRACKED PARAMETERS ARE SET UP IN THE COMMON AREA
        991. * DEFINED IN *COMTDBP*.
        992. *
        993. * EXIT THE CRACKED PARAMETERS ARE CONVERTED OR REPLACED
        994. * BY DEFAULT VALUES AND PLACED BACK IN THE SAME
        995. * COMMON AREA.
        996. * (FLAG) = 0, NO ERROR.
        997. * 1, CONVERSION ERROR.
        998. *
        999. * NOTES THE PARAMETERS ARE CONVERTED FROM DISPLAY
        1000. * CODE TO INTEGER VALUES OR ARE REPLACED BY
        1001. * DEFAULT VALUES. THE CONVERTED PARAMETERS
        1002. * ARE PLACED BACK IN THEIR ORIGINAL LOCATIONS.
        1003. #
        1004.  
        1005. ITEM FLAG I; # ERROR FLAG #
        1006.  
        1007. #
        1008. **** PROC DBCONV - XREF LIST BEGIN.
        1009. #
        1010.  
        1011. XREF
        1012. BEGIN
        1013. FUNC XDXB I; # DISPLAY TO INTEGER CONVERSION #
        1014. END
        1015.  
        1016. #
        1017. **** PROC DBCONV - XREF LIST END.
        1018. #
        1019.  
        1020. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1021. *CALL COMBFAS
        1022. *CALL COMBCPR
        1023. *CALL COMTDBG
        1024. *CALL COMTDBP
        1025.  
        1026. ITEM TEMP I; # TEMPORARY ITEM #
        1027.  
        1028. CONTROL EJECT;
        1029.  
        1030. FLAG = 0; # INITIALIZE #
        1031.  
        1032. #
        1033. * CHECK THE VALUE OF *SB*.
        1034. #
        1035.  
        1036. IF DBARG$SB[0] EQ 0
        1037. THEN # *SB* OMITTED #
        1038. BEGIN
        1039. DBARG$SB[0] = -2;
        1040. END
        1041.  
        1042. ELSE
        1043. BEGIN
        1044. IF DBARG$SB[0] NQ -1
        1045. THEN
        1046. BEGIN # CONVERT *SB* #
        1047. FLAG = XDXB(DBARG$SB[0],1,TEMP);
        1048. IF FLAG NQ OK
        1049. THEN # CONVERSION ERROR #
        1050. BEGIN
        1051. RETURN;
        1052. END
        1053.  
        1054. DBARG$SB[0] = TEMP;
        1055. END # CONVERT *SB* #
        1056.  
        1057. END
        1058.  
        1059. #
        1060. * CHECK THE VALUE OF *SM*.
        1061. #
        1062.  
        1063. IF DBARG$SM[0] EQ 0
        1064. THEN
        1065. BEGIN
        1066. DBARG$SM[0] = "A"; # USE DEFAULT VALUE #
        1067. END
        1068.  
        1069. #
        1070. * CHECK THE VALUE OF *SL*.
        1071. #
        1072.  
        1073. IF DBARG$SL[0] NQ 0
        1074. THEN
        1075. BEGIN # CONVERT *SL* #
        1076. FLAG = XDXB(DBARG$SL[0],1,TEMP);
        1077. IF FLAG NQ OK
        1078. THEN # CONVERSION ERROR #
        1079. BEGIN
        1080. RETURN;
        1081. END
        1082.  
        1083. DBARG$SL[0] = TEMP;
        1084. END # CONVERT *SL* #
        1085.  
        1086. ELSE # USE DEFAULT VALUE #
        1087. BEGIN
        1088. DBARG$SL[0] = 1;
        1089. END
        1090.  
        1091. #
        1092. * CHECK THE VALUE OF *SU*.
        1093. #
        1094.  
        1095. IF DBARG$SU[0] NQ 0
        1096. THEN
        1097. BEGIN # CONVERT *SU* #
        1098. FLAG = XDXB(DBARG$SU[0],1,TEMP);
        1099. IF FLAG NQ OK
        1100. THEN # CONVERSION ERROR #
        1101. BEGIN
        1102. RETURN;
        1103. END
        1104.  
        1105. DBARG$SU[0] = TEMP;
        1106. END # CONVERT *SU* #
        1107.  
        1108. ELSE # USE DEFAULT VALUE #
        1109. BEGIN
        1110. DBARG$SU[0] = 1;
        1111. END
        1112.  
        1113. #
        1114. * CHECK THE VALUE OF *D*.
        1115. #
        1116.  
        1117. IF DBARG$D[0] EQ 0
        1118. THEN # *D* OMITTED #
        1119. BEGIN
        1120. DBARG$D[0] = -2;
        1121. END
        1122.  
        1123. ELSE
        1124. BEGIN
        1125. IF DBARG$D[0] NQ -1
        1126. THEN
        1127. BEGIN # CONVERT *D* #
        1128. FLAG = XDXB(DBARG$D[0],1,TEMP);
        1129. IF FLAG NQ OK
        1130. THEN # CONVERSION ERROR #
        1131. BEGIN
        1132. RETURN;
        1133. END
        1134.  
        1135. DBARG$D[0] = TEMP;
        1136. END # CONVERT *D* #
        1137.  
        1138. END
        1139.  
        1140. #
        1141. * CHECK THE VALUE OF *YI*.
        1142. #
        1143.  
        1144. IF DBARG$YI[0] EQ 0
        1145. THEN # *YI* OMITTED #
        1146. BEGIN
        1147. DBARG$YI[0] = -1;
        1148. END
        1149.  
        1150. ELSE # *YI* SPECIFIED #
        1151. BEGIN
        1152. IF DBARG$YI[0] NQ O"7777"
        1153. THEN
        1154. BEGIN # CONVERT *YI* #
        1155. FLAG = XDXB(DBARG$YI[0],1,TEMP);
        1156. IF FLAG NQ OK
        1157. THEN # CONVERSION ERROR #
        1158. BEGIN
        1159. RETURN;
        1160. END
        1161.  
        1162. DBARG$YI[0] = TEMP;
        1163. END # CONVERT *YI* #
        1164.  
        1165. END
        1166.  
        1167. #
        1168. * CHECK THE VALUE OF *ZI*.
        1169. #
        1170.  
        1171. IF DBARG$ZI[0] EQ 0
        1172. THEN # *ZI* OMITTED #
        1173. BEGIN
        1174. DBARG$ZI[0] = -1;
        1175. END
        1176.  
        1177. ELSE # *ZI* SPECIFIED #
        1178. BEGIN
        1179. IF DBARG$ZI[0] NQ O"7777"
        1180. THEN
        1181. BEGIN # CONVERT *ZI* #
        1182. FLAG = XDXB(DBARG$ZI[0],1,TEMP);
        1183. IF FLAG NQ OK
        1184. THEN
        1185. BEGIN
        1186. RETURN;
        1187. END
        1188.  
        1189. DBARG$ZI[0] = TEMP;
        1190. END # CONVERT *ZI* #
        1191.  
        1192. END
        1193.  
        1194. #
        1195. * CHECK THE VALUE OF *PF*.
        1196. #
        1197.  
        1198. IF DBARG$WPF[0] EQ 0
        1199. THEN
        1200. BEGIN
        1201. DBARG$PF[0] = "MMMMBUG"; # USE DEFAULT VALUE #
        1202. END
        1203.  
        1204. #
        1205. * CHECK THE VALUE OF *FO*.
        1206. #
        1207.  
        1208. IF DBARG$FO[0] EQ 0
        1209. THEN # *FO* OMITTED #
        1210. BEGIN
        1211. DBARG$FO[0] = -2;
        1212. END
        1213.  
        1214. ELSE # *FO* SPECIFIED #
        1215. BEGIN
        1216. IF DBARG$FO[0] NQ -1
        1217. THEN
        1218. BEGIN # CONVERT *FO* #
        1219. FLAG = XDXB(DBARG$FO[0],1,TEMP);
        1220. IF FLAG NQ OK
        1221. THEN # CONVERSION ERROR #
        1222. BEGIN
        1223. RETURN;
        1224. END
        1225.  
        1226. DBARG$FO[0] = TEMP;
        1227. END # CONVERT *FO* #
        1228.  
        1229. END
        1230.  
        1231. #
        1232. * CHECK THE VALUE OF *ST*.
        1233. #
        1234.  
        1235. IF DBARG$ST[0] EQ 0
        1236. THEN # *ST* OMITTED #
        1237. BEGIN
        1238. DBARG$ST[0] = -2;
        1239. END
        1240.  
        1241. ELSE # *ST* SPECIFIED #
        1242. BEGIN
        1243. IF DBARG$ST[0] NQ -1
        1244. THEN
        1245. BEGIN # CONVERT *ST* #
        1246. FLAG = XDXB(DBARG$ST[0],1,TEMP);
        1247. IF FLAG NQ OK
        1248. THEN # CONVERSION ERROR #
        1249. BEGIN
        1250. RETURN;
        1251. END
        1252.  
        1253. DBARG$ST[0] = TEMP;
        1254. END # CONVERT *ST* #
        1255.  
        1256. END
        1257.  
        1258. RETURN;
        1259.  
        1260. END # DBCONV #
        1261.  
        1262. TERM
        1263.  
        1264. PROC DBERR(ERRCODE);
        1265. # TITLE DBERR - ERROR PROCESSOR. #
        1266.  
        1267. BEGIN # DBERR #
        1268.  
        1269. #
        1270. ** DBERR - ERROR PROCESSOR.
        1271. *
        1272. * PROC DBERR(ERRCODE)
        1273. *
        1274. * ENTRY (ERRCODE) = ERROR CODE.
        1275. * (OUT$FETP) = FWA OF FET FOR OUTPUT FILE.
        1276. * (DBARG$PF) = PERMANENT FILE NAME.
        1277. * (DBARG$DIRN) = DIRECTIVE NUMBER IN DISPLAY CODE.
        1278. *
        1279. * EXIT ERROR PROCESSING DONE. DEPENDING ON THE
        1280. * ERROR CODE EITHER *SSDEBUG* IS TERMINATED
        1281. * OR CONTROL IS RETURNED BACK TO THE CALLING
        1282. * PROC.
        1283. *
        1284. * MESSAGES SSDEBUG ABNORMAL, DBERR.
        1285. * SEE ARRAY *ERRMSG* FOR THE DAYFILE MESSAGES
        1286. * PRINTED OUT.
        1287. *
        1288. * NOTES *DBERR* IS A TABLE DRIVEN ERROR PROCESSOR. A
        1289. * TABLE HAS BEEN PRESET WITH THE ERROR MESSAGES
        1290. * WHICH CORRESPOND TO THE ERROR STATUS LIST SET
        1291. * UP IN *COMTDER*. THE ERROR CODE CORRESPONDS
        1292. * TO THE ORDINAL OF THE CORRESPONDING ENTRY IN
        1293. * THE TABLE. THE ACTION TO BE TAKEN FOR THE
        1294. * ERROR CODE HAS BEEN PRESET AS STATUS VALUES
        1295. * IN THE CORRESPONDING ENTRY IN THE TABLE. THE
        1296. * ERROR MESSAGE IS PRINTED OUT IN THE DAYFILE
        1297. * AND THE REPORT FILE.
        1298. #
        1299.  
        1300. ITEM ERRCODE I; # ERROR CODE #
        1301.  
        1302. #
        1303. **** PROC DBERR - XREF LIST BEGIN.
        1304. #
        1305.  
        1306. XREF
        1307. BEGIN
        1308. PROC BZFILL; # BLANK/ZERO FILL A BUFFER #
        1309. PROC MESSAGE; # DISPLAYS MESSAGE #
        1310. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        1311.   OR RETURN #
        1312. PROC RPCLOSE; # CLOSE OUTPUT FILE #
        1313. PROC RPLINE; # PRINTS A REPORT LINE #
        1314. PROC RPSPACE; # PRINTS A BLANK LINE #
        1315. FUNC XCDD C(10); # CONVERTS TO DISPLAY CODE #
        1316. END
        1317.  
        1318. #
        1319. **** PROC DBERR - XREF LIST END.
        1320. #
        1321.  
        1322. DEF PROCNAME #"DBERR."#; # PROC NAME #
        1323.  
        1324. STATUS ACTION # ACTION TO BE TAKEN #
        1325. MSG, # DISPLAY DAYFILE/REPORT MESSAGE #
        1326. MSGDTL, # DISPLAY DETAILED MESSAGE #
        1327. RETRN, # RETURN TO CALLING PROC #
        1328. ABRT, # ABORT PROCESSING #
        1329. LSTACT; # END OF STATUS LIST #
        1330.  
        1331. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1332. *CALL COMBFAS
        1333. *CALL COMBBZF
        1334. *CALL COMBCPR
        1335. *CALL COMTDBG
        1336. *CALL COMTDBP
        1337. *CALL COMTDER
        1338. *CALL COMTOUT
        1339.  
        1340. ITEM DIS$ERR C(20); # ERROR CODE IN DISPLAY #
        1341. ITEM FNAME C(7); # FILE NAME #
        1342. ITEM I I; # LOOP INDUCTION VARIABLE #
        1343. ITEM STAT I; # STATUS VALUE #
        1344.  
        1345. #
        1346. * ARRAYS FOR DISPLAZING DAYFILE MESSAGES.
        1347. #
        1348.  
        1349. ARRAY DAYMSG [0:0] P(5); # ERROR MESSAGE #
        1350. BEGIN
        1351. ITEM DAY$MSGTXT C(00,00,40); # MESSAGE TEXT #
        1352. ITEM DAY$MSGFIL C(01,48,07); # FILE NAME #
        1353. ITEM DAY$MSGTRM U(04,00,60) = [0]; # ZERO BYTE TERMINATOR #
        1354. END
        1355.  
        1356. ARRAY DIRNUM [0:0] P(2); # DIRECTIVE NUMBER #
        1357. BEGIN
        1358. ITEM DIR$MSG C(00,00,11) = [" DIRECTIVE "];
        1359. ITEM DIR$NO C(01,06,03); # DIRECTIVE NUMBER #
        1360. ITEM DIR$PRD C(01,24,01) = ["."]; # ENDING PERIOD #
        1361. ITEM DIR$TRM U(01,30,30) = [0]; # ZERO BYTE TERMINATOR #
        1362. END
        1363.  
        1364. ARRAY ERRNUM [0:0] P(3); # ERROR NUMBER #
        1365. BEGIN
        1366. ITEM ERR$TXT C(00,00,15) = [" SSDEBUG ERROR "];
        1367. ITEM ERR$NUM C(01,30,03); # ERROR NUMBER #
        1368. ITEM ERR$PRD C(01,48,02) = [". "]; # ENDING PERIOD #
        1369. ITEM ERR$TRM U(02,00,60) = [0]; # ZERO BYTE TERMINATOR #
        1370. END
        1371.  
        1372. #
        1373. * ARRAY PRESET WITH THE ERROR MESSAGES AND THE STATUS
        1374. * VALUES REPRESENTING THE ACTION TO BE TAKEN ON AN ERROR
        1375. * CODE.
        1376. #
        1377.  
        1378. ARRAY ERRMSG [0:DBCODEMAX] S(5);
        1379. BEGIN
        1380. ITEM ERR$MSG C(00,00,38) = [
        1381. " SYNTAX ERROR, SSDEBUG ABORT.",
        1382. " SYNTAX ERROR IN DIRECTIVE.",
        1383. " ILLEGAL DIRECTIVE.",
        1384. " FO NOT SPECIFIED CORRECTLY.",
        1385. " ST NOT SPECIFIED CORRECTLY.",
        1386. " ILLEGAL SUBFAMILY.",
        1387. " ILLEGAL SM.",
        1388. " ILLEGAL SL.",
        1389. " ILLEGAL SU.",
        1390. # CSN OPTION VIOLATED.#,
        1391. # CN OR YI OPTION VIOLATED.#,
        1392. # CN, FO, OR YI OPTION VIOLATED.#,
        1393. " FL OPTION VIOLATED.",
        1394. " ON,OF OPTION VIOLATED.",
        1395. " ILLEGAL D.",
        1396. " YI,ZI OPTION VIOLATED.",
        1397. " CUBE EMPTY - SMMAP ENTRY REMOVED.",
        1398. " UNABLE TO DEFINE .",
        1399. " ATTACH ERROR ON .",
        1400. # CSN NOT FOUND.#,
        1401. # CSN OR Y-Z NOT IN SUBFAMILY.#,
        1402. " NON FROZEN FRAGMENT.",
        1403. " FROZEN CHAIN.",
        1404. " SMMAP ERROR FLAG NOT SET IN FCT.",
        1405. " ERROR FLAG NOT SET IN SMMAP.",
        1406. " CATALOG/MAP INTERLOCKED.",
        1407. " PERMANENT FILE PROBLEM.",
        1408. " NO SUCH SUBCATALOG.",
        1409. " FCT ORDINAL OUT OF RANGE.",
        1410. " CATALOG/MAP NOT OPEN.",
        1411. " CARTRIDGE NOT FOUND.",
        1412. " MSF SYSTEM ERROR.",
        1413. " MSF HARDWARE PROBLEM.",
        1414. " DISK FILE ERROR.",
        1415. " ONLY PART OF CARTRIDGE LABEL MATCHED.",
        1416. " CARTRIDGE IN USE.",
        1417. " SPECIFIED CELL EMPTY.",
        1418. " NO CARTRIDGE LABEL MATCH.",
        1419. " UNRECOVERABLE READ ERROR.",
        1420. " VOLUME HEADER ERROR.",
        1421. " DISK FULL.",
        1422. " STORAGE MODULE OFF."] ;
        1423. ITEM ERR$MTRM U(03,48,12) = [0,DBCODEMAX(0)];
        1424. # ZERO BYTE TERMINATOR #
        1425. ITEM ERR$STATW U(04,00,60); # ACTION TO BE TAKEN #
        1426.  
        1427. #
        1428. * STATUS VALUES REPRESENTING TYPE OF MESSAGE TO
        1429. * BE PRINTED.
        1430. #
        1431.  
        1432. ITEM ERR$STAT1 S: ACTION (04,00,06) = [ 17(S"MSG"),
        1433. 2(S"MSGDTL"),
        1434. 23(S"MSG")];
        1435.  
        1436. #
        1437. * STATUS VALUES REPRESENTING TYPE OF ACTION TO BE
        1438. * TAKEN AFTER PRINTING THE MESSAGE.
        1439. #
        1440.  
        1441. ITEM ERR$STAT2 S: ACTION (04,06,06) = [ S"ABRT",
        1442. 16(S"RETRN"),
        1443. 25(S"ABRT")];
        1444. END
        1445.  
        1446. CONTROL EJECT;
        1447.  
        1448. #
        1449. * CHECK FOR A LEGAL ERRCODE.
        1450. #
        1451.  
        1452. IF ERRCODE LS 0 OR ERRCODE GR DBCODEMAX
        1453. THEN # ILLEGAL ERROR CODE #
        1454. BEGIN
        1455. DBMSG$PROC[0] = PROCNAME;
        1456. MESSAGE(DBMSG[0],SYSUDF1);
        1457. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        1458. END
        1459.  
        1460. #
        1461. * SET UP THE DIRECTIVE NUMBER AND ERROR CODE
        1462. * FOR DISPLAY.
        1463. #
        1464.  
        1465. DIR$NO[0] = DBARG$DIRN[0];
        1466. DIS$ERR = XCDD(ERRCODE);
        1467. ERR$NUM = C<7,3>DIS$ERR;
        1468.  
        1469. #
        1470. * DO THE CORRESPONDING PROCESSING FOR THE
        1471. * ERROR CODE.
        1472. #
        1473.  
        1474. IF ERRCODE NQ DERRLIST"DSYNT$CRD"
        1475. THEN
        1476. BEGIN # DISPLAY MESSAGE HEADER #
        1477. IF ERR$STAT2[ERRCODE] EQ S"ABRT"
        1478. THEN # SEND MESSAGE TO SYSTEM DAYFILE #
        1479. BEGIN
        1480. MESSAGE(ERRNUM[0],SYSUDF1);
        1481. MESSAGE(DIRNUM[0],SYSUDF1);
        1482. END
        1483.  
        1484. ELSE # SEND MESSAGE TO USER DAYFILE #
        1485. BEGIN
        1486. MESSAGE(ERRNUM[0],UDFL1);
        1487. MESSAGE(DIRNUM[0],UDFL1);
        1488. END
        1489.  
        1490. RPLINE(OUT$FETP,"*** ERROR",4,9,1);
        1491. RPLINE(OUT$FETP,ERR$NUM[0],14,3,0);
        1492. RPLINE(OUT$FETP,"DIRECTIVE",8,9,1);
        1493. RPLINE(OUT$FETP,DIR$NO[0],18,3,0);
        1494. END # DISPLAY MESSAGE HEADER #
        1495.  
        1496. #
        1497. * DISPLAY ERROR MESSAGE.
        1498. #
        1499.  
        1500. IF ERR$STAT1[ERRCODE] EQ S"MSG"
        1501. THEN
        1502. BEGIN # DISPLAY ERROR MESSAGE #
        1503. IF ERR$STAT2[ERRCODE] EQ S"ABRT"
        1504. THEN # SEND MESSAGE TO SYSTEM DAYFILE #
        1505. BEGIN
        1506. MESSAGE(ERRMSG[ERRCODE],SYSUDF1);
        1507. END
        1508.  
        1509. ELSE # SEND MESSAGE TO USER DAYFILE #
        1510. BEGIN
        1511. MESSAGE(ERRMSG[ERRCODE],UDFL1);
        1512. END
        1513.  
        1514. RPLINE(OUT$FETP,ERR$MSG[ERRCODE],7,38,0);
        1515. END
        1516.  
        1517. ELSE
        1518. BEGIN # DISPLAY DETAILED MESSAGE #
        1519. DAY$MSGTXT[0] = ERR$MSG[ERRCODE];
        1520. FNAME = DBARG$PF[0];
        1521. BZFILL(FNAME,TYPFILL"BFILL",7);
        1522. DAY$MSGFIL[0] = FNAME;
        1523. IF ERR$STAT2[ERRCODE] EQ S"ABRT"
        1524. THEN # SEND MESSAGE TO SYSTEM DAYFILE #
        1525. BEGIN
        1526. MESSAGE(DAYMSG[0],SYSUDF1);
        1527. END
        1528.  
        1529. ELSE # SEND MESSAGE TO USER DAYFILE #
        1530. BEGIN
        1531. MESSAGE(DAYMSG[0],UDFL1);
        1532. END
        1533.  
        1534. RPLINE(OUT$FETP,DAY$MSGTXT[0],7,40,0);
        1535. END # DISPLAY DETAILED MESSAGE #
        1536.  
        1537. RPSPACE(OUT$FETP,SP"SPACE",1);
        1538.  
        1539. #
        1540. * ABORT OR RETURN.
        1541. #
        1542.  
        1543. IF ERR$STAT2[ERRCODE] EQ S"ABRT"
        1544. THEN
        1545. BEGIN
        1546. RPCLOSE(OUT$FETP);
        1547. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        1548. END
        1549.  
        1550. RETURN;
        1551.  
        1552. END # DBERR #
        1553.  
        1554. TERM
        1555. PROC DBFLAG;
        1556. # TITLE DBFLAG - SET OR CLEAR SPECIFIED FLAGS. #
        1557.  
        1558. BEGIN # DBFLAG #
        1559.  
        1560. #
        1561. ** DBFLAG - SET OR CLEAR SPECIFIED FLAGS.
        1562. *
        1563. * *DBFLAG* CHANGES SPECIFIED FLAGS IN SMMAPS OR CATALOGS.
        1564. *
        1565. * PROC DBFLAG
        1566. *
        1567. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        1568. * ARE SET UP IN THE COMMON AREA DEFINED IN *COMTDBP*.
        1569. * THE APPROPRIATE SMMAP AND CATALOG, IF ANY, HAVE
        1570. * BEEN OPENED.
        1571. * P<CPR> = FWA OF *CALLSS* PARAMETER BLOCK.
        1572. *
        1573. * EXIT THE DIRECTIVE WAS PROCESSED AND THE MAP AND
        1574. * CATALOG WERE CLOSED, OR AN ERROR CONDITION
        1575. * WAS DETECTED.
        1576. *
        1577. * MESSAGES * SSDEBUG ABNORMAL, DBFLAG.*
        1578. #
        1579.  
        1580. #
        1581. **** PROC DBFLAG - XREF LIST BEGIN.
        1582. #
        1583.  
        1584. XREF
        1585. BEGIN
        1586. PROC CCLOSE; # CLOSE MSF CATALOG #
        1587. PROC CGETFCT; # GET *FCT* ENTRY #
        1588. PROC DBCALL3; # ISSUE TYPE 3 *CALLSS* #
        1589. PROC DBERR; # *SSDEBUG* ERROR PROCESSOR #
        1590. PROC DBRESP; # RESPOND TO ERROR CONDITION #
        1591. PROC DBVSN; # SEARCH SMMAP FOR A VSN #
        1592. PROC MCLOSE; # CLOSE SMMAP #
        1593. PROC MGETENT; # GET A SMMAP ENTRY #
        1594. PROC MESSAGE; # ISSUE MESSAGE #
        1595. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        1596.   OR RETURN #
        1597. END
        1598.  
        1599. #
        1600. **** PROC DBFLAG - XREF LIST END.
        1601. #
        1602.  
        1603.  
        1604. DEF PROCNAME #"DBFLAG"#; # PROCEDURE NAME #
        1605.  
        1606. DEF LISTCON #0#; # DO NOT LIST COMMON DECKS #
        1607. *CALL COMBFAS
        1608. *CALL COMBCMS
        1609. *CALL COMBCPR
        1610. *CALL COMBMAP
        1611. *CALL COMBMCT
        1612. *CALL COMTDBG
        1613. *CALL COMTDBP
        1614. *CALL COMTDER
        1615.  
        1616. ITEM CONTINUE B; # LOOP CONTROL FLAG #
        1617. ITEM I I; # INDUCTION VARIABLE #
        1618. ITEM ORD I; # SMMAP ORDINAL #
        1619. ITEM RESPCODE I; # RESPONSE CODE #
        1620. ITEM Y I; # SM *Y* COORDINATE #
        1621. ITEM Z I; # SM *Z* COORDINATE #
        1622.  
        1623. ARRAY FCTENT [0:0] P(FCTENTL); ; # *FCT* ENTRY #
        1624. ARRAY MAPENT [0:0] P(MAPENTL); ; # SMMAP ENTRY #
        1625.  
        1626. CONTROL EJECT;
        1627.  
        1628. #
        1629. * IF THE *ST* PARAMETER WAS SPECIFIED, USE THIS VALUE IN PLACE
        1630. * OF THE *SL* AND *SU* AU NUMBERS.
        1631. #
        1632.  
        1633. IF DBARG$ST[0] NQ -2
        1634. THEN # *ST* SPECIFIED #
        1635. BEGIN
        1636. DBARG$SL[0] = DBARG$ST[0];
        1637. DBARG$SU[0] = DBARG$ST[0];
        1638. END
        1639.  
        1640. #
        1641. * GET THE APPROPRIATE SMMAP OR CATALOG ENTRY.
        1642. #
        1643.  
        1644. IF DBARG$FL[0] EQ "ME" AND DBARG$FO[0] GR 0
        1645. THEN # *FCT* ENTRY REQUIRED #
        1646. BEGIN # GET *FCT* #
        1647. CGETFCT(DBARG$FM[0],DBARG$SB[0],DBARG$SMID[0],DBARG$FO[0],
        1648. LOC(FCTENT[0]),0,RESPCODE);
        1649. IF RESPCODE NQ CMASTAT"NOERR"
        1650. THEN # UNABLE TO GET *FCT* #
        1651. BEGIN
        1652. DBRESP(RESPCODE,0);
        1653. END
        1654.  
        1655. P<FCT> = LOC(FCTENT[0]);
        1656. IF FCT$Y[0] EQ 0 AND FCT$Z[0] EQ 0
        1657. THEN # NO CARTRIDGE FOR THIS *FO* #
        1658. BEGIN
        1659. RESPCODE = CMASTAT"ORDERR";
        1660. DBRESP(RESPCODE,0);
        1661. END
        1662.  
        1663. DBARG$YI[0] = FCT$Y[0];
        1664. DBARG$ZI[0] = FCT$Z[0];
        1665. CCLOSE(DBARG$FM[0],DBARG$SB[0],0,RESPCODE);
        1666. IF RESPCODE NQ CMASTAT"NOERR"
        1667. THEN # UNABLE TO CLOSE CATALOG #
        1668. BEGIN
        1669. DBRESP(RESPCODE,0);
        1670. END
        1671.  
        1672. END # GET *FCT* #
        1673.  
        1674. IF DBARG$WCN[0] NQ 0
        1675. THEN # CSN SPECIFIED #
        1676. BEGIN # *CN* SPECIFIED #
        1677. DBVSN(Y,Z,MAPENT[0],RESPCODE);
        1678. IF RESPCODE NQ OK
        1679. THEN # CSN NOT FOUND #
        1680. BEGIN
        1681. DBERRCODE = S"DVSN$NFND";
        1682. DBERR(DBERRCODE);
        1683. RETURN;
        1684. END
        1685.  
        1686. DBARG$YI[0] = Y;
        1687. DBARG$ZI[0] = Z;
        1688. END # *CN* SPECIFIED #
        1689.  
        1690. IF DBARG$YI[0] GQ 0
        1691. AND DBARG$WCN[0] EQ 0
        1692. THEN
        1693. BEGIN # *YI* SPECIFIED #
        1694. ORD = MAXORD -DBARG$ZI[0] - ( DBARG$YI[0]*16 );
        1695. MGETENT(DBARG$SMID[0],ORD,LOC(MAPENT[0]),RESPCODE);
        1696. IF RESPCODE NQ CMASTAT"NOERR"
        1697. THEN # UNABLE TO GET MAP ENTRY #
        1698. BEGIN
        1699. DBMSG$PROC[0] = PROCNAME;
        1700. MESSAGE(DBMSG[0],SYSUDF1);
        1701. RESTPFP(PFP$ABORT);
        1702. END
        1703.  
        1704. END # *YI* SPECIFIED #
        1705.  
        1706. #
        1707. * UPDATE THE CATALOG OR SMMAP AS REQUESTED.
        1708. #
        1709.  
        1710. P<SMUMAP> = LOC(MAPENT[0]);
        1711. IF DBARG$FL[0] EQ "ME"
        1712. THEN # UPDATE SMMAP #
        1713. BEGIN # *FL* .EQ. *ME* #
        1714. CM$FLAG1[0] = DBARG$ON[0] NQ 0;
        1715. DBCALL3(REQTYP3"UPD$MAP",MAPENT[0],0,0,0,RESPCODE);
        1716. IF RESPCODE NQ RESPTYP3"OK3"
        1717. THEN # UNABLE TO UPDATE MAP #
        1718. BEGIN
        1719. DBRESP(RESPCODE,TYP"TYP3");
        1720. RETURN;
        1721. END
        1722.  
        1723. END # *FL* .EQ. *ME* #
        1724.  
        1725. ELSE # UPDATE CATALOG #
        1726. BEGIN # *FL* .NE. *ME* #
        1727. IF DBARG$FO[0] EQ 0 OR DBARG$FO[0] EQ -2
        1728. THEN
        1729. BEGIN # *FO* NOT SPECIFIED #
        1730. IF CM$CODE[0] NQ CUBSTAT"SUBFAM"
        1731. THEN # VSN OR Y-Z NOT IN SUBFAMILY #
        1732. BEGIN
        1733. DBERRCODE = S"DNOTIN$SB";
        1734. DBERR(DBERRCODE);
        1735. RETURN;
        1736. END
        1737.  
        1738. DBARG$FO[0] = CM$FCTORD[0];
        1739. DBARG$FM[0] = CM$FMLYNM[0];
        1740. DBARG$SB[0] = CM$SUB[0];
        1741. END # *FO* NOT SPECIFIED #
        1742.  
        1743. CONTINUE = TRUE;
        1744. SLOWFOR I = DBARG$SL[0] STEP 1
        1745. WHILE CONTINUE
        1746. AND I LQ DBARG$SU[0]
        1747. DO
        1748. BEGIN
        1749. CONTINUE = DBARG$FLSD[0]; # TRUE FOR AU DETAIL FLAGS #
        1750. DBARG$ST[0] = I;
        1751. DBCALL3(REQTYP3"UPD$CAT",0,DBARG$FO[0],DBARG$FLCD[0],
        1752. DBARG$ON[0],RESPCODE);
        1753. IF RESPCODE NQ RESPTYP3"OK3"
        1754. THEN # UNABLE TO UPDATE CATALOG #
        1755. BEGIN
        1756. DBRESP(RESPCODE,TYP"TYP3");
        1757. RETURN;
        1758. END
        1759.  
        1760. END
        1761.  
        1762. END # *FL* .NE. *ME* #
        1763.  
        1764. IF DBARG$FL[0] EQ "ME" OR DBARG$FO[0] EQ 0
        1765. THEN # MAP OPENED #
        1766. BEGIN
        1767. MCLOSE(DBARG$SMID[0],RESPCODE);
        1768. IF RESPCODE NQ CMASTAT"NOERR"
        1769. THEN # UNABLE TO CLOSE MAP #
        1770. BEGIN
        1771. DBRESP(RESPCODE,0);
        1772. END
        1773.  
        1774. END
        1775.  
        1776. END # DBFLAG #
        1777.  
        1778. TERM
        1779. PROC DBFMAP;
        1780. # TITLE DBFMAP - REMOVE *FCT* ENTRY. #
        1781.  
        1782. BEGIN # DBFMAP #
        1783.  
        1784. #
        1785. ** DBFMAP - REMOVE *FCT* ENTRY.
        1786. *
        1787. * PROC DBFMAP.
        1788. *
        1789. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        1790. * ARE SET UP IN THE COMMON AREA DEFINED IN *COMTDBP*.
        1791. * THE CATALOG IS OPEN FOR THE SPECIFIED FAMILY AND
        1792. * SUBFAMILY.
        1793. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        1794. *
        1795. * EXIT THE DIRECTIVE HAS BEEN PROCESSED AND CATALOG
        1796. * HAS BEEN CLOSED OR AN ERROR CONDITION HAS
        1797. * BEEN DETECTED.
        1798. *
        1799. * NOTES THE SELECTED *FCT* ENTRY IS CHECKED FOR THE
        1800. * SMMAP ERROR FLAG AND IF SET, A REQUEST IS
        1801. * SENT TO EXEC TO PURGE THE *FCT* ENTRY.
        1802. #
        1803.  
        1804. #
        1805. **** PROC DBFMAP - XREF LIST BEGIN.
        1806. #
        1807.  
        1808. XREF
        1809. BEGIN
        1810. PROC CCLOSE; # CLOSES THE CATALOG #
        1811. PROC CGETFCT; # GET *FCT* ENTRY #
        1812. PROC DBCALL3; # ISSUES A TYPE 3 UCP REQUEST #
        1813. PROC DBERR; # ERROR PROCESSOR #
        1814. PROC DBRESP; # PROCESS RESPONSE FROM EXEC #
        1815. END
        1816.  
        1817. #
        1818. **** PROC DBFMAP - XREF LIST END.
        1819. #
        1820.  
        1821. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1822. *CALL COMBFAS
        1823. *CALL COMBCMS
        1824. *CALL COMBCPR
        1825. *CALL COMBMCT
        1826. *CALL COMTDBG
        1827. *CALL COMTDBP
        1828. *CALL COMTDER
        1829.  
        1830. ITEM FCTBADR I; # FWA OF BUFFER FOR *FCT* #
        1831. ITEM FLAG I; # ERROR STATUS #
        1832. ITEM RESPCODE I; # RESPONSE FROM EXEC #
        1833.  
        1834. ARRAY FCTENT [0:0] P(FCTENTL);; # *FCT* ENTRY #
        1835.  
        1836. CONTROL EJECT;
        1837.  
        1838. #
        1839. * CHECK THE SMMAP ERROR FLAG IN THE *FCT* ENTRY.
        1840. #
        1841.  
        1842. FCTBADR = LOC(FCTENT[0]);
        1843. CGETFCT(DBARG$FM[0],DBARG$SB[0],DBARG$SMID[0],DBARG$FO[0],
        1844. FCTBADR,0,FLAG);
        1845. IF FLAG NQ CMASTAT"NOERR"
        1846. THEN # UNABLE TO GET *FCT* ENTRY #
        1847. BEGIN
        1848. DBRESP(FLAG,0);
        1849. RETURN;
        1850. END
        1851.  
        1852. P<FCT> = FCTBADR;
        1853. IF NOT FCT$SEF[0]
        1854. THEN # SMMAP ERROR FLAG NOT SET #
        1855. BEGIN
        1856. DBERRCODE = S"DCME$NSET";
        1857. DBERR(DBERRCODE);
        1858. RETURN;
        1859. END
        1860.  
        1861. #
        1862. * PURGE THE *FCT* ENTRY.
        1863. #
        1864.  
        1865. DBCALL3(REQTYP3"PURG$FCT",0,DBARG$FO[0],0,0,RESPCODE);
        1866. IF RESPCODE NQ RESPTYP3"OK3"
        1867. THEN # UNABLE TO PURGE *FCT* ENTRY #
        1868. BEGIN
        1869. DBRESP(RESPCODE,TYP"TYP3");
        1870. RETURN;
        1871. END
        1872.  
        1873. CCLOSE(DBARG$FM[0],DBARG$SB[0],0,FLAG);
        1874. IF FLAG NQ CMASTAT"NOERR"
        1875. THEN # UNABLE TO CLOSE CATALOG #
        1876. BEGIN
        1877. DBRESP(FLAG,0);
        1878. END
        1879.  
        1880. RETURN;
        1881.  
        1882. END # DBFMAP #
        1883.  
        1884. TERM
        1885. PROC DBHEAD((FETP));
        1886. # TITLE DBHEAD - PRINT HEADER LINE ON THE REPORT. #
        1887.  
        1888. BEGIN # DBHEAD #
        1889.  
        1890. #
        1891. ** DBHEAD - PRINT HEADER LINE ON THE REPORT.
        1892. *
        1893. * PROC DBHEAD((FETP))
        1894. *
        1895. * ENTRY (FETP) = FWA OF FET FOR REPORT FILE.
        1896. *
        1897. * EXIT HEADER LINE HAS BEEN WRITTEN.
        1898. *
        1899. * NOTES THE REPORT FORMATTER IS USED TO PRINT
        1900. * THE HEADER LINE.
        1901. #
        1902.  
        1903. ITEM FETP I; # FWA OF FET #
        1904.  
        1905. #
        1906. **** PROC DBHEAD - XREF LIST BEGIN.
        1907. #
        1908.  
        1909. XREF
        1910. BEGIN
        1911. PROC RPLINEX; # PRINT A REPORT LINE #
        1912. END
        1913.  
        1914. #
        1915. **** PROC DBHEAD - XREF LIST END.
        1916. #
        1917.  
        1918. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1919. *CALL COMBFAS
        1920.  
        1921. CONTROL EJECT;
        1922.  
        1923. #
        1924. * PRINT HEADER LINE.
        1925. #
        1926.  
        1927. RPLINEX(FETP,"SSDEBUG REPORT FILE",2,19,0);
        1928. RPLINEX(FETP," ",2,1,0);
        1929. RPLINEX(FETP," ",2,1,0);
        1930. RETURN;
        1931.  
        1932. END # DBHEAD #
        1933.  
        1934. TERM
        1935. PROC DBLOOP((ARGLIST),ERRFLAG);
        1936. # TITLE DBLOOP - CRACK AND SYNTAX CHECK *SSDEBUG* DIRECTIVES. #
        1937.  
        1938. BEGIN # DBLOOP #
        1939.  
        1940. #
        1941. ** DBLOOP - CRACK AND SYNTAX CHECK *SSDEBUG* DIRECTIVES.
        1942. *
        1943. * PROC DBLOOP((ARGLIST),ERRFLAG)
        1944. *
        1945. * ENTRY (ARGLIST) = FWA OF ARGUMENT LIST.
        1946. * (DB$CBUF) = *SSDEBUG* DIRECTIVES.
        1947. * (DB$FET) = FET FOR READING DIRECTIVES.
        1948. *
        1949. * EXIT ALL THE DIRECTIVES HAVE BEEN CRACKED, SYNTAX CHECKED
        1950. * AND WRITTEN TO A SCRATCH FILE.
        1951. * (DSCR$FET) = FET FOR READING THE SCRATCH FILE.
        1952. * (ERRFLAG) = FALSE, NO ERROR.
        1953. * TRUE, ERROR IN ONE OR MORE DIRECTIVES.
        1954. *
        1955. * MESSAGES SSDEBUG, NO DIRECTIVES.
        1956. *
        1957. * NOTES A LOOP IS SET UP TO READ EACH DIRECTIVE.
        1958. * THE DIRECTIVE IS CRACKED AND THE CRACKED
        1959. * PARAMETERS ARE CONVERTED FROM DISPLAY
        1960. * CODE TO INTEGER VALUES. THE CONVERTED PARAMETERS
        1961. * ARE PLACED BACK INTO THE SAME LOCATIONS (DEFINED
        1962. * IN *COMTDBP*). THE DIRECTIVE IS THEN CHECKED FOR
        1963. * ALL THE VALID OPTIONS. ANY ERROR IN THE DIRECTIVE
        1964. * CAUSES A DIRECTIVE ERROR FLAG TO BE SET UP. THE
        1965. * CRACKED DIRECTIVE ALONG WITH THE DIRECTIVE
        1966. * FLAG, NUMBER AND IMAGE IS WRITTEN TO A SCRATCH
        1967. * FILE. THE SCRATCH FILE HAS ONE RECORD WITH
        1968. * AN EOR. AN ERROR IN ANY DIRECTIVE CAUSES AN
        1969. * ERROR FLAG TO BE RETURNED TO THE CALLING PROC.
        1970. #
        1971.  
        1972. ITEM ARGLIST I; # FWA OF ARGUMENT LIST #
        1973. ITEM ERRFLAG B; # ERROR FLAG #
        1974.  
        1975. #
        1976. **** PROC DBLOOP - XREF LIST BEGIN.
        1977. #
        1978.  
        1979. XREF
        1980. BEGIN
        1981. PROC BZFILL; # BLANK/ZERO FILLS A BUFFER #
        1982. PROC DBCONV; # CONVERT PARAMETERS TO INTEGERS #
        1983. PROC DBERR; # ERROR PROCESSOR #
        1984. PROC DBOPT; # CHECKS FOR VALID OPTIONS #
        1985. PROC LOFPROC; # LIST OF FILES PROCESSOR #
        1986. PROC MESSAGE; # DISPLAYS MESSAGES #
        1987. PROC READC; # READS A CODED LINE #
        1988. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        1989.   OR RETURN #
        1990. PROC RETERN; # RETURNS A FILE #
        1991. PROC REWIND; # REWINDS A FILE #
        1992. PROC RPLINE; # WRITES A REPORT LINE #
        1993. PROC RPSPACE; # WRITES A BLANK LINE #
        1994. PROC WRITER; # WRITES EOR ON A FILE #
        1995. PROC WRITEW; # DATA TRANSFER ROUTINE #
        1996. PROC XARG; # CRACK PARAMETER LIST #
        1997. FUNC XCDD C(10); # CONVERTS TO DISPLAY CODE #
        1998. PROC ZFILL; # ZERO FILLS A BUFFER #
        1999. PROC ZSETFET; # INITIALIZES A FET #
        2000. END
        2001.  
        2002. #
        2003. **** PROC DBLOOP - XREF LIST END.
        2004. #
        2005.  
        2006. DEF WBUFL #8#; # LENGTH OF WORKING BUFFER #
        2007.  
        2008. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        2009. *CALL COMBFAS
        2010. *CALL COMBBZF
        2011. *CALL COMBCPR
        2012. *CALL COMTDBG
        2013. *CALL COMTDBP
        2014. *CALL COMTDER
        2015. *CALL COMTOUT
        2016.  
        2017. ITEM BUFP I; # FWA OF *CIO* BUFFER #
        2018. ITEM COMMENT B; # COMMENT INDICATOR #
        2019. ITEM DIRNUM I; # DIRECTIVE NUMBER #
        2020. ITEM EOR B; # EOR STATUS ON A FILE #
        2021. ITEM FETP I; # FWA OF FET #
        2022. ITEM I I; # LOOP INDUCTION VARIABLE #
        2023. ITEM FLAG I; # ERROR STATUS #
        2024. ITEM TEMP C(10); # TEMPORARY ITEM #
        2025.  
        2026. ARRAY DB$WBUF [0:0] S(WBUFL); # WORKING BUFFER #
        2027. BEGIN
        2028. ITEM DB$DIRIMG C(00,00,80); # DIRECTIVE IMAGE #
        2029. END
        2030.  
        2031. CONTROL EJECT;
        2032.  
        2033. COMMENT = FALSE; # INITIALIZE #
        2034. EOR = FALSE;
        2035. DIRNUM = 0;
        2036. ERRFLAG = FALSE;
        2037.  
        2038. #
        2039. * SET UP FET FOR SCRATCH FILE.
        2040. #
        2041.  
        2042. FETP = LOC(DSCR$FET[0]);
        2043. BUFP = LOC(DSCR$BUF[0]);
        2044. ZSETFET(FETP,DBSCR,BUFP,DBUFL,SFETL);
        2045. RETERN(DSCR$FET[0],RCL); # RETURN THE SCRATCH FILE #
        2046. LOFPROC(DBSCR); # ADD LFN TO LIST OF FILES #
        2047.  
        2048. #
        2049. * SET UP A LOOP TO
        2050. * 1. READ A DIRECTIVE.
        2051. * 2. CRACK THE DIRECTIVE.
        2052. * 3. CONVERT THE PARAMETERS.
        2053. * 4. CHECK FOR VALID OPTIONS.
        2054. * 5. WRITE THE DIRECTIVE TO THE SCRATCH FILE.
        2055. #
        2056.  
        2057. FASTFOR I = 0 STEP 1 WHILE NOT EOR
        2058. DO
        2059. BEGIN # CRACK AND SYNTAX CHECK DIRECTIVES #
        2060.  
        2061. #
        2062. * READ THE DIRECTIVE.
        2063. #
        2064.  
        2065. ZFILL(DB$WBUF[0],WBUFL);
        2066. READC(DB$FET[0],DB$WBUF[0],WBUFL,FLAG);
        2067. IF FLAG NQ OK
        2068. THEN # NO MORE DIRECTIVES #
        2069. BEGIN
        2070. EOR = TRUE;
        2071. TEST I;
        2072. END
        2073.  
        2074. #
        2075. * CHECK FOR A COMMENT.
        2076. #
        2077.  
        2078. IF C<0,1>DB$DIRIMG[0] EQ "*"
        2079. THEN # A COMMENT #
        2080. BEGIN
        2081. COMMENT = TRUE;
        2082. TEMP = " ";
        2083. END
        2084.  
        2085. ELSE # A DIRECTIVE #
        2086. BEGIN
        2087. COMMENT = FALSE;
        2088. DIRNUM = DIRNUM + 1;
        2089. TEMP = XCDD(DIRNUM); # SET UP DIRECTIVE NUMBER #
        2090. TEMP = C<7,3>TEMP;
        2091. END
        2092.  
        2093. #
        2094. * WRITE THE DIRECTIVE IMAGE ALONG WITH THE DIRECTIVE
        2095. * NUMBER TO THE OUTPUT FILE.
        2096. #
        2097.  
        2098. BZFILL(DB$WBUF[0],TYPFILL"BFILL",80);
        2099. RPLINE(OUT$FETP,TEMP,2,5,1);
        2100. RPLINE(OUT$FETP,DB$DIRIMG[0],8,80,0);
        2101. RPSPACE(OUT$FETP,SP"SPACE",1);
        2102.  
        2103. IF COMMENT
        2104. THEN
        2105. BEGIN
        2106. TEST I; # READ NEXT DIRECTIVE #
        2107. END
        2108.  
        2109. #
        2110. * SET UP THE AREA TO BE WRITTEN TO THE
        2111. * SCRATCH FILE.
        2112. #
        2113.  
        2114. ZFILL(DBARG[0],DBDIRPRML);
        2115. DBARG$DIRN[0] = TEMP;
        2116. DBARG$DIRI[0] = DB$DIRIMG[0];
        2117.  
        2118. #
        2119. * CRACK THE DIRECTIVE.
        2120. #
        2121.  
        2122. XARG(ARGLIST,DB$WBUF[0],FLAG);
        2123. IF FLAG NQ OK
        2124. THEN # SYNTAX ERROR IN DIRECTIVE #
        2125. BEGIN
        2126. DBARG$DIRF[0] = TRUE;
        2127. ERRFLAG = TRUE;
        2128. END
        2129.  
        2130.  
        2131. #
        2132. * ADJUST FOR MANUFACTURERS CODE.
        2133. #
        2134.  
        2135. IF C<1,1>DBARG$CM[0] NQ "-"
        2136. THEN # INSERT HYPHEN #
        2137. BEGIN
        2138. C<1,1>DBARG$CM[0] = "-";
        2139. END
        2140.  
        2141. #
        2142. * CONVERT THE PARAMETERS FROM DISPLAY CODE TO
        2143. * INTEGER VALUES.
        2144. #
        2145.  
        2146. IF NOT DBARG$DIRF[0]
        2147. THEN
        2148. BEGIN # CONVERT PARAMETERS #
        2149. DBCONV(FLAG);
        2150. IF FLAG NQ OK
        2151. THEN # CONVERSION ERROR #
        2152. BEGIN
        2153. DBARG$DIRF[0] = TRUE;
        2154. ERRFLAG = TRUE;
        2155. END
        2156.  
        2157.  
        2158. END # CONVERT PARAMETERS #
        2159.  
        2160. IF DBARG$DIRF[0]
        2161. THEN
        2162. BEGIN
        2163. DBERRCODE = S"DSYNT$DIR";
        2164. DBERR(DBERRCODE);
        2165. END
        2166.  
        2167. #
        2168. * CHECK THE DIRECTIVE FOR VALID OPTIONS.
        2169. #
        2170.  
        2171. IF NOT DBARG$DIRF[0]
        2172. THEN
        2173. BEGIN # CHECK VALID OPTIONS #
        2174. DBOPT(FLAG);
        2175. IF FLAG NQ OK
        2176. THEN # VALID OPTIONS VIOLATED #
        2177. BEGIN
        2178. DBARG$DIRF[0] = TRUE;
        2179. ERRFLAG = TRUE;
        2180. END
        2181.  
        2182. END # CHECK VALID OPTIONS #
        2183.  
        2184. #
        2185. * WRITE THE DIRECTIVE NUMBER, ERROR FLAG,
        2186. * IMAGE AND THE CRACKED PARAMETERS TO THE
        2187. * SCRATCH FILE.
        2188. #
        2189.  
        2190. WRITEW(DSCR$FET[0],DBARG[0],DBDIRPRML,FLAG);
        2191. END # CRACK AND SYNTAX CHECK DIRECTIVES #
        2192.  
        2193. IF DIRNUM EQ 0
        2194. THEN # NO DIRECTIVES #
        2195. BEGIN
        2196. DBMSG$LN[0] = " SSDEBUG, NO DIRECTIVES.";
        2197. MESSAGE(DBMSG[0],SYSUDF1);
        2198. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        2199. END
        2200.  
        2201. WRITER(DSCR$FET[0],RCL);
        2202. REWIND(DSCR$FET[0],RCL);
        2203. RETURN;
        2204.  
        2205. END # DBLOOP #
        2206.  
        2207. TERM
        2208. PROC DBMAIN;
        2209. # TITLE DBMAIN - PROCESS *SSDEBUG* DIRECTIVES. #
        2210.  
        2211. BEGIN # SSDEBUG #
        2212.  
        2213. #
        2214. ** DBMAIN - PROCESS *SSDEBUG* DIRECTIVES.
        2215. *
        2216. * PROC DBMAIN.
        2217. *
        2218. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVES
        2219. * HAVE BEEN WRITTEN TO A SCRATCH FILE WHICH HAS
        2220. * BEEN REWOUND.
        2221. * (DSCR$FET) = FET FOR READING THE SCRATCH FILE.
        2222. *
        2223. * EXIT ALL DIRECTIVES HAVE BEEN PROCESSED OR AN ERROR FLAG
        2224. * HAS BEEN SET UP.
        2225. *
        2226. * MESSAGES FAMILY NOT FOUND.
        2227. *
        2228. * NOTES A LOOP IS SET UP TO READ EACH DIRECTIVE
        2229. * FROM THE SCRATCH FILE INTO THE COMMON AREA
        2230. * DEFINED IN *COMTDBP*. THE CATALOG OR MAP IS
        2231. * OPENED AND THE CORRESPONDING ROUTINE IS
        2232. * CALLED TO PROCESS THE DIRECTIVE. ANY ERROR
        2233. * IN DIRECTIVE PROCESSING CAUSES *SSDEBUG*
        2234. * TO ABORT.
        2235. #
        2236.  
        2237. #
        2238. **** PROC DBMAIN - XREF LIST BEGIN.
        2239. #
        2240.  
        2241. XREF
        2242. BEGIN
        2243. PROC COPEN; # OPEN CATALOG #
        2244. PROC DBCMAP; # PROCESS REMOVE SMMAP ENTRY
        2245.   DIRECTIVE #
        2246. PROC DBFLAG; # PROCESS CHANGE FLAG DIRECTIVE #
        2247. PROC DBFMAP; # PROCESS REMOVE FCT ENTRY
        2248.   DIRECTIVE #
        2249. PROC DBRDFIL; # PROCESS READ FILE DIRECTIVE #
        2250. PROC DBRDSTM; # PROCESS READ AU DIRECTIVE #
        2251. PROC DBREL; # PROCESS RELEASE MSF PROBLEM
        2252.   CHAIN DIRECTIVE #
        2253. PROC DBRESP; # PROCESSES RESPONSE FROM EXEC #
        2254. PROC LOFPROC; # LIST OF FILES PROCESSOR #
        2255. PROC MESSAGE; # DISPLAY MESSAGES #
        2256. PROC MOPEN; # OPEN SMMAP #
        2257. PROC READ; # READS A FILE #
        2258. PROC READW; # DATA TRANSFER ROUTINE #
        2259. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        2260.   OR RETURN #
        2261. PROC RETERN; # RETURNS A FILE #
        2262. PROC RPLINE; # WRITES A REPORT LINE #
        2263. PROC RPSPACE; # WRITES A BLANK LINE #
        2264. PROC SETPFP; # SET FAMILY AND USER INDEX #
        2265. PROC SSINIT; # SETS UP TABLES AND POINETRS #
        2266. FUNC XCOD C(10); # INTEGER TO DISPLAY CONVERSION #
        2267. END
        2268.  
        2269. #
        2270. **** PROC DBMAIN - XREF LIST END.
        2271. #
        2272.  
        2273. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        2274.  
        2275. *CALL COMBFAS
        2276. *CALL COMBCMD
        2277. *CALL COMBCMS
        2278. *CALL COMBCPR
        2279. *CALL COMBPFP
        2280. *CALL COMBSNS
        2281. *CALL COMSPFM
        2282. *CALL COMTDBG
        2283. *CALL COMTDBP
        2284. *CALL COMTOUT
        2285.  
        2286. ITEM DIS$SB C(10); # SUBFAMILY IN DISPLAY CODE #
        2287. ITEM EOR B; # INDICATES END OF RECORD #
        2288. ITEM I I; # LOOP INDUCTION VARIABLE #
        2289. ITEM J I; # LOOP INDUCTION VARIABLE #
        2290. ITEM RESPCODE I; # RESPONSE CODE #
        2291.  
        2292. ARRAY CATNAME [0:0] P(1); # CATALOG FILE NAME #
        2293. BEGIN
        2294. ITEM CAT$NAM C(00,00,06); # FIRST 6 CHARACTERS #
        2295. ITEM CAT$SB C(00,36,01); # SUBFAMILY IDENTIFIER #
        2296. END
        2297.  
        2298. ARRAY DRWSTAT [0:0] S(SNSLEN);; # DRAWER STATUS TABLE #
        2299.  
        2300. ARRAY MAPNAME [0:0] P(1); # MAP FILE NAME #
        2301. BEGIN
        2302. ITEM MAP$NAM C(00,00,07) = ["SMMAP "];
        2303. ITEM MAP$SM C(00,30,01); # SM IDENTIFIER #
        2304. ITEM MAP$ZFILL U(00,36,06) = [0];
        2305. END
        2306.  
        2307. #
        2308. * SWITCH TO PROCESS *SSDEBUG* DIRECTIVES. THE
        2309. * ORDER OF THE SWITCH LABELS IS THE SAME AS THE
        2310. * DIRECTIVE NAMES SET UP IN ARRAY *DB$DIR*
        2311. * DEFINED IN *COMTDBG*.
        2312. #
        2313.  
        2314. SWITCH DIR$ACT # SWITCH TO PROCESS DIRECTIVES #
        2315. CMAP, # REMOVE SMMAP ENTRY #
        2316. FMAP, # REMOVE *FCT* ENTRY #
        2317. REL, # RELEASE PROBLEM CHAIN #
        2318. RDFIL, # READ FILE #
        2319. RDSTM, # READ AU #
        2320. FLAG; # CHANGE FLAG #
        2321.  
        2322. CONTROL EJECT;
        2323.  
        2324. ADDRSENSE = LOC(DRWSTAT[0]); # FWA OF DRAWER STATUS TABLE #
        2325. P<SNS> = ADDRSENSE;
        2326.  
        2327. #
        2328. * INITIALIZE THE FETS, BUFFERS, TABLES AND
        2329. * POINTERS NEEDED TO ACCESS CATALOGS AND MAPS.
        2330. #
        2331.  
        2332. SSINIT;
        2333.  
        2334. #
        2335. * READ THE DIRECTIVES.
        2336. #
        2337.  
        2338. READ(DSCR$FET[0],RCL);
        2339.  
        2340. EOR = FALSE;
        2341. FASTFOR I = 0 STEP 1 WHILE NOT EOR
        2342. DO
        2343. BEGIN # PROCESS EACH DIRECTIVE #
        2344. READW(DSCR$FET[0],DBARG[0],DBDIRPRML,RESPCODE);
        2345. IF RESPCODE NQ OK
        2346. THEN # NO MORE DIRECTIVES #
        2347. BEGIN
        2348. EOR = TRUE;
        2349. TEST I;
        2350. END
        2351.  
        2352. #
        2353. * WRITE THE DIRECTIVE TO THE OUTPUT FILE.
        2354. #
        2355.  
        2356. RPLINE(OUT$FETP,DBARG$DIRN[0],2,5,1);
        2357. RPLINE(OUT$FETP,DBARG$DIRI[0],8,80,0);
        2358. RPSPACE(OUT$FETP,SP"SPACE",1);
        2359.  
        2360. IF DBARG$DIRF[0]
        2361. THEN # SYNTAX ERROR IN DIRECTIVE #
        2362. BEGIN
        2363. RPLINE(OUT$FETP,"*** SYNTAX ERROR",2,16,0);
        2364. TEST I; # GET NEXT DIRECTIVE #
        2365. END
        2366.  
        2367. IF DBARG$FM[0] EQ 0
        2368. THEN # FAMILY NOT SPECIFIED #
        2369. BEGIN
        2370. DBARG$FM[0] = DEF$FAM; # USE DEFAULT FAMILY #
        2371. END
        2372.  
        2373. PFP$WRD0[0] = 0; # SET FLAGS #
        2374. PFP$WRD1[0] = 0; # CLEAR PACK NAME #
        2375. PFP$FG1[0] = TRUE;
        2376. PFP$FG2[0] = TRUE;
        2377. PFP$FG4[0] = TRUE;
        2378.  
        2379. #
        2380. * OPEN THE SMMAP FOR *RS*, *RC* AND *CF* DIRECTIVES.
        2381. #
        2382.  
        2383. IF DBARG$OP[0] EQ "RC"
        2384. OR ( DBARG$OP[0] EQ "RS" AND DBARG$WCN[0] NQ 0 )
        2385. OR (DBARG$OP[0] EQ "CF"
        2386. AND (DBARG$FL[0] EQ "ME" OR DBARG$FO[0] LS 0))
        2387. THEN
        2388. BEGIN # OPEN SMMAP #
        2389. PFP$FAM[0] = DEF$FAM; # SET FAMILY AND USER INDEX #
        2390. PFP$UI[0] = DEF$UI;
        2391. SETPFP(PFP);
        2392. IF PFP$STAT[0] NQ 0
        2393. THEN # DEFAULT FAMILY NOT FOUND #
        2394. BEGIN
        2395. DBMSG$LN[0] = " FAMILY NOT FOUND.";
        2396. MESSAGE(DBMSG[0],SYSUDF1);
        2397. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        2398. END
        2399.  
        2400. MAP$SM[0] = DBARG$SM[0];
        2401. MOPEN(DBARG$SMID[0],MAP$NAM[0],"RM",RESPCODE);
        2402. IF RESPCODE NQ CMASTAT"NOERR"
        2403. THEN # UNABLE TO OPEN MAP #
        2404. BEGIN
        2405. DBRESP(RESPCODE,0);
        2406. TEST I;
        2407. END
        2408.  
        2409. ELSE # MAP OPENED #
        2410. BEGIN
        2411. LOFPROC(MAP$NAM[0]); # ADD LFN TO LIST OF FILES #
        2412. END
        2413.  
        2414. END # OPEN SMMAP #
        2415.  
        2416. #
        2417. * OPEN THE CATALOG FOR *RF*, *RP*, *RL*, AND *CF* DIRECTIVES.
        2418. #
        2419.  
        2420. IF DBARG$OP[0] EQ "RF"
        2421. OR DBARG$OP[0] EQ "RP"
        2422. OR DBARG$OP[0] EQ "RL"
        2423. OR (DBARG$OP[0] EQ "CF" AND DBARG$FL[0] EQ "ME"
        2424. AND DBARG$FO[0] GR 0)
        2425. THEN
        2426. BEGIN # OPEN CATALOG #
        2427. PFP$FAM[0] = DBARG$FM[0]; # SET FAMILY AND USER INDEX #
        2428. PFP$UI[0] = DEF$UI + DBARG$SB[0];
        2429. SETPFP(PFP);
        2430. IF PFP$STAT[0] NQ 0
        2431. THEN # FAMILY NOT FOUND #
        2432. BEGIN
        2433. DBMSG$LN[0] = " FAMILY NOT FOUND.";
        2434. MESSAGE(DBMSG[0],SYSUDF1);
        2435. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        2436. END
        2437.  
        2438. CAT$NAM[0] = SFMCAT;
        2439. DIS$SB = XCOD(DBARG$SB[0]);
        2440. CAT$SB[0] = C<9,1>DIS$SB;
        2441. COPEN(DBARG$FM[0],DBARG$SB[0],CATNAME[0],"RM",TRUE,RESPCODE);
        2442. IF RESPCODE NQ CMASTAT"NOERR"
        2443. THEN # UNABLE TO OPEN CATALOG #
        2444. BEGIN
        2445. DBRESP(RESPCODE,0);
        2446. TEST I;
        2447. END
        2448.  
        2449. ELSE # CATALOG OPENED #
        2450. BEGIN
        2451. LOFPROC(OCT$LFN[1]); # ADD LFN TO LIST OF FILES #
        2452. END
        2453.  
        2454. END # OPEN CATALOG #
        2455.  
        2456. #
        2457. * PROCESS THE DIRECTIVE.
        2458. #
        2459.  
        2460. SLOWFOR J = 0 STEP 1 UNTIL DBDIRNM
        2461. DO
        2462. BEGIN # FIND MATCHING DIRECTIVE #
        2463. IF DB$DIRNM[J] EQ DBARG$OP[0]
        2464. THEN
        2465. BEGIN
        2466. GOTO DIR$ACT[J];
        2467. CMAP: # REMOVE SMMAP ENTRY #
        2468. DBCMAP;
        2469. TEST I;
        2470.  
        2471. FMAP: # REMOVE *FCT* ENTRY #
        2472. DBFMAP;
        2473. TEST I;
        2474.  
        2475. REL: # RELEASE PROBLEM CHAINS #
        2476. DBREL;
        2477. TEST I;
        2478.  
        2479. RDFIL: # READ FILE #
        2480. DBRDFIL;
        2481. TEST I;
        2482.  
        2483. RDSTM:
        2484. DBRDSTM; # READ AU #
        2485. TEST I;
        2486.  
        2487. FLAG:
        2488. DBFLAG; # CHANGE FLAG #
        2489. TEST I;
        2490.  
        2491. END
        2492.  
        2493. END # FIND MATCHING DIRECTIVE #
        2494.  
        2495. END # PROCESS EACH DIRECTIVE #
        2496.  
        2497. RETURN;
        2498.  
        2499. END # DBMAIN #
        2500.  
        2501. TERM
        2502. PROC DBOPT(FLAG);
        2503. # TITLE DBOPT - CHECKS CRACKED PARAMETERS FOR VALID OPTIONS. #
        2504.  
        2505. BEGIN # DBOPT #
        2506.  
        2507. #
        2508. ** DBOPT - CHECKS CRACKED PARAMETERS FOR VALID OPTIONS.
        2509. *
        2510. * PROC DBOPT(FLAG)
        2511. *
        2512. * ENTRY THE CRACKED AND CONVERTED PARAMETERS ARE SET UP
        2513. * IN THE COMMON AREA DEFINED IN *COMTDBP*.
        2514. *
        2515. * EXIT ALL OPTIONS HAVE BEEN CHECKED FOR VALIDITY.
        2516. * (FLAG) = 0, NO ERROR.
        2517. * 1, VALID OPTION VIOLATED.
        2518. *
        2519. * NOTES ALL THE DIRECTIVES ARE CHECKED FOR VALID
        2520. * OPTIONS. THE VALID OPTIONS ARE
        2521. * 1. *OP* MUST BE A VALID DIRECTIVE NAME.
        2522. * 2. *FO* MUST BE SPECIFIED FOR OP=RF, RP AND RL,
        2523. * AND *ST* MUST BE SPECIFIED FOR OP=RF AND RP.
        2524. * 3. *SB* MUST BE FROM 0 TO 7.
        2525. * 4. *CS* MUST BE FROM A THROUGH H.
        2526. * 5. *SL* AND *SU* MUST BE FROM 1 TO 1931.
        2527. * 5. *SL* AND *SU* MUST BE FROM 1 TO 1931.
        2528. * 6. *SL* MUST BE LESS THAN OR EQUAL TO *SU*.
        2529. * 7. FOR OP=RS, ONE AND ONLY ONE OF THE FOLLOWING
        2530. * PARAMETERS MUST BE SPECIFIED: *V*, *YI*, OR *D*.
        2531. * 8. FOR OP=CF, ONE AND ONLY ONE OF THE FOLLOWING
        2532. * PARAMETERS MUST BE SPECIFIED: *V*, *YI*, OR *FO*.
        2533. * 9. *FL*, *ON*, AND *OF* ARE VALID ONLY FOR OP=CF.
        2534. * 10. FOR OP=CF, *FL* MUST BE A VALID FLAG NAME AND
        2535. * EITHER *ON* OR *OF* MUST BE SPECIFIED.
        2536. * 11. *YI* AND *ZI* MUST BE SPECIFIED TOGETHER.
        2537. * 12. *YI* MUST BE FROM 0 TO 21.
        2538. * 13. *ZI* MUST BE FROM 0 TO 15.
        2539. * 14. *YI*, *ZI* MUST BE SPECIFIED FOR OP=RC.
        2540. *
        2541. * ANY VIOLATION OF THE VALID OPTIONS CAUSES A
        2542. * MESSAGE TO BE PRINTED IN THE DAYFILE AND THE
        2543. * REPORT FILE, AND AN ERROR FLAG TO BE RETURNED
        2544. * TO THE CALLING ROUTINE.
        2545. #
        2546.  
        2547. ITEM FLAG I; # ERROR STATUS #
        2548.  
        2549. #
        2550. **** PROC DBOPT - XREF LIST BEGIN.
        2551. #
        2552.  
        2553. XREF
        2554. BEGIN
        2555. PROC DBERR; # ERROR PROCESSOR #
        2556. END
        2557.  
        2558. #
        2559. **** PROC DBOPT - XREF LIST END.
        2560. #
        2561.  
        2562. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        2563. *CALL COMBFAS
        2564. *CALL COMBCPR
        2565. *CALL COMTDBP
        2566. *CALL COMTDBG
        2567. *CALL COMTDER
        2568. *CALL COMTLAB
        2569.  
        2570. ITEM FOUND B; # SEARCH FLAG #
        2571. ITEM I I; # LOOP INDUCTION VARIABLE #
        2572. ITEM OPTCOUNT I; # OPTION COUNT #
        2573.  
        2574. CONTROL EJECT;
        2575.  
        2576. FLAG = 1; # INITIALIZE #
        2577.  
        2578. #
        2579. * CHECK FOR A LEGAL DIRECTIVE NAME.
        2580. #
        2581.  
        2582. FOUND = FALSE;
        2583. FASTFOR I = 0 STEP 1 UNTIL DBDIRNM
        2584. DO
        2585. BEGIN # SEARCH FOR MATCHING DIRECTIVE NAME #
        2586. IF DBARG$OP[0] EQ DB$DIRNM[I]
        2587. THEN
        2588. BEGIN
        2589. FOUND = TRUE;
        2590. END
        2591.  
        2592. END # SEARCH FOR MATCHING DIRECTIVE NAME #
        2593.  
        2594. IF NOT FOUND
        2595. THEN # ILLEGAL DIRECTIVE #
        2596. BEGIN
        2597. DBERRCODE = S"DILLEG$DIR";
        2598. DBERR(DBERRCODE);
        2599. RETURN;
        2600. END
        2601.  
        2602. #
        2603. * CHECK IF *FO* SPECIFIED CORRECTLY.
        2604. #
        2605.  
        2606. IF DBARG$FO[0] EQ -1 ##
        2607. OR (DBARG$FO[0] EQ -2 ##
        2608. AND (DBARG$OP[0] EQ "RF" ##
        2609. OR DBARG$OP[0] EQ "RP" ##
        2610. OR DBARG$OP[0] EQ "RL"))
        2611. OR ( DBARG$FO[0] GQ 0 AND DBARG$FO[0] LS MINFO )
        2612. OR ( DBARG$FO[0] GR MAXFO )
        2613. THEN # *FO* OPTION VIOLATED #
        2614. BEGIN
        2615. DBERRCODE = S"DVIOL$FO";
        2616. DBERR(DBERRCODE);
        2617. RETURN;
        2618. END
        2619.  
        2620. #
        2621. * CHECK IF *ST* IS SPECIFIED CORRECTLY.
        2622. #
        2623.  
        2624. IF DBARG$ST[0] EQ -1 ##
        2625. OR ( ( DBARG$ST[0] EQ -2 ##
        2626. OR DBARG$ST[0] EQ 0 ) ##
        2627. AND (DBARG$OP[0] EQ "RF" ##
        2628. OR DBARG$OP[0] EQ "RP"))
        2629. THEN # *ST* OPTION VIOLATED #
        2630. BEGIN
        2631. DBERRCODE = S"DVIOL$ST";
        2632. DBERR(DBERRCODE);
        2633. RETURN;
        2634. END
        2635.  
        2636. #
        2637. * CHECK THE VALUE OF *SB*.
        2638. #
        2639.  
        2640. IF DBARG$SB[0] LS 0 ##
        2641. OR DBARG$SB[0] GR 7
        2642. THEN # *SB* OPTION VIOLATED #
        2643. BEGIN
        2644. DBERRCODE = S"DVIOL$SB";
        2645. DBERR(DBERRCODE);
        2646. RETURN;
        2647. END
        2648.  
        2649. #
        2650. * CHECK THE VALUE OF *SM*.
        2651. #
        2652.  
        2653. IF DBARG$SM[0] LS "A" ##
        2654. OR DBARG$SM[0] GR "H" ##
        2655. OR DBARG$WSM[0] NQ 0 ##
        2656. THEN # *SM* OPTION VIOLATED #
        2657. BEGIN
        2658. DBERRCODE = S"DVIOL$SM";
        2659. DBERR(DBERRCODE);
        2660. RETURN;
        2661. END
        2662.  
        2663. #
        2664. * CHECK THE VALUE OF *SL*.
        2665. #
        2666.  
        2667. IF ( DBARG$SL[0] LS 0 ##
        2668. OR DBARG$SL[0] GR INAVOT ) # MAXIMUM AU PER CARTRIDGE #
        2669. OR ( DBARG$OP[0] EQ "RS" ##
        2670. AND DBARG$SL[0] EQ 0 ) ##
        2671. THEN # *SL* OPTION VIOLATED #
        2672. BEGIN
        2673. DBERRCODE = S"DVIOL$SL";
        2674. DBERR(DBERRCODE);
        2675. RETURN;
        2676. END
        2677.  
        2678. #
        2679. * CHECK THE VALUE OF *SU*.
        2680. #
        2681.  
        2682. IF ( DBARG$SU[0] LS 0 ##
        2683. OR DBARG$SU[0] GR INAVOT ) # MAXIMUM AU PER CARTRIDGE #
        2684. OR ( DBARG$OP[0] EQ "RS" ##
        2685. AND DBARG$SU[0] EQ 0 ) ##
        2686. OR DBARG$SU[0] LS DBARG$SL[0]
        2687. THEN # *SU* OPTION VIOLATED #
        2688. BEGIN
        2689. DBERRCODE = S"DVIOL$SU";
        2690. DBERR(DBERRCODE);
        2691. RETURN;
        2692. END
        2693.  
        2694. #
        2695. * CHECK THE VALUE OF *CN*
        2696. #
        2697.  
        2698. IF DBARG$WCN[0] EQ -1
        2699. THEN # *CN* OPTION VIOLATED #
        2700. BEGIN
        2701. DBERRCODE = S"DVIOL$V";
        2702. DBERR(DBERRCODE);
        2703. RETURN;
        2704. END
        2705.  
        2706.  
        2707. #
        2708. * CHECK THE VALUE OF *YI* AND *ZI*.
        2709. #
        2710.  
        2711. IF DBARG$YI[0] LS -1 ##
        2712. OR DBARG$ZI[0] LS -1 ##
        2713. OR DBARG$YI[0] GR MAX$Y ##
        2714. OR DBARG$ZI[0] GR MAX$Z ##
        2715. OR DBARG$ZI[0] EQ Z$NO$CUBE
        2716. THEN # *YI*, *ZI* OPTION VIOLATED #
        2717. BEGIN
        2718. DBERRCODE = S"DVIOL$YZ";
        2719. DBERR(DBERRCODE);
        2720. RETURN;
        2721. END
        2722.  
        2723. #
        2724. * CHECK IF *YI* AND *ZI* ARE SPECIFIED TOGETHER.
        2725. #
        2726.  
        2727. IF (DBARG$YI[0] EQ -1 ##
        2728. AND DBARG$ZI[0] GQ 0) ##
        2729. OR (DBARG$YI[0] GQ 0 ##
        2730. AND DBARG$ZI[0] EQ -1)
        2731. THEN # *YI*, *ZI* OPTION VIOLATED #
        2732. BEGIN
        2733. DBERRCODE = S"DVIOL$YZ";
        2734. DBERR(DBERRCODE);
        2735. RETURN;
        2736. END
        2737.  
        2738. #
        2739. * *YI*, *ZI* MUST BE SPECIFIED FOR OP=RC.
        2740. #
        2741.  
        2742. IF DBARG$OP[0] EQ "RC" ##
        2743. AND DBARG$YI[0] EQ -1
        2744. THEN # *YI*, *ZI* OPTION VIOLATED #
        2745. BEGIN
        2746. DBERRCODE = S"DVIOL$YZ";
        2747. DBERR(DBERRCODE);
        2748. RETURN;
        2749. END
        2750.  
        2751. #
        2752. * FOR OP=RS, ONE AND ONLY ONE OF THE FOLLOWING MUST BE
        2753. * SPECIFIED: *CN*, OR *YI*. FOR OP=CF, ONE AND ONLY
        2754. * ONE OF THE FOLLOWING MUST BE SPECIFIED: *CN*, *YI*, OR *FO*.
        2755. #
        2756.  
        2757. IF DBARG$OP[0] EQ "RS" OR DBARG$OP[0] EQ "CF"
        2758. THEN
        2759. BEGIN # CHECK *CN*, *YI*, AND *FO* #
        2760. OPTCOUNT = 0;
        2761. IF DBARG$WCN[0] NQ 0
        2762. THEN # *CN* SPECIFIED #
        2763. BEGIN
        2764. OPTCOUNT = OPTCOUNT + 1;
        2765. END
        2766.  
        2767. IF DBARG$YI[0] GQ 0
        2768. THEN # *YI* SPECIFIED #
        2769. BEGIN
        2770. OPTCOUNT = OPTCOUNT + 1;
        2771. END
        2772.  
        2773. IF DBARG$OP[0] EQ "CF" ##
        2774. AND DBARG$FO[0] GR 0
        2775. THEN # *FO* SPECIFIED AND OP=CF #
        2776. BEGIN
        2777. OPTCOUNT = OPTCOUNT + 1;
        2778. DBERRCODE = S"DVIOL$VFOX";
        2779. END
        2780.  
        2781. IF OPTCOUNT NQ 1
        2782. THEN # OPTION VIOLATED #
        2783. BEGIN
        2784. DBERR(DBERRCODE);
        2785. RETURN;
        2786. END
        2787.  
        2788. END # CHECK *CN*, *YI*, AND *FO* #
        2789.  
        2790.  
        2791. #
        2792. * *FL* IS REQUIRED FOR OP=CF, AND NOT ALLOWED FOR ANY
        2793. * OTHER DIRECTIVES.
        2794. #
        2795.  
        2796. IF (DBARG$OP[0] EQ "CF" AND DBARG$FL[0] LQ 0)
        2797. OR (DBARG$OP[0] NQ "CF" AND DBARG$FL[0] GR 0)
        2798. THEN # *FL* OPTION VIOLATED #
        2799. BEGIN
        2800. DBERRCODE = S"DVIOL$FL";
        2801. DBERR(DBERRCODE);
        2802. RETURN;
        2803. END
        2804.  
        2805. #
        2806. * EITHER *ON* OR *OF* (BUT NOT BOTH) MUST BE SPECIFIED FOR
        2807. * OP=CF, BUT NEITHER MAY BE USED WITH OTHER DIRECTIVES.
        2808. #
        2809.  
        2810. IF (DBARG$OP[0] EQ "CF" AND DBARG$ON[0] EQ DBARG$OF[0])
        2811. OR (DBARG$OP[0] NQ "CF"
        2812. AND ((DBARG$ON[0] NQ 0) OR (DBARG$OF[0] NQ 0)))
        2813. THEN # *ON*, *OF* OPTION VIOLATED #
        2814. BEGIN
        2815. DBERRCODE = S"DVIOL$ONOF";
        2816. DBERR(DBERRCODE);
        2817. RETURN;
        2818. END
        2819.  
        2820. #
        2821. * CHECK FOR A VALID VALUE OF *FL*.
        2822. #
        2823.  
        2824. IF DBARG$OP[0] EQ "CF"
        2825. THEN # CHANGE FLAG DIRECTIVE #
        2826. BEGIN # CHECK *FL* #
        2827. FOUND = FALSE;
        2828. FASTFOR I = 0 STEP 1 WHILE NOT FOUND AND I LQ DBFLAGNM
        2829. DO
        2830. BEGIN
        2831. IF DBARG$FL[0] EQ DB$FLAG[I]
        2832. THEN
        2833. BEGIN
        2834. FOUND = TRUE;
        2835. DBARG$FLCD[0] = DB$FLCODE[I]; # SAVE STATUS VALUE #
        2836. DBARG$FLSD[0] = DB$FLSTR[I]; # AU DETAIL FLAG #
        2837. END
        2838.  
        2839. END
        2840.  
        2841. IF NOT FOUND
        2842. THEN
        2843. BEGIN
        2844. DBERRCODE = S"DVIOL$FL";
        2845. DBERR(DBERRCODE);
        2846. RETURN;
        2847. END
        2848.  
        2849. END # CHECK *FL* #
        2850.  
        2851. FLAG = 0; # NO ERRORS DETECTED #
        2852. RETURN;
        2853.  
        2854. END # DBOPT #
        2855.  
        2856. TERM
        2857. PROC DBRDFIL;
        2858. # TITLE DBRDFIL - PROCESS READ FILE DIRECTIVE. #
        2859.  
        2860. BEGIN # DBRDFIL #
        2861.  
        2862. #
        2863. ** DBRDFIL - PROCESS READ FILE DIRECTIVE.
        2864. *
        2865. * PROC DBRDFIL.
        2866. *
        2867. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVE IS
        2868. * IN THE COMMON AREA DEFINED IN *COMTDBP*.
        2869. * THE CATALOG IS OPEN FOR THE SPECIFIED FAMILY
        2870. * AND SUBFAMILY.
        2871. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        2872. * (USER$FAM) = USER-S FAMILY NAME.
        2873. * (USER$UI) = USER-S USER INDEX.
        2874. *
        2875. * EXIT THE DIRECTIVE HAS BEEN PROCESSED AND
        2876. * THE CATALOG HAS BEEN CLOSED OR AN ERROR
        2877. * CONDITION HAS BEEN DETECTED.
        2878. *
        2879. * MESSAGES SSDEBUG ABNORMAL, DBRDFIL.
        2880. *
        2881. * NOTES THE CARTRIDGE IS LOADED AND A REQUEST IS SENT
        2882. * TO EXEC TO COPY EACH RAW AU IN THE CHAIN
        2883. * TO THE SPECIFIED FILE. IF AN OFF CARTRIDGE
        2884. * LINK EXISTS THE NEXT CARTRIDGE IS LOADED. THIS
        2885. * SEQUENCE IS REPEATED UNTIL THE ENTIRE FILE IS
        2886. * COPIED. IF FROZEN CHAIN FLAG IS SET
        2887. * *SSDEBUG* ABORTS WITH A DAYFILE MESSAGE.
        2888. #
        2889.  
        2890. #
        2891. **** PROC DBRDFIL - XREF LIST BEGIN.
        2892. #
        2893.  
        2894. XREF
        2895. BEGIN
        2896. PROC CCLOSE; # CLOSES THE CATALOG #
        2897. PROC CGETFCT; # GET *FCT* ENTRY #
        2898. PROC DBCALL4; # ISSUES A TYPE 4 UCP REQUEST #
        2899. PROC DBERR; # ERROR PROCESSOR #
        2900. PROC DBRESP; # PROCESSES RESPONSE FROM EXEC #
        2901. PROC MESSAGE; # DISPLAYS MESSAGES #
        2902. PROC PFD; # *PFM* REQUEST INTERFACE #
        2903. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        2904.   OR RETURN #
        2905. PROC RETERN; # RETURNS A FILE #
        2906. PROC SETPFP; # SET FAMILY AND USER INDEX #
        2907. PROC ZSETFET; # INITIALIZES A FET #
        2908. END
        2909.  
        2910. #
        2911. **** PROC DBRDFIL - XREF LIST END.
        2912. #
        2913.  
        2914. DEF PROCNAME #"DBRDFIL."#; # PROC NAME #
        2915.  
        2916. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        2917. *CALL COMBFAS
        2918. *CALL COMBCMS
        2919. *CALL COMBCPR
        2920. *CALL COMBMCT
        2921. *CALL COMBPFP
        2922. *CALL COMSPFM
        2923. *CALL COMTDBG
        2924. *CALL COMTDBP
        2925. *CALL COMTDER
        2926.  
        2927. ITEM ANOTHERVOL B; # MORE VOLUMES ON CARTRIDGE #
        2928. ITEM CHNCNTRL I; # CHAIN CONTROL FIELD #
        2929. ITEM FCTBADR I; # FWA OF BUFFER FOR *FCT* #
        2930. ITEM FLAG I; # ERROR STATUS #
        2931. ITEM GTNXTCART B; # GET NEXT CARTRIDGE FLAG #
        2932. ITEM LAST B; # END OF CHAIN INDICATOR #
        2933. ITEM LINK I; # OFF CARTRIDGE LINK #
        2934. ITEM NXTFCT I; # NEXT *FCT* ENTRY ORDINAL #
        2935. ITEM NXTSTRM I; # NEXT AU IN THE CHAIN #
        2936. ITEM RESPCODE I; # RESPONSE FROM EXEC #
        2937. ITEM SH I; # STRIPE HIGH #
        2938. ITEM SL I; # STRIPE LOW #
        2939. ITEM TEMP I; # INTEGER SCRATCH #
        2940. ARRAY FCTENT [0:0] P(FCTENTL);; # *FCT* ENTRY #
        2941. ARRAY SCRFET [0:0] S(SFETL);; # SCRATCH FET #
        2942.  
        2943.  
        2944. CONTROL EJECT;
        2945.  
        2946. #
        2947. * DEFINE THE USER-S FILE TO RECEIVE THE RAW AU DATA.
        2948. #
        2949.  
        2950. RESTPFP(PFP$RESUME); # RESTORE USER-S *PFP* #
        2951.  
        2952. FLAG = 0;
        2953. PFD("DEFINE",DBARG$PF[0],0,"RC",FLAG,0);
        2954. IF FLAG NQ OK
        2955. THEN # UNABLE TO DEFINE USER-S FILE #
        2956. BEGIN
        2957. DBERRCODE = S"DDEF$PF";
        2958. DBERR(DBERRCODE);
        2959. RETURN;
        2960. END
        2961.  
        2962. ZSETFET(LOC(SCRFET[0]),DBARG$PF[0],0,0,SFETL);
        2963. RETERN(SCRFET[0],RCL);
        2964.  
        2965. GTNXTCART = TRUE; # INITIALIZE THE FLAGS #
        2966. LINK = 0;
        2967. ANOTHERVOL = FALSE;
        2968. NXTFCT = DBARG$FO[0];
        2969. SL = INSPAU*DBARG$ST[0] + (INFTST - INSPAU);
        2970. NXTSTRM = DBARG$ST[0];
        2971. LAST = FALSE;
        2972. FCTBADR = LOC(FCTENT[0]);
        2973.  
        2974. #
        2975. * COPY EACH AU OF THE FILE.
        2976. #
        2977.  
        2978. REPEAT WHILE NOT LAST
        2979. DO
        2980. BEGIN # COPY RAW AU #
        2981. IF GTNXTCART ##
        2982. AND NOT ANOTHERVOL
        2983. THEN
        2984. BEGIN # GET NEXT CARTRIDGE #
        2985. CGETFCT(DBARG$FM[0],DBARG$SB[0],DBARG$SMID[0],NXTFCT,
        2986. FCTBADR,0,FLAG);
        2987. IF FLAG NQ CMASTAT"NOERR"
        2988. THEN # UNABLE TO GET *FCT* ENTRY #
        2989. BEGIN
        2990. DBRESP(FLAG,0);
        2991. RETURN;
        2992. END
        2993.  
        2994. #
        2995. * CHECK FOR FROZEN CHAIN.
        2996. #
        2997.  
        2998. P<FCT> = FCTBADR;
        2999. IF FCT$Y[0] EQ 0 AND FCT$Z[0] EQ 0
        3000. THEN # NO CARTRIDGE FOR *FO* #
        3001. BEGIN
        3002. FLAG = CMASTAT"ORDERR";
        3003. DBRESP(FLAG,0);
        3004. END
        3005.  
        3006. FLAG = FCT$FRCF(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3007. IF FLAG EQ 1
        3008. THEN # FROZEN CHAIN #
        3009. BEGIN
        3010. DBERRCODE = S"DFROZ$CHN";
        3011. DBERR(DBERRCODE);
        3012. RETURN;
        3013. END
        3014.  
        3015. SETFCTX(NXTSTRM);
        3016. TEMP = FCT$LEN(FWD,FPS);
        3017. SH = SL + INSPAU*TEMP + INSPAU - 1;
        3018.  
        3019. #
        3020. * CHECK FOR BEGINNING OF VOLUME.
        3021. #
        3022.  
        3023. FLAG = FCT$CC(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3024. IF FLAG NQ CHAINCON"FIRST" ##
        3025. AND FLAG NQ CHAINCON"ONLY" ##
        3026. AND LINK EQ 0 # NOT CONTINUATION CARTRIDGE #
        3027. THEN # INVALID STARTING AU #
        3028. BEGIN
        3029. DBERRCODE = S"DVIOL$ST";
        3030. DBERR(DBERRCODE);
        3031. RETURN;
        3032. END
        3033.  
        3034. #
        3035. * CHECK FOR ALLOCATED AU.
        3036. #
        3037.  
        3038. FLAG = FCT$FBF(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3039. IF FLAG EQ 0
        3040. THEN # AU NOT ALLOCATED #
        3041. BEGIN
        3042. DBERRCODE = S"DVIOL$ST";
        3043. DBERR(DBERRCODE);
        3044. RETURN;
        3045. END
        3046.  
        3047. #
        3048. * CHECK FOR AU CONFLICT.
        3049. #
        3050.  
        3051. FLAG = FCT$AUCF(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3052. IF FLAG NQ 0
        3053. THEN # INTERSECTING CHAIN #
        3054. BEGIN
        3055. DBERRCODE = S"DVIOL$ST";
        3056. DBERR(DBERRCODE);
        3057. RETURN;
        3058. END
        3059.  
        3060. #
        3061. * CHECK FOR START OF FRAGMENT.
        3062. #
        3063.  
        3064. FLAG = FCT$SFF(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3065. IF FLAG NQ 0
        3066. THEN # START OF FRAGMENT #
        3067. BEGIN
        3068. DBERRCODE = S"DVIOL$ST";
        3069. DBERR(DBERRCODE);
        3070. RETURN;
        3071. END
        3072.  
        3073. #
        3074. * LOAD THE CARTRIDGE.
        3075. #
        3076.  
        3077. P<FCT> = FCTBADR;
        3078. DBCALL4(REQTYP4"LOAD$CART",FCT$Y[0],FCT$Z[0],0,0,0,0,
        3079. RESPCODE);
        3080. IF RESPCODE NQ RESPTYP4"OK4"
        3081. THEN # UNABLE TO LOAD CARTRIDGE #
        3082. BEGIN
        3083. DBRESP(RESPCODE,TYP"TYP4");
        3084. RETURN;
        3085. END
        3086.  
        3087. TRNSPORT = CPR$DRD[0]; # SET UP TRANSPORT ID #
        3088. GTNXTCART = FALSE;
        3089. END # GET NEXT CARTRIDGE #
        3090.  
        3091. #
        3092. * COPY THE RAW AU.
        3093. #
        3094.  
        3095. ANOTHERVOL = FALSE;
        3096. DBCALL4(REQTYP4"CP$RAW$AU",FCT$Y[0],FCT$Z[0],SL,SH,
        3097. USER$FAM[0],USER$UI[0],RESPCODE);
        3098. IF RESPCODE NQ RESPTYP4"OK4"
        3099. THEN # UNABLE TO COPY RAW AU #
        3100. BEGIN
        3101. DBRESP(RESPCODE,TYP"TYP4");
        3102. RETURN;
        3103. END
        3104.  
        3105. #
        3106. * GET THE NEXT AU IN THE CHAIN.
        3107. #
        3108.  
        3109. LINK = FCT$CLKOCL(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3110. IF LINK NQ 0
        3111. THEN # OFF CARTRIDGE LINK TEST #
        3112. BEGIN # OFF CARTRIDGE LINK EXISTS #
        3113. GTNXTCART = TRUE;
        3114. IF LINK EQ 1
        3115. THEN # USE FIRST OFF CARTRIDGE LINK #
        3116. BEGIN
        3117. NXTFCT = FCT$OCL[0] + MINFO;
        3118. END
        3119.  
        3120. IF LINK EQ 2
        3121. THEN # USE SECOND OFF CARTRIDGE LINK #
        3122. BEGIN
        3123. NXTFCT = FCT$OCL1[0] + MINFO;
        3124. END
        3125.  
        3126. IF LINK EQ 3
        3127. THEN # USE THIRD OFF CARTRIDGE LINK #
        3128. BEGIN
        3129. NXTFCT = FCT$OCL2[0] + MINFO;
        3130. END
        3131.  
        3132. DBCALL4(REQTYP4"UNLD$CART",FCT$Y[0],FCT$Z[0],0,0,0,0,
        3133. RESPCODE);
        3134. IF RESPCODE NQ RESPTYP4"OK4"
        3135. THEN # UNABLE TO UNLOAD CARTRIDGE #
        3136. BEGIN
        3137. DBRESP(RESPCODE,TYP"TYP4");
        3138. RETURN;
        3139. END
        3140.  
        3141. NXTSTRM = FCT$LINK(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3142. SL = INSPAU*NXTSTRM + (INFTST - INSPAU);
        3143. END # OFF CARTRIDGE LINK EXISTS #
        3144.  
        3145. IF LINK EQ 0
        3146. THEN # NO OFF CARTRIGE LINK #
        3147. BEGIN # NO OFF CARTRIDGE LINK #
        3148. CHNCNTRL = FCT$CC(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3149. IF CHNCNTRL EQ CHAINCON"LAST" ##
        3150. OR CHNCNTRL EQ CHAINCON"ONLY"
        3151. THEN # END OF CHAIN #
        3152. BEGIN
        3153. LAST = TRUE;
        3154. TEST DUMMY;
        3155. END
        3156.  
        3157. NXTSTRM = FCT$LINK(FCT$WD(NXTSTRM),FCT$WP(NXTSTRM));
        3158. SL = INSPAU*NXTSTRM + (INFTST - INSPAU);
        3159. SETFCTX(NXTSTRM);
        3160. TEMP = FCT$LEN(FWD,FPS);
        3161. SH = SL + INSPAU*TEMP + INSPAU - 1;
        3162. ANOTHERVOL = TRUE;
        3163. END # NO OFF CARTRIDGE LINK #
        3164.  
        3165. END # COPY RAW AU #
        3166.  
        3167. #
        3168. * UNLOAD THE CARTRIDGE.
        3169. #
        3170.  
        3171. DBCALL4(REQTYP4"UNLD$CART",FCT$Y[0],FCT$Z[0],0,0,0,0,
        3172. RESPCODE);
        3173. IF RESPCODE NQ RESPTYP4"OK4"
        3174. THEN # PROCESS ERROR RESPONSE #
        3175. BEGIN
        3176. DBRESP(RESPCODE,TYP"TYP4");
        3177. RETURN;
        3178. END
        3179.  
        3180. CCLOSE(DBARG$FM[0],DBARG$SB[0],0,FLAG);
        3181. IF FLAG NQ CMASTAT"NOERR"
        3182. THEN # UNABLE TO CLOSE CATALOG #
        3183. BEGIN
        3184. DBRESP(FLAG,0);
        3185. END
        3186.  
        3187. RETURN;
        3188.  
        3189. END # DBRDFILE #
        3190.  
        3191. TERM
        3192. PROC DBRDSTM;
        3193. # TITLE DBRDSTM - PROCESS READ AU DIRECTIVE. #
        3194.  
        3195. BEGIN # DBRDSTM #
        3196.  
        3197. #
        3198. ** DBRDSTM - PROCESS READ AU DIRECTIVE.
        3199. *
        3200. * PROC DBRDSTM.
        3201. *
        3202. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVE IS
        3203. * IN THE COMMON AREA DEFINED IN *COMTDBG*.
        3204. * THE MAP FOR THE SPECIFIED SM IS OPEN.
        3205. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        3206. * (USER$FAM) = USER-S FAMILY NAME.
        3207. * (USER$UI) = USER-S USER INDEX.
        3208. *
        3209. * EXIT THE DIRECTIVE HAS BEEN PROCESSED AND
        3210. * THE MAP HAS BEEN CLOSED OR AN ERROR
        3211. * CONDITION HAS BEEN DETECTED.
        3212. *
        3213. * MESSAGES SSDEBUG ABNORMAL, DBRDSTM.
        3214. *
        3215. * NOTES THE SPECIFIED CARTRIDGE IS LOADED AND A REQUEST
        3216. * IS SENT TO EXEC TO COPY EACH SELECTED AU TO
        3217. * THE SPECIFIED FILE.
        3218. #
        3219.  
        3220. #
        3221. **** PROC DBRDSTM - XREF LIST BEGIN.
        3222. #
        3223.  
        3224. XREF
        3225. BEGIN
        3226. PROC DBCALL4; # ISSUES TYPE 4 UCP REQUEST #
        3227. PROC DBERR; # ERROR PROCESSOR #
        3228. PROC DBRESP; # PROCESSES RESPONSE FROM EXEC #
        3229. PROC DBVSN; # SEARCH SM MAP FOR A VSN #
        3230. PROC MCLOSE; # CLOSES SMMAP #
        3231. PROC MESSAGE; # DISPLAYS MESSAGES #
        3232. PROC PFD; # *PFM* REQUEST INTERFACE #
        3233. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        3234.   OR RETURN #
        3235. PROC RETERN; # RETURNS A FILE #
        3236. PROC SETPFP; # SET FAMILY AND USER INDEX #
        3237. PROC ZSETFET; # INITIALIZES A FET #
        3238. END
        3239.  
        3240. #
        3241. **** PROC DBRDSTM - XREF LIST END.
        3242. #
        3243.  
        3244. DEF PROCNAME #"DBRDSTM."#; # PROC NAME #
        3245.  
        3246. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3247. *CALL COMBFAS
        3248. *CALL COMBCMS
        3249. *CALL COMBCPR
        3250. *CALL COMBMAP
        3251. *CALL COMBPFP
        3252. *CALL COMSPFM
        3253. *CALL COMTDBG
        3254. *CALL COMTDBP
        3255. *CALL COMTDER
        3256.  
        3257. ITEM FLAG I; # ERROR STATUS #
        3258. ITEM I I; # LOOP INDUCTION VARIABLE #
        3259. ITEM RESPCODE I; # RESPONSE CODE #
        3260. ITEM STRIPELO I; # INITIAL STRIPE #
        3261. ITEM STRIPEHI I; # LAST STRIPE #
        3262. ITEM Y I; # Y COORDINATE #
        3263. ITEM Z I; # Z COORDINATE #
        3264.  
        3265. ARRAY CMAPENT [0:0] P(MAPENTL);; # SMMAP ENTRY #
        3266. ARRAY SCRFET [0:0] S(SFETL);; # SCRATCH FET #
        3267.  
        3268. CONTROL EJECT;
        3269.  
        3270. #
        3271. * DEFINE THE USER-S FILE TO RECEIVE THE RAW AU DATA.
        3272. #
        3273.  
        3274. RESTPFP(PFP$RESUME); # RESTORE USER-S *PFP* #
        3275.  
        3276. FLAG = 0;
        3277. PFD("DEFINE",DBARG$PF[0],0,"RC",FLAG,0);
        3278. IF FLAG NQ OK
        3279. THEN # UNABLE TO DEFINE USER-S FILE #
        3280. BEGIN
        3281. DBERRCODE = S"DDEF$PF";
        3282. DBERR(DBERRCODE);
        3283. RETURN;
        3284. END
        3285.  
        3286. ZSETFET(LOC(SCRFET[0]),DBARG$PF[0],0,0,SFETL);
        3287. RETERN(SCRFET[0],RCL);
        3288.  
        3289. #
        3290. * LOCATE THE CARTRIDGE.
        3291. #
        3292.  
        3293. Y = DBARG$YI[0]; # COORDINATES SPECIFIED, IF ANY #
        3294. Z = DBARG$ZI[0];
        3295.  
        3296. IF DBARG$D[0] GQ -1
        3297. THEN # CARTRIDGE IN INPUT DRAWER #
        3298. BEGIN
        3299. Z = SM$ENT$TY; # SET ENTRY TRAY #
        3300. Y = 0;
        3301. END
        3302.  
        3303. IF DBARG$WCN[0] NQ 0
        3304. THEN
        3305. BEGIN # SEARCH SMMAP FOR THE VSN #
        3306. DBVSN(Y,Z,CMAPENT[0],FLAG);
        3307. IF FLAG NQ OK
        3308. THEN # VSN NOT FOUND #
        3309. BEGIN
        3310. DBERRCODE = S"DVSN$NFND";
        3311. DBERR(DBERRCODE);
        3312. RETURN;
        3313. END
        3314.  
        3315. END # SEARCH SMMAP FOR THE VSN #
        3316.  
        3317. #
        3318. * LOAD THE CARTRIDGE.
        3319. #
        3320.  
        3321. DBCALL4(REQTYP4"LOAD$CART",Y,Z,0,0,0,0,RESPCODE);
        3322. IF RESPCODE NQ RESPTYP4"OK4"
        3323. THEN # UNABLE TO LOAD CARTRIDGE #
        3324. BEGIN
        3325. DBRESP(RESPCODE,TYP"TYP4");
        3326. RETURN;
        3327. END
        3328.  
        3329. TRNSPORT = CPR$DRD[0]; # SET UP TRANSPORT ID #
        3330.  
        3331. #
        3332. * COPY EACH OF THE SELECTED RAW AU.
        3333. #
        3334.  
        3335. STRIPELO = INSPAU*DBARG$SL[0] + ( INFTST - INSPAU );
        3336. STRIPEHI = INSPAU*(DBARG$SU[0] - DBARG$SL[0] + 1) + STRIPELO - 1;
        3337. DBCALL4(REQTYP4"CP$RAW$AU",Y,Z,STRIPELO,STRIPEHI,USER$FAM[0],
        3338. USER$UI[0],RESPCODE);
        3339.  
        3340. #
        3341. * UNLOAD THE CARTRIDGE.
        3342. #
        3343.  
        3344. DBCALL4(REQTYP4"UNLD$CART",Y,Z,0,0,0,0,RESPCODE);
        3345. IF RESPCODE NQ RESPTYP4"OK4"
        3346. THEN # UNABLE TO UNLOAD CARTRIDGE #
        3347. BEGIN
        3348. DBRESP(RESPCODE,TYP"TYP4");
        3349. RETURN;
        3350. END
        3351.  
        3352. IF DBARG$WCN[0] NQ 0
        3353. THEN # MAP OPENED #
        3354. BEGIN
        3355. MCLOSE(DBARG$SMID[0],FLAG);
        3356. IF FLAG NQ CMASTAT"NOERR"
        3357. THEN # UNABLE TO CLOSE SMMAP #
        3358. BEGIN
        3359. DBRESP(FLAG,0);
        3360. END
        3361.  
        3362. END
        3363.  
        3364. RETURN;
        3365.  
        3366. END # DBRDSTM #
        3367.  
        3368. TERM
        3369. PROC DBREL;
        3370. # TITLE DBREL - RELEASE PROBLEM CHAIN AND CLEAR FLAGS. #
        3371.  
        3372. BEGIN # DBREL #
        3373.  
        3374. #
        3375. ** DBREL - RELEASE PROBLEM CHAIN AND CLEAR FLAGS.
        3376. *
        3377. * PROC DBREL.
        3378. *
        3379. * ENTRY THE CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        3380. * ARE IN THE COMMON AREA DEFINED IN *COMTDBP*.
        3381. * THE CATALOG IS OPEN FOR THE SPECIFIED FAMILY AND
        3382. * SUBFAMILY.
        3383. * P<CPR> = FWA OF CALLSS PARAMETER BLOCK.
        3384. *
        3385. * EXIT THE DIRECTIVE HAS BEEN PROCESSED AND THE
        3386. * CATALOG HAS BEEN CLOSED OR AN ERROR CONDI-
        3387. * TION HAS BEEN DETECTED.
        3388. *
        3389. * NOTES THE SELECTED *FCT* ENTRY IS CHECKED FOR THE
        3390. * FROZEN CHAIN FLAG AND IF SET, A REQUEST IS
        3391. * SENT TO EXEC TO RELEASE THE PROBLEM CHAIN.
        3392. #
        3393.  
        3394. #
        3395. **** PROC DBREL - XREF LIST BEGIN.
        3396. #
        3397.  
        3398. XREF
        3399. BEGIN
        3400. PROC CCLOSE; # CLOSES THE CATALOG #
        3401. PROC CGETFCT; # GET *FCT* ENTRY #
        3402. PROC DBCALL3; # ISSUES A TYPE 3 UCP REQUEST #
        3403. PROC DBERR; # ERROR PROCESSOR #
        3404. PROC DBRESP; # PROCESS RESPONSE FROM EXEC #
        3405. END
        3406.  
        3407. #
        3408. **** PROC DBREL - XREF LIST END.
        3409. #
        3410.  
        3411. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3412. *CALL COMBFAS
        3413. *CALL COMBCMS
        3414. *CALL COMBCPR
        3415. *CALL COMBMCT
        3416. *CALL COMTDBG
        3417. *CALL COMTDBP
        3418. *CALL COMTDER
        3419.  
        3420. ITEM FCTBADR I; # FWA OF BUFFER FOR *FCT* #
        3421. ITEM FLAG I; # ERROR STATUS #
        3422. ITEM RESPCODE I; # RESPONSE FROM EXEC #
        3423.  
        3424. ARRAY FCTENT [0:0] P(FCTENTL);; # *FCT* ENTRY #
        3425.  
        3426. CONTROL EJECT;
        3427.  
        3428. #
        3429. * CHECK THE FROZEN CHAIN FLAG IN THE *FCT* ENTRY.
        3430. #
        3431.  
        3432. FCTBADR = LOC(FCTENT[0]);
        3433. CGETFCT(DBARG$FM[0],DBARG$SB[0],DBARG$SMID[0],DBARG$FO[0],
        3434. FCTBADR,0,FLAG);
        3435. IF FLAG NQ CMASTAT"NOERR"
        3436. THEN # UNABLE TO GET *FCT* ENTRY #
        3437. BEGIN
        3438. DBRESP(FLAG,0);
        3439. RETURN;
        3440. END
        3441.  
        3442. P<FCT> = FCTBADR;
        3443. FLAG = FCT$FRCF(FCT$WD(DBARG$ST[0]),FCT$WP(DBARG$ST[0]));
        3444. IF FLAG EQ 0
        3445. THEN # FROZEN CHAIN FLAG NOT SET #
        3446. BEGIN
        3447. DBERRCODE = S"DFROZ$NSET";
        3448. DBERR(DBERRCODE);
        3449. RETURN;
        3450. END
        3451.  
        3452. #
        3453. * RELEASE FROZEN CHAIN.
        3454. #
        3455.  
        3456. DBCALL3(REQTYP3"PURG$FRAG",0,DBARG$FO[0],0,0,RESPCODE);
        3457. IF RESPCODE NQ RESPTYP3"OK3"
        3458. THEN # UNABLE TO RELEASE FROZEN CHAIN #
        3459. BEGIN
        3460. DBRESP(RESPCODE,TYP"TYP3");
        3461. RETURN;
        3462. END
        3463.  
        3464. CCLOSE(DBARG$FM[0],DBARG$SB[0],0,FLAG);
        3465. IF FLAG NQ CMASTAT"NOERR"
        3466. THEN # UNABLE TO CLOSE CATALOG #
        3467. BEGIN
        3468. DBRESP(FLAG,0);
        3469. END
        3470.  
        3471. RETURN;
        3472.  
        3473. END # DBREL #
        3474.  
        3475. TERM
        3476. PROC DBRESP((RESPCODE),(REQTYPE));
        3477. # TITLE DBRESP - PROCESS RESPONSE FROM EXEC. #
        3478.  
        3479. BEGIN # DBRESP #
        3480.  
        3481. #
        3482. ** DBRESP - PROCESS RESPONSE FROM EXEC.
        3483. *
        3484. * PROC DBRESP((RESPCODE),(REQTYPE))
        3485. *
        3486. * ENTRY (RESPCODE) = RESPONSE CODE FROM EXEC.
        3487. * (REQTYPE) = TYPE OF REQUEST SENT TO EXEC.
        3488. * 0, FOR MAP/CATALOG ACCESS ROUTINES.
        3489. *
        3490. * EXIT THE ERROR RESPONSE HAS BEEN PROCESSED.
        3491. *
        3492. * MESSAGES SSDEBUG ABNORMAL, DBRESP.
        3493. *
        3494. * NOTES *SSDEBUG* ERROR PROCESSOR IS CALLED WITH THE
        3495. * CORRESPONDING ERROR CODE.
        3496. #
        3497.  
        3498. ITEM RESPCODE I; # RESPONSE CODE FROM EXEC #
        3499. ITEM REQTYPE I; # TYPE OF REQUEST SENT TO EXEC #
        3500.  
        3501. #
        3502. **** PROC DBRESP - XREF LIST BEGIN.
        3503. #
        3504.  
        3505. XREF
        3506. BEGIN
        3507. PROC DBERR; # ERROR PROCESSOR #
        3508. PROC MESSAGE; # DISPLAYS MESSAGE #
        3509. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        3510.   OR RETURN #
        3511. END
        3512.  
        3513. #
        3514. **** PROC DBRESP - XREF LIST END.
        3515. #
        3516.  
        3517. DEF PROCNAME #"DBRESP."#; # PROC NAME #
        3518.  
        3519. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3520. *CALL COMBFAS
        3521. *CALL COMBCMS
        3522. *CALL COMBCPR
        3523. *CALL COMTDBG
        3524. *CALL COMTDER
        3525.  
        3526. #
        3527. * STATUS SWITCH TO PROCESS THE RESPONSE CODES RETURNED
        3528. * IN RESPONSE TO A TYPE 3 UCP REQUEST.
        3529. #
        3530.  
        3531. SWITCH RESPACT3: RESPTYP3 # TYPE 3 RESPONSE CODES #
        3532. OK3$ACT: OK3, # NO ERROR #
        3533. INTLCK$ACT: C$M$INTLCK, # CATALOG/MAP INTERLOCKED #
        3534. NOPEN$ACT: C$M$NOPEN, # CATALOG/MAP NOT OPEN #
        3535. RESUB$ACT: RESUB$REQ, # RESUBMIT REQUEST #
        3536. SCATEX$ACT: SUB$CAT$EX, # SUBCATALOG ALREADY EYISTS #
        3537. NOSUB$ACT: NO$SUB$CAT, # NO SUCH SUBCATALOG #
        3538. PFPROB$ACT: PF$PROB, # PF PROBLEM #
        3539. NEMPTY$ACT: MSC$NEMPTY, # MSC NOT EMPTY #
        3540. ILLORD$ACT:ILLEG$ORD, # ORDINAL OUT OF RANGE #
        3541. NFROZ$ACT: NFROZ$FRAG, # NON FROZEN FRAGMENT #
        3542. GR$FL$ACT: GROUP$FUL; # GROUP FULL STATUS #
        3543.  
        3544. #
        3545. * STATUS SWITCH TO PROCESS THE RESPONSE CODES
        3546. * RETURNED IN RESPONSE TO A TYPE 4 UCP REQUEST.
        3547. #
        3548.  
        3549. SWITCH RESPACT4: RESPTYP4 # TYPE 4 RESPONSE CODES #
        3550. OK4$ACT: OK4, # NO ERROR #
        3551. CSN$MIS$ACT: CART$LB$ERR, # PART OF LABEL MATCHED #
        3552. CSN$USE$ACT: CSN$IN$USE, # CSN IN USE #
        3553. CELL$EMP$ACT: CELL$EMP, # SPECIFIED CELL EMPTY #
        3554. CELL$FLL$ACT: CELL$FULL, # SPECIFIED CELL FULL #
        3555. EX$DMARK$ACT: EX$DMARK, # EXCESSIVE DMARKS #
        3556. UNK$CART$ACT: UNK$CART, # NO CARTRIDGE LABEL MATCH #
        3557. URDERR$ACT: UN$RD$ERR, # UNRECOVERABLE READ ERROR #
        3558. UWTERR$ACT: UN$WRT$ERR, # UNRECOVERABLE WRITE ERROR #
        3559. VOL$ERR$ACT: VOL$HD$ERR, # VOLUME HEADER ERROR #
        3560. M86HW$PR$ACT: M86$HDW$PR, # M860 HARDWARE PROBLEM #
        3561. RMSER$ACT: RMS$FL$ERR, # DISK FILE ERROR #
        3562. DSKFUL$ACT: DISK$FULL, # DISK FULL #
        3563. ATTER$ACT: ATTACH$ERR, # ATTACH ERROR #
        3564. SMA$OFF$ACT: SMA$OFF, # SM IS OFF #
        3565. EOI$ACT: EOI; # END OF INFORMATION ON FILE #
        3566.  
        3567. CONTROL EJECT;
        3568.  
        3569. #
        3570. * CHECK THE RESPONSE TYPE.
        3571. #
        3572.  
        3573. IF REQTYPE EQ TYP"TYP3"
        3574. THEN # TYPE 3 UCP REQUEST #
        3575. BEGIN
        3576. GOTO RESPACT3[RESPCODE];
        3577. END
        3578.  
        3579. IF REQTYPE EQ TYP"TYP4"
        3580. THEN # TYPE 4 UCP REQUEST #
        3581. BEGIN
        3582. GOTO RESPACT4[RESPCODE];
        3583. END
        3584.  
        3585. IF REQTYPE NQ 0
        3586. THEN # ILLEGAL ERROR TYPE #
        3587. BEGIN
        3588. GOTO ERR;
        3589. END
        3590.  
        3591. #
        3592. * PROCESS RESPONSE FROM CATALOG/MAP ACCESS ROUTINES.
        3593. #
        3594.  
        3595. IF RESPCODE EQ CMASTAT"INTLK"
        3596. THEN # CATALOG/MAP INTERLOCKED #
        3597. BEGIN
        3598. DBERRCODE = S"DC$M$INTLK";
        3599. DBERR(DBERRCODE);
        3600. RETURN;
        3601. END
        3602.  
        3603. IF RESPCODE EQ CMASTAT"ATTERR"
        3604. THEN # ATTACH ERROR #
        3605. BEGIN
        3606. DBERRCODE = S"DPF$PROB";
        3607. DBERR(DBERRCODE);
        3608. RETURN;
        3609. END
        3610.  
        3611. IF RESPCODE EQ CMASTAT"NOSUBCAT"
        3612. THEN # NO SUCH SUBCATALOG #
        3613. BEGIN
        3614. DBERRCODE = S"DNO$SUBCAT";
        3615. DBERR(DBERRCODE);
        3616. RETURN;
        3617. END
        3618.  
        3619. IF RESPCODE EQ CMASTAT"ORDERR"
        3620. THEN # *FCT* ORDINAL OUT OF RANGE #
        3621. BEGIN
        3622. DBERRCODE = S"DORD$ERR";
        3623. DBERR(DBERRCODE);
        3624. RETURN;
        3625. END
        3626.  
        3627. GOTO ERR; # ILLEGAL RESPONSE CODE #
        3628.  
        3629. #
        3630. * PROCESS RESPONSE CODES FOR TYPE 3 UCP REQUESTS.
        3631. #
        3632.  
        3633. OK3$ACT: # NO ERROR #
        3634. RETURN;
        3635.  
        3636. INTLCK$ACT: # CATALOG/MAP FILE INTERLOCKED #
        3637. DBERRCODE = S"DC$M$INTLK";
        3638. DBERR(DBERRCODE);
        3639. RETURN;
        3640.  
        3641. NOPEN$ACT: # CATALOG/MAP NOT OPEN #
        3642. DBERRCODE = S"DC$M$NOPEN";
        3643. DBERR(DBERRCODE);
        3644. RETURN;
        3645.  
        3646. RESUB$ACT: # RESUBMIT REQUEST #
        3647. GOTO ERR;
        3648.  
        3649. SCATEX$ACT: # SUBCATALOG ALREADY EYISTS #
        3650. GOTO ERR;
        3651.  
        3652. NOSUB$ACT: # NO SUCH SUBCATALOG #
        3653. DBERRCODE = S"DNO$SUBCAT";
        3654. DBERR(DBERRCODE);
        3655. RETURN;
        3656.  
        3657. PFPROB$ACT: # PF PROBLEM #
        3658. DBERRCODE = S"DPF$PROB";
        3659. DBERR(DBERRCODE);
        3660. RETURN;
        3661.  
        3662. NEMPTY$ACT: # MSC NOT EMPTY #
        3663. GOTO ERR;
        3664.  
        3665. ILLORD$ACT: # *FCT* ORDINAL OUT OF RANGE #
        3666. DBERRCODE = S"DORD$ERR";
        3667. DBERR(DBERRCODE);
        3668. RETURN;
        3669.  
        3670. NFROZ$ACT: # NON FROZEN FRAGMENT #
        3671. DBERRCODE = S"DFROZ$NSET";
        3672. DBERR(DBERRCODE);
        3673. RETURN;
        3674.  
        3675. GR$FL$ACT: # GROUP FULL #
        3676. GOTO ERR;
        3677.  
        3678. #
        3679. * PROCESS RESPONSE CODES FOR TYPE 4 UCP REQUESTS.
        3680. #
        3681.  
        3682. OK4$ACT: # NO ERROR #
        3683. RETURN;
        3684.  
        3685. CSN$MIS$ACT: # CSN CARTRIDGE MISMATCH #
        3686. DBERRCODE = S"DCART$LB$ERR";
        3687. DBERR(DBERRCODE);
        3688. RETURN;
        3689.  
        3690. CSN$USE$ACT: # CSN IN USE #
        3691. DBERRCODE = S"DCSN$IN$USE";
        3692. DBERR(DBERRCODE);
        3693. RETURN;
        3694.  
        3695. CELL$EMP$ACT: # CELL EMPTY #
        3696. DBERRCODE = S"DCELL$EMP";
        3697. DBERR(DBERRCODE);
        3698. RETURN;
        3699.  
        3700. CELL$FLL$ACT: # CELL FULL #
        3701. GOTO ERR;
        3702.  
        3703. EX$DMARK$ACT: # EXCESSIVE DEMARKS #
        3704. GOTO ERR;
        3705.  
        3706. UNK$CART$ACT: # NO CARTRIDGE LABEL MATCH #
        3707. DBERRCODE = S"DUNK$CART";
        3708. DBERR(DBERRCODE);
        3709. RETURN;
        3710.  
        3711. URDERR$ACT: # UNRECOVERABLE READ ERROR #
        3712. DBERRCODE = S"DUN$RD$ERR";
        3713. DBERR(DBERRCODE);
        3714. RETURN;
        3715.  
        3716. UWTERR$ACT: # UNRECOVERABLE WRITE ERROR #
        3717. GOTO ERR;
        3718.  
        3719. VOL$ERR$ACT: # VOLUME HEADER ERROR #
        3720. DBERRCODE = S"DVOL$HD$ERR";
        3721. DBERR(DBERRCODE);
        3722. RETURN;
        3723.  
        3724. M86HW$PR$ACT: # M860 HARDWARE ERROR #
        3725. DBERRCODE = S"DSYS$ERR";
        3726. DBERR(DBERRCODE);
        3727. RETURN;
        3728.  
        3729. RMSER$ACT: # DISK FILE ERROR #
        3730. DBERRCODE = S"DDSKFL$ERR";
        3731. DBERR(DBERRCODE);
        3732. RETURN;
        3733.  
        3734. DSKFUL$ACT: # DISK FULL #
        3735. DBERRCODE = S"DDISK$FULL";
        3736. DBERR(DBERRCODE);
        3737. RETURN;
        3738.  
        3739. ATTER$ACT: # ATTACH ERROR #
        3740. DBERRCODE = S"DATT$ERR";
        3741. DBERR(DBERRCODE);
        3742. RETURN;
        3743.  
        3744. SMA$OFF$ACT: # SMA OFF #
        3745. DBERRCODE = S"DSMA$OFF";
        3746. DBERR(DBERRCODE);
        3747. RETURN;
        3748.  
        3749. EOI$ACT: # EOI ON FILE #
        3750. GOTO ERR;
        3751.  
        3752. ERR:
        3753. DBMSG$PROC[0] = PROCNAME; # ABNORMAL TERMINATION #
        3754. MESSAGE(DBMSG[0],SYSUDF1);
        3755. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        3756.  
        3757.  
        3758. END # DBRESP #
        3759.  
        3760. TERM
        3761. PROC DBVSN(Y,Z,MAPENT,FLAG);
        3762. # TITLE - DBVSN - SEARCH SMMAP FOR THE CSN. #
        3763.  
        3764. BEGIN # DBVSN #
        3765.  
        3766. #
        3767. ** DBVSN - SEARCH SMMAP FOR CSN.
        3768. *
        3769. * PROC DBVSN(Y,Z,MAPENT,FLAG)
        3770. *
        3771. * ENTRY (DBARG$SMID) = SM-ID.
        3772. * (DBARG$CN) = DIGIT PORTION OF CSN.
        3773. * (DBARG$CM) = CARTRIDGE MANUFACTURER CODE.
        3774. *
        3775. * EXIT (Y) = Y COORDINATE OF MATCHING CSN.
        3776. * (Z) = Z COORDINATE OF MATCHING CSN.
        3777. * (MAPENT) = SMMAP ENTRY.
        3778. * (FLAG) = ERROR STATUS.
        3779. * 0, NO ERROR
        3780. * 1, CSN NOT FOUND.
        3781. *
        3782. * MESSAGES SSDEBUG ABNORMAL, DBVSN.
        3783. *
        3784. * NOTES THE SMMAP IS SEARCHED SEQUENTIALLY FOR
        3785. * MATCHING CSN.
        3786. #
        3787.  
        3788. ITEM Y I; # Y COORDINATE OF MATCHING CSN #
        3789. ITEM Z I; # Z COORDINATE OF MATCHING CSN #
        3790. ARRAY MAPENT [0:0] S(3);; # SMMAP ENTRY #
        3791. ITEM FLAG I; # ERROR STATUS #
        3792.  
        3793. #
        3794. **** PROC DBVSN - XREF LIST BEGIN.
        3795. #
        3796.  
        3797. XREF
        3798. BEGIN
        3799. PROC MESSAGE; # DISPLAYS MESSAGE #
        3800. PROC MGETENT; # GET SMMAP ENTRY #
        3801. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        3802.   OR RETURN #
        3803. END
        3804.  
        3805. #
        3806. **** PROC DBVSN - XREF LIST END.
        3807. #
        3808.  
        3809. DEF PROCNAME #"DBVSN."#; # PROC NAME #
        3810.  
        3811. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3812. *CALL COMBFAS
        3813. *CALL COMBCMS
        3814. *CALL COMBCPR
        3815. *CALL COMBMAP
        3816. *CALL COMTDBP
        3817. *CALL COMTDBG
        3818.  
        3819. ITEM I I; # LOOP INDUCTION VARIABLE #
        3820. ITEM MAPADDR I; # FWA OF BUFFER TO HOLD ENTRY #
        3821.  
        3822. CONTROL EJECT;
        3823.  
        3824. FLAG = 0; # INITIALIZE #
        3825. MAPADDR = LOC(MAPENT[0]);
        3826. P<SMUMAP> = MAPADDR;
        3827.  
        3828. #
        3829. * SEARCH SMMAP FOR MATCHING VSN.
        3830. #
        3831.  
        3832. FASTFOR I = 1 STEP 1 UNTIL MAXORD
        3833. DO
        3834. BEGIN # SEARCH SMMAP #
        3835. MGETENT(DBARG$SMID[0],I,MAPADDR,FLAG);
        3836. IF FLAG NQ CMASTAT"NOERR"
        3837. THEN # ABNORMAL TERMINATION #
        3838. BEGIN
        3839. DBMSG$PROC[0] = PROCNAME;
        3840. MESSAGE(DBMSG[0],SYSUDF1);
        3841. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        3842. END
        3843.  
        3844. IF CM$CCOD[0] EQ DBARG$CM[0] AND CM$CSND[0] EQ DBARG$CN[0]
        3845. THEN # VSN MATCH FOUND #
        3846. BEGIN
        3847. Y = ( MAXORD - I )/( MAX$Z + 1 );
        3848. Z = MAXORD - I - ( MAX$Z + 1 )* Y;
        3849. RETURN;
        3850. END
        3851.  
        3852. END # SEARCH SMMAP #
        3853.  
        3854. FLAG = 1; # MATCHING VSN NOT FOUND #
        3855. RETURN;
        3856.  
        3857. END
        3858.  
        3859. TERM
cdc/nos2.source/opl871/ssdebug.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator