6)
1)
REQ$CODE),RESP$CODE)
  • [00474] CALL1 - SETS UP AND ISSUES A CALLSS TYPE 1 REQUEST.
  • [00479] CALL1 - SETS UP AND ISSUES A CALLSS TYPE 1 REQUEST.
  • [00513] PROC CALLSS
  • [00551] PROC CALL3((REQ$CODE),PT$CSU$ENT,(CATFLD),(CATVALUE),RESP$CODE)
    • [00552] CALL3 - SETS UP AND ISSUES A TYPE 3 CALLSS TO EXEC.
    • [00557] CALL3 - SETS UP AND ISSUES A TYPE 3 CALLSS TO EXEC.
    • [00614] PROC CALLSS
    • [00765] PROC CALL4((REQ$CODE),(DRD),(CART$CSN),(OLD$Y),(OLD$Z),RESP$CODE)
      • [00766] CALL4 - SETS UP AND ISSUES A TYPE 4 CALLSS TO EXEC.
      • [00771] CALL4 - SETS UP AND ISSUES A TYPE4 CALLSS TO EXEC.
      • [00821] PROC CALLSS
      • [00890] PROC CKLAB(LAB$TYPE)
      • [00891] CKLAB - CHECKS CARTRIDGE LABEL.
      • [00896] CKLAB - CHECKS CARTRIDGE LABEL.
      • [00924] PROC CONVSN
      • [00997] PROC CONVSN(DC$VSN,(CONTYPE),CONFLAG)
      • [00998] CONVSN - CONVERTS CSN BETWEEN EBCDIC AND DISPLAY CODE.
      • [01003] CONVSN - CONVERTS CSN BETWEEN EBCDIC AND DISPLAY CODE.
      • [01041] PROC DCEBC
      • [01153] PROC DCEBC(DC$ITEM,EBC$ITEM,FLAG)
      • [01154] DCEBC - CONVERTS TO/FROM EBCDIC VALUES.
      • [01273] PROC DLABFLD
      • [01274] DLABFLD - DISPLAYS FIELDS IN THE CARTRIDGE LABEL.
      • [01279] DLABFLD - DISPLAYS FIELDS IN THE CARTRIDGE LABEL.
      • [01308] PROC BZFILL
      • [01309] PROC CONVSN
      • [01311] PROC LBERR
      • [01312] PROC MESSAGE
      • [01313] PROC RPLINE
      • [01314] FUNC XCDD C(10)
      • [01449] PROC GENLAB((LAB$TYPE),PT$CSU$ENT,(LD$CNT),(LD$ERR),(SR$ERR), (
        • [01451] GENLAB - SETS UP A FAMILY OR SCRATCH LABEL.
        • [01456] GENLAB - SETS UP A FAMILY OR SCRATCH LABEL.
        • [01514] PROC CONVSN
        • [01516] PROC LBERR
        • [01656] PROC LBADCSU
        • [01657] LBADCSU - ADDS A *SM* TO A SUBFAMILY.
        • [01662] LBADCSU - ADDS A *SM* TO A SUBFAMILY.
        • [01688] PROC CALL3
        • [01689] PROC LBRESP
        • [01725] PROC LBADCUB
        • [01726] LBADCUB - ADDS CUBES TO A FAMILY OR POOL.
        • [01731] LBADCUB - ADDS CUBES TO A FAMILY OR POOL.
        • [01762] PROC CALL3
        • [01763] PROC LBERR
        • [01764] PROC LBRESP
        • [01765] PROC MFLUSH
        • [01766] PROC MCLOSE
        • [01767] PROC MOPEN
        • [01768] PROC SERCSU
        • [01769] PROC SETCORD
        • [01969] PROC LBADMSC
        • [01970] LBADMSC - PROCESS THE *ADDMSC* DIRECTIVE.
        • [01975] LBADMSC - PROCESS THE *ADDMSC* DIRECTIVE.
        • [02000] PROC CALL3
        • [02001] PROC CALL4
        • [02002] PROC CKLAB
        • [02003] PROC GENLAB
        • [02004] PROC LBERR
        • [02005] PROC LBRESP
        • [02006] PROC LBSTCLR
        • [02007] PROC MFLUSH
        • [02008] PROC SERASTG
        • [02009] PROC SERCSU
        • [02467] PROC LBCONV(FLAG)
        • [02468] LBCONV - CONVERT CRACKED PARAMETERS TO INTEGERS.
        • [02473] LBCONV - CONVERT CRACKED PARAMETERS TO INTEGERS.
        • [02505] FUNC XDXB I
        • [02801] PROC LBERR((ERR$CODE
        2)
        FETP
        3)
        ARGLIST),ERRFLAG)
        • [03657] LBLOOP - CRACK AND SYNTAX CHECK *SSLABEL* DIRECTIVES.
        • [03662] LBLOOP - CRACK AND SYNTAX CHECK *SSLABEL* DIRECTIVES.
        • [03713] PROC BZFILL
        • [03714] PROC LBCONV
        • [03715] PROC LBERR
        • [03716] PROC LBOPT
        • [03717] PROC LOFPROC
        • [03718] PROC MESSAGE
        • [03719] PROC READC
        • [03720] PROC RESTPFP
        • [03722] PROC RETERN
        • [03723] PROC REWIND
        • [03724] PROC RPLINE
        • [03725] PROC RPSPACE
        • [03726] PROC WRITER
        • [03727] PROC WRITEW
        • [03728] PROC XARG
        • [03729] FUNC XCDD C(10)
        • [03730] PROC ZFILL
        • [03731] PROC ZSETFET
        • [03935] PROC LBMAIN
        • [03936] LBMAIN - PROCESSES *SSLABEL* DIRECTIVES.
        • [03941] LBMAIN - PROCESSES *SSLABEL* DIRECTIVES.
        • [03972] PROC SSINIT
        • [03973] PROC LBADCSU
        • [03974] PROC LBADCUB
        • [03975] PROC LBADMSC
        • [03976] PROC LBERR
        • [03977] PROC LBFLMSC
        • [03978] PROC LBFXVSN
        • [03979] PROC LBRESP
        • [03980] PROC LBRMCSU
        • [03981] PROC LBRMCUB
        • [03982] PROC LBRMMSC
        • [03983] PROC LBRSMSC
        • [03984] PROC LOFPROC
        • [03985] PROC MESSAGE
        • [03986] PROC MOPEN
        • [03987] PROC READ
        • [03988] PROC READW
        • [03989] PROC RESTPFP
        • [03991] PROC RETERN
        • [03992] PROC RPLINE
        • [03993] PROC RPSPACE
        • [03994] PROC SETPFP
        • [04234] PROC LBOPT(ERRFLAG)
        • [04235] LBOPT - TESTS FOR VALID *SSLABEL* DIRECTIVES.
        • [04240] LBOPT - TESTS FOR VALID *SSLABEL* DIRECTIVE OPTIONS.
        • [04314] PROC LBERR
        • [04901] PROC LBRESP((RESP$CODE),(CALLTYP
        4)
        SERTYPE),(SP$Y),(SP$Z),(SP$CODE),(SP$VSN),(SP$FAM),##
        • [06899] SERCSU - SEARCHES SMMAP FOR A CUBE OR A CARTRIDGE.
        • [06904] SERCSU - SEARCHES SMMAP FOR A CUBE OR A CARTRIDGE.
        • [06982] PROC MESSAGE
        • [06983] PROC MGETENT
        • [06984] PROC RESTPFP
        • [07210] PROC SETCORD
        • [07211] SETCORD - SETS Y,Z COORDINATES OF CUBES.
        • [07216] SETCORD - SETS Y,Z COORDINATES OF CUBES.
        • [07254] PROC LBERR
        </WRAP> === Source Code ===
        SSLABEL.txt
        1. PRGM SSLABEL;
        2. # TITLE SSLABEL - INITIALIZES *SSLABEL*. #
        3.  
        4. BEGIN # SSLABEL #
        5.  
        6. #
        7. *** SSLABEL - INITIALIZES *SSLABEL*.
        8. *
        9. * THIS PROCEDURE INITIALIZES *SSLABEL* BY
        10. * CRACKING THE CONTROL CARD AND SETTING
        11. * UP POINTERS AND DEFAULT VALUES.
        12. *
        13. * SSLABEL,I,L.
        14. *
        15. * PRGM SSLABEL.
        16. *
        17. * ENTRY. INPUTS TO SSLABEL ARE-
        18. * I SOURCE OF DIRECTIVES IS ON FILE
        19. * *INPUT*.
        20. * I = LFN SOURCE OF DIRECTIVES IS ON FILE
        21. * *LFN*.
        22. * I OMITTED SAME AS *I*.
        23. * *INPUT*.
        24. * L LISTABLE OUTPUT ON FILE *OUTPUT*.
        25. * L = LFN LISTABLE OUTPUT ON FILE *LFN*.
        26. * L = 0 NO OUTPUT FILE GENERATED.
        27. * L OMITTED SAME AS *L*.
        28. *
        29. * Z SOURCE OF DIRECTIVES IS ON THE
        30. * CONTROL CARD.
        31. *
        32. * *SSLABEL* DIRECTIVE OPTIONS ARE-
        33. * OP NOT PERMITTED.
        34. * OP = XX WHERE XX IS THE DIRECTIVE TO BE PROCESSED.
        35. * XX MAY BE ANY ONE OF THE FOLLOWING.
        36. * *AM*--ADD A CARTRIDGE (*ADDMSC*).
        37. * *RM*--REMOVE A CARTRIDGE (*RMVMSC*).
        38. * *RS*--RESTORE A CARTRIDGE (*RSTRMSC*).
        39. * *FX*--REPAIR A LABEL (*FIXVSN*).
        40. * *IB*--SET OR CLEAR *FCT INHIBIT FLAG*
        41. * (*FLAGMSC*).
        42. * *FC*--SET OR CLEAR *FREE CARTRIDGE FLAG*
        43. * (*FLAGFC*) IN FCT.
        44. * *AS*--ADD A *SM* TO A SUBFAMILY
        45. * (*ADDCSU*).
        46. * *RS*--REMOVE A SM FROM A SUBFAMILY
        47. * (*RMVCSU*).
        48. * *AB*--ADD A CUBE TO A SUBFAMILY
        49. * (*ADDCUBE*).
        50. * *RB*--REMOVE AN EMPTY CUBE FROM A SUBFAMILY
        51. * (*RMVCUBE*).
        52. * OP OMITTED NOT PERMITTED.
        53. *
        54. * N NUMBER OF CARTRIDGES OR CUBES = 1.
        55. * N = X NUMBER OF CARTRIDGES OR CUBES = X.
        56. * X MAY RANGE FROM 1 TO 100.
        57. * N OMITTED SAME AS *N*.
        58. * *NOTE* - *N* MUST BE 1 IF THE *CSN*
        59. * OPTION IS SPECIFIED.
        60. *
        61. * B SAME AS *B* = 600.
        62. * B = N NUMBER OF AU'S (N) USED FOR SMALL FILES.
        63. * 1931 - N AU'S REMAIN FOR LARGE FILES.
        64. * B OMITTED SAME AS *B*.
        65. *
        66. * CM CARTRIDGE MANUFACTURER CODE IS *A* INDICATI
        67. * *IBM*.
        68. * CM = A CARTRIDGE MANUFACTURER CODE IS *A* INDICATI
        69. * *IBM*.
        70. * CM = ANYTHING ELSE IS CURRENTLY ILLEGAL.
        71. * CM OMMITTED CARTRIDGE MANUFACTURER CODE IS *A*.
        72. *
        73. * CN CARTRIDGE SERIAL NUMBER OF CARTRIDGE IS
        74. * NOT SPECIFIED.
        75. * CN = CSN SERIAL NUMBER OF CARTRIDGE IS
        76. * *CSN*.
        77. * C OMITTED SAME AS *C*.
        78. * *NOTE* - *CSN* MUST BE SPECIFIED WITH
        79. * *RMVMSC LOST(LS)* OPTION.
        80. * *CSN* MAY NOT BE SPECIFIED WHEN ANY *PK*
        81. * OPTION IS USED.
        82. * *NOTE* - PK IS SET TO 0
        83. * WHENEVER CSN IS SPECIFIED.
        84. * *N* MUST BE 1 IF THE *C* = CSN
        85. * OPTION IS SPECIFIED.
        86. * *CSN* MAY NOT BE SPECIFIED WITH
        87. * *OP* = *ADDCSU* (AC)
        88. * *OP* = *RMVCSU* (RC)
        89. * *OP* = *ADDCUBE* (AB)
        90. * *OP* = *RMVCUBE* (RB)
        91. *
        92. *
        93. * GR CHOOSE DEFAULT GROUP.
        94. * GR = N GROUP TO WHICH CARTRIDGE IS ADDED/REMOVED.
        95. * INVALID IF *PT* = P IS SPECIFIED WITH
        96. * *OP* = *AM*. N MUST BE O TO 127.
        97. * GR OMITTED SAME AS *GR*.
        98. *
        99. * PK SAME AS *PK* = P.
        100. * PK = D CARTRIDGE IS TO BE PICKED FROM INPUT
        101. * DRAWER SLOT.
        102. * PK = P CARTRIDGE OR CUBE IS PICKED FROM POOL.
        103. * PK = F CARTRIDGE OR CUBE IS PICKED FROM THE
        104. * SPECIFIED FAMILY (SEE *FM* OPTION) AND
        105. * SUBFAMILY (SEE *SB* OPTION) AND GROUP
        106. * (SEE *GR* OPTION).
        107. * PK OMITTED SAME AS *PK*.
        108. * *NOTE* - VALID USES OF *PK*
        109. * OP=AM - PK=D OR PK=P
        110. * OP=RM - PK=P OR PK=F
        111. * OP=RB - PK=P OR PK=F OR PK=R
        112. * NONE OF THE *PK* OPTION MAY BE
        113. * USED IF *C* = CSN OPTION IS
        114. * SPECIFIED.
        115. * PK=D OR F IF PT=P.
        116. *
        117. * PT SAME AS *PT* = P.
        118. * PT = D CARTRIDGE IS TO BE PLACED IN THE
        119. * DRAWER.
        120. * PT = P CARTRIDGE OR CUBE IS PUT IN THE POOL.
        121. * PT = F CARTRIDGE OR CUBE IS PUT IN THE SPECIFIED
        122. * FAMILY (SEE *FM* OPTION) AND SUBFAMILY
        123. * (SEE *SB* OPTION).
        124. * PT = R CUBE IS PUT INTO THE *RESERVED FOR
        125. * ALTERNATE SMMAP* AREA OF THE SMMAP.
        126. * PT OMITTED SAME AS *PT*.
        127. * *NOTE* - VALID USES OF *PT*
        128. * OP=AM - PT=P OR PT=F
        129. * HOWEVER, WITH OP=AM AND THE CSN
        130. * SPECIFIED, *PT* CANNOT BE EQUAL
        131. * TO *P*.
        132. * OP=RM - PT=D OR PT=P
        133. * OP=AB - PT=P OR PT=F OR PT=R
        134. *
        135. * LT CARTRIDGE IS LOST AND EXISTS ONLY IN THE
        136. * CATALOG. ITS CATALOG ENTRY IS TO BE
        137. * REMOVED.
        138. * LT OMITTED NO ACTION.
        139. * *NOTE* - *LT* IS VALID ONLY WITH OP=RM
        140. * (*RMVMSC*).
        141. *
        142. * SM USE *SM* *A*.
        143. * SM = N USE *SM* N WHERE N IS ONE OF THE
        144. * FOLLOWING
        145. * A - SM A
        146. * B - SM B
        147. * C - SM C
        148. * D - SM D
        149. * E - SM E
        150. * F - SM F
        151. * G - SM G
        152. * H - SM H
        153. * SM OMITTED SAME AS *SM*.
        154. *
        155. * ON TURN ON A FLAG.
        156. *
        157. * OF TURN OFF A FLAG.
        158. *
        159. * YI INVALID.
        160. * YF INVALID.
        161. * ZI INVALID.
        162. * ZF INVALID.
        163. * YI = I ROW I IS SELECTED FOR THE *ADDCUBE*
        164. * OR *RMVCUBE* DIRECTIVE. I IS FROM 0 TO 21.
        165. * ZI = J COLUMNN J IS SELECTED FOR THE *ADDCUBE* OR
        166. * *RMVCUBE* DIRECTIVE. J IS FROM 0 TO 15.
        167. * YI=I,ZI=J LOCATION (I,J) IS SELECTED FOR THE
        168. * *ADDCUBE* OR *RMVCUBE* DIRECTIVE.
        169. * YI=I,ZI=J, A RECTANGLE OF CELLS BOUNDED BY (I,J),
        170. * YF=K,ZF=L (I,L), (K,J) AND (K,L) ARE SELECTED FOR
        171. * THE *ADDCUBE* OR *RMVCUBE* DIRECTIVE.
        172. * *NOTE* - YF=K AND ZF=L MUST BOTH BE
        173. * SPECIFIED IF EITHER IS SPECIFIED.
        174. * YF=K AND ZF=L CANNOT BE SPECIFIED UNLESS
        175. * BOTH YI=I AND ZI=J ARE SPECIFIED.
        176. * K MUST BE GREATER THAN I AND L MUST BE
        177. * GREATER THAN J.
        178. * YI=I AND YF=K MUST BE LESS THAN OR EQUAL
        179. * TO 21.
        180. * ZI=J AND ZF=L MUST BE LESS THAN OR EQUAL
        181. * TO 15.
        182. * THE FOLLOWING LOCATIONS ARE RESERVED:
        183. * (0,0),((Y,6),Y=0,21),(0,15),(11,15),
        184. * (21,15),((Y,Z),Y=11,15,Z=0,1),(0,1),
        185. * (0,14),(21,0),AND (21,14).
        186. * YI AND ZI *ADDCUBE* WILL SELECT THE NEXT AVAILABLE
        187. * OMITTED CUBE CLOSEST TO THE TOP OF THE *SM* FOR
        188. * ASSIGNMENTS TO A FAMILY OR THE FARTHEST
        189. * CUBE FOR ASSIGNMENT TO THE POOL.
        190. * *RMVCUBE* WILL SELECT THE FIRST UNASSIG-
        191. * NED CUBE FROM THE *AST* FOR A FAMILY.
        192. *
        193. * FM USE DEFAULT FAMILY.
        194. * FM = FAMILY SELECT SPECIFIED FAMILY.
        195. * FM OMITTED SAME AS *FM*.
        196. *
        197. * SB SELECT SUB-FAMILY 0.
        198. * SB = SUB SELECT SUB-FAMILY SUB.
        199. * SB OMITTED SAME AS *SB*.
        200. * *NOTE* - SUB MUST BE BETWEEN 0 AND 7.
        201. *
        202. * EXIT. *SSLABEL* DIRECTIVES PROCESSED OR
        203. * AN ERROR CONDITION ENCOUNTERED.
        204. *
        205. * MESSAGES. 1. SSLABEL COMPLETE.
        206. * 2. UNABLE TO CONNECT WITH EXEC.
        207. * 3. SSLABEL - MUST BE SYSTEM ORIGIN.
        208. *
        209. * NOTES. PROC *SSLABEL* INITIALIZES *SSLABEL*.
        210. * *SSLABEL* PROCESSING IS CONTROLLED BY
        211. * THE USE OF DIRECTIVES. THE DIRECTIVES CAN
        212. * BE SPECIFIED ON THE CONTROL CARD, ON
        213. * *INPUT* FILE OR ON
        214. * AN ALTERNATE FILE. PROC *SSLABEL*
        215. * CRACKS THE CONTROL CARD AND READS
        216. * IN THE DIRECTIVES FROM THE FILE
        217. * SPECIFIED INTO THE CIO BUFFER. PROC
        218. * *LBLOOP* IS CALLED TO CRACK THE DIREC-
        219. * TIVES AND TO WRITE THEM ON A TEMPORARY
        220. * FILE. THE CRACKED PARAMETERS ARE RETUR-
        221. * NED IN COMMON AREA *ULBPCOM*. ANY ERROR
        222. * IN THE DIRECTIVE CAUSES *SSLABEL* TO
        223. * ABORT. PROC *LBERR* DOES ERROR PROCESSING
        224. * FOR *SSLABEL*. AFTER THE DIRECTIVES ARE
        225. * CRACKED AND SYNTAX CHECKED A *CONNECT* IS
        226. * SET WITH EXEC. PROC *LBMAIN* IS CALLED
        227. * TO PROCESS ALL THE DIRECTIVES. A
        228. * *DISCONNECT* IS DONE WITH EXEC AFTER ALL
        229. * THE DIRECTIVES ARE PROCESSED.
        230. #
        231.  
        232. #
        233. **** PROC SSLABEL - XREF LIST BEGIN.
        234. #
        235.  
        236. XREF
        237. BEGIN
        238. PROC ABORT; # ABORT PROCESSING #
        239. PROC BZFILL; # BLANK OR ZERO-FILLS A BUFFER #
        240. PROC CALL1; # SENDS TYPE 1 CALLSS TO EXEC #
        241. PROC GETFAM; # GETS DEFAULT FAMILY #
        242. PROC GETPFP; # GET USER INDEX AND FAMILY #
        243. PROC GETSPS; # GET PRIVILIDGES #
        244. PROC LBERR; # ERROR PROCESSOR #
        245. PROC LBHEAD; # WRITES HEADER ON OUTPUT FILE #
        246. PROC LBLOOP; # CRACK AND SYNTAX CHECK
        247.   DIRECTIVES #
        248. PROC LBMAIN; # PROCESSES SSLABEL DIRECTIVES #
        249. PROC LBTAB; # SETS UP THE ARGUMENT LIST #
        250. PROC MESSAGE; # DISPLAYS MESSAGE IN DAYFILE #
        251. PROC PDATE; # GETS PACKED DATE AND TIME #
        252. PROC READ; # READS A FILE #
        253. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        254.   OR RETURN #
        255. PROC RPCLOSE; # CLOSES OUTPUT FILE #
        256. PROC RPLINE; # WRITES A LINE ON OUTPUT FILE #
        257. PROC RPOPEN; # OPENS OUTPUT FILE #
        258. PROC RPSPACE; # WRITES A BLANK LINE #
        259. PROC VERSION; # GETS OS LEVEL #
        260. PROC XARG; # CRACK PARAMETER LIST #
        261. PROC XZAP; # *Z* ARGUMENT PROCESSOR #
        262. PROC ZSETFET; # SETS UP A FET #
        263. END
        264.  
        265. #
        266. **** PROC SSLABEL - XREF LIST END.
        267. #
        268.  
        269. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        270.  
        271. CONTROL PRESET;
        272. *CALL COMBFAS
        273. *CALL COMBBZF
        274. *CALL COMBCMD
        275. *CALL COMBCPR
        276. *CALL COMBLBL
        277. *CALL COMBPFP
        278. *CALL COMBUCR
        279. *CALL COMSPFM
        280. *CALL COMTERR
        281. *CALL COMTFMT
        282. *CALL COMTLAB
        283. *CALL COMTLBP
        284. *CALL COMTOUT
        285.  
        286. ITEM ARGLIST U; # ADDRESS OF ARGUMENT TABLE #
        287. ITEM BUFP U; # FWA OF CIO BUFFER #
        288. ITEM DEFAULT I; # DEFAULT FAMILY ORDINAL #
        289. ITEM ERRFLAG B; # ERROR FLAG #
        290. ITEM FAM$NUM I; # NUMBER OF FAMILIES #
        291. ITEM FETP U; # FWA OF FET #
        292. ITEM FLAG I; # ERROR FLAG #
        293. ITEM LFN C(7); # TEMP LOC FOR FILE NAME #
        294. ITEM LINK I; # LINK FAMILY ORDINAL #
        295. ITEM OPTION I; # OPTION OF SKIPPING OVER PROGRAM
        296.   NAME IN CONTROL CARD #
        297. ITEM REQCODE U; # REQUEST CODE #
        298. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        299.  
        300. ARRAY CALL$SS [0:0] P(CPRLEN);; # CALLSS REQUEST BLOCK #
        301. ARRAY OUT$FET [0:0] S(SFETL);; # FET FOR OUTPUT FILE #
        302. BASED
        303. ARRAY RA [0:0] P(1);; # ACCESS CONTROL CARD AREA #
        304. ARRAY SPSSTAT [0:0] S(1);
        305. BEGIN
        306. ITEM SPS$STATUS U(00,48,12); # RETURN STATUS #
        307. END
        308.  
        309.  
        310. CONTROL EJECT;
        311.  
        312. #
        313. * USER MUST HAVE SYSTEM ORIGIN PRIVILIDGES.
        314. #
        315.  
        316. GETSPS(SPSSTAT);
        317. IF SPS$STATUS NQ OK
        318. THEN
        319. BEGIN
        320. LBMSG$LINE[0] = " SSLABEL - MUST BE SYSTEM ORIGIN.";
        321. MESSAGE(LBMSG$BUF[0],SYSUDF1);
        322. ABORT;
        323. END
        324.  
        325.  
        326. REQID$LB = REQNAME"RQILABL"; # SET REQUESTOR ID FOR SSLABEL #
        327.  
        328. #
        329. * SAVE THE USER-S CURRENT FAMILY AND USER INDEX IN COMMON.
        330. #
        331.  
        332. GETPFP(PFP[0]);
        333. USER$FAM[0] = PFP$FAM[0];
        334. USER$UI[0] = PFP$UI[0];
        335.  
        336. #
        337. * CRACK THE PARAMETERS ON SSLABEL CALL.
        338. #
        339.  
        340. LBTAB(ARGLIST); # SET UP THE ARGUMENT LIST #
        341. OPTION = 0; # SKIP OVER PROGRAM NAME #
        342. XARG(ARGLIST,OPTION,FLAG); # CRACK THE CONTROL STATEMENT #
        343. IF FLAG NQ 0
        344. THEN # SYNTAX ERROR #
        345. BEGIN
        346. ERRCODE = S"SYNTX$ABRT"; # ABORT WITH *SYNTAX ERROR* #
        347. OUT$FETP = 0;
        348. LBERR(ERRCODE);
        349. END
        350.  
        351. #
        352. * SET UP FET FOR READING THE DIRECTIVE FILE.
        353. #
        354.  
        355. FETP = LOC(LBIN$FET[0]);
        356. LB$BUFP = LOC(LBIN$BUF[0]);
        357. LFN = LBARG$I[0];
        358. ZSETFET(FETP,LFN,LB$BUFP,BUFL,SFETL);
        359.  
        360. #
        361. * DO *Z* ARGUMENT PROCESSING.
        362. #
        363.  
        364. IF LBARG$Z[0] NQ 0
        365. THEN # *Z* OPTION SPECIFIED #
        366. BEGIN
        367. XZAP(LBIN$FET[0]); # PROCESS *Z* ARGUMENTS #
        368. END
        369.  
        370. ELSE
        371. BEGIN
        372. READ(LBIN$FET[0],NRCL); # READ INPUT FILE #
        373. END
        374.  
        375. #
        376. * SET UP FET POINTER FOR OUTPUT FILE.
        377. #
        378.  
        379. IF LBARG$L[0] EQ 0
        380. THEN # NO OUTPUT FILE #
        381. BEGIN
        382. OUT$FETP = 0;
        383. END
        384.  
        385. ELSE # SET UP THE FWA OF THE FET #
        386. BEGIN
        387. OUT$FETP = LOC(OUT$FET[0]);
        388. END
        389.  
        390. #
        391. * OPEN OUTPUT FILE AND WRITE THE CONTROL CARD
        392. * IMAGE TO IT.
        393. #
        394.  
        395. RPOPEN(LBARG$L[0],OUT$FETP,LBHEAD);
        396. P<RA> = 0; # SET TO RA+0 #
        397. BZFILL(RA[O"70"],TYPFILL"BFILL",80);
        398. RPLINE(OUT$FETP,RA[O"70"],2,80,0);
        399. RPSPACE(OUT$FETP,SP"SPACE",1);
        400.  
        401. #
        402. * READ EACH DIRECTIVE AND CRACK AND SYNTAX CHECK IT.
        403. #
        404.  
        405. ERRFLAG = FALSE; # INITIALIZE ERROR STATUS #
        406. LBLOOP(ARGLIST,ERRFLAG);
        407. IF ERRFLAG
        408. THEN # ERROR IN ANY DIRECTIVE #
        409. BEGIN
        410. ERRCODE = S"SYNTX$ABRT"; # ABORT WITH DAYFILE MESSAGE #
        411. LBERR(ERRCODE);
        412. END
        413.  
        414. PDATE(PD$T); # GET PACKED DATE/TIME #
        415. VERSION(OSVERSION[0]); # GET *OS* LEVEL #
        416.  
        417. #
        418. * GET DEFAULT FAMILY AND SUBSYSTEM ID.
        419. #
        420.  
        421. SSID$LB = ATAS;
        422. GETFAM(FAMT,FAM$NUM,LINK,DEFAULT,SSID$LB);
        423. DEF$FAM = FAM$NAME[DEFAULT];
        424.  
        425. #
        426. * INITIALIZE THE POINTER OF THE BASED ARRAY
        427. * DESCRIBING THE FORMAT OF THE CALLSS REQUEST
        428. * BLOCK.
        429. #
        430.  
        431. P<CPR> = LOC(CALL$SS[0]);
        432.  
        433. #
        434. * SET UP CONNECT WITH EXEC.
        435. #
        436.  
        437. REQCODE = REQTYP1"CONNECT";
        438. CALL1(REQCODE,RESP$CODE);
        439. IF RESP$CODE NQ OK
        440. THEN
        441. BEGIN
        442. LBMSG$LINE[0] = " UNABLE TO CONNECT WITH EXEC.";
        443. MESSAGE(LBMSG$BUF[0],SYSUDF1);
        444. RPCLOSE(OUT$FETP); # CLOSE OUTPUT FILE #
        445. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        446. END
        447.  
        448. #
        449. * PROCESS EACH DIRECTIVE.
        450. #
        451.  
        452. LBMAIN;
        453.  
        454. #
        455. * DISCONNECT WITH EXEC.
        456. #
        457.  
        458. REQCODE = REQTYP1"DISCONNECT";
        459. CALL1(REQCODE,RESP$CODE);
        460. RPCLOSE(OUT$FETP); # CLOSE OUTPUT FILE #
        461.  
        462. #
        463. * DISPLAY *SSLABEL COMPLETE* IN THE DAYFILE.
        464. #
        465.  
        466. LBMSG$LINE[0] = " SSLABEL COMPLETE.";
        467. MESSAGE(LBMSG$BUF[0],SYSUDF1);
        468. RESTPFP(PFP$END); # RESTORE USER-S *PFP* #
        469.  
        470. END # SSLABEL #
        471.  
        472. TERM
        473. PROC CALL1((REQ$CODE),RESP$CODE);
        474. # TITLE CALL1 - SETS UP AND ISSUES A CALLSS TYPE 1 REQUEST. #
        475.  
        476. BEGIN # CALL1 #
        477.  
        478. #
        479. ** CALL1 - SETS UP AND ISSUES A CALLSS TYPE 1 REQUEST.
        480. *
        481. * THIS PROC SETS UP THE CALLSS REQUEST BLOCK FOR A
        482. * UCP REQUEST TYPE 1 AND CALLS *CALLSS* TO ISSUE IT
        483. * TO EXEC.
        484. *
        485. * PROC CALL1((REQ$CODE),RESP$CODE)
        486. *
        487. * ENTRY (REQCODE) = REQUEST CODE.
        488. * (REQID$LB) = REQUESTOR ID.
        489. * (SSID$LB) = SUBSYSTEM ID.
        490. * P<CPR> = FWA OF PARAMETER BLOCK.
        491. *
        492. * EXIT (RESP$CODE) = RESPONSE FROM EXEC.
        493. *
        494. * NOTES PROC *CALL1* SETS UP THE CALLSS PARAMETER
        495. * BLOCK FOR A UCP TYPE 1 REQUEST. TYPE 1
        496. * REQUESTS ARE THE UCP LINKAGE REQUESTS I.E
        497. * CONNECT AND DISCONNECT. THE REQUEST CODE
        498. * IS SET UP IN THE CALLSS PARAMETER BLOCK
        499. * TO IDENTIFY THE TYPE OF REQUEST BEING SENT
        500. * TO EXEC. THE RESPONSE CODE IS RETURNED
        501. * TO THE CALLING PROCEDURE.
        502. #
        503.  
        504. ITEM REQ$CODE U; # REQUEST CODE #
        505. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        506.  
        507. #
        508. **** PROC CALL1 - XREF LIST BEGIN.
        509. #
        510.  
        511. XREF
        512. BEGIN
        513. PROC CALLSS; # ISSUES A CALLSS TO EXEC #
        514. END
        515.  
        516. #
        517. **** PROC CALL1 - XREF LIST END.
        518. #
        519.  
        520. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        521. *CALL COMBFAS
        522. *CALL COMBCPR
        523. *CALL COMTLAB
        524.  
        525. ITEM I I; # LOOP VARIABLE #
        526.  
        527. CONTROL EJECT;
        528.  
        529. #
        530. * ZERO FILL THE CALLSS PARAMETER REQUEST BLOCK.
        531. #
        532.  
        533. SLOWFOR I = 0 STEP 1 UNTIL CPRLEN-1
        534. DO
        535. BEGIN
        536. CPR1[I] = 0;
        537. END
        538.  
        539. CPR$WC[0] = TYP1$WC; # SET UP WORD COUNT #
        540. CPR$RQT[0] = TYP"TYP1"; # TYPE 1 REQUEST #
        541. CPR$RQC[0] = REQ$CODE; # SET UP REQUEST CODE #
        542. CPR$RQI[0] = REQID$LB; # SET UP REQUESTOR ID #
        543. CPR$SSPFLG[0] = TRUE;
        544. CALLSS(SSID$LB,CPR[0],RCL); # ISSUE CALLSS #
        545. RESP$CODE = CPR$ES[0]; # RETURN THE RESPONSE CODE #
        546. RETURN;
        547.  
        548. END # CALL1 #
        549.  
        550. TERM
        551. PROC CALL3((REQ$CODE),PT$CSU$ENT,(CATFLD),(CATVALUE),RESP$CODE);
        552. # TITLE CALL3 - SETS UP AND ISSUES A TYPE 3 CALLSS TO EXEC. #
        553.  
        554. BEGIN # CALL3 #
        555.  
        556. #
        557. ** CALL3 - SETS UP AND ISSUES A TYPE 3 CALLSS TO EXEC.
        558. *
        559. * PROC CALL3((REQ$CODE),PT$CSU$ENT,(CATFLD),(CATVALUE),RESP$CODE)
        560. *
        561. * ENTRY (REQ$CODE) = REQUEST CODE.
        562. * (PT$CSU$ENT) = 3 WORD SMMAP ENTRY WITH THE THIRD
        563. * WORD CONTAINING THE Y,Z COORDINATES.
        564. * (CATFLD) = CATALOG FIELD TO BE UPDATED.
        565. * (CATVALUE) = NEW VALUE FOR THE CATALOG FIELD TO
        566. * BE UPDATED.
        567. * (REQID$LB) = REQUESTOR ID.
        568. * (NEWLABP) = FWA OF BUFFER CONTAINING NEW CARTRIDGE
        569. * LABEL.
        570. * (OLDLABP) = FWA OF BUFFER CONTAINING OLD CARTRIDGE
        571. * LABEL.
        572. * (SSID$LB) = SUBSYSTEM ID.
        573. * (LBARG$B) = LARGE FILE ALLOCATION SPACE.
        574. * (LBARG$SMID) = *SM*-ID.
        575. * (LBARG$FM) = FAMILY NAME.
        576. * (LBARG$SB) = SUBFAMILY ID.
        577. * P<CPR> = FWA OF PARAMETER BLOCK.
        578. *
        579. * EXIT (RESP$CODE) = RESPONSE FROM EXEC.
        580. *
        581. * NOTES PROC *CALL3* SETS UP THE CALLSS PARAMETER BLOCK
        582. * FOR A TYPE 3 REQUEST TO EXEC. TYPE 3 REQUESTS
        583. * ARE THE REQUESTS TO MODIFY MSF CATALOGS AND MAPS.
        584. * THE SPECIFIC REQUEST ISSUED IS DEPENDENT ON THE
        585. * VALUE OF *REQCODE*. PARAMETERS NOT NEEDED FOR
        586. * THE REQUEST ARE IGNORED. IF THE RESPONSE CODE
        587. * RETURNED BY EXEC IS *RESUBMIT THE REQUEST*, THE
        588. * CALLSS IS REISSUED. OTHERWISE THE RESPONSE CODE
        589. * IS RETURNED TO THE CALLING PROC.
        590. #
        591.  
        592. ITEM REQ$CODE U; # REQUEST CODE #
        593.  
        594. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        595. BEGIN
        596. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        597. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        598. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        599. ITEM PT$GR U(04,00,07); # GROUP #
        600. ITEM PT$GRT U(04,07,05); # GROUP ORDINAL #
        601. END
        602.  
        603.  
        604. ITEM CATFLD U; # CATALOG FIELD #
        605. ITEM CATVALUE U; # NEW VALUE FOR CATALOG FIELD #
        606. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        607.  
        608. #
        609. **** PROC CALL3 - XREF LIST BEGIN.
        610. #
        611.  
        612. XREF
        613. BEGIN
        614. PROC CALLSS; # ISSUES A CALLSS TO EXEC #
        615. END
        616.  
        617. #
        618. **** PROC CALL3 - XREF LIST END.
        619. #
        620.  
        621. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
        622. *CALL COMBFAS
        623. *CALL COMBCPR
        624. *CALL COMBLBL
        625. *CALL COMBMAP
        626. *CALL COMTLAB
        627. *CALL COMTLBP
        628.  
        629. ITEM COMPLETE B; # CALLSS COMPLETION STATUS #
        630. ITEM I I; # LOOP VARIABLE #
        631.  
        632. SWITCH CALL3ACT: REQTYP3 # TYPE OF CALLSS ISSUED #
        633. ADDCBFM: ADD$CUBE, # ADD CUBE TO FAMILY #
        634. ADDCRFM: ADD$CART, # ADD CARTRIDGE TO FAMILY #
        635. ADDCSFM: ADD$CSU, # ADD *SM* TO FAMILY #
        636. RMVCBFM: RMV$CUBE, # REMOVE CUBE FROM FAMILY #
        637. RMVCRFM: RMV$CART, # REMOVE CARTRIDGE FROM FAMILY #
        638. RMVCSFM: RMV$CSU, # REMOVE *SM* FROM FAMILY #
        639. UPDCAT: UPD$CAT, # UPDATE CATALOG FIELD #
        640. UPDMAP: UPD$MAP; # UPDATE SMMAP FIELD #
        641.  
        642. CONTROL EJECT;
        643.  
        644. #
        645. * ZERO FILL CALLSS REQUEST BLOCK AND SET UP FIELDS COMMON
        646. * TO MOST REQUESTS.
        647. #
        648.  
        649. COMPLETE = FALSE;
        650.  
        651. SLOWFOR I = 0 STEP 1 UNTIL CPRLEN-1
        652. DO
        653. BEGIN
        654. CPR1[I] = 0;
        655. END
        656.  
        657. #
        658. * SET UP PARAMETER BLOCK.
        659. #
        660.  
        661. CPR$RQT[0] = TYP"TYP3";
        662. CPR$RQC[0] = REQ$CODE;
        663. CPR$RQI[0] = REQID$LB;
        664. CPR$FAM[0] = LBARG$FM[0];
        665. CPR$SUB[0] = LBARG$SB[0];
        666. CPR$CSU[0] = LBARG$SMID[0];
        667. CPR$WC[0] = TYP3$WC;
        668. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        669.  
        670. #
        671. * SET UP ADDITIONAL REQUEST BLOCK FIELDS FOR SPECIFIC
        672. * REQUEST CODES.
        673. #
        674.  
        675. GOTO CALL3ACT[REQ$CODE];
        676.  
        677. ADDCBFM: # ADD CUBE TO FAMILY #
        678. CPR$Y[0] = PT$Y[0]; # SET Y AND Z COORDINATES #
        679. CPR$Z[0] = PT$Z[0];
        680. GOTO ISSUECALL;
        681.  
        682. ADDCRFM: # ADD CARTRIDGE TO FAMILY #
        683. P<LABEL$CART> = NEWLABP;
        684. CPR$FCT[0] = (PT$GR[0]) * 16 + PT$GRT[0];
        685. CPR$Y[0] = LAB$Y[0]; # SET Y AND Z COORDINATES #
        686. CPR$Z[0] = LAB$Z[0];
        687. CPR$CSND[0] = LAB$CSND[0]; # SET VSN FIELD #
        688. CPR$CCOD[0] = LAB$CCOD[0];
        689. CPR$GR[0] = LBARG$GR[0]; # SET GROUP PARAMETERS #
        690. CPR$GRT[0] = PT$GRT;
        691. # CALCULATE GRTO #
        692. CPR$B[0] = LBARG$B[0];
        693. CPR$STRD[0] = LAB$STRD[0];
        694. CPR$STWR[0] = LAB$STWR[0];
        695. CPR$SRDE[0] = LAB$SRDE[0];
        696. CPR$SWRE[0] = LAB$SWRE1[0];
        697. B<28,4>CPR$SWRE = LAB$SWRE[0];
        698. CPR$HRDE[0] = LAB$HRDE[0];
        699. CPR$STDM[0] = LAB$STDM[0];
        700. CPR$CRLD[0] = LAB$CRLD[0];
        701. CPR$LDER[0] = LAB$LDER[0];
        702. GOTO ISSUECALL;
        703.  
        704. ADDCSFM: # ADD *SM* TO FAMILY #
        705. GOTO ISSUECALL;
        706.  
        707. RMVCBFM: # REMOVE CUBE FROM FAMILY #
        708. CPR$FCT[0] = CM$FCTORD[0]; # SET FCT ORDINAL #
        709. CPR$Y[0] = PT$Y[0]; # SET Y AND Z COORDINATES #
        710. CPR$Z[0] = PT$Z[0];
        711. GOTO ISSUECALL;
        712.  
        713. RMVCRFM: # REMOVE CARTRIDGE FROM FAMILY #
        714. CPR$FAM[0] = CM$FMLYNM[0]; # USE *FM* AND *SB* FROM SMMAP #
        715. CPR$SUB[0] = CM$SUB[0];
        716. CPR$FCT[0] = CM$FCTORD[0]; # SET FCT ORDINAL #
        717. CPR$GR[0] = LBARG$GR[0]; # SET GROUP #
        718. CPR$Y[0] = PT$Y[0]; # SET Y AND Z COORDINATES #
        719. CPR$Z[0] = PT$Z[0];
        720. GOTO ISSUECALL;
        721.  
        722. RMVCSFM: # REMOVE *SM* FROM FAMILY #
        723. GOTO ISSUECALL;
        724.  
        725. UPDCAT: # UPDATE CATALOG FIELD #
        726. CPR$FAM[0] = CM$FMLYNM[0]; # USE *FM* AND *SB* FROM SMMAP #
        727. CPR$SUB[0] = CM$SUB[0];
        728. CPR$FCT[0] = CM$FCTORD[0]; # SET FCT ORDINAL #
        729. CPR$FLD[0] = CATFLD; # SET FIELD NAME #
        730. CPR$VAL[0] = CATVALUE; # SET CATALOG FIELD VALUE #
        731. GOTO ISSUECALL;
        732.  
        733. UPDMAP: # UPDATE SMMAP ENTRY #
        734. CPR$Y[0] = PT$Y[0]; # SET Y AND Z COORDINATES #
        735. CPR$Z[0] = PT$Z[0];
        736. CPR$MAPENT[0] = PT$MAPENT[0]; # SET UP NEW SMMAP ENTRY #
        737. GOTO ISSUECALL;
        738.  
        739. ISSUECALL: # ISSUE REQUEST TO EXEC #
        740. REPEAT WHILE NOT COMPLETE
        741. DO
        742. BEGIN
        743. CALLSS(SSID$LB,CPR[0],RCL);
        744. IF CPR$RQR[0] NQ RESPTYP3"RESUB$REQ"
        745. THEN # REQUEST COMPLETE #
        746. BEGIN
        747. COMPLETE = TRUE;
        748. TEST DUMMY;
        749. END
        750.  
        751. #
        752. * RESUBMIT THE REQUEST.
        753. #
        754.  
        755. CPR$RQR[0] = 0;
        756. CPR$C[0] = FALSE;
        757. END
        758.  
        759. RESP$CODE = CPR$RQR[0];
        760. RETURN;
        761.  
        762. END # CALL3 #
        763.  
        764. TERM
        765. PROC CALL4((REQ$CODE),(DRD),(CART$CSN),(OLD$Y),(OLD$Z),RESP$CODE);
        766. # TITLE CALL4 - SETS UP AND ISSUES A TYPE 4 CALLSS TO EXEC. #
        767.  
        768. BEGIN # CALL4 #
        769.  
        770. #
        771. ** CALL4 - SETS UP AND ISSUES A TYPE4 CALLSS TO EXEC.
        772. *
        773. * PROC CALL4((REQ$CODE),(OLD$Y),(OLD$Z),(NEW$Y),(NEW$Z),RESP$CODE)
        774. *
        775. * ENTRY (REQ$CODE) = REQUEST CODE.
        776. * (OLD$Y) = PRIMARY Y COORDINATE.
        777. * (OLD$Z) = PRIMARY Z COORDINATE.
        778. * (NEW$Y) = SECONDARY Y COORDINATE.
        779. * (NEW$Z) = SECONDARY Z COORDINATE.
        780. * (REQID$LB) = REQUESTOR ID.
        781. * (SSID$LB) = SUBSYSTEM ID.
        782. * (NEWLABP) = FWA OF BUFFER CONTAINING NEW
        783. * CARTRIDGE LABEL.
        784. * (OLDLABP) = FWA OF BUFFER CONTAINING OLD
        785. * CARTRIDGE LABEL.
        786. * (ADDRSNS) = FWA OF BUFFER TO HOLD DRAWER
        787. * STATUS TABLE.
        788. * (DRD$NUM) = TRANSPORT ID.
        789. * (LBARG$SMID) = *SM*-ID.
        790. * P<CPR> = FWA OF PARAMETER BLOCK.
        791. *
        792. * EXIT (RESP$CODE) = RESPONSE FROM EXEC.
        793. *
        794. * NOTES PROC *CALL4* SETS UP THE CALLSS PARAMETER BLOCK
        795. * FOR A TYPE 4 REQUEST TO EXEC. TYPE 4 ARE THE
        796. * REQUESTS THAT REQUIRE SM OR M860 ACTIONS PERFOR-
        797. * -MED. THE SPECIFIC REQUEST ISSUED IS DEPENDENT
        798. * ON THE VALUE OF *REQCODE*. PARAMETERS NOT NEEDED
        799. * FOR THE REQUEST ARE IGNORED. IF THE RESPONSE
        800. * RETURNED BY EXEC IS *RESUBMIT* THE REQUEST*, THE
        801. * CALLSS IS REISSUED. OTHERWISE THE RESPONSE CODE
        802. * IS RETURNED TO THE CALLING PROC.
        803. #
        804.  
        805. ITEM CART$CSN U; # CARTRIDGE SERIAL NUMBER #
        806. ITEM DRD U; # DRIVE NUMBER #
        807.  
        808. ITEM REQ$CODE U; # REQUEST CODE #
        809. ITEM OLD$Y I; # OLD Y COORDINATE #
        810. ITEM OLD$Z I; # OLD Z COORDINATE #
        811. ITEM NEW$Y I; # NEW Y COORDINATE #
        812. ITEM NEW$Z I; # NEW Z COORDINATE #
        813. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        814.  
        815. #
        816. **** PROC CALL4 - XREF LIST BEGIN.
        817. #
        818.  
        819. XREF
        820. BEGIN
        821. PROC CALLSS; # ISSUES A CALLSS TO EXEC #
        822. END
        823.  
        824. #
        825. **** PROC CALL4 - XREF LIST END.
        826. #
        827.  
        828. DEF LISTCON #0#; # CONTROLS LISTING OF COMDECKS #
        829. *CALL COMBFAS
        830. *CALL COMBCPR
        831. *CALL COMTLAB
        832. *CALL COMTLBP
        833.  
        834. SWITCH CALL4ACT: REQTYP4 # TYPE OF CALLSS TO BE ISSUED #
        835. GETCART: LOAD$CART, # GET CARTRIDGE #
        836. PUTCART: UNLD$CART, # PUT CARTRIDGE #
        837. WRITLAB: WRT$LAB; # WRITE LABEL #
        838.  
        839. ITEM I I; # LOOP VARIABLE #
        840.  
        841. CONTROL EJECT;
        842.  
        843. #
        844. * ZERO-FILL CALLSS REQUEST BLOCK AND SET UP FIELDS USED BY
        845. * MOST REQUESTS.
        846. #
        847.  
        848. SLOWFOR I = 0 STEP 1 UNTIL CPRLEN-1
        849. DO
        850. BEGIN
        851. CPR1[I] = 0;
        852. END
        853.  
        854. CPR$RQT[0] = TYP"TYP4";
        855. CPR$RQC[0] = REQ$CODE;
        856. CPR$RQI[0] = REQID$LB;
        857. CPR$CSU[0] = LBARG$SMID[0];
        858. CPR$WC[0] = TYP4$WC;
        859. CPR$Y[0] = OLD$Y;
        860. CPR$Z[0] = OLD$Z;
        861.  
        862. #
        863. * SET UP ADDITIONAL REQUEST BLOCK FIELDS FOR SPECIFIC REQUEST.
        864. #
        865.  
        866. GOTO CALL4ACT[REQ$CODE];
        867.  
        868. GETCART: # GET CARTRIDGE REQUEST #
        869. CPR$ADDR2[0] = OLDLABP;
        870. GOTO ISSUECALL;
        871.  
        872.  
        873. PUTCART: # PUT CARTRIDGE REQUEST #
        874. GOTO ISSUECALL;
        875.  
        876. WRITLAB: # WRITE LABEL REQUEST #
        877. CPR$ADDR2[0] = NEWLABP;
        878. GOTO ISSUECALL;
        879.  
        880.  
        881.  
        882. ISSUECALL: # ISSUE REQUEST TO EXEC #
        883. CALLSS(SSID$LB,CPR[0],RCL);
        884. RESP$CODE = CPR$RQR[0];
        885. RETURN;
        886.  
        887. END # CALL4 #
        888.  
        889. TERM
        890. PROC CKLAB(LAB$TYPE);
        891. # TITLE CKLAB - CHECKS CARTRIDGE LABEL. #
        892.  
        893. BEGIN # CKLAB #
        894.  
        895. #
        896. ** CKLAB - CHECKS CARTRIDGE LABEL.
        897. *
        898. * THIS PROCEDURE CHECKS CARTRIDGE LABEL
        899. * TO SEE IF IT IS A RECOGNIZABLE LABEL.
        900. *
        901. * PROC CKLAB(LAB$TYPE)
        902. *
        903. * ENTRY OLDLABP, AN ITEM CONTAINING FWA OF BUFFER
        904. * CONTAINING OLD CARTRIDGE LABEL.
        905. *
        906. * EXIT CARTRIDGE LABEL CHECKED.
        907. * LAB$TYPE, AN ITEM CONTAINING
        908. * LABEL TYPE.
        909. *
        910. * NOTES PROC *CKLAB* CHECKS THE LABEL
        911. * TO SEE IF IT IS A MANUFACTURERS
        912. * LABEL, SCRATCH LABEL, FAMILY
        913. * LABEL OR AN UNRECOGNIZABLE LABEL.
        914. #
        915.  
        916. ITEM LAB$TYPE U; # CARTRIDGE LABEL TYPE #
        917.  
        918. #
        919. **** PROC CKLAB - XREF LIST BEGIN.
        920. #
        921.  
        922. XREF
        923. BEGIN
        924. PROC CONVSN; # CONVERTS VSN FROM EBCDIC TO CDC
        925.   DISPLAY CODE #
        926. END
        927.  
        928. #
        929. **** PROC CKLAB - XREF LIST END.
        930. #
        931.  
        932. DEF PROCNAME #"CKLAB."#; # PROC NAME #
        933.  
        934. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        935. *CALL COMBFAS
        936. *CALL COMBLBL
        937. *CALL COMTLAB
        938.  
        939. ITEM CONTYPE I; # TYPE OF CONVERSION #
        940. ITEM FLAG I; # CHECK FOR LEGAL CHARACTER #
        941. ITEM TEMP$VSN C(8); # CSN IN CDC DISPLAY CODE #
        942.  
        943. CONTROL EJECT;
        944.  
        945. #
        946. * CONVERT THE TWELVE BYTES IN THE CSN IN EBCDIC TO
        947. * DISPLAY CODE AND ALSO CHECK TO SEE IF THEY ARE
        948. * LEGAL CDC CHARACTERS (A - Z EXCEPT I AND O AND
        949. * 0 - 9).
        950. #
        951.  
        952. CONTYPE = 1;
        953. CONVSN(TEMP$VSN,CONTYPE,FLAG);
        954. IF FLAG NQ 0
        955. THEN # NOT LEGAL CDC CHARACTER #
        956. BEGIN
        957. GOTO UNREC$LAB; # PROCESS THE ERROR #
        958. END
        959.  
        960. P<LABEL$CART> = OLDLABP;
        961.  
        962.  
        963.  
        964. #
        965. * CHECK FOR A FAMILY LABEL.
        966. #
        967.  
        968. IF (LAB$FMLY[0] NQ " ") AND (LAB$CARTTP[0] EQ 1)
        969. THEN
        970. BEGIN
        971. LAB$TYPE = LABTYPE"FAM$LAB";
        972. RETURN;
        973. END
        974.  
        975. #
        976. * CHECK FOR A SCRATCH LABEL.
        977. #
        978.  
        979. IF (LAB$FMLY[0] EQ " ") AND (LAB$CARTTP[0] EQ LABTYPE"SCR$LAB")
        980. THEN
        981. BEGIN
        982. LAB$TYPE = LABTYPE"SCR$LAB";
        983. RETURN;
        984. END
        985.  
        986. LAB$TYPE = LABTYPE"MAN$LAB";
        987. RETURN;
        988.  
        989.  
        990. UNREC$LAB: # UNRECOGNIZABLE LABEL #
        991. LAB$TYPE = LABTYPE"UNR$LAB";
        992. RETURN;
        993.  
        994. END # CKLAB #
        995.  
        996. TERM
        997. PROC CONVSN(DC$VSN,(CONTYPE),CONFLAG);
        998. # TITLE CONVSN - CONVERTS CSN BETWEEN EBCDIC AND DISPLAY CODE. #
        999.  
        1000. BEGIN # CONVSN #
        1001.  
        1002. #
        1003. ** CONVSN - CONVERTS CSN BETWEEN EBCDIC AND DISPLAY CODE.
        1004. *
        1005. * THIS PROCEDURE CONVERTS THE CSN FROM EBCDIC TO DISPLAY CODE,
        1006. * OR FROM DISPLAY CODE TO EBCDIC.
        1007. *
        1008. * PROC CONVSN(DC$VSN,(CONTYPE),CONFLAG)
        1009. *
        1010. * ENTRY CONTYPE TYPE OF CONVERSION REQUESTED.
        1011. * 0, DISPLAY CODE TO EBCDIC.
        1012. * 1, EBCDIC TO DISPLAY CODE.
        1013. * DC$VSN AN ITEM CONTAINING CSN IN CDC
        1014. * DISPLAY CODE.
        1015. * OLDLABP AN ITEM CONTAINING FWA OF BUFFER
        1016. * CONTAINING OLD CARTRIDGE LABEL.
        1017. *
        1018. * EXIT CONFLAG BOOLEAN ITEM CONTAINING ERROR STATUS.
        1019. * FALSE, NO ERROR.
        1020. * TRUE, NOT A LEGAL CDC CHARACTER.
        1021. *
        1022. * NOTES PROC *CONVSN* CONVERTS THE EBCDIC CSN FROM
        1023. * *OLDLABEL* AND RETURNS A DISPLAY CODE CSN IN ITEM
        1024. * *DC$VSN*, OR IT CONVERTS THE DISPLAY CODE CSN FROM
        1025. * ITEM *DC$VSN* TO EBCDIC AND STORES THE RESULT IN
        1026. * ARRAY *OLDLABEL*. IF ANY CHARACTERS ARE NOT LEGAL
        1027. * CDC CHARACTERS (ALPHANUMERIC, EXCLUDING *O* AND *I*)
        1028. * ERROR FLAG *CONFLAG* IS SET.
        1029. #
        1030.  
        1031. ITEM DC$VSN C(8); # CSN IN CDC DISPLAY CODE #
        1032. ITEM CONTYPE U; # TYPE OF CONVERSION #
        1033. ITEM CONFLAG B; # ERROR FLAG FOR ILLEGAL CSN #
        1034.  
        1035. #
        1036. **** PROC CONVSN - XREF LIST BEGIN.
        1037. #
        1038.  
        1039. XREF
        1040. BEGIN
        1041. PROC DCEBC; # CONVERTS BETWEEN EBCDIC AND
        1042.   DISPLAY CODE #
        1043. END
        1044.  
        1045. #
        1046. **** PROC CONVSN - XREF LIST END.
        1047. #
        1048.  
        1049. DEF LISTCON #0#; # DO NOT LIST THE COMDECKS #
        1050. *CALL COMBFAS
        1051. *CALL COMBLBL
        1052. *CALL COMTLAB
        1053.  
        1054. ITEM DCTEMP C(1); # TEMPORARY DISPLAY CODE ITEM #
        1055. ITEM EBCTEMP U; # TEMPORARY EBCDIC ITEM #
        1056. ITEM I I; # LOOP VARIABLE #
        1057. ITEM LEGCHAR B; # LEGAL CHARACTER FLAG #
        1058.  
        1059. ARRAY EBC$VSN [1:12] P(1); # CONTAINS EBCDIC CHARACTERS #
        1060. BEGIN
        1061. ITEM EBC$CHAR U(00,00,60); # EBCDIC CHARACTER #
        1062. END
        1063.  
        1064. CONTROL EJECT;
        1065.  
        1066. P<LABEL$CART> = OLDLABP; # LABEL FORMAT DESCRIPTION #
        1067. CONFLAG = FALSE;
        1068.  
        1069. #
        1070. * CONVERSION FROM DISPLAY CODE TO EBCDIC.
        1071. #
        1072.  
        1073. IF CONTYPE EQ 0
        1074. THEN
        1075. BEGIN # DISPLAY TO EBCDIC CONVERSION #
        1076. SLOWFOR I = 0 STEP 1 UNTIL 7
        1077. DO
        1078. BEGIN
        1079. DCTEMP = C<I,1>DC$VSN;
        1080. IF DCTEMP EQ "I" ##
        1081. OR DCTEMP EQ "O" ##
        1082. OR DCTEMP LS "A" ##
        1083. OR DCTEMP GR "9"
        1084. THEN # ILLEGAL CDC CHARACTER #
        1085. BEGIN
        1086. CONFLAG = TRUE;
        1087. RETURN;
        1088. END
        1089.  
        1090. DCEBC(DCTEMP,EBCTEMP,0); # CONVERT TO EBCDIC #
        1091. EBC$CHAR[I+1] = EBCTEMP;
        1092. END
        1093.  
        1094. B<32,8>LAB$CSN[0] = B<52,8>EBC$CHAR[1];
        1095. B<40,8>LAB$CSN[0] = B<52,8>EBC$CHAR[2];
        1096. B<48,8>LAB$CSN[0] = B<52,8>EBC$CHAR[3];
        1097. B<56,4>LAB$CSN[0] = B<52,4>EBC$CHAR[4];
        1098. B<0,4>LAB$CSN[1] = B<56,4>EBC$CHAR[4];
        1099. B<4,8>LAB$CSN[1] = B<52,8>EBC$CHAR[5];
        1100. B<12,8>LAB$CSN[1] = B<52,8>EBC$CHAR[6];
        1101. B<20,8>LAB$CSN[1] = B<52,8>EBC$CHAR[7];
        1102. B<28,8>LAB$CSN[1] = B<52,8>EBC$CHAR[8];
        1103. RETURN;
        1104. END # DISPLAY TO EBCDIC CONVERSION #
        1105.  
        1106. #
        1107. * CONVERSION FROM EBCDIC TO DISPLAY CODE.
        1108. #
        1109.  
        1110. IF CONTYPE EQ 1
        1111. THEN
        1112. BEGIN # EBCDIC TO DISPLAY CONVERSION #
        1113. EBC$CHAR[1] = B<32,8>LAB$CSN[0]; # SAVE EBCDIC BYTES #
        1114. EBC$CHAR[2] = B<40,8>LAB$CSN[0];
        1115. EBC$CHAR[3] = B<48,8>LAB$CSN[0];
        1116. B<52,4>EBC$CHAR[4] = B<56,4>LAB$CSN[0];
        1117. B<56,4>EBC$CHAR[4] = B<0,4>LAB$CSN[1];
        1118. EBC$CHAR[5] = B<4,8>LAB$CSN[1];
        1119. EBC$CHAR[6] = B<12,8>LAB$CSN[1];
        1120. EBC$CHAR[7] = B<20,8>LAB$CSN[1];
        1121. EBC$CHAR[8] = B<28,8>LAB$CSN[1];
        1122. LEGCHAR = TRUE;
        1123.  
        1124. SLOWFOR I = 0 STEP 1 WHILE LEGCHAR AND I LQ 7
        1125. DO
        1126. BEGIN
        1127. DCEBC(DCTEMP,EBC$CHAR[I+1],1); # CONVERT TO DISPLAY CODE #
        1128. IF DCTEMP EQ "I" ##
        1129. OR DCTEMP EQ "O" ##
        1130. OR DCTEMP LS "A" ##
        1131. OR DCTEMP GR "9"
        1132. THEN # ILLEGAL CDC CHARACTER #
        1133. BEGIN
        1134. LEGCHAR = FALSE;
        1135. TEST I;
        1136. END
        1137.  
        1138. C<I,1>DC$VSN = DCTEMP;
        1139. END
        1140.  
        1141. IF NOT LEGCHAR
        1142. THEN # RETURN ERROR FLAG #
        1143. BEGIN
        1144. CONFLAG = TRUE;
        1145. END
        1146.  
        1147. RETURN;
        1148. END # EBCDIC TO DISPLAY CONVERSION #
        1149.  
        1150. END # CONVSN #
        1151.  
        1152. TERM
        1153. PROC DCEBC(DC$ITEM,EBC$ITEM,FLAG);
        1154. # TITLE DCEBC - CONVERTS TO/FROM EBCDIC VALUES. #
        1155.  
        1156. BEGIN # DCEBC #
        1157.  
        1158. #
        1159. ** DCEBC CONVERTS TO/FROM EBCDIC VALUES.
        1160. *
        1161. * THIS PROCEDURE CONVERTS AN ITEM FROM DISPLAY
        1162. * CODE TO EBCDIC (FLAG = 0), OR FROM EBCDIC TO
        1163. * DISPLAY CODE (FLAG = 1).
        1164. *
        1165. * PROC DCEBC(DC$ITEM,EBC$ITEM,FLAG)
        1166. *
        1167. * ENTRY FLAG, AN ITEM CONTAINING CODE FOR THE
        1168. * THE TYPE OF CONVERSION.
        1169. * 0, DISPLAY CODE TO EBCDIC.
        1170. * 1, EBCDIC TO DISPLAY CODE.
        1171. * DC$ITEM, DISPLAY CODE VALUE (IF FLAG=0).
        1172. * EBC$ITEM, EBCDIC VALUE (IF FLAG=1).
        1173. *
        1174. * EXIT CONVERSION DONE AND THE CONVERTED VALUE SET
        1175. * UP IN DC$ITEM (FLAG=1) OR EBC$ITEM(FLAG=0).
        1176. * (DC$ITEM) = 0, IF AN ILLEGAL CHARACTER.
        1177. *
        1178. * NOTES PROC *DCEBC* CONVERTS AN ITEM FROM DISPLAY
        1179. * CODE TO EBCDIC OR EBCDIC TO DISPLAY CODE
        1180. * VALUE DEPENDING ON THE VALUE OF FLAG. A
        1181. * TABLE HAS BEEN PRESET WITH THE EBCDIC VALUES.
        1182. * THE ORDINAL OF THE MATCHING EBCDIC VALUE GIVES
        1183. * THE DISPLAY CODE VALUE.
        1184. #
        1185.  
        1186. ITEM DC$ITEM U; # DISPLAY CODE VALUE #
        1187. ITEM EBC$ITEM U; # EBCDIC VALUE #
        1188. ITEM FLAG I; # DIRECTION OF CONVERSION #
        1189.  
        1190. DEF CTLEN #36#; # CONVERSION TABLE LENGTH #
        1191.  
        1192. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1193. *CALL COMBFAS
        1194.  
        1195. ITEM I I; # LOOP VARIABLE #
        1196.  
        1197. #
        1198. * DISPLAY CODE / EBCDIC CONVERSION TABLE.
        1199. #
        1200.  
        1201. ARRAY CONVTBL [1:CTLEN] P(1); # EBCDIC VALUE #
        1202. BEGIN
        1203. ITEM CONV$VAL U(00,00,08) = [X"C1", # A #
        1204. X"C2", # B #
        1205. X"C3", # C #
        1206. X"C4", # D #
        1207. X"C5", # E #
        1208. X"C6", # F #
        1209. X"C7", # G #
        1210. X"C8", # H #
        1211. X"C9", # I #
        1212. X"D1", # J #
        1213. X"D2", # K #
        1214. X"D3", # L #
        1215. X"D4", # M #
        1216. X"D5", # N #
        1217. X"D6", # O #
        1218. X"D7", # P #
        1219. X"D8", # Q #
        1220. X"D9", # R #
        1221. X"E2", # S #
        1222. X"E3", # T #
        1223. X"E4", # U #
        1224. X"E5", # V #
        1225. X"E6", # W #
        1226. X"E7", # X #
        1227. X"E8", # Y #
        1228. X"E9", # Z #
        1229. X"F0", # 0 #
        1230. X"F1", # 1 #
        1231. X"F2", # 2 #
        1232. X"F3", # 3 #
        1233. X"F4", # 4 #
        1234. X"F5", # 5 #
        1235. X"F6", # 6 #
        1236. X"F7", # 7 #
        1237. X"F8", # 8 #
        1238. X"F9"]; # 9 #
        1239. END
        1240.  
        1241. CONTROL EJECT;
        1242.  
        1243. IF FLAG EQ 1
        1244. THEN
        1245. BEGIN # CONVERT FROM EBCDIC TO DISPLAY CODE #
        1246.  
        1247. SLOWFOR I = 1 STEP 1 UNTIL CTLEN
        1248. DO
        1249. BEGIN
        1250. IF CONV$VAL[I] EQ EBC$ITEM
        1251. THEN
        1252. BEGIN
        1253. B<0,6>DC$ITEM = I;
        1254. RETURN;
        1255. END
        1256.  
        1257. END
        1258.  
        1259. DC$ITEM = 0; # ILLEGAL CHARACTER #
        1260. RETURN;
        1261. END # CONVERT FROM EBCDIC TO DISPLAY CODE #
        1262.  
        1263. ELSE
        1264. BEGIN # CONVERT FROM DISPLAY CODE TO EBCDIC #
        1265. I = B<0,6>DC$ITEM;
        1266. EBC$ITEM = CONV$VAL[I];
        1267. RETURN;
        1268. END # CONVERT FROM DISPLAY CODE TO EBCDIC #
        1269.  
        1270. END # DCEBC #
        1271.  
        1272. TERM
        1273. PROC DLABFLD;
        1274. # TITLE DLABFLD - DISPLAYS FIELDS IN THE CARTRIDGE LABEL. #
        1275.  
        1276. BEGIN # DLABFLD #
        1277.  
        1278. #
        1279. ** DLABFLD - DISPLAYS FIELDS IN THE CARTRIDGE LABEL.
        1280. *
        1281. * PROC DLABFLD.
        1282. *
        1283. * ENTRY (OLDLABP) = FWA OF BUFFER CONTAINING
        1284. * CARTRIDGE LABEL.
        1285. *
        1286. * EXIT ALL APPROPRIATE FIELDS ARE DISPLAYED IN THE
        1287. * DAYFILE AND IN THE REPORT FILE.
        1288. *
        1289. * MESSAGES 1) CSN = XXXXXXXX.
        1290. * 2) FAMILY = XXXXXXX.
        1291. * 3) SUBFAMILY = X.
        1292.   4) SM = X.
        1293. * 5) X = X.
        1294. * 6) Y = X.
        1295. *
        1296. * NOTES PROC *DLABFLD* CALLS *CONVSN* AND *XCDD* TO
        1297. * CONVERT ALL FIELDS TO DISPLAY CODE. THE APPROPRIATE
        1298. * FIELDS FROM THE OLD CARTRIDGE LABEL ARE THEN DISPLAYED
        1299. * IN THE DAYFILE AND IN THE REPORT FILE.
        1300. #
        1301.  
        1302. #
        1303. **** PROC DLABFLD - XREF LIST BEGIN.
        1304. #
        1305.  
        1306. XREF
        1307. BEGIN
        1308. PROC BZFILL; # BLANK/ZERO FILLS A BUFFER #
        1309. PROC CONVSN; # CONVERTS VSN FROM EBCDIC TO
        1310.   DISPLAY CODE #
        1311. PROC LBERR; # ERROR PROCESSOR #
        1312. PROC MESSAGE; # DISPLAYS DAYFILE MESSAGES #
        1313. PROC RPLINE; # WRITES A LINE ON OUTPUT FILE #
        1314. FUNC XCDD C(10); # CONVERTS ITEMS FROM INTEGERS TO
        1315.   DISPLAY CODE #
        1316. END
        1317.  
        1318. #
        1319. **** PROC DLABFLD - XREF LIST END.
        1320. #
        1321.  
        1322. DEF PROCNAME #"DLABFLD."#; # PROC NAME #
        1323.  
        1324. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1325. *CALL COMBFAS
        1326. *CALL COMBBZF
        1327. *CALL COMBLBL
        1328. *CALL COMTERR
        1329. *CALL COMTLAB
        1330. *CALL COMTOUT
        1331.  
        1332. ITEM CONFLAG B; # CONVERSION FLAG #
        1333. ITEM CONTYPE I; # TYPE OF CONVERSION #
        1334. ITEM DIS$SUB C(10); # SUBFAMILY IN DISPLAY CODE #
        1335. ITEM DIS$VSN C(8); # *CSN* IN DISPLAY CODE #
        1336. ITEM DIS$Y C(10); # Y COORDINATE IN DISPLAY CODE #
        1337. ITEM DIS$Z C(10); # Z COORDINATE IN DISPLAY CODE #
        1338. ITEM TEMP C(7); # TEMPORARY ITEM #
        1339.  
        1340. ARRAY LABFLD [0:0] P(4); # DISPLAY FIELDS ARRAY #
        1341. BEGIN
        1342. ITEM LABMSG C(00,00,38); # MESSAGE DISPLAY FIELD #
        1343. ITEM LABY C(00,30,02); # Y COORDINATE IN DISPLAY #
        1344. ITEM LABZ C(00,30,02); # Z COORDINATE IN DISPLAY #
        1345. ITEM LABCSU C(00,42,01); # *SM* IN DISPLAY CODE #
        1346. ITEM LABCM C(00,42,02); # CARTRIDGE MANUFACTURER #
        1347. ITEM LABVSN C(00,42,08); # *CSN* IN DISPLAY CODE #
        1348. ITEM LABFAM C(01,00,07); # FAMILY IN DISPLAY CODE #
        1349. ITEM LABSUB C(01,18,01); # SUBFAMILY IN DISPLAY CODE #
        1350. ITEM LABTERM U(03,48,12) = [0]; # TERMINATOR #
        1351. END
        1352.  
        1353. CONTROL EJECT;
        1354.  
        1355. #
        1356. * CONVERT EACH BYTE IN *CSN* TO DISPLAY CODE.
        1357. #
        1358.  
        1359. CONTYPE = 1;
        1360. CONVSN(DIS$VSN,CONTYPE,CONFLAG);
        1361. IF CONFLAG
        1362. THEN # ILLEGAL *CSN* #
        1363. BEGIN
        1364. ERRCODE = S"ILLEG$C";
        1365. LBERR(ERRCODE);
        1366. END
        1367.  
        1368. #
        1369. * DISPLAY CARTRIDGE MANUFACTURER.
        1370. #
        1371.  
        1372. P<LABEL$CART> = OLDLABP;
        1373. LABMSG[0] = " CM = ";
        1374. LABCM[0] = LAB$CCOD[0];
        1375. MESSAGE(LABFLD[0],UDFL1);
        1376. RPLINE(OUT$FETP,"CM = ",8,8,1);
        1377. RPLINE(OUT$FETP,LABCM[0],14,2,0);
        1378.  
        1379.  
        1380. #
        1381. * DISPLAY *CSN* IN DAYFILE AND IN REPORT FILE.
        1382. #
        1383.  
        1384. LABMSG[0] = " CSN = ";
        1385. LABVSN[0] = DIS$VSN;
        1386. MESSAGE(LABFLD[0],UDFL1);
        1387. RPLINE(OUT$FETP,"CSN = ",8,8,1);
        1388. RPLINE(OUT$FETP,DIS$VSN,14,8,0);
        1389.  
        1390.  
        1391.  
        1392. #
        1393. * DISPLAY FAMILY AND SUBFAMILY FOR A FAMILY LABEL.
        1394. #
        1395.  
        1396. IF LAB$FMLY[0] NQ " "
        1397. THEN
        1398. BEGIN # DISPLAY FAMILY/SUBFAMILY #
        1399. TEMP = LAB$FMLY[0]; # BLANK FILL FAMILY NAME #
        1400. BZFILL(TEMP,TYPFILL"BFILL",7);
        1401. LABMSG[0] = " FAMILY = ";
        1402. LABFAM[0] = TEMP;
        1403. MESSAGE(LABFLD[0],UDFL1);
        1404. RPLINE(OUT$FETP,"FAMILY = ",8,9,1);
        1405. RPLINE(OUT$FETP,TEMP,17,7,0);
        1406.  
        1407. DIS$SUB = XCDD(LAB$SF[0]);
        1408. LABMSG[0] = " SUBFAMILY";
        1409. LABFAM[0] = " = ";
        1410. LABSUB[0] = C<9,1>DIS$SUB;
        1411. MESSAGE(LABFLD[0],UDFL1);
        1412. RPLINE(OUT$FETP,"SUBFAMILY = ",8,12,1);
        1413. RPLINE(OUT$FETP,LABSUB[0],20,1,0);
        1414. END # DISPLAY FAMILY/SUBFAMILY #
        1415.  
        1416. #
        1417. * DISPLAY *SM* IDENTIFIER.
        1418. #
        1419.  
        1420. LABMSG[0] = " SM = ";
        1421. LABCSU[0] = LAB$SMID[0];
        1422. MESSAGE(LABFLD[0],UDFL1);
        1423. RPLINE(OUT$FETP,"SM = ",8,6,1);
        1424. RPLINE(OUT$FETP,LABCSU[0],14,1,0);
        1425.  
        1426. #
        1427. * DISPLAY Y,Z COORDINATES.
        1428. #
        1429.  
        1430. DIS$Y = XCDD(LAB$Y[0]);
        1431. LABMSG[0] = " Y = ";
        1432. LABY[0] = C<8,2>DIS$Y;
        1433. MESSAGE(LABFLD[0],UDFL1);
        1434. RPLINE(OUT$FETP,"Y = ",8,4,1);
        1435. RPLINE(OUT$FETP,LABY[0],12,2,0);
        1436.  
        1437. DIS$Z = XCDD(LAB$Z[0]);
        1438. LABMSG[0] = " Z = ";
        1439. LABZ[0] = C<8,2>DIS$Z;
        1440. MESSAGE(LABFLD[0],UDFL1);
        1441. RPLINE(OUT$FETP,"Z = ",8,4,1);
        1442. RPLINE(OUT$FETP,LABZ[0],12,2,0);
        1443.  
        1444. RETURN;
        1445.  
        1446. END # DLABFLD #
        1447.  
        1448. TERM
        1449. PROC GENLAB((LAB$TYPE),PT$CSU$ENT,(LD$CNT),(LD$ERR),(SR$ERR), (
        1450. STR$RD),(STR$WR),(STR$DM));
        1451. # TITLE GENLAB - SETS UP A FAMILY OR SCRATCH LABEL. #
        1452.  
        1453. BEGIN # GENLAB #
        1454.  
        1455. #
        1456. ** GENLAB - SETS UP A FAMILY OR SCRATCH LABEL.
        1457. *
        1458. * THIS PROCEDURE SETS UP A FAMILY OR SCRATCH
        1459. * LABEL DEPENDING UPON THE *LABTYPE* SPECIFIED.
        1460. *
        1461. * PROC GENLAB((LAB$TYPE),PT$CSU$ENT,(LD$CNT),(LD$ERR),
        1462. * (SR$ERR),(SW$ERR),(HR$ERR))
        1463. *
        1464. * ENTRY PT$CSU$ENT AN ARRAY CONTAINING THE
        1465. * SMMAP ENTRY.
        1466. * LD$CNT AN ITEM CONTAINING THE
        1467. * CARTRIDGE LOAD COUNT.
        1468. * LD$ERR AN ITEM CONTAINING A COUNT OF
        1469. * LOAD ERRORS.
        1470. * SR$ERR AN ITEM CONTAINING A COUNT OF
        1471. * SOFT READ ERRORS.
        1472. * SW$ERR AN ITEM CONTAINING A COUNT OF
        1473. * SOFT WRITE ERRORS.
        1474. * HR$ERR AN ITEM CONTAINING A COUNT OF
        1475. * HARD READ ERRORS.
        1476. * STR$RD AN ITEM CONTAINING A COUNT OF
        1477. * STRIPES WRITTEN.
        1478. * STR$WR AN ITEM CONTAINING A COUNT OF
        1479. * STRIPES READ.
        1480. * STR$DM AN ITEM CONTAINING A COUNT OF
        1481. * STRIPES DEMARKED.
        1482. * NEWLABP AN ITEM CONTAINING FWA OF BUFFER
        1483. * CONTAINING NEW CARTRIDGE LABEL.
        1484. * DRD$NUM AN ITEM CONTAINING TRANSPORT ID.
        1485. *
        1486. * EXIT LABEL SET UP IN *NEWLABEL*.
        1487. *
        1488. * NOTES PROC *GENLAB* SETS UP THE FIELDS FOR
        1489. * A FAMILY OR SCRATCH LABEL FOR A CARTRIDGE.
        1490. #
        1491.  
        1492. ITEM LAB$TYPE U; # TYPE OF CARTRIDGE LABEL #
        1493.  
        1494. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        1495. BEGIN
        1496. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        1497. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        1498. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        1499. ITEM PT$GR U(04,00,07); # GROUP #
        1500. ITEM PT$GRT U(04,07,04); # GROUP ORDINAL #
        1501. END
        1502.  
        1503.  
        1504. ITEM LD$CNT I; # CARTRIDGE LOAD COUNT #
        1505. ITEM PS$CNT I; # CARTRIDGE PASS COUNT #
        1506. ITEM ERR$CNT I; # CARTRIDGE ERROR COUNT #
        1507.  
        1508. #
        1509. **** PROC GENLAB - XREF LIST BEGIN.
        1510. #
        1511.  
        1512. XREF
        1513. BEGIN
        1514. PROC CONVSN; # CONVERTS VSN FROM EBCDIC TO
        1515.   DISPLAY CODE #
        1516. PROC LBERR; # ERROR PROCESSOR #
        1517. END
        1518.  
        1519. #
        1520. **** PROC GENLAB - XREF LIST END.
        1521. #
        1522.  
        1523. DEF PROCNAME #"GENLAB."#; # PROC NAME #
        1524.  
        1525. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1526. *CALL COMBFAS
        1527. *CALL COMBLBL
        1528. *CALL COMBMAP
        1529. *CALL COMTERR
        1530. *CALL COMTLAB
        1531. *CALL COMTLBP
        1532.  
        1533. ITEM CONTYPE I; # TYPE OF CONVERSION #
        1534. ITEM FLAG I; # ERROR FLAG #
        1535. ITEM HR$ERR I; # HARD READ ERRORS #
        1536. ITEM I I; # LOOP VARIABLE #
        1537. ITEM LD$ERR I; # LOAD ERRORS #
        1538. ITEM TEMP$VSN C(8); # CSN IN CDC DISPLAY CODE #
        1539. ITEM SR$ERR I; # SOFT READ ERRORS #
        1540. ITEM STR$RD I; # STRIPES READ #
        1541. ITEM STR$WR I; # STRIPES WRITTEN #
        1542. ITEM STR$DM I; # STRIPES DEMARKED #
        1543. ITEM SW$ERR I; # SOFT WRITE ERRORS #
        1544.  
        1545. #
        1546. * BASED ARRAY TO ACCESS FIRST FOUR WORDS OF CARTRIDGE LABEL.
        1547. #
        1548.  
        1549. BASED
        1550. ARRAY TEMP$LAB [0:0] P(1);
        1551. BEGIN
        1552. ITEM TEMP$LABW U(00,00,60); # FIRST WORD OF LABEL #
        1553. END
        1554.  
        1555. CONTROL EJECT;
        1556.  
        1557. #
        1558. * ZERO FILL THE *NEWLABEL* ARRAY.
        1559. #
        1560.  
        1561. P<LABEL$CART> = NEWLABP;
        1562. SLOWFOR I = 0 STEP 1 UNTIL LABLEN-1
        1563. DO
        1564. BEGIN
        1565. LAB$W1[I] = 0;
        1566. END
        1567.  
        1568. #
        1569. * SET THE FIRST 4 WORDS WORDS OF *NEWLABEL*
        1570. * EQUAL TO THE FIRST 4 WORDS OF *OLDLABEL*.
        1571. #
        1572.  
        1573. P<LABEL$CART> = OLDLABP;
        1574. P<TEMP$LAB> = NEWLABP;
        1575. SLOWFOR I = 0 STEP 1 UNTIL 3
        1576. DO
        1577. BEGIN
        1578. TEMP$LABW[I] = LAB$W1[I];
        1579. END
        1580.  
        1581. #
        1582. * CONVERT EACH OF THE SIX EBCDIC BYTES IN *OLDLABEL*
        1583. * TO DISPLAY CODE.
        1584. #
        1585.  
        1586. CONTYPE = 1;
        1587. CONVSN(TEMP$VSN,CONTYPE,FLAG);
        1588. IF FLAG NQ 0
        1589. THEN # ILLEGAL VSN #
        1590. BEGIN
        1591. ERRCODE = S"ILLEG$C";
        1592. LBERR(ERRCODE);
        1593. END
        1594.  
        1595. P<LABEL$CART> = NEWLABP;
        1596. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        1597.  
        1598. #
        1599. * SET UP VARIOUS FIELDS IN *NEWLABEL*.
        1600. #
        1601.  
        1602. LAB$CSND[0] = TEMP$VSN;
        1603. LAB$Y[0] = PT$Y[0];
        1604. LAB$Z[0] = PT$Z[0];
        1605. LAB$FMLY[0] = CM$FMLYNM[0];
        1606. LAB$SF[0] = CM$SUB[0];
        1607. LAB$SMID[0] = LBARG$SM[0];
        1608. LAB$CLF[0] = 1;
        1609.  
        1610. #
        1611. * SET UP *P* FLAG.
        1612. #
        1613.  
        1614. IF LAB$TYPE EQ LABTYPE"SCR$LAB"
        1615. THEN # A SCRATCH LABEL #
        1616. BEGIN
        1617. LAB$CARTTP[0] = 2;
        1618. END
        1619.  
        1620. ELSE # A FAMILY LABEL #
        1621. BEGIN
        1622. LAB$CARTTP[0] = 1;
        1623. END
        1624.  
        1625.  
        1626. #
        1627. * SET UP THE LOAD COUNT, LOAD ERRORS, SOFT READ/WRITE
        1628. * AND HARD READ ERRORS.
        1629. * FOR THE CARTRIDGE.
        1630. #
        1631.  
        1632. LAB$CRLD[0] = LD$CNT;
        1633. LAB$LDER = LD$ERR;
        1634. LAB$SWRE = B<28,4>SW$ERR;
        1635. LAB$SWRE1 = B<32,28>SW$ERR;
        1636. LAB$SRDE = SR$ERR;
        1637. LAB$HRDE = HR$ERR;
        1638. LAB$STRD[0] = B<28,8>STR$RD;
        1639. LAB$STWR1[0] = B<36,24>STR$WR;
        1640. LAB$STWR[0] = STR$WR;
        1641. LAB$STDM[0] = STR$DM;
        1642.  
        1643. #
        1644. * SET UP NUMBER OF THE TRANSPORT ON WHICH
        1645. * LABEL WAS WRITTEN. ALSO SET UP THE DATE
        1646. * AND TIME WHEN LABEL WAS WRITTEN.
        1647. #
        1648.  
        1649. LAB$DTTM[0] = PD$T;
        1650.  
        1651. RETURN;
        1652.  
        1653. END # GENLAB #
        1654.  
        1655. TERM
        1656. PROC LBADCSU;
        1657. # TITLE LBADCSU - ADDS A *SM* TO A SUBFAMILY. #
        1658.  
        1659. BEGIN # LBADCSU #
        1660.  
        1661. #
        1662. ** LBADCSU - ADDS A *SM* TO A SUBFAMILY.
        1663. *
        1664. * THIS PROCEDURE ADDS A *SM* TO A FAMILY
        1665. * IN THE CATALOG. THIS DIRECTIVE DOES NOT
        1666. * MANIPULATE CUBES OR CARTRIDGES.
        1667. *
        1668. * PROC LBADCSU.
        1669. *
        1670. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        1671. * SET UP IN COMMON AREA DEFINED IN *COMTLBP*.
        1672. *
        1673. * EXIT *SM* ADDED TO THE SPECIFIED FAMILY.
        1674. *
        1675. * NOTES PROC *LBADCSU* SENDS A REQUEST TO EXEC TO ADD
        1676. * THE *SM* TO THE FAMILY CATALOG. IF THE *SM* IS
        1677. * ALREADY DEFINED, IT CALLS THE ERROR PROCESSOR
        1678. * WITH THE CORRESPONDING ERROR CODE. SEE *LBERR*
        1679. * FOR FURTHER INFORMATION.
        1680. #
        1681.  
        1682. #
        1683. **** PROC LBADCSU - XREF LIST BEGIN.
        1684. #
        1685.  
        1686. XREF
        1687. BEGIN
        1688. PROC CALL3; # SENDS TYPE 3 CALLSS TO EXEC #
        1689. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        1690. END
        1691.  
        1692. #
        1693. **** PROC LBADCSU - XREF LIST END.
        1694. #
        1695.  
        1696. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1697. *CALL COMBFAS
        1698. *CALL COMBCPR
        1699.  
        1700. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        1701.  
        1702. CONTROL EJECT;
        1703.  
        1704. #
        1705. * ADD *SM* TO FAMILY CATALOG.
        1706. #
        1707.  
        1708. CALL3(REQTYP3"ADD$CSU",0,0,0,RESP$CODE);
        1709.  
        1710. #
        1711. * PROCESS THE RESPONSE CODE RETURNED BY EXEC.
        1712. #
        1713.  
        1714. IF RESP$CODE NQ RESPTYP3"OK3"
        1715. THEN
        1716. BEGIN
        1717. LBRESP(RESP$CODE,TYP"TYP3");
        1718. END
        1719.  
        1720. RETURN;
        1721.  
        1722. END # LBADCSU #
        1723.  
        1724. TERM
        1725. PROC LBADCUB;
        1726. # TITLE LBADCUB - ADDS CUBES TO A FAMILY OR POOL. #
        1727.  
        1728. BEGIN # LBADCUB #
        1729.  
        1730. #
        1731. ** LBADCUB - ADDS CUBES TO A FAMILY OR POOL.
        1732. *
        1733. * THIS PROC ADDS NON-ASSIGNED CUBES TO A FAMILY OR
        1734. * THE POOL.
        1735. *
        1736. * PROC LBADCUB.
        1737. *
        1738. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        1739. * SET UP IN COMMON AREA DEFINED IN *COMTLBP*.
        1740. *
        1741. * EXIT A SPECIFIED NUMBER OR LOCATIONS OF CUBES
        1742. * ADDED TO A FAMILY OR POOL.
        1743. *
        1744. * NOTES PROC *LBADCUB* ADDS UNASSIGNED CUBES TO
        1745. * A FAMILY OR POOL. IT ADDS A SPECIFIED
        1746. * NUMBER OF CUBES IF *N* IS SPECIFIED OR
        1747. * ADDS THE CUBES AT THE LOCATIONS SPECIFIED
        1748. * BZ *YI*, *YF*, *ZI*, *ZF*. IT SEARCHES
        1749. * THE SMMAP FOR AN UNASSIGNED CUBE AND
        1750. * SENDS A REQUEST TO EXEC TO ADD IT TO THE
        1751. * FAMILY CATALOG OR TO THE POOL. IF AN
        1752. * ERROR CONDITION IS ENCOUNTERED, *LBERR* IS
        1753. * CALLED TO DO THE ERROR PROCESSING.
        1754. #
        1755.  
        1756. #
        1757. **** PROC LBADCUB - XREF LIST BEGIN.
        1758. #
        1759.  
        1760. XREF
        1761. BEGIN
        1762. PROC CALL3; # SENDS TYPE 3 CALLSS TO EXEC #
        1763. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        1764. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        1765. PROC MFLUSH; # FLUSH MAP BUFFER #
        1766. PROC MCLOSE; # CLOSE SMMAP #
        1767. PROC MOPEN; # OPEN SMMAP #
        1768. PROC SERCSU; # SEARCHES SMMAP #
        1769. PROC SETCORD; # SETS UP Y Z COORDINATE TABLE #
        1770. END
        1771.  
        1772. #
        1773. **** PROC LBADCUB - XREF LIST END.
        1774. #
        1775.  
        1776. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        1777. *CALL COMBFAS
        1778. *CALL COMBCPR
        1779. *CALL COMBMAP
        1780. *CALL COMTERR
        1781. *CALL COMTLAB
        1782. *CALL COMTLBP
        1783.  
        1784. ITEM FLAG I; # ERROR FLAG #
        1785. ITEM I I; # LOOP VARIABLE #
        1786. ITEM LOC$OPTION B ; # TRUE, IF *LOC* OPTION SELECTED
        1787.   FALSE, IF *N* OPTION SELECTED #
        1788. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        1789. ITEM SERTYPE S:SERCH$TYPE; # SMMAP SEARCH TYPE #
        1790. ITEM SP$CODE U; # CODE FOR CUBE/CARTRIDGE
        1791.   ASSIGNMENT #
        1792. ITEM SP$FAM C(7); # SPECIFIED FAMILY #
        1793. ITEM SP$SUB U; # SPECIFIED SUB FAMILY #
        1794. ITEM SP$VSN C(8); # SPECIFIED *CSN* #
        1795. ITEM SP$Y U; # Y COORDINATE #
        1796. ITEM SP$Z U; # Z COORDINATE #
        1797.  
        1798.  
        1799. ARRAY PK$CSU$ENT [0:0] P(4); # *PICK* SMMAP ENTRY #
        1800. BEGIN
        1801. ITEM PK$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        1802. ITEM PK$Y U(03,00,30); # Y COORDINATE #
        1803. ITEM PK$Z U(03,30,30); # Z COORDINATE #
        1804. END
        1805.  
        1806.  
        1807. ARRAY CMAP$NM [0:0] P(1); # BUILD SMMAP FILE NAME #
        1808. BEGIN
        1809. ITEM CMAP$NAME C(00,00,07); # SMMAP FILE NAME #
        1810. ITEM CMAP$IN C(00,00,05); # FIRST FIVE CHARACTERS #
        1811. ITEM CMAP$ID C(00,30,01); # SM-ID #
        1812. ITEM CMAP$Z U(00,36,24) = [0]; # ZERO FILL #
        1813. END
        1814.  
        1815. CONTROL EJECT;
        1816.  
        1817. #
        1818. * CHECK TO SEE IF THE *N* OPTION OR THE *LOC* OPTION
        1819. * IS SPECIFIED.
        1820. #
        1821.  
        1822. LOC$OPTION = FALSE; # INITIALIZE #
        1823. IF (LBARG$YI[0] NQ -1) OR (LBARG$ZI[0] NQ -1)
        1824. THEN # *LOC* OPTION SPECIFIED #
        1825. BEGIN
        1826. SETCORD; # SET UP THE Y/Z COORDINATES #
        1827. LOC$OPTION = TRUE;
        1828. END
        1829.  
        1830. #
        1831. * INITIALIZE ITEMS TO SEARCH SMMAP FOR UNASSIGNED
        1832. * CUBES.
        1833. #
        1834.  
        1835. SP$VSN = " ";
        1836. SP$CODE = CUBSTAT"UNASGN";
        1837. SP$FAM = " ";
        1838. SP$SUB = 0;
        1839. IF NOT LOC$OPTION
        1840. THEN
        1841. BEGIN # *N* OPTION #
        1842. IF LBARG$PT[0] EQ "F"
        1843. THEN # SEARCH SMMAP FOR FIRST
        1844.   UNASSIGNED CUBE #
        1845. BEGIN
        1846. SERTYPE = S"ASSIGN";
        1847. END
        1848.  
        1849. IF LBARG$PT[0] EQ "P"
        1850. THEN # SEARCH SMMAP FOR LAST
        1851.   UNASSIGNED CUBE #
        1852. BEGIN
        1853. SERTYPE = S"LST$UNAS";
        1854. END
        1855.  
        1856. END # *N* OPTION #
        1857.  
        1858. ELSE # *LOC* OPTION #
        1859. BEGIN
        1860. SERTYPE = S"LOC"; # SEARCH FOR LOCATION #
        1861. END
        1862.  
        1863. #
        1864. * PROCESS EACH OF THE *NOPT* CUBES.
        1865. #
        1866.  
        1867. SLOWFOR I = 1 STEP 1 UNTIL LBARG$N[0]
        1868. DO
        1869. BEGIN # ADD CUBES #
        1870. IF SERTYPE EQ S"LOC"
        1871. THEN
        1872. BEGIN
        1873. SP$Y = Y$COORD[I]; # SET UP Y AND Z COORDINATES #
        1874. SP$Z = Z$COORD[I];
        1875. END
        1876.  
        1877. #
        1878. * SEARCH SMMAP FOR THE SPECIFIC ENTRY.
        1879. #
        1880.  
        1881. SERCSU(SERTYPE,SP$Y,SP$Z,SP$CODE,SP$VSN,SP$FAM,SP$SUB,
        1882. PK$CSU$ENT[0],FLAG);
        1883. IF FLAG NQ 0
        1884. THEN # ENTRY NOT FOUND #
        1885. BEGIN
        1886. NUMDONE = I - 1; # NUMBER OF CUBES PROCESSED #
        1887. ERRCODE = S"INSUF$CB";
        1888. LBERR(ERRCODE);
        1889. RETURN;
        1890. END
        1891.  
        1892. CMAP$ID[0] = LBARG$SM[0];
        1893. CMAP$IN[0] = SMMAP;
        1894.  
        1895. #
        1896. * CHECK THE *CODE* IN SMMAP ENTRY TO SEE IF
        1897. * THE CUBE IS UNASSIGNED.
        1898. #
        1899.  
        1900. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        1901. IF CM$CODE[0] NQ CUBSTAT"UNASGN"
        1902. THEN
        1903. BEGIN
        1904. NUMDONE = I - 1; # NUMBER OF CUBES PROCESSED #
        1905. ERRCODE = S"CB$ASGN";
        1906. LBERR(ERRCODE);
        1907. RETURN;
        1908. END
        1909.  
        1910. #
        1911. * CHECK *PT* TO SEE IF THE CUBE IS TO BE ADDED TO
        1912. * FAMILY, POOL OR THE RESERVED AREA AND SEND A
        1913. * CORRESPONDING REQUEST TO EXEC.
        1914. #
        1915.  
        1916. IF LBARG$PT[0] EQ "F"
        1917. THEN # ADD CUBE TO FAMILY #
        1918. BEGIN
        1919. CALL3(REQTYP3"ADD$CUBE",PK$CSU$ENT[0],0,0,RESP$CODE);
        1920. IF RESP$CODE NQ RESPTYP3"OK3"
        1921. THEN
        1922. BEGIN
        1923. LBRESP(RESP$CODE,TYP"TYP3");
        1924. RETURN;
        1925. END
        1926.  
        1927. END
        1928.  
        1929. ELSE
        1930. BEGIN # ADD CUBE TO POOL/RESERVED AREA #
        1931. IF LBARG$PT[0] EQ "P"
        1932. THEN
        1933. BEGIN
        1934. CM$CODE[0] = CUBSTAT"SCRPOOL";
        1935. END
        1936.  
        1937. IF LBARG$PT[0] EQ "R"
        1938. THEN
        1939. BEGIN
        1940. CM$CODE[0] = CUBSTAT"ALTCSU";
        1941. END
        1942.  
        1943. CALL3(REQTYP3"UPD$MAP",PK$CSU$ENT[0],0,0,RESP$CODE);
        1944. END # ADD CUBE TO POOL/RESERVED AREA #
        1945.  
        1946. #
        1947. * CHECK THE RESPONSE CODE RETURNED BY EXEC.
        1948. #
        1949.  
        1950. IF RESP$CODE NQ RESPTYP3"OK3"
        1951. THEN
        1952. BEGIN
        1953. LBRESP(RESP$CODE,TYP"TYP3");
        1954. RETURN;
        1955. END
        1956.  
        1957. MFLUSH; # FLUSH MAP BUFFER #
        1958. END # ADD CUBES #
        1959.  
        1960. #
        1961. * ALL THE CUBES ADDED.
        1962. #
        1963.  
        1964. RETURN;
        1965.  
        1966. END # LBADCUB #
        1967.  
        1968. TERM
        1969. PROC LBADMSC;
        1970. # TITLE LBADMSC - PROCESS THE *ADDMSC* DIRECTIVE. #
        1971.  
        1972. BEGIN # LBADMSC #
        1973.  
        1974. #
        1975. ** LBADMSC - PROCESS THE *ADDMSC* DIRECTIVE.
        1976. *
        1977. * PROC LBADMSC.
        1978. *
        1979. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE PARAMETERS
        1980. * SET UP IN COMMON AREA DEFINED IN *COMTLBP*.
        1981. *
        1982. * EXIT ALL CARTRIDGES PROCESSED.
        1983. *
        1984. * NOTES THE SMMAP IS SEARCHED FOR THE APPROPRIATE
        1985. * *PICK* AND *PUT* LOCATIONS. IF SUCCESSFUL, THE
        1986. * CARTRIDGE IS BROUGHT TO A TRANSPORT AND GIVEN A NEW
        1987. * LABEL. THE SMMAP (AND FCT AND AST IF ADDED TO A
        1988. * FAMILY) IS UPDATED TO REFLECT THE NEW CARTRIDGE
        1989. * ASSIGNMENT, AND THE CARTRIDGE IS UNLOADED TO THE
        1990. * NEW LOCATION. ANY ERROR CONDITIONS ARE PROCESSED
        1991. * BY PROC *LBERR*.
        1992. #
        1993.  
        1994. #
        1995. **** PROC LBADMSC - XREF LIST BEGIN.
        1996. #
        1997.  
        1998. XREF
        1999. BEGIN
        2000. PROC CALL3; # SENDS TYPE 3 CALLSS TO EXEC #
        2001. PROC CALL4; # SENDS TYPE 4 CALLSS TO EXEC #
        2002. PROC CKLAB; # CHECKS CARTRIDGE LABEL TYPE #
        2003. PROC GENLAB; # GENERATES NEW LABEL #
        2004. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        2005. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        2006. PROC LBSTCLR; # STORE A *CE* CARTRIDGE #
        2007. PROC MFLUSH; # FLUSH MAP BUFFER #
        2008. PROC SERASTG; # DETERMINE GROUP AND ORDINAL #
        2009. PROC SERCSU; # SEARCHES SMMAP #
        2010. END
        2011.  
        2012. #
        2013. **** PROC LBADMSC - XREF LIST END.
        2014. #
        2015.  
        2016. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        2017. *CALL COMBFAS
        2018. *CALL COMBCPR
        2019. *CALL COMBLBL
        2020. *CALL COMBMAP
        2021. *CALL COMTERR
        2022. *CALL COMTLAB
        2023. *CALL COMTLBP
        2024.  
        2025. ITEM CART$CSN C(20); # CARTRIDGE SERIAL NUMBER #
        2026. ITEM CATFLD U; # CATALOG FIELD #
        2027. ITEM CATVALUE U; # NEW VALUE FOR CATALOG FIELD #
        2028. ITEM ERR$CNT I; # CARTRIDGE ERROR COUNT #
        2029. ITEM FLAG I; # ERROR FLAG #
        2030. ITEM GROUP I; # GROUP NUMBER #
        2031. ITEM GRT I; # ORDINAL WITHIN GROUP #
        2032. ITEM HR$ERR I; # HARD READ ERRORS #
        2033. ITEM I I; # LOOP VARIABLE #
        2034. ITEM LD$CNT I; # CARTRIDGE LOAD COUNT #
        2035. ITEM LD$ERR I; # LOAD ERRORS #
        2036. ITEM PS$CNT U; # CARTRIDGE PASS COUNT #
        2037. ITEM REQCODE U; # REQUEST CODE #
        2038. ITEM RESP$CODE U; # RESPONSE CODE #
        2039. ITEM SGROUP I; # SAVE GROUP PARAMETER #
        2040. ITEM SERFLAG B; # SMMAP SEARCH FLAG #
        2041. ITEM SERTYPE S:SERCH$TYPE; # SMMAP SEARCH TYPE #
        2042. ITEM SP$CODE U; # CUBE/CARTRIDGE ASSIGNMENT #
        2043. ITEM SP$FAM C(7); # SPECIFIED FAMILY NAME #
        2044. ITEM SP$SUB U; # SPECIFIED SUB FAMILY ID #
        2045. ITEM SP$VSN C(8); # SPECIFIED CARTRIDGE *CSND* #
        2046. ITEM SP$Y I; # Y COORDINATE #
        2047. ITEM SP$Z I; # Z COORDINATE #
        2048. ITEM SR$ERR I; # SOFT READ ERRORS #
        2049. ITEM STR$RD I; # STRIPES READ #
        2050. ITEM STR$WR I; # STRIPES WRITTEN #
        2051. ITEM STR$DM I; # STRIPES DEMARKED #
        2052. ITEM SW$ERR I; # SOFT WRITE ERRORS #
        2053.  
        2054.  
        2055. ARRAY PK$CSU$ENT [0:0] P(4); # *PICK* SMMAP ENTRY #
        2056. BEGIN
        2057. ITEM PK$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        2058. ITEM PK$Y U(03,00,30); # Y COORDINATE #
        2059. ITEM PK$Z U(03,30,30); # Z COORDINATE #
        2060. END
        2061.  
        2062.  
        2063.  
        2064. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        2065. BEGIN
        2066. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        2067. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        2068. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        2069. ITEM PT$GR U(04,00,07); # GROUP #
        2070. ITEM PT$GRT U(04,07,05); # GROUP ORDINAL #
        2071. END
        2072.  
        2073.  
        2074. CONTROL EJECT;
        2075.  
        2076. IF LBARG$CC[0] NQ -1
        2077. THEN # STORE CLEAR CARTRIDGE #
        2078. BEGIN
        2079. LBSTCLR;
        2080. RETURN;
        2081. END
        2082.  
        2083. SGROUP = LBARG$GR[0];
        2084. SLOWFOR I = 1 STEP 1 UNTIL LBARG$N[0]
        2085. DO
        2086. BEGIN # LBADMSC PROCESSING #
        2087.  
        2088. #
        2089. * SEARCH FOR DEFAULT GROUP AND GROUP ORDINAL.
        2090. #
        2091.  
        2092. IF LBARG$PT[0] NQ "P"
        2093. THEN
        2094. BEGIN
        2095. LBARG$GR[0] = SGROUP;
        2096. GROUP = LBARG$GR[0];
        2097. SERASTG(GROUP,GRT,FLAG);
        2098. IF FLAG NQ 0
        2099. THEN # GROUP OR ORDINAL NOT AVAILABLE #
        2100. BEGIN
        2101. ERRCODE = S"GR$FULL";
        2102. LBERR(ERRCODE);
        2103. RETURN;
        2104. END
        2105.  
        2106. ELSE # SEARCH SUCCESSFUL #
        2107. BEGIN
        2108. LBARG$GR[0] = GROUP;
        2109. PT$GR[0] = GROUP;
        2110. PT$GRT[0] = GRT;
        2111. END
        2112.  
        2113. END
        2114.  
        2115.  
        2116. #
        2117. * SEARCH FOR EMPTY CUBE TO WHICH CARTRIDGE IS TO BE ADDED.
        2118. #
        2119.  
        2120. IF LBARG$PT[0] EQ "F"
        2121. THEN # ADD CARTRIDGE TO FAMILY #
        2122. BEGIN # FAMILY SEARCH #
        2123. SERTYPE = S"ASSIGN";
        2124. SP$CODE = CUBSTAT"SUBFAM";
        2125. SP$VSN = " "; # SEARCH FOR AN EMPTY CUBE #
        2126. SERCSU(SERTYPE,0,0,SP$CODE,SP$VSN,LBARG$FM[0],LBARG$SB[0],
        2127. PT$CSU$ENT[0],SERFLAG);
        2128. IF SERFLAG
        2129. THEN # NO EMPTY CUBE IN FAMILY #
        2130. BEGIN
        2131. NUMDONE = I - 1;
        2132. ERRCODE = S"NO$EMPCBFP";
        2133. LBERR(ERRCODE); # DO ERROR PROCESSING #
        2134. RETURN;
        2135. END
        2136.  
        2137. END # FAMILY SEARCH #
        2138.  
        2139. IF LBARG$PT[0] EQ "P"
        2140. THEN # ADD CARTRIDGE TO POOL #
        2141. BEGIN # POOL SEARCH #
        2142. SERTYPE = S"ASSIGN";
        2143. SP$FAM = " "; # SEARCH FOR AN EMPTY CUBE #
        2144. SP$SUB = 0;
        2145. SP$VSN = " ";
        2146. SP$CODE = CUBSTAT"SCRPOOL";
        2147. SERCSU(SERTYPE,0,0,SP$CODE,SP$VSN,SP$FAM,SP$SUB, ##
        2148. PT$CSU$ENT[0],SERFLAG);
        2149. IF SERFLAG
        2150. THEN # NO EMPTY CUBE IN POOL #
        2151. BEGIN
        2152. NUMDONE = I - 1;
        2153. ERRCODE = S"NO$EMPCBFP";
        2154. LBERR(ERRCODE); # DO ERROR PROCESSING #
        2155. RETURN;
        2156. END
        2157.  
        2158. END # POOL SEARCH #
        2159.  
        2160. #
        2161. * SEARCH FOR CARTRIDGE TO BE ADDED.
        2162. #
        2163.  
        2164.  
        2165. IF LBARG$PK[0] EQ "P" AND LBARG$C[0] EQ 0
        2166. THEN
        2167. BEGIN # SEARCH POOL FOR ANY CARTRIDGE #
        2168. SERTYPE = S"CART$POOL";
        2169. SERCSU(SERTYPE,0,0,0,0,0,0,PK$CSU$ENT[0],SERFLAG);
        2170. IF SERFLAG
        2171. THEN # POOL EMPTY #
        2172. BEGIN
        2173. NUMDONE = I - 1;
        2174. ERRCODE = S"NO$CR$PL";
        2175. LBERR(ERRCODE); # DO ERROR PROCESSING #
        2176. RETURN;
        2177. END
        2178.  
        2179. END # SEARCH POOL FOR ANY CARTRIDGE #
        2180.  
        2181. IF LBARG$C[0] NQ 0
        2182. THEN
        2183. BEGIN # SEARCH POOL FOR VSN #
        2184. SERTYPE = S"CSN$MATCH";
        2185. SERCSU(SERTYPE,0,0,0,LBARG$C[0],0,0,PK$CSU$ENT[0],SERFLAG);
        2186. IF SERFLAG
        2187. THEN # VSN NOT FOUND #
        2188. BEGIN
        2189. ERRCODE = S"CSN$NOTFND";
        2190. LBERR(ERRCODE); # DO ERROR PROCESSING #
        2191. RETURN;
        2192. END
        2193.  
        2194. ELSE # VSN FOUND #
        2195. BEGIN
        2196. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        2197. IF CM$CODE[0] NQ CUBSTAT"SCRPOOL"
        2198. THEN # CARTRIDGE NOT ASSIGNED TO POOL #
        2199. BEGIN
        2200. ERRCODE = S"UNX$CR$ASN";
        2201. LBERR(ERRCODE); # DO ERROR PROCESSING #
        2202. RETURN;
        2203. END
        2204.  
        2205. END
        2206.  
        2207. END # SEARCH POOL FOR VSN #
        2208.  
        2209. IF LBARG$PK[0] EQ "D"
        2210. THEN # SET COORDINATES TO CAS ENTRY #
        2211. BEGIN
        2212. PK$Y[0] = SM$ENT$TY;
        2213. PK$Z[0] = 0;
        2214. END
        2215.  
        2216.  
        2217. #
        2218. * LOAD CARTRIDGE AND READ THE LABEL.
        2219. #
        2220.  
        2221. CALL4(REQTYP4"LOAD$CART",DRD$NUM,CART$CSN,PK$Y[0], PK$Z[0],
        2222. FLAG);
        2223. IF FLAG NQ RESPTYP4"OK4" ##
        2224. AND FLAG NQ RESPTYP4"UNK$CART"
        2225. THEN
        2226. BEGIN # LOAD FAILS #
        2227. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        2228. IF FLAG EQ RESPTYP4"CELL$EMP" ##
        2229. AND CM$CODE[0] EQ CUBSTAT"SCRPOOL"
        2230. THEN
        2231. BEGIN # SET ERROR FLAG IN SMMAP ENTRY #
        2232. CM$FLAG1[0] = TRUE;
        2233. CALL3(REQTYP3"UPD$MAP",PK$CSU$ENT[0],0,0,FLAG);
        2234. NUMDONE = I - 1;
        2235. ERRCODE = S"CR$NOTFND"; # CARTRIDGE NOT FOUND #
        2236. LBERR(ERRCODE);
        2237. IF FLAG NQ RESPTYP3"OK3"
        2238. THEN
        2239. BEGIN
        2240. LBRESP(FLAG,TYP"TYP3");
        2241. END
        2242.  
        2243. RETURN;
        2244. END # SET ERROR FLAG IN SMMAP ENTRY #
        2245.  
        2246. P<LABEL$CART> = OLDLABP;
        2247. IF FLAG EQ RESPTYP4"UNK$CART"
        2248. AND LAB$CARTTP[0] NQ 0
        2249. THEN # *CSN* MISMATCH #
        2250. BEGIN
        2251. LBRESP(FLAG,TYP"TYP4");
        2252. RETURN;
        2253. END
        2254.  
        2255. ELSE # PROCESS THE RESPONSE CODE #
        2256. BEGIN
        2257. LBRESP(FLAG,TYP"TYP4");
        2258. RETURN;
        2259. END
        2260.  
        2261. END # LOAD FAILS #
        2262.  
        2263.  
        2264. CKLAB(FLAG); # CHECK LABEL TYPE #
        2265. P<LABEL$CART> = OLDLABP;
        2266. IF (FLAG NQ LABTYPE"MAN$LAB" ##
        2267. AND FLAG NQ LABTYPE"SCR$LAB") ##
        2268. THEN # UNKNOWN LABEL TYPE #
        2269. BEGIN
        2270. CALL4(REQTYP4"UNLD$CART",0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        2271. IF RESP$CODE NQ 0
        2272. THEN
        2273. BEGIN
        2274. LBRESP(RESP$CODE,TYP"TYP4");
        2275. RETURN;
        2276. END
        2277.  
        2278. ERRCODE = S"UNKNWN$LAB";
        2279. LBERR(ERRCODE);
        2280. TEST I;
        2281. END
        2282.  
        2283. LD$CNT = LAB$CRLD[0]; # USE OLD COUNTS #
        2284. LD$ERR = LAB$LDER[0];
        2285. SR$ERR = LAB$SRDE[0];
        2286. SW$ERR = LAB$SWRE1[0];
        2287. B<28,4>SW$ERR = LAB$SWRE;
        2288. HR$ERR = LAB$HRDE[0];
        2289. STR$RD = LAB$STRD[0];
        2290. STR$WR = LAB$STWR1[0];
        2291. B<36,24>STR$WR = LAB$STWR[0];
        2292. STR$DM = LAB$STDM[0];
        2293.  
        2294. IF LBARG$PK[0] NQ "D"
        2295. THEN
        2296. BEGIN # VERIFY VSN, Y, Z IN THE LABEL #
        2297. P<LABEL$CART> = OLDLABP;
        2298. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        2299. IF LAB$CSND[0] NQ CM$CSND[0] ##
        2300. AND (LAB$Y[0] NQ PK$Y[0] OR LAB$Z[0] NQ PK$Z[0])
        2301. THEN
        2302. BEGIN # TEST Y,Z #
        2303. REQCODE = REQTYP4"UNLD$CART";
        2304. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        2305. IF RESP$CODE NQ RESPTYP4"OK4"
        2306. THEN
        2307. BEGIN
        2308. LBRESP(RESP$CODE,TYP"TYP4");
        2309. RETURN;
        2310. END
        2311.  
        2312. ERRCODE = S"M86$HARDWR"; # MSF HARDWARE PROBLEM #
        2313. LBERR(ERRCODE);
        2314. RETURN;
        2315. END # TEST Y,Z #
        2316.  
        2317. END # VERIFY VSN, Y, Z IN THE LABEL #
        2318.  
        2319. #
        2320. * GENERATE NEW CARTRIDGE LABEL
        2321. #
        2322.  
        2323. IF LBARG$PT[0] EQ "P"
        2324. THEN # SET UP SCRATCH LABEL #
        2325. BEGIN
        2326. GENLAB(LABTYPE"SCR$LAB",PT$CSU$ENT[0],LD$CNT,LD$ERR, SR$ERR,
        2327. SW$ERR,HR$ERR,STR$RD,STR$WR,STR$DM);
        2328. END
        2329.  
        2330. ELSE # SET UP FAMILY LABEL #
        2331. BEGIN
        2332. GENLAB(LABTYPE"FAM$LAB",PT$CSU$ENT[0],LD$CNT,LD$ERR, SR$ERR,
        2333. SW$ERR,HR$ERR,STR$RD,STR$WR,STR$DM);
        2334. END
        2335.  
        2336. #
        2337. * UPDATE THE CARTRIDGE LOAD AND PASS COUNTS IN THE
        2338. * NEW LABEL.
        2339. #
        2340.  
        2341. P<LABEL$CART> = NEWLABP;
        2342. LAB$CRLD[0] = LAB$CRLD[0] + 1;
        2343. IF B<0,8>LAB$CSN[0] NQ X"C9" ##
        2344. OR B<8,8>LAB$CSN[0] NQ X"C2" OR B<16,8>LAB$CSN[0] NQ X"D4"
        2345. THEN # CARTRIDGE NOT IBM #
        2346. BEGIN
        2347. LAB$CCOD[0] = OTHCART;
        2348. END
        2349.  
        2350. ELSE
        2351. BEGIN
        2352. LAB$CCOD[0] = IBMCART;
        2353. END
        2354.  
        2355.  
        2356. #
        2357. * IF THE CARTRIDGE IS FROM THE INPUT DRAWER, ENSURE THAT
        2358. * THE VSN IS NOT ALREADY IN THE SMUMAP.
        2359. #
        2360.  
        2361. IF LBARG$PK[0] EQ "D"
        2362. THEN
        2363. BEGIN # CHECK FOR DUPLICATE VSN #
        2364. SERTYPE = S"CSN$MATCH";
        2365. SERCSU(SERTYPE,0,0,0,LAB$CSND[0],0,0, PK$CSU$ENT[0],SERFLAG)
        2366. ;
        2367. IF NOT SERFLAG
        2368. THEN # VSN ALREADY IN SMMAP #
        2369. BEGIN
        2370. REQCODE = REQTYP4"UNLD$CART";
        2371. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        2372. IF RESP$CODE NQ RESPTYP4"OK4"
        2373. THEN
        2374. BEGIN
        2375. LBRESP(RESP$CODE,TYP"TYP4");
        2376. RETURN;
        2377. END
        2378.  
        2379. ERRCODE = S"DUPL$CSN";
        2380. LBERR(ERRCODE);
        2381. RETURN;
        2382. END
        2383.  
        2384. END # CHECK FOR DUPLICATE VSN #
        2385.  
        2386.  
        2387. #
        2388. * IF CARTRIDGE PICKED FROM POOL, UPDATE SMMAP ENTRY AND AST FOR
        2389. * NOW EMPTY CUBE IN POOL.
        2390. #
        2391.  
        2392. IF LBARG$PK[0] NQ "D"
        2393. THEN # PICKED FROM POOL #
        2394. BEGIN
        2395. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        2396. CM$CCOD[0] = " ";
        2397. CM$CSND[0] = " "; # CLEAR VSN FIELD #
        2398. CALL3(REQTYP3"UPD$MAP",PK$CSU$ENT[0],0,0,FLAG);
        2399. IF FLAG NQ RESPTYP3"OK3"
        2400. THEN # MAP UPDATE FAILS #
        2401. BEGIN
        2402. REQCODE = REQTYP4"UNLD$CART";
        2403. CALL4(REQCODE,0,0,PK$Y[0],PK$Z[0],RESP$CODE);
        2404. IF RESP$CODE NQ RESPTYP4"OK4"
        2405. THEN
        2406. BEGIN
        2407. LBRESP(RESP$CODE,TYP"TYP4");
        2408. RETURN;
        2409. END
        2410.  
        2411. LBRESP(FLAG,TYP"TYP3"); # PROCESS ERROR CODE #
        2412. RETURN;
        2413. END
        2414.  
        2415. END
        2416.  
        2417. #
        2418. * WRITE NEW LABEL.
        2419. #
        2420.  
        2421. CALL4(REQTYP4"WRT$LAB",DRD$NUM,CART$CSN,PT$Y[0],PT$Z[0], FLAG)
        2422. ;
        2423. IF FLAG NQ RESPTYP4"OK4"
        2424. THEN # WRITE FAILS #
        2425. BEGIN
        2426. LBRESP(FLAG,TYP"TYP4"); # PROCESS THE RESPONSE CODE #
        2427. RETURN;
        2428. END
        2429.  
        2430. #
        2431. * UPDATE SMMAP ENTRY FOR NEW LOCATION OF CARTRIDGE.
        2432. #
        2433.  
        2434. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        2435. IF LBARG$PT[0] EQ "P"
        2436. THEN # ADD CARTRIDGE TO POOL #
        2437. BEGIN
        2438. P<LABEL$CART> = NEWLABP;
        2439. CM$CCOD[0] = LAB$CCOD[0];
        2440. CM$CSND[0] = LAB$CSND[0]; # UPDATE VSN IN MAP ENTRY #
        2441. CALL3(REQTYP3"UPD$MAP",PT$CSU$ENT[0],0,0,FLAG);
        2442. END
        2443.  
        2444. IF LBARG$PT[0] EQ "F"
        2445. THEN # ADD CARTRIDGE TO FAMILY #
        2446. BEGIN
        2447. CALL3(REQTYP3"ADD$CART",PT$CSU$ENT[0],0,0,FLAG);
        2448. END
        2449.  
        2450. IF FLAG NQ RESPTYP3"OK3"
        2451. THEN # ADD TO FAMILY FAILS #
        2452. BEGIN
        2453. LBRESP(FLAG,TYP"TYP3"); # PROCESS THE RESPONSE CODE #
        2454. RETURN;
        2455. END
        2456.  
        2457.  
        2458.  
        2459. MFLUSH; # FLUSH MAP BUFFER #
        2460. END # LBADMSC PROCESSING #
        2461.  
        2462. RETURN;
        2463.  
        2464. END # LBADMSC #
        2465.  
        2466. TERM
        2467. PROC LBCONV(FLAG);
        2468. # TITLE LBCONV - CONVERT CRACKED PARAMETERS TO INTEGERS. #
        2469.  
        2470. BEGIN # LBCONV #
        2471.  
        2472. #
        2473. ** LBCONV - CONVERT CRACKED PARAMETERS TO INTEGERS.
        2474. *
        2475. * THIS PROCEDURE CALLS *XDXB* TO CONVERT THE PARAMETERS
        2476. * IN DISPLAY CODE TO INTEGER VALUES.
        2477. *
        2478. * PROC LBCONV(FLAG)
        2479. *
        2480. * ENTRY DIRECTIVE PARAMETERS CRACKED AND
        2481. * PLACED IN COMMON AREA *ULBPCOM*.
        2482. *
        2483. * EXIT ALL THE PARAMETERS CONVERTED AND PLACED
        2484. * BACK IN *ULBPCOM*.
        2485. * FLAG, AN ITEM CONTAINING THE ERROR STATUS.
        2486. * 0, NO ERROR
        2487. * 1, CONVERSION ERROR
        2488. *
        2489. * NOTES PROC *LBCONV* CONVERTS EACH CRACKED
        2490. * PARAMETER FROM DISPLAY CODE TO INTEGER
        2491. * VALUE AND REPLACES IT BACK IN ITS
        2492. * ORIGINAL LOCATION. ANY PARAMETER NOT
        2493. * SPECIFIED IS SUBSTITUTED WITH ITS
        2494. * DEFAULT VALUE.
        2495. #
        2496.  
        2497. ITEM FLAG I; # ERROR STATUS #
        2498.  
        2499. #
        2500. **** PROC LBCONV - XREF LIST BEGIN.
        2501. #
        2502.  
        2503. XREF
        2504. BEGIN
        2505. FUNC XDXB I; # CONVERT DISPLAY TO INTEGER #
        2506. END
        2507.  
        2508. #
        2509. **** PROC LBCONV - XREF LIST END.
        2510. #
        2511.  
        2512. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        2513. *CALL COMBFAS
        2514. *CALL COMTLAB
        2515. *CALL COMTLBP
        2516.  
        2517. ITEM TEMPR I; # TEMP ITEM #
        2518. ITEM TYPE I; # TYPE OF CONVERSION #
        2519.  
        2520. CONTROL EJECT;
        2521.  
        2522. TYPE = 1; # CONVERT FROM DISPLAY CODE TO
        2523.   INTEGER VALUE #
        2524.  
        2525. #
        2526. * CHECK THE VALUE OF *N*.
        2527. #
        2528.  
        2529. IF LBARG$N[0] EQ 0
        2530. THEN # N OMITTED #
        2531. BEGIN
        2532. LBARG$N[0] = 1; # SET DEFAULT VALUE #
        2533. END
        2534.  
        2535. IF LBARG$N[0] NQ 1
        2536. THEN # N SPECIFIED #
        2537. BEGIN
        2538. FLAG = XDXB(LBARG$N[0],TYPE,TEMPR);
        2539. IF FLAG NQ 0
        2540. THEN # CONVERSION ERROR #
        2541. BEGIN
        2542. RETURN;
        2543. END
        2544.  
        2545. LBARG$N[0] = TEMPR; # RESET N #
        2546. END
        2547.  
        2548. #
        2549. * CHECK THE VALUE OF *B*.
        2550. #
        2551.  
        2552. IF LBARG$B[0] EQ 0
        2553. THEN # SET DEFAULT #
        2554. BEGIN
        2555. LBARG$B[0] = 600;
        2556. END
        2557.  
        2558. IF LBARG$B[0] NQ 600
        2559. THEN # *B* IS SPECIFIED #
        2560. BEGIN
        2561. FLAG = XDXB(LBARG$B[0],TYPE,TEMPR);
        2562. IF FLAG NQ 0
        2563. THEN # CONVERSION ERROR #
        2564. BEGIN
        2565. RETURN;
        2566. END
        2567.  
        2568. LBARG$B[0] = TEMPR; # RESET *B* #
        2569. END
        2570.  
        2571. #
        2572. * SET THE VALUE OF *CC*.
        2573. #
        2574.  
        2575. IF LBARG$CC[0] NQ 0
        2576. THEN
        2577. BEGIN
        2578. IF C<0,1>LBARG$CC[0] EQ "A"
        2579. THEN
        2580. BEGIN
        2581. LBARG$CC[0] = 0;
        2582. END
        2583.  
        2584. IF C<0,1>LBARG$CC[0] EQ "B"
        2585. THEN
        2586. BEGIN
        2587. LBARG$CC[0] = 15;
        2588. END
        2589.  
        2590.  
        2591. END
        2592.  
        2593. ELSE
        2594. BEGIN
        2595. LBARG$CC[0] = -1;
        2596. END
        2597.  
        2598.  
        2599.  
        2600. #
        2601. * CHECK THE VALUE OF *CC*.
        2602. #
        2603.  
        2604. IF LBARG$CM[0] EQ 0
        2605. THEN
        2606. BEGIN
        2607. LBARG$CM[0] = IBMCART;
        2608. END
        2609.  
        2610. ELSE
        2611. BEGIN
        2612. B<6,6>LBARG$CM[0] = "-";
        2613. END
        2614.  
        2615.  
        2616.  
        2617. #
        2618. * CHECK THE VALUE OF *GR*.
        2619. #
        2620.  
        2621. IF LBARG$GR[0] NQ 7777
        2622. THEN # VALUE IS SPECIFIED #
        2623. BEGIN
        2624. FLAG = XDXB(LBARG$GR[0],TYPE,TEMPR);
        2625. IF FLAG NQ 0
        2626. THEN # CONVERSION ERROR #
        2627. BEGIN
        2628. RETURN;
        2629. END
        2630.  
        2631. LBARG$GR[0] = TEMPR; # RESET *GR* #
        2632. END
        2633.  
        2634. ELSE # *GR* NOT SPECIFIED #
        2635. BEGIN
        2636. LBARG$GR[0] = -1;
        2637. END
        2638.  
        2639.  
        2640. #
        2641. * CHECK THE VALUE OF *YI*.
        2642. #
        2643.  
        2644. IF LBARG$YI[0] NQ 0 AND LBARG$YI[0] NQ O"7777"
        2645. THEN
        2646. BEGIN
        2647. FLAG = XDXB(LBARG$YI[0],TYPE,TEMPR);
        2648. IF FLAG NQ 0
        2649. THEN # CONVERSION ERROR #
        2650. BEGIN
        2651. RETURN;
        2652. END
        2653.  
        2654. LBARG$YI[0] = TEMPR; # RESET *YI* #
        2655. END
        2656.  
        2657. ELSE
        2658. BEGIN
        2659. IF LBARG$YI[0] EQ 0
        2660. THEN # *YI* OMITTED #
        2661. BEGIN
        2662. LBARG$YI[0] = -1; # SET DEFAULT VALUE #
        2663. END
        2664.  
        2665. END
        2666.  
        2667. #
        2668. * CHECK THE VALUE OF *YF*.
        2669. #
        2670.  
        2671. IF LBARG$YF[0] NQ 0 ##
        2672. AND LBARG$YF[0] NQ O"7777"
        2673. THEN
        2674. BEGIN
        2675. FLAG = XDXB(LBARG$YF[0],TYPE,TEMPR);
        2676. IF FLAG NQ 0
        2677. THEN # CONVERSION ERROR #
        2678. BEGIN
        2679. RETURN;
        2680. END
        2681.  
        2682. LBARG$YF[0] = TEMPR; # RESET *YF* #
        2683. END
        2684.  
        2685. ELSE
        2686. BEGIN
        2687. IF LBARG$YF[0] EQ 0
        2688. THEN # *YF* OMITTED #
        2689. BEGIN
        2690. LBARG$YF[0] = -1; # SET DEFAULT VALUE #
        2691. END
        2692.  
        2693. END
        2694.  
        2695. #
        2696. * CHECK THE VALUE OF *ZI*.
        2697. #
        2698.  
        2699. IF LBARG$ZI[0] NQ 0 AND LBARG$ZI[0] NQ O"7777"
        2700. THEN
        2701. BEGIN
        2702. FLAG = XDXB(LBARG$ZI[0],TYPE,TEMPR);
        2703. IF FLAG NQ 0
        2704. THEN # CONVERSION ERROR #
        2705. BEGIN
        2706. RETURN;
        2707. END
        2708.  
        2709. LBARG$ZI[0] = TEMPR; # RESET *ZI* #
        2710. END
        2711.  
        2712. ELSE
        2713. BEGIN
        2714. IF LBARG$ZI[0] EQ 0
        2715. THEN # *ZI* OMITTED #
        2716. BEGIN
        2717. LBARG$ZI[0] = -1; # SET DEFAULT VALUE #
        2718. END
        2719.  
        2720. END
        2721.  
        2722. #
        2723. * CHECK THE VALUE OF *ZF*.
        2724. #
        2725.  
        2726. IF LBARG$ZF[0] NQ 0 AND LBARG$ZF[0] NQ O"7777"
        2727. THEN
        2728. BEGIN
        2729. FLAG = XDXB(LBARG$ZF[0],TYPE,TEMPR);
        2730. IF FLAG NQ 0
        2731. THEN # CONVERSION ERROR #
        2732. BEGIN
        2733. RETURN;
        2734. END
        2735.  
        2736. LBARG$ZF[0] = TEMPR; # RESET *ZF* #
        2737. END
        2738.  
        2739. ELSE
        2740. BEGIN
        2741. IF LBARG$ZF[0] EQ 0
        2742. THEN # *ZF* OMITTED #
        2743. BEGIN
        2744. LBARG$ZF[0] = -1; # SET DEFAULT VALUE #
        2745. END
        2746.  
        2747. END
        2748.  
        2749. #
        2750. * CHECK THE VALUE OF *SB*.
        2751. #
        2752.  
        2753. IF LBARG$SB[0] NQ 0
        2754. THEN
        2755. BEGIN
        2756. FLAG = XDXB(LBARG$SB[0],TYPE,TEMPR);
        2757. IF FLAG NQ 0
        2758. THEN # CONVERSION ERROR #
        2759. BEGIN
        2760. RETURN;
        2761. END
        2762.  
        2763. LBARG$SB[0] = TEMPR; # RESET *SB* #
        2764. END
        2765.  
        2766. #
        2767. * CHECK *CN* AND *PK*.
        2768. #
        2769.  
        2770. IF LBARG$C[0] EQ 0 AND LBARG$PK[0] EQ 0
        2771. THEN
        2772. BEGIN
        2773. LBARG$PK[0] = "P";
        2774. END
        2775.  
        2776. #
        2777. * CHECK *PT*.
        2778. #
        2779.  
        2780. IF LBARG$PT[0] EQ 0
        2781. THEN
        2782. BEGIN
        2783. LBARG$PT[0] = "P";
        2784. END
        2785.  
        2786. #
        2787. * CHECK *SM*.
        2788. #
        2789.  
        2790. IF LBARG$SM[0] EQ 0
        2791. THEN
        2792. BEGIN
        2793. LBARG$SM[0] = "A";
        2794. END
        2795.  
        2796. RETURN;
        2797.  
        2798. END # LBCONV #
        2799.  
        2800. TERM
        2801. PROC LBERR((ERR$CODE));
        2802. # TITLE LBERR - *SSLABEL* ERROR PROCESSOR. #
        2803.  
        2804. BEGIN # LBERR #
        2805.  
        2806. #
        2807. ** LBERR - *SSLABEL* ERROR PROCESSOR.
        2808. *
        2809. * THIS PROCEDURE DOES ERROR PROCESSING FOR *SSLABEL* IN
        2810. * ACCORDANCE WITH THE VALUE OF THE ERROR CODE.
        2811. *
        2812. * PROC LBERR((ERR$CODE))
        2813. *
        2814. * ENTRY ERR$CODE = STATUS ITEM INDICATING THE ERROR CODE.
        2815. *
        2816. * EXIT ERROR PROCESSING IS COMPLETED. DEPENDING ON ERROR
        2817. * TYPE, EITHER A RETURN OR AN ABORT OCCURS.
        2818. *
        2819. * MESSAGES SEE ARRAY *ERRMSG* FOR THE
        2820. * DAYFILE MESSAGES.
        2821. *
        2822. * NOTES PROC *LBERR* IS A TABLE DRIVEN
        2823. * ERROR PROCESSOR. A TABLE HAS BEEN
        2824. * PRESET WITH THE ERROR MESSAGES FOR THE
        2825. * DIFFERENT ERROR CODES. THE ERROR CODE
        2826. * CORRESPONDS TO THE ORDINAL OF THE CORRE-
        2827. * SPONDING ENTRY IN THE TABLE. THE ACTION
        2828. * TO BE TAKEN ON EACH ERROR CONDITION IS
        2829. * PRESET AS STATUS VALUES INTO EACH ENTRY.
        2830. * USING THE ERROR CODE THE CORRESPONDING
        2831. * ENTRY IN THE TABLE IS FOUND AND THE ERROR
        2832. * CONDITION IS PROCESSED BY USING A STATUS
        2833. * SWITCH THAT CORRESPONDS TO THE STATUS
        2834. * VALUES PRESET IN THE ENTRY. THE MESSAGES
        2835. * ARE PRINTED OUT IN THE DAYFILE AND ALSO
        2836. * ON THE REPORT FILE IF ONE IS SPECIFIED.
        2837. #
        2838.  
        2839. ITEM ERR$CODE U; # ERROR CODE #
        2840.  
        2841. #
        2842. **** PROC LBERR - XREF LIST BEGIN.
        2843. #
        2844.  
        2845. XREF
        2846. BEGIN
        2847. PROC MESSAGE; # WRITES USER DAYFILE MESSAGE #
        2848. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        2849.   OR RETURN #
        2850. PROC RPCLOSE; # CLOSES OUTPUT PRINT FILE #
        2851. PROC RPLINE; # WRITES PRINT LINE FOR REPORT #
        2852. PROC RPSPACE; # WRITES BLANK LINE ON REPORT #
        2853. FUNC XCDD C(10); # CONVERT ITEMS TO DISPLAY CODE #
        2854. END
        2855.  
        2856. #
        2857. **** PROC LBERR - XREF LIST END.
        2858. #
        2859.  
        2860. DEF PROCNAME #"LBERR."#; # PROC NAME #
        2861.  
        2862. STATUS ACTION # ERROR PROCESSING TO BE DONE #
        2863. MSG, # DISPLAY ERROR MESSAGE #
        2864. MSGDETL, # DISPLAY DETAIL ERROR MESSAGE #
        2865. RETRN, # RETURN TO MAIN LOOP #
        2866. ABRT, # ABORT SSLABEL #
        2867. LSTACT; # END OF STATUS LIST #
        2868.  
        2869. DEF LISTCON #0#; # DO NOT LIST THE COMDECKS #
        2870. *CALL COMBFAS
        2871. *CALL COMTERR
        2872. *CALL COMTLAB
        2873. *CALL COMTLBP
        2874. *CALL COMTOUT
        2875.  
        2876. ITEM DIS$ASN C(20); # CUBES ASSIGNED (DISPLAY CODE) #
        2877. ITEM DIS$ERR C(20); # ERROR CODE (DISPLAY CODE) #
        2878. ITEM I I; # LOOP VARIABLE #
        2879. ITEM STAT U; # ERROR TABLE ENTRY STATUS #
        2880.  
        2881. #
        2882. * THIS ARRAY IS FOR DISPLAYING DETAILED MESSAGES.
        2883. #
        2884.  
        2885. ARRAY DETAIL [0:0] P(5); # FOR MESSAGES WITH DETAIL NO. #
        2886. BEGIN
        2887. ITEM DET$MSG1 C(00,00,40); # ERROR MESSAGE #
        2888. ITEM DET$NO C(02,00,05); # DETAIL NUMBER #
        2889. ITEM DET$PRD C(02,30,01); # PERIOD AT END OF MESSAGE #
        2890. ITEM DET$BLNK C(02,36,14); # BLANK FILL #
        2891. ITEM DET$ZRO U(04,00,60) = [0]; # ZERO BYTE TERMINATOR #
        2892. END
        2893.  
        2894. #
        2895. * THIS ARRAY IS FOR DISPLAYING DIRECTIVE NUMBERS.
        2896. #
        2897.  
        2898. ARRAY DIRECTV [0:0] P(2);
        2899. BEGIN
        2900. ITEM DIR$MSG C(00,00,11) = [" DIRECTIVE "];
        2901. ITEM DIR$NO C(01,06,03); # DIRECTIVE NUMBER #
        2902. ITEM DIR$PRD C(01,24,01); # ENDING PERIOD #
        2903. ITEM DIRZRO U(01,30,30) = [0]; # ZERO BYTE #
        2904. END
        2905.  
        2906. #
        2907. * ARRAY ERRMSG IS AN ERROR TABLE IN WHICH THE ORDINAL OF EACH
        2908. * ENTRY IS EQUAL TO THE ERROR CODE IT REPRESENTS. EACH ENTRY
        2909. * CONTAINS THE APPROPRIATE ERROR MESSAGE AND THE STATUS VALUES
        2910. * WHICH CONTROL ERROR PROCESSING.
        2911. #
        2912.  
        2913. ARRAY ERRMSG [0:CODEMAX] S(6);
        2914. BEGIN
        2915. ITEM ERRMSSG C(00,00,40) = [ # MESSAGE ENTRY TO BE
        2916.   DISPLAYED #
        2917. " CATALOG/MAP ATTACH PROBLEM.",
        2918. " SYNTAX ERROR IN DIRECTIVE.",
        2919. " SYNTAX ERROR - SSLABEL ABORT.",
        2920. " CSN NOT FOUND IN SMMAP.",
        2921. " NO EMPTY CUBE IN FAMILY/POOL.",
        2922. " NO CARTRIDGE AVAILABLE IN POOL.",
        2923. " NO EMPTY CARTRIDGES AVAILABLE IN FAMILY.",
        2924. " NO MANUFACTURER OR SCRATCH LABEL.",
        2925. " UNEXPECTED SM, Y, Z, FAMILY OR SUBFAM.",
        2926. " CANNOT FIX CSN FOR GOOD LABEL.",
        2927. " UNRECOVERABLE READ ERROR.",
        2928. " UNRECOVERABLE WRITE ERROR.",
        2929. " EXCESSIVE PARITY ERRORS.",
        2930. " CSN ALREADY IN SMMAP.",
        2931. " CARTRIDGE ALREADY IN CUBE.",
        2932. " CARTRIDGE LABEL ERROR.",
        2933. " CARTRIDGE ALREADY IN USE.",
        2934. " STORAGE MODULE IS TURNED OFF.",
        2935. " CARTRIDGE NOT FOUND.",
        2936. " CARTRIDGE NOT EMPTY.",
        2937. " M860 HARDWARE PROBLEM.",
        2938. " CATALOG/MAP FILE INTERLOCKED.",
        2939. " NO SUCH SMMAP OR SUBCATALOG.",
        2940. " CATALOG/MAP NOT OPEN.",
        2941. " CATALOG LOST BIT MUST BE SET.",
        2942. " CARTRIDGE PRESENT--LOST BIT SET.",
        2943. " SUB ALREADY DEFINED.",
        2944. " CUBES ASSIGNED TO SUB-FAMILY.",
        2945. " INSUFFICIENT CUBES.",
        2946. " SELECTED CUBE NOT UNASSIGNED.",
        2947. " NO EMPTY CUBES.",
        2948. " SELECTED CUBE NOT EMPTY.",
        2949. " SELECTED CUBE NOT ASSIGNED AS EXPECTED.",
        2950. " CARTRIDGE NOT ASSIGNED AS EXPECTED.",
        2951. " UNRECOGNIZABLE LABEL.",
        2952. " NO MATCH ON FAMILY/SUBFAMILY.",
        2953. " INCORRECT CSN.",
        2954. " ADDCUBE - ONLY 100 LOCATIONS PROCESSED.",
        2955. " INCORRECT N.",
        2956. " CSN OPTION VIOLATED.",
        2957. " PK,PT OPTION VIOLATED.",
        2958. " LT OPTION NOT SPECIFIED CORRECTLY.",
        2959. " INCORRECT SM NUMBER.",
        2960. " Y,Z OPTION VIOLATED.",
        2961. " INCORRECT SUBFAMILY.",
        2962. " ON,OF NOT SPECIFIED CORRECTLY.",
        2963. " INCORRECT DIRECTIVE.",
        2964. " GR PARAMETER USED INCORRECTLY.",
        2965. " GR PARAMETER OUT OF RANGE.",
        2966. " B PARAMETER USED INCORRECTLY.",
        2967. " B PARAMETER OUT OF RANGE.",
        2968. " NO EMPTY CARTRIDGES IN GROUP." ];
        2969. ITEM ERRZERO U(04,00,60) = [0,
        2970. CODEMAX(0)];
        2971. ITEM ERRSTATW U(05,00,60); # PROCESSING TO BE DONE #
        2972.  
        2973. #
        2974. * TYPE OF MESSAGE TO BE PRINTED.
        2975. #
        2976.  
        2977. ITEM ERRSTAT1 S:ACTION (05,00,06) = [ 4(S"MSG"),
        2978. 3(S"MSGDETL"),
        2979. 11(S"MSG"),
        2980. 1(S"MSGDETL"),
        2981. 9(S"MSG"),
        2982. 5(S"MSGDETL"),
        2983. 15(S"MSG"),
        2984. 5(S"MSGDETL") ];
        2985.  
        2986. #
        2987. * ACTION TO BE TAKEN AFTER PRINTING MESSAGE.
        2988. #
        2989.  
        2990. ITEM ERRSTAT2 S:ACTION (05,06,06) = [ S"ABRT",
        2991. S"RETRN",
        2992. 35(S"ABRT"),
        2993. 15(S"RETRN"),
        2994. 1(S"ABRT") ];
        2995. END
        2996.  
        2997. #
        2998. * ARRAY TO PRINT DAYFILE MESSAGE.
        2999. #
        3000.  
        3001. ARRAY MSGBUF [0:0] P(3);
        3002. BEGIN
        3003. ITEM MSG$ID C(00,00,15) = [" SSLABEL ERROR "];
        3004. ITEM MSG$NO C(01,30,03); # ERROR NUMBER DISPLAYED #
        3005. ITEM MSGPRD C(01,48,01) = ["."];
        3006. ITEM MSGZERO U(02,48,12) = [0]; # ZERO BYTE TERMINATOR #
        3007. END
        3008.  
        3009. SWITCH ACT: ACTION # TYPE OF ERROR PROCESSING #
        3010. REPORT: MSG, # DISPLAY ERROR MESSAGE #
        3011. DETL$RPT: MSGDETL, # DISPLAY DETAIL ERROR MESSAGE #
        3012. RTURN: RETRN, # RETURN TO MAIN LOOP #
        3013. ABT: ABRT; # ABORT *SSLABEL* #
        3014.  
        3015. CONTROL EJECT;
        3016.  
        3017. #
        3018. * CHECK FOR LEGAL ERROR CODE.
        3019. #
        3020.  
        3021. IF ERR$CODE LS 0 OR ERR$CODE GR CODEMAX
        3022. THEN # ERROR CODE OUT OF RANGE #
        3023. BEGIN
        3024. LBMSG$PROC[0] = PROCNAME;
        3025. MESSAGE(LBMSG[0],SYSUDF1);
        3026. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        3027. END
        3028.  
        3029. DIR$NO[0] = LBARG$DIRN[0];
        3030. DIR$PRD = ".";
        3031. DIS$ERR = XCDD(ERR$CODE);
        3032. MSG$NO[0] = C<7,3>DIS$ERR;
        3033.  
        3034. #
        3035. * BEAD OUT STATUS VALUES FROM ERROR CODE ENTRY, AND DO
        3036. * CORRESPONDING PROCESSING.
        3037. #
        3038.  
        3039. SLOWFOR I = 0 STEP 6 UNTIL 12
        3040. DO
        3041. BEGIN
        3042. STAT = B<I,6>ERRSTATW[ERR$CODE];
        3043. GOTO ACT[STAT];
        3044.  
        3045. REPORT: # REPORT THE ERROR #
        3046. MESSAGE(ERRMSG[ERR$CODE],SYSUDF1);
        3047. IF ERR$CODE NQ ERRLIST"SYNTX$ABRT"
        3048. THEN
        3049. BEGIN
        3050. MESSAGE(MSGBUF[0],UDFL1);
        3051. MESSAGE(DIRECTV[0],UDFL1);
        3052. RPLINE(OUT$FETP,"*** ERROR",2,9,1);
        3053. RPLINE(OUT$FETP,MSG$NO[0],12,3,1);
        3054. RPLINE(OUT$FETP,"DIRECTIVE",19,9,1);
        3055. RPLINE(OUT$FETP,DIR$NO[0],29,3,0);
        3056. RPLINE(OUT$FETP,ERRMSSG[ERR$CODE],18,40,1);
        3057. RPLINE(OUT$FETP,"***",58,3,0);
        3058. RPSPACE(OUT$FETP,SP"SPACE",1);
        3059. END
        3060.  
        3061. TEST I;
        3062.  
        3063. DETL$RPT: # REPORT THE ERROR IN DETAIL #
        3064. DIS$ASN = XCDD(NUMDONE);
        3065. DET$MSG1[0] = ERRMSSG[ERR$CODE];
        3066. MESSAGE(MSGBUF[0],UDFL1);
        3067. MESSAGE(DIRECTV[0],UDFL1);
        3068. MESSAGE(DETAIL[0],SYSUDF1);
        3069. DET$MSG1[0] = " NUMBER PROCESSED = ";
        3070. DET$BLNK[0] = " ";
        3071. DET$NO[0] = C<5,5>DIS$ASN;
        3072. DET$PRD[0] = "."; # ADD PERIOD TO END OF MESSAGE #
        3073. MESSAGE(DETAIL,SYSUDF1);
        3074. RPLINE(OUT$FETP,"*** ERROR",2,9,1);
        3075. RPLINE(OUT$FETP,MSG$NO[0],12,3,1);
        3076. RPLINE(OUT$FETP,"DIRECTIVE",19,9,1);
        3077. RPLINE(OUT$FETP,DIR$NO[0],29,3,0);
        3078. RPLINE(OUT$FETP,ERRMSSG[ERR$CODE],18,40,0);
        3079. RPLINE(OUT$FETP,"NUMBER PROCESSED = ",19,19,1);
        3080. RPLINE(OUT$FETP,DET$NO[0],38,5,1);
        3081. RPLINE(OUT$FETP,"***",45,3,0);
        3082. RPSPACE(OUT$FETP,SP"SPACE",1);
        3083. TEST I;
        3084.  
        3085. RTURN: # RETURN TO CALLING PROC #
        3086. RETURN;
        3087.  
        3088. ABT: # ABORT PROCESSING #
        3089. RPCLOSE(OUT$FETP);
        3090. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        3091. END
        3092.  
        3093. END # LBERR #
        3094.  
        3095. TERM
        3096. PROC LBFLMSC;
        3097. # TITLE LBFLMSC - MODIFIES THE *INHIBIT* FLAG IN THE FCT. #
        3098.  
        3099. BEGIN # LBFLMSC #
        3100.  
        3101. #
        3102. ** LBFLMSC - MODIFIES THE *INHIBIT* FLAG IN THE FCT.
        3103. *
        3104. * THIS PROC UPDATES THE *INHIBIT* FLAG IN THE FCT ENTRY
        3105. * CORRESPONDING TO THE CSN SPECIFIED.
        3106. *
        3107. * PROC LBFLMSC.
        3108. *
        3109. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE
        3110. * PARAMETERS SET UP IN COMMON AREA DEFINED
        3111. * IN *COMTLBP*.
        3112. *
        3113. * EXIT *INHIBIT* FLAG UPDATED OR ERROR CONDITION.
        3114. *
        3115. * NOTES PROC *LBFLMSC* SEARCHES THE SMMAP FOR AN ENTRY
        3116. * WITH A CSN MATCHING THAT SPECIFIED. IF THIS IS
        3117. * FOUND AND IT IS ASSIGNED TO A FAMILY, THEN THE
        3118. * *INHIBIT* FLAG IN THE CORRESPONDING *FCT* ENTRY
        3119. * OR THE FREE CARTRIDGE FLAG IN THE *FCT* IS
        3120. * MODIFIED. IF *ON* IS SPECIFIED THE FLAG IS SET,
        3121. * AND IF *OFF* IS SPECIFIED THE FLAG IS CLEARED.
        3122. #
        3123.  
        3124. #
        3125. **** PROC LBFLMSC - XREF LIST BEGIN.
        3126. #
        3127.  
        3128. XREF
        3129. BEGIN
        3130. PROC CALL3; # ISSUES TYPE 3 CALLSS TO EXEC #
        3131. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        3132. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        3133. PROC SERCSU; # SEARCHES THE SMMAP #
        3134. END
        3135.  
        3136. #
        3137. **** PROC LBFLMSC - XREF LIST END.
        3138. #
        3139.  
        3140. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3141. *CALL COMBFAS
        3142. *CALL COMBCPR
        3143. *CALL COMBMAP
        3144. *CALL COMTERR
        3145. *CALL COMTLAB
        3146. *CALL COMTLBP
        3147.  
        3148. ITEM CATFLD U; # CATALOG FIELD #
        3149. ITEM CATVALUE I; # CATALOG VALUE #
        3150. ITEM FLAG I; # ERROR FLAG #
        3151. ITEM REQCODE U; # REQUEST CODE #
        3152. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        3153. ITEM SERTYPE S:SERCH$TYPE; # SEARCH TYPE #
        3154. ITEM SP$VSN C(12); # SPECIFIED CSN #
        3155.  
        3156.  
        3157. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        3158. BEGIN
        3159. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        3160. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        3161. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        3162. ITEM PT$GR U(04,00,07); # GROUP #
        3163. ITEM PT$GRT U(04,07,04); # GROUP ORDINAL #
        3164. END
        3165.  
        3166.  
        3167. CONTROL EJECT;
        3168.  
        3169. SERTYPE = S"CSN$MATCH";
        3170. SP$VSN = LBARG$C[0];
        3171.  
        3172. #
        3173. * SEARCH FOR MATCHING VSN.
        3174. #
        3175.  
        3176. SERCSU(SERTYPE,0,0,0,SP$VSN,0,0,PT$CSU$ENT[0],FLAG);
        3177. IF FLAG NQ 0
        3178. THEN # VSN NOT FOUND #
        3179. BEGIN
        3180. ERRCODE = S"CSN$NOTFND";
        3181. LBERR(ERRCODE); # DO ERROR PROCESSING #
        3182. RETURN;
        3183. END
        3184.  
        3185. #
        3186. * CHECK CARTRIDGE ASSIGNMENT.
        3187. #
        3188.  
        3189. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        3190. IF CM$CODE NQ CUBSTAT"SUBFAM"
        3191. THEN # NOT ASSIGNED TO FAMILY #
        3192. BEGIN
        3193. ERRCODE = S"UNX$CR$ASN";
        3194. LBERR(ERRCODE); # DO ERROR PROCESSING #
        3195. RETURN;
        3196. END
        3197.  
        3198. #
        3199. * ISSUE A REQUEST TO EXEC TO UPDATE THE CATALOG *INHIBIT* FLAG.
        3200. #
        3201.  
        3202. IF LBARG$ON[0] NQ 0
        3203. THEN # *ON* SPECIFIED #
        3204. BEGIN
        3205. CATVALUE = 1;
        3206. END
        3207.  
        3208. ELSE
        3209. BEGIN
        3210. IF LBARG$OF[0] NQ 0
        3211. THEN # *OFF* SPECIFIED #
        3212. BEGIN
        3213. CATVALUE = 0;
        3214. END
        3215.  
        3216. END
        3217.  
        3218. REQCODE = REQTYP3"UPD$CAT";
        3219. IF LBARG$OP[0] EQ "FC"
        3220. THEN # FREE CARTRIDGE #
        3221. BEGIN
        3222. CATFLD = UCF"FREEFL";
        3223. END
        3224.  
        3225. ELSE # INHIBIT ALLOCATION #
        3226. BEGIN
        3227. CATFLD = UCF"INHIB";
        3228. END
        3229.  
        3230.  
        3231. #
        3232. * UPDATE CATALOG.
        3233. #
        3234.  
        3235. CALL3(REQCODE,PT$CSU$ENT[0],CATFLD,CATVALUE,RESP$CODE);
        3236. IF RESP$CODE NQ RESPTYP3"OK3"
        3237. THEN # UPDATE UNSUCCESSFUL #
        3238. BEGIN
        3239. LBRESP(RESP$CODE,TYP"TYP3");
        3240. END
        3241.  
        3242. RETURN;
        3243.  
        3244. END # LBFLMSC #
        3245.  
        3246. TERM
        3247. PROC LBFXVSN;
        3248. # TITLE LBFXVSN - REPLACES LABEL WITH SCRATCH LABEL. #
        3249.  
        3250. BEGIN # LBFXVSN #
        3251.  
        3252. #
        3253. ** LBFXVSN - REPLACES LABEL WITH A SCRATCH LABEL.
        3254. *
        3255. * THIS PROC GETS A CARTRIDGE FROM THE INPUT DRAWER, WRITES A
        3256. * SCRATCH LABEL ON IT, AND ADDS IT TO THE POOL.
        3257. *
        3258. * PROC LBFXVSN.
        3259. *
        3260. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE
        3261. * PARAMETERS SET UP IN COMMON AREA DEFINED
        3262. * IN *COMTLBP*.
        3263. *
        3264. * EXIT CARTRIDGE IN SCRATCH POOL OR ERROR CONDITION.
        3265. *
        3266. * NOTES PROC *LBFXVSN* VERIFIES THE PRESENCE OF A CARTRIDGE
        3267. * IN THE INPUT DRAWER, AND SEARCHES FOR AN
        3268. * EMPTY CUBE IN THE POOL. EXEC IS CALLED TO BRING
        3269. * THE CARTRIDGE TO A DRIVE AND READ ITS LABEL. IF
        3270. * THE LABEL TYPE AGREES WITH THAT SPECIFIED, A NEW
        3271. * SCRATCH LABEL IS WRITTEN AND THE CARTRIDGE IS ADDED
        3272. * TO THE POOL.
        3273. #
        3274.  
        3275. #
        3276. **** PROC LBFXVSN - XREF LIST BEGIN.
        3277. #
        3278.  
        3279. XREF
        3280. BEGIN
        3281. PROC CALL3; # ISSUES TYPE 3 CALLSS TO EXEC #
        3282. PROC CALL4; # ISSUES TYPE 4 CALLSS TO EXEC #
        3283. PROC CKLAB; # CHECKS CARTRIDGE LABEL TYPE #
        3284. PROC CONVSN; # CONVERTS VSN FROM EBCDIC TO
        3285.   DISPLAY CODE #
        3286. PROC DCEBC; # CONVERTS DISPLAY TO EBCDIC #
        3287. PROC DLABFLD; # DISPLAY LABEL FIELDS #
        3288. PROC GENLAB; # GENERATES A NEW LABEL #
        3289. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        3290. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        3291. PROC SERCSU; # SEARCHES THE SMMAP #
        3292. END
        3293.  
        3294. #
        3295. **** PROC LBFXVSN - XREF LIST END.
        3296. #
        3297.  
        3298. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3299. *CALL COMBFAS
        3300. *CALL COMBCPR
        3301. *CALL COMBLBL
        3302. *CALL COMBMAP
        3303. *CALL COMTERR
        3304. *CALL COMTLAB
        3305. *CALL COMTLBP
        3306.  
        3307. ITEM CART$CSN C(20); # CARTRIDGE SERIAL NUMBER #
        3308. ITEM CONFLAG B; # CONVERSION FLAG #
        3309. ITEM DC$VSN C(8); # *CSN* IN DISPLAY CODE #
        3310. ITEM ERR$CNT I; # ERROR COUNT #
        3311. ITEM FLAG I; # ERROR FLAG #
        3312. ITEM HR$ERR I; # HARD READ ERRORS #
        3313. ITEM I I; # LOOP VARIABLE #
        3314. ITEM LAB$TYPE S:LABTYPE; # LABEL TYPE #
        3315. ITEM LD$CNT I; # LOAD COUNT #
        3316. ITEM LD$ERR I; # LOAD ERRORS #
        3317. ITEM PS$CNT I; # PASS COUNT #
        3318. ITEM REQCODE I; # REQUEST CODE #
        3319. ITEM RESP$CODE I; # RESPONSE CODE #
        3320. ITEM SERTYPE S:SERCH$TYPE; # SEARCH TYPE #
        3321. ITEM SP$CODE I; # SPECIFIED CODE #
        3322. ITEM SP$FAM C(7); # SPECIFIED FAMILY #
        3323. ITEM SP$SUB I; # SUBFAMILY #
        3324. ITEM SP$VSN C(8); # SPECIFIED CARTRIDGE *CSND* #
        3325. ITEM SP$Y I; # SPECIFIED Y COORDINATE #
        3326. ITEM SP$Z I; # SPECIFIED Z COORDINATE #
        3327. ITEM SR$ERR I; # SOFT READ ERRORS #
        3328. ITEM STR$RD I; # STRIPES READ #
        3329. ITEM STR$WR I; # STRIPES WRITTEN #
        3330. ITEM STR$DM I; # STRIPES DEMARKED #
        3331. ITEM SW$ERR I; # SOFT WRITE ERRORS #
        3332. ITEM TEMP$VSN C(8); # TEMPORARY *CSN* #
        3333.  
        3334.  
        3335. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        3336. BEGIN
        3337. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        3338. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        3339. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        3340. ITEM PT$GR U(04,00,07); # GROUP #
        3341. ITEM PT$GRT U(04,07,04); # GROUP ORDINAL #
        3342. END
        3343.  
        3344.  
        3345. CONTROL EJECT;
        3346.  
        3347. #
        3348. * CHECK IF SPECIFIED *CSN* IS ALREADY IN MAP.
        3349. #
        3350.  
        3351. SERTYPE = S"CSN$MATCH"; # SEARCH FOR *CSN* #
        3352. SERCSU(SERTYPE,0,0,0,LBARG$C[0],0,0,PT$CSU$ENT[0],FLAG);
        3353. IF FLAG EQ 0 # *CSN* ALREADY IN MAP #
        3354. THEN
        3355. BEGIN
        3356. ERRCODE = S"DUPL$CSN";
        3357. LBERR(ERRCODE);
        3358. RETURN;
        3359. END
        3360.  
        3361.  
        3362. #
        3363. * CHECK THAT CARTRIDGE IS PRESENT IN INPUT DRAWER AND SEARCH
        3364. * SMMAP FOR EMPTY CUBE IN THE POOL.
        3365. #
        3366.  
        3367. SERTYPE = S"ASSIGN";
        3368. SP$CODE = CUBSTAT"SCRPOOL";
        3369. SP$FAM = " ";
        3370. SP$SUB = 0;
        3371. SP$VSN = " ";
        3372. SERCSU(SERTYPE,0,0,SP$CODE,SP$VSN,SP$FAM,SP$SUB,PT$CSU$ENT[0],
        3373. FLAG);
        3374. IF FLAG NQ 0
        3375. THEN # NO EMPTY CUBE IN POOL #
        3376. BEGIN
        3377. ERRCODE = S"NO$EMPCBFP";
        3378. LBERR(ERRCODE); # DO ERROR PROCESSING #
        3379. RETURN;
        3380. END
        3381.  
        3382. #
        3383. * LOAD CARTRIDGE FROM INPUT DRAWER.
        3384. #
        3385.  
        3386. SP$Y = 14;
        3387. SP$Z = 0;
        3388. REQCODE = REQTYP4"LOAD$CART";
        3389. CALL4(REQCODE,DRD$NUM,0,SP$Y,SP$Z,RESP$CODE);
        3390. IF RESP$CODE NQ 0
        3391. THEN # *LOAD* FAILS #
        3392. BEGIN
        3393. LBRESP(RESP$CODE,TYP"TYP4");
        3394. RETURN;
        3395. END
        3396.  
        3397. DRD$NUM = CPR$DRD[0]; # TRANSPORT ID #
        3398.  
        3399.  
        3400. P<LABEL$CART> = OLDLABP;
        3401. CKLAB(LAB$TYPE); # CHECK LABEL TYPE #
        3402. IF LAB$TYPE EQ S"UNR$LAB"
        3403. THEN
        3404. BEGIN # UNRECOGNIZABLE LABEL #
        3405. IF LBARG$ZFM[0] EQ 0
        3406. THEN # FAMILY NOT SPECIFIED #
        3407. BEGIN
        3408. LD$CNT = 0;
        3409. SW$ERR = 0;
        3410. SR$ERR = 0;
        3411. HR$ERR = 0;
        3412. STR$RD = 0;
        3413. STR$WR = 0;
        3414. STR$DM = 0;
        3415. END
        3416.  
        3417. ELSE # FAMILY SPECIFIED #
        3418. BEGIN
        3419. REQCODE = REQTYP4"UNLD$CART";
        3420. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        3421. IF RESP$CODE NQ RESPTYP4"OK4"
        3422. THEN
        3423. BEGIN
        3424. LBRESP(RESP$CODE,TYP"TYP4");
        3425. RETURN;
        3426. END
        3427.  
        3428. ERRCODE = S"UNREC$LAB";
        3429. LBERR(ERRCODE);
        3430. RETURN;
        3431. END
        3432.  
        3433. END # UNRECOGNIZABLE LABEL #
        3434.  
        3435. ELSE
        3436. BEGIN # RECOGNIZABLE LABEL #
        3437. IF LBARG$ZFM[0] NQ 0
        3438. THEN
        3439. BEGIN # FAMILY SPECIFIED #
        3440. IF LAB$TYPE EQ S"FAM$LAB" AND LAB$FMLY[0] EQ LBARG$FM[0] AND
        3441. LAB$SF[0] EQ LBARG$SB[0]
        3442. THEN # MATCHING FAMILY LABEL #
        3443. BEGIN
        3444. LD$CNT = LAB$CRLD[0];
        3445. LD$ERR = LAB$LDER[0];
        3446. SR$ERR = LAB$SRDE[0];
        3447. SW$ERR = LAB$SWRE1[0];
        3448. B<28,4>SW$ERR = LAB$SWRE[0];
        3449. HR$ERR = LAB$HRDE[0];
        3450. STR$RD = LAB$STRD[0];
        3451. STR$WR = LAB$STWR1[0];
        3452. B<36,24>STR$WR = LAB$STWR[0];
        3453. STR$DM = LAB$STDM[0];
        3454. END
        3455.  
        3456. ELSE # NO MATCHING FAMILY LABEL #
        3457. BEGIN
        3458. DLABFLD; # DISPLAY LABEL FIELDS #
        3459. REQCODE = REQTYP4"UNLD$CART";
        3460. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        3461. IF RESP$CODE NQ RESPTYP4"OK4"
        3462. THEN
        3463. BEGIN
        3464. LBRESP(RESP$CODE,TYP"TYP4");
        3465. RETURN;
        3466. END
        3467.  
        3468. ERRCODE = S"NO$FAMLAB";
        3469. LBERR(ERRCODE);
        3470. RETURN;
        3471. END
        3472.  
        3473. END # FAMILY SPECIFIED #
        3474.  
        3475. ELSE
        3476. BEGIN # FAMILY NOT SPECIFIED #
        3477. IF LAB$TYPE EQ S"SCR$LAB"
        3478. THEN # SCRATCH LABEL #
        3479. BEGIN
        3480. LD$CNT = LAB$CRLD[0];
        3481. LD$ERR = LAB$LDER[0];
        3482. SR$ERR = LAB$SRDE[0];
        3483. SW$ERR = LAB$SWRE1[0];
        3484. B<28,4>SW$ERR = LAB$SWRE[0];
        3485. HR$ERR = LAB$HRDE[0];
        3486. STR$RD = LAB$STRD[0];
        3487. STR$WR = LAB$STWR1[0];
        3488. B<36,24>STR$WR = LAB$STWR[0];
        3489. STR$DM = LAB$STDM[0];
        3490. END
        3491.  
        3492. ELSE # FAMILY LABEL #
        3493. BEGIN
        3494. REQCODE = REQTYP4"UNLD$CART";
        3495. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        3496. IF RESP$CODE NQ RESPTYP4"OK4"
        3497. THEN
        3498. BEGIN
        3499. LBRESP(RESP$CODE,TYP"TYP4");
        3500. RETURN;
        3501. END
        3502.  
        3503. DLABFLD;
        3504. ERRCODE = S"GOOD$LAB";
        3505. LBERR(ERRCODE);
        3506. RETURN;
        3507. END
        3508.  
        3509. END # FAMILY NOT SPECIFIED #
        3510.  
        3511. END # RECOGNIZABLE LABEL #
        3512.  
        3513. LAB$TYPE = S"FAM$LAB";
        3514.  
        3515.  
        3516. #
        3517. * CHECK *CSN* PARAMETER FOR MATCH.
        3518. #
        3519.  
        3520. CONVSN(TEMP$VSN,1,CONFLAG);
        3521. IF LBARG$C[0] NQ TEMP$VSN
        3522. THEN # NO MATCH OF *CSN* #
        3523. BEGIN
        3524. ERRCODE = S"ILLEG$C";
        3525. LBERR(ERRCODE);
        3526. RETURN;
        3527. END
        3528.  
        3529. #
        3530. * CONVERT VSN FROM DISPLAY CODE TO EBCDIC.
        3531. #
        3532.  
        3533. DC$VSN = LBARG$C[0];
        3534. CONVSN(DC$VSN,0,CONFLAG);
        3535. IF CONFLAG
        3536. THEN # ILLEGAL CDC CHARACTER #
        3537. BEGIN
        3538. ERRCODE = S"ILLEG$C";
        3539. LBERR(ERRCODE);
        3540. RETURN;
        3541. END
        3542.  
        3543. #
        3544. * GENERATE NEW LABEL.
        3545. #
        3546.  
        3547. LAB$TYPE = S"SCR$LAB";
        3548. GENLAB(LAB$TYPE,PT$CSU$ENT[0],LD$CNT,LD$ERR, SR$ERR,SW$ERR,
        3549. HR$ERR);
        3550. IF LBARG$CM[0] NQ IBMCART
        3551. THEN # CARTRIDGE NOT IBM #
        3552. BEGIN
        3553. LAB$CCOD[0] = OTHCART;
        3554. END
        3555.  
        3556. ELSE
        3557. BEGIN
        3558. LAB$CCOD[0] = IBMCART;
        3559. END
        3560.  
        3561. IF LBARG$CM[0] EQ IBMCART
        3562. THEN # WRITE IBM ON CARTRIDGE #
        3563. BEGIN
        3564. B<0,32>LAB$CSN[0] = O"31160552100";
        3565. END
        3566.  
        3567. # NOTE: IF CM EQ B- THEN DO
        3568.   CONVERSION #
        3569. REQCODE = REQTYP4"WRT$LAB";
        3570. CALL4(REQCODE,DRD$NUM,CART$CSN,PT$Y[0],PT$Z[0],RESP$CODE);
        3571. IF RESP$CODE NQ RESPTYP4"OK4"
        3572. THEN # WRITE FAILS #
        3573. BEGIN
        3574. LBRESP(RESP$CODE,TYP"TYP4");
        3575. RETURN;
        3576. END
        3577.  
        3578. #
        3579. * UPDATE SMMAP TO ADD CARTRIDGE TO POOL.
        3580. #
        3581.  
        3582. REQCODE = REQTYP3"UPD$MAP";
        3583. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        3584. CM$CSND[0] = LBARG$C[0];
        3585. CM$CCOD[0] = LAB$CCOD;
        3586. CALL3(REQCODE,PT$CSU$ENT[0],0,0,RESP$CODE);
        3587. IF RESP$CODE NQ RESPTYP3"OK3"
        3588. THEN # UPDATE FAILS #
        3589. BEGIN
        3590. LBRESP(RESP$CODE,TYP"TYP3");
        3591. RETURN;
        3592. END
        3593.  
        3594. # WHICH ERROR CODE #
        3595. IF RESP$CODE NQ RESPTYP4"OK4"
        3596. THEN # PUT FAILS #
        3597. BEGIN
        3598. LBRESP(RESP$CODE,TYP"TYP4");
        3599. END
        3600.  
        3601. RETURN;
        3602.  
        3603. END # LBFXVSN #
        3604.  
        3605. TERM
        3606. PROC LBHEAD((FETP));
        3607. # TITLE LBHEAD - WRITES HEADER LINE ON OUTPUT FILE. #
        3608.  
        3609. BEGIN # LBHEAD #
        3610.  
        3611. #
        3612. ** LBHEAD - WRITES HEADER LINE ON OUTPUT FILE.
        3613. *
        3614. * PROC LBHEAD((FETP))
        3615. *
        3616. * ENTRY FETP, AN ITEM CONTAINING THE FWA OF THE FET.
        3617. *
        3618. * EXIT HEADER WRITTEN ON OUTPUT FILE.
        3619. *
        3620. * NOTES THE REPORT FORMATTER IS USED TO
        3621. * PRINT THE HEADER LINES.
        3622. #
        3623.  
        3624. ITEM FETP I; # FWA OF THE FET #
        3625.  
        3626. #
        3627. **** PROC LBHEAD - XREF LIST BEGIN.
        3628. #
        3629.  
        3630. XREF
        3631. BEGIN
        3632. PROC RPLINEX; # PRINTS A REPORT LINE #
        3633. END
        3634.  
        3635. #
        3636. **** PROC LBHEAD - XREF LIST END.
        3637. #
        3638.  
        3639. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        3640. *CALL COMBFAS
        3641. *CALL COMTOUT
        3642.  
        3643. CONTROL EJECT;
        3644.  
        3645. #
        3646. * PRINT HEADER LINE.
        3647. #
        3648.  
        3649. RPLINEX(FETP,"SSLABEL REPORT FILE",2,19,0);
        3650. RPLINEX(FETP," ",1,1,0); # WRITE A BLANK LINE #
        3651. RETURN;
        3652.  
        3653. END # LBHEAD #
        3654.  
        3655. TERM
        3656. PROC LBLOOP((ARGLIST),ERRFLAG);
        3657. # TITLE LBLOOP - CRACK AND SYNTAX CHECK *SSLABEL* DIRECTIVES. #
        3658.  
        3659. BEGIN # LBLOOP #
        3660.  
        3661. #
        3662. ** LBLOOP - CRACK AND SYNTAX CHECK *SSLABEL* DIRECTIVES.
        3663. *
        3664. * THIS PROCEDURE CRACKS AND SYNTAX CHECKS THE
        3665. * PARAMETERS SPECIFIED ON *SSLABEL* DIRECTIVE
        3666. * CALL.
        3667. *
        3668. * PROC LBLOOP((ARGLIST),ERRFLAG)
        3669. *
        3670. * ENTRY ARGLIST, AN ITEM CONTAINING THE ADDRESS
        3671. * OF THE ARGUMENT LIST FOR *SSLABEL*.
        3672. *
        3673. * EXIT ALL THE DIRECTIVES CRACKED, SYNTAX CHECKED
        3674. * AND WRITTEN ON A TEMPORARY FILE.
        3675. * ERRFLAG, AN ITEM CONTAINING THE ERROR STATUS.
        3676. * FALSE, NO ERROR.
        3677. * TRUE, SYNTAX ERROR IN ONE OR MORE DIRECTIVES.
        3678. *
        3679. * MESSAGES SSLABEL - NO DIRECTIVES.
        3680. *
        3681. * NOTES PROC *LBLOOP* SETS UP A LOOP TO READ IN EACH
        3682. * DIRECTIVE, CRACK THE DIRECTIVE, CONVERT THE CRACKED
        3683. * PARAMETERS FROM DISPLAY CODE TO INTEGER VALUE
        3684. * AND TO CHECK FOR THE VALID OPTIONS ON THE
        3685. * DIRECTIVE CALL. THE CRACKED PARAMETERS ARE
        3686. * RETURNED IN THE COMMON AREA *ULBPCOM* AND
        3687. * AFTER CONVERSION ARE PLACED BACK IN THE
        3688. * SAME LOCATIONS. IF AN ERROR IS ENCOUNTERED
        3689. * WITH THE DIRECTIVE, A DIRECTIVE ERROR FLAG
        3690. * IS SET UP. THE DIRECTIVE ALONG WITH THE
        3691. * CRACKED AND CONVERTED PARAMETERS, DIRECTIVE
        3692. * NUMBER AND THE DIRECTIVE ERROR STATUS FLAG
        3693. * IS WRITTEN TO A TEMPORARY FILE. THE TEMPORARY
        3694. * FILE HAS THE FOLLOWING FORMAT.
        3695. * EACH DIRECTIVE HAS ITS IMAGE, NUMBER AND
        3696. * ERROR STATUS AND THE CRACKED PARAMETERS
        3697. * WRITTEN ON TO IT. IT CONSISTS OF
        3698. * ONE LOGICAL RECORD FOLLOWED BY AN EOR.
        3699. * A SYNTAX ERROR IS RETURNED TO THE CALLING
        3700. * PROCEDURE IF AN ERROR IS ENCOUNTERED WITH
        3701. * ANY DIRECTIVE.
        3702. #
        3703.  
        3704. ITEM ARGLIST I; # ADDRESS OF ARGUMENT LIST #
        3705. ITEM ERRFLAG B; # ERROR FLAG #
        3706.  
        3707. #
        3708. **** PROC LBLOOP - XREF LIST BEGIN.
        3709. #
        3710.  
        3711. XREF
        3712. BEGIN
        3713. PROC BZFILL; # BLANK OR ZERO FILLS A BUFFER #
        3714. PROC LBCONV; # CONVERT PARAMETERS TO INTEGERS #
        3715. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        3716. PROC LBOPT; # CHECKS FOR VALID OPTIONS #
        3717. PROC LOFPROC; # LIST OF FILES PROCESSOR #
        3718. PROC MESSAGE; # DISPLAYS MESSAGES #
        3719. PROC READC; # READS IN A CODED LINE #
        3720. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        3721.   OR RETURN #
        3722. PROC RETERN; # RETURNS A FILE #
        3723. PROC REWIND; # REWINDS A FILE #
        3724. PROC RPLINE; # PRINTS A REPORT LINE #
        3725. PROC RPSPACE; # PRINTS A BLANK LINE #
        3726. PROC WRITER; # WRITES EOR ON A FILE #
        3727. PROC WRITEW; # DATA TRANSFER ROUTINE #
        3728. PROC XARG; # CRACK PARAMETER LIST #
        3729. FUNC XCDD C(10); # CONVERT INTEGERS TO DISPLAY #
        3730. PROC ZFILL; # ZERO FILLS A BUFFER #
        3731. PROC ZSETFET; # SETS UP A CIO FET #
        3732. END
        3733.  
        3734. #
        3735. **** PROC LBLOOP - XREF LIST END.
        3736. #
        3737.  
        3738. DEF WBUFL #8#; # LENGTH OF WORKING BUFFER #
        3739.  
        3740. DEF LISTCON #0#; # DO NOT LIST THE COMDECKS #
        3741. *CALL COMBFAS
        3742. *CALL COMBBZF
        3743. *CALL COMTERR
        3744. *CALL COMTLAB
        3745. *CALL COMTLBP
        3746. *CALL COMTOUT
        3747.  
        3748. ITEM BUFP I; # FIRST WORD ADDRESS OF BUFFER #
        3749. ITEM COMMENT B = FALSE; # INDICATES A COMMENT #
        3750. ITEM DIRNUM I; # DIRECTIVE NUMBER #
        3751. ITEM EOR B = FALSE; # EOR STATUS ON A FILE #
        3752. ITEM FETP I; # FIRST WORD ADDRESS OF FET #
        3753. ITEM FLAG I; # ERROR FLAG #
        3754. ITEM TEMP C(10); # TEMPORARY ITEM #
        3755.  
        3756. ARRAY LBIN$WBUF [0:0] S(WBUFL); # WORKING BUFFER #
        3757. BEGIN
        3758. ITEM LBINW$DIR C(00,00,80); # *SSLABEL* DIRECTIVE IMAGE #
        3759. END
        3760.  
        3761. CONTROL EJECT;
        3762.  
        3763. DIRNUM = 0; # INITIALIZE DIRECTIVE NUMBER #
        3764.  
        3765. #
        3766. * SET UP FET FOR TEMPORARY FILE.
        3767. #
        3768.  
        3769. FETP = LOC(SCR$FET[0]);
        3770. BUFP = LOC(SCR$BUF[0]);
        3771. ZSETFET(FETP,SCR,BUFP,BUFL,SFETL);
        3772. LOFPROC(SCR); # ADD LFN TO LIST OF FILES #
        3773.  
        3774. #
        3775. * SET UP A LOOP TO
        3776. * 1. READ A DIRECTIVE.
        3777. * 2. CRACK THE DIRECTIVE.
        3778. * 3. CONVERT PARAMETERS.
        3779. * 4. CHECK FOR VALID OPTIONS.
        3780. * 5. WRITE THE DIRECTIVE TO A TEMPORARY FILE.
        3781. #
        3782.  
        3783. RETERN(SCR$FET[0],RCL); # RETURN THE TEMPORARY FILE #
        3784.  
        3785. FASTFOR DUMMY = 0 STEP 1 WHILE NOT EOR
        3786. DO
        3787. BEGIN # CRACK AND SYNTAX CHECK DIRECTIVES #
        3788. ZFILL(LBIN$WBUF[0],WBUFL); # ZERO FILL WORKING BUFFER #
        3789. READC(LBIN$FET[0],LBIN$WBUF[0],WBUFL,FLAG);
        3790. IF FLAG NQ 0
        3791. THEN # NO MORE DIRECTIVES #
        3792. BEGIN
        3793. EOR = TRUE;
        3794. TEST DUMMY;
        3795. END
        3796.  
        3797. #
        3798. * CHECK FOR A COMMENT.
        3799. #
        3800.  
        3801. IF C<0,1>LBINW$DIR[0] EQ "*"
        3802. THEN # A COMMENT #
        3803. BEGIN
        3804. COMMENT = TRUE;
        3805. TEMP = " ";
        3806. END
        3807.  
        3808. ELSE # A DIRECTIVE #
        3809. BEGIN
        3810. COMMENT = FALSE;
        3811. DIRNUM = DIRNUM + 1;
        3812. TEMP = XCDD(DIRNUM); # WRITE DIRECTIVE NUMBER #
        3813. TEMP = C<7,3>TEMP;
        3814. END
        3815.  
        3816. #
        3817. * WRITE THE DIRECTIVE NUMBER AND THE DIRECTIVE
        3818. * IMAGE TO THE OUTPUT FILE.
        3819. #
        3820.  
        3821. BZFILL(LBIN$WBUF[0],TYPFILL"BFILL",80);
        3822. RPLINE(OUT$FETP,TEMP,2,5,1);
        3823. RPLINE(OUT$FETP,LBINW$DIR[0],8,80,0);
        3824. RPSPACE(OUT$FETP,SP"SPACE",1);
        3825.  
        3826. IF COMMENT
        3827. THEN
        3828. BEGIN
        3829. TEST DUMMY; # READ THE NEXT DIRECTIVE #
        3830. END
        3831.  
        3832. #
        3833. * ZERO FILL THE AREA TO HOLD THE DIRECTIVE
        3834. * IMAGE AND THE CRACKED PARAMETERS.
        3835. #
        3836.  
        3837. ZFILL(LBARG[0],DIRPRML);
        3838.  
        3839. #
        3840. * SET UP THE DIRECTIVE IMAGE AND THE DIRECTIVE
        3841. * NUMBER IN THE AREA TO BE WRITTEN TO THE
        3842. * TEMPORARY FILE.
        3843. #
        3844.  
        3845. LBARG$DIRN[0] = TEMP;
        3846. LBARG$DIRI[0] = LBINW$DIR[0]; # DIRECTIVE IMAGE #
        3847.  
        3848. #
        3849. * CRACK THE DIRECTIVE.
        3850. #
        3851.  
        3852. LBARG$GR[0] = 7777;
        3853. XARG(ARGLIST,LBIN$WBUF[0],FLAG); # OPTION IS *DO NOT SKIP OVER
        3854.   PROGRAM NAME* #
        3855. IF FLAG NQ 0
        3856. THEN # SYNTAX ERROR #
        3857. BEGIN
        3858. LBARG$DIRF[0] = TRUE; # SET UP ERROR FLAGS #
        3859. ERRFLAG = TRUE;
        3860. END
        3861.  
        3862. #
        3863. * IF NO SYNTAX ERROR IN THE DIRECTIVE THEN CONVERT
        3864. * THE PARAMETERS FROM DISPLAY CODE TO INTEGER VALUE.
        3865. #
        3866.  
        3867. IF NOT LBARG$DIRF[0]
        3868. THEN # NO ERROR IN DIRECTIVE #
        3869. BEGIN
        3870. LBCONV(FLAG); # CONVERT PARAMETERS #
        3871. IF FLAG NQ 0
        3872. THEN # CONVERSION ERROR #
        3873. BEGIN
        3874. LBARG$DIRF[0] = TRUE; # SET UP ERROR FLAGS #
        3875. ERRFLAG = TRUE;
        3876. END
        3877.  
        3878. END
        3879.  
        3880. #
        3881. * IF AN ERROR IS FOUND IN THE DIRECTIVE, REPORT
        3882. * IT ON THE OUTPUT FILE.
        3883. #
        3884.  
        3885. IF LBARG$DIRF[0]
        3886. THEN # ERROR IN THE DIRECTIVE #
        3887. BEGIN
        3888. ERRCODE = S"SYNTX$DIR";
        3889. LBERR(ERRCODE); # PROCESS THE ERROR #
        3890. END
        3891.  
        3892. #
        3893. * IF THERE IS NO ERROR IN THE DIRECTIVE, CHECK
        3894. * FOR ALL THE VALID OPTIONS ON THE DIRECTIVE
        3895. * CALL.
        3896. #
        3897.  
        3898. IF NOT LBARG$DIRF[0]
        3899. THEN # CHECK FOR VALID OPTIONS #
        3900. BEGIN
        3901. LBOPT(FLAG);
        3902. IF FLAG NQ 0
        3903. THEN # VALID OPTIONS VIOLATED #
        3904. BEGIN
        3905. LBARG$DIRF[0] = TRUE; # SET UP ERROR FLAGS #
        3906. ERRFLAG = TRUE;
        3907. END
        3908.  
        3909. END
        3910.  
        3911. #
        3912. * WRITE THE DIRECTIVE IMAGE ALONG WITH THE DIRECTIVE
        3913. * NUMBER, DIRECTIVE FLAG AND THE CRACKED PARAMETERS
        3914. * ON THE TEMPORARY FILE.
        3915. #
        3916.  
        3917. WRITEW(SCR$FET[0],LBARG[0],DIRPRML,FLAG);
        3918. END # CRACK AND SYNTAX CHECK DIRECTIVES #
        3919.  
        3920. IF DIRNUM EQ 0
        3921. THEN # NO DIRECTIVES #
        3922. BEGIN
        3923. LBMSG$LINE[0] = " SSLABEL - NO DIRECTIVES.";
        3924. MESSAGE(LBMSG$BUF[0],SYSUDF1);
        3925. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        3926. END
        3927.  
        3928. WRITER(SCR$FET[0],NRCL);
        3929. REWIND(SCR$FET[0],NRCL);
        3930. RETURN; # ALL DIRECTIVES CRACKED #
        3931.  
        3932. END # LBLOOP #
        3933.  
        3934. TERM
        3935. PROC LBMAIN;
        3936. # TITLE LBMAIN - PROCESSES *SSLABEL* DIRECTIVES. #
        3937.  
        3938. BEGIN # LBMAIN #
        3939.  
        3940. #
        3941. ** LBMAIN - PROCESSES *SSLABEL* DIRECTIVES.
        3942. *
        3943. * THIS PROCEDURE PROCESSES DIRECTIVES BY CALLING
        3944. * THE APPROPRIATE DIRECTIVE ROUTINES.
        3945. *
        3946. * PROC LBMAIN.
        3947. *
        3948. * ENTRY THE TEMPORARY FILE SET UP WITH
        3949. * THE DIRECTIVE IMAGES ALONG WITH THE
        3950. * CRACKED PARAMETERS.
        3951. *
        3952. * EXIT ALL DIRECTIVES HAVE BEEN PROCESSED.
        3953. *
        3954. * MESSAGES FAMILY NOT FOUND.
        3955. *
        3956. * NOTES THE CRACKED PARAMETER FILE IS READ (UNTIL EOI)
        3957. * INTO WORKING STORAGE. FOR EACH DIRECTIVE, THE
        3958. * DIRECTIVE IMAGE IS WRITTEN ON THE OUTPUT FILE
        3959. * AND THE SMMAP IS OPENED. IF THIS OPEN FAILS,
        3960. * OR IF THE SYNTAX ERROR FLAG IS SET FOR THIS
        3961. * DIRECTIVE, THEN THE ERROR PROCESSOR IS CALLED.
        3962. * OTHERWISE THE CORRESPONDING DIRECTIVE ROUTINE
        3963. * IS CALLED.
        3964. #
        3965.  
        3966. #
        3967. **** PROC LBMAIN - XREF LIST BEGIN.
        3968. #
        3969.  
        3970. XREF
        3971. BEGIN
        3972. PROC SSINIT; # SET UP TABLES AND POINTERS #
        3973. PROC LBADCSU; # ADD *SM* DIRECTIVE (AC) #
        3974. PROC LBADCUB; # ADD CUBE (AB) #
        3975. PROC LBADMSC; # ADD CARTRIDGE (AM) #
        3976. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        3977. PROC LBFLMSC; # SET/CLEAR FCT INHIB FLAG (IB) #
        3978. PROC LBFXVSN; # REPAIR LABEL (FX) #
        3979. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        3980. PROC LBRMCSU; # REMOVE *SM* DIRECTIVE (RC) #
        3981. PROC LBRMCUB; # REMOVE CUBE DIRECTIVE (RB) #
        3982. PROC LBRMMSC; # REMOVE CARTRIDGE (RM) #
        3983. PROC LBRSMSC; # RESTORE A CARTRIDGE (RS) #
        3984. PROC LOFPROC; # LIST OF FILES PROCESSOR #
        3985. PROC MESSAGE; # DISPLAYS MESSAGES #
        3986. PROC MOPEN; # OPEN SMMAP #
        3987. PROC READ; # CIO READ MACRO #
        3988. PROC READW; # CIO READW MACRO #
        3989. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        3990.   OR RETURN #
        3991. PROC RETERN; # RETURN MACRO #
        3992. PROC RPLINE; # PRINT FORMATTER ROUTINE #
        3993. PROC RPSPACE; # PRINTS BLANK LINES #
        3994. PROC SETPFP; # SET FAMILY AND USER INDEX #
        3995. END
        3996.  
        3997. #
        3998. **** PROC LBMAIN - XREF LIST END.
        3999. #
        4000.  
        4001. DEF MSG1 #" FAMILY NOT FOUND."#;
        4002.  
        4003. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        4004. *CALL COMBFAS
        4005. *CALL COMBCMD
        4006. *CALL COMBCMS
        4007. *CALL COMBCPR
        4008. *CALL COMBLBL
        4009. *CALL COMBPFP
        4010. *CALL COMBSNS
        4011. *CALL COMSPFM
        4012. *CALL COMTERR
        4013. *CALL COMTLAB
        4014. *CALL COMTLBP
        4015. *CALL COMTOUT
        4016.  
        4017. ITEM J I; # LOOP VARIABLE #
        4018. ITEM MSTAT S:CMASTAT; # ERROR STATUS #
        4019. ITEM RDWSTAT I = 0; # ERROR STATUS #
        4020.  
        4021. ARRAY CMAP$NM [0:0] P(1); # BUILD SMMAP FILE NAME #
        4022. BEGIN
        4023. ITEM CMAP$NAME C(00,00,07); # SMMAP FILE NAME #
        4024. ITEM CMAP$IN C(00,00,05); # FIRST 5 CHARACTERS #
        4025. ITEM CMAP$ID C(00,30,01); # CSU-ID #
        4026. ITEM CMAP$Z U(00,36,24) = [0]; # ZERO FILL FILE NAME #
        4027. END
        4028.  
        4029. ARRAY DRW$STAT [0:0] S(SNSLEN);; # DRAWER STATUS TABLE #
        4030.  
        4031. #
        4032. * BUFFERS TO HOLD THE OLD CARTRIDGE LABEL
        4033. * AND THE NEW CARTRIDGE LABEL.
        4034. #
        4035.  
        4036. ARRAY OLDLABEL [0:0] S(LABLEN);;
        4037. ARRAY NEWLABEL [0:0] S(LABLEN);;
        4038.  
        4039. #
        4040. * SWITCH TO PROCESS ALL THE *SSLABEL*
        4041. * DIRECTIVES. THE ORDER OF THE SWITCH
        4042. * LABELS IS THE SAME AS THE DIRECTIVE
        4043. * NAMES SET UP IN ARRAY *DIR$NAME*
        4044. * DEFINED IN *COMTLAB*.
        4045. #
        4046.  
        4047. SWITCH DIR$ACT # SWITCH TO PROCESS DIRECTIVES #
        4048. ADDCUBE, # ADD CUBES TO A FAMILY OR POOL #
        4049. ADDCSU, # ADD A *SM* TO FAMILY CATALOG #
        4050. ADDMSC, # ADD CARTRIDGES TO FAMILY OR POOL
        4051.   #
        4052. FIXVSN, # FIX A CARTRIDGE VSN #
        4053. FLAGFRE, # TURN FREE FLAG ON OR OFF #
        4054. FLAGMSC, # TURN A FLAG ON OR OFF #
        4055. RMVCSU, # REMOVE A *SM* FROM FAMILY CATALOG
        4056.   #
        4057. RMVCUBE, # REMOVE A CUBE FROM A FAMILY OR
        4058.   POOL #
        4059. RMVMSC, # REMOVE CARTRIDGES FROM FAMILY OR
        4060.   POOL #
        4061. RSTRMSC; # RESTORE A LOST CARTRIDGE #
        4062.  
        4063. CONTROL EJECT;
        4064.  
        4065. #
        4066. * SET UP THE POINTERS OF THE BASED ARRAYS AND
        4067. * THE ADDRESSES OF THE BUFFERS.
        4068. #
        4069.  
        4070. # DRAWER RELATED #
        4071. OLDLABP = LOC(OLDLABEL[0]);
        4072. NEWLABP = LOC(NEWLABEL[0]);
        4073. CMAP$IN[0] = SMMAP;
        4074.  
        4075. #
        4076. * INITIALIZE THE FETS, BUFFERS ,TABLES AND
        4077. * THE POINTERS FOR THE CATALOG AND THE MAP
        4078. * ACCESS ROUTINES.
        4079. #
        4080.  
        4081. SSINIT;
        4082. READ(SCR$FET[0],NRCL);
        4083.  
        4084. #
        4085. * READ EACH DIRECTIVE AREA FROM THE SCRATCH FILE.
        4086. #
        4087.  
        4088. REPEAT WHILE RDWSTAT EQ 0
        4089. DO
        4090. BEGIN # PROCESS DIRECTIVES #
        4091. READW(SCR$FET[0],LBARG[0],DIRPRML,RDWSTAT);
        4092. IF RDWSTAT NQ 0
        4093. THEN # EOI REACHED #
        4094. BEGIN
        4095. TEST DUMMY;
        4096. END
        4097.  
        4098. #
        4099. * WRITE DIRECTIVE NUMBER AND IMAGE TO OUTPUT FILE.
        4100. #
        4101.  
        4102. RPLINE(OUT$FETP,LBARG$DIRN[0],2,5,1);
        4103. RPLINE(OUT$FETP,LBARG$DIRI[0],8,80,0);
        4104. RPSPACE(OUT$FETP,SP"SPACE",1);
        4105. IF LBARG$DIRF[0]
        4106. THEN # CHECK SYNTAX ERROR FLAG #
        4107. BEGIN
        4108. RPLINE(OUT$FETP,"*** SYNTAX ERROR",2,16,0);
        4109. TEST DUMMY;
        4110. END
        4111.  
        4112. #
        4113. * IF *FM* IS NOT SPECIFIED, USE THE DEFAULT FAMILY.
        4114. #
        4115.  
        4116. IF (LBARG$ZFM[0] EQ 0 AND LBARG$OP[0] NQ "FX") ##
        4117. OR LBARG$ZFM[0] EQ -1
        4118. THEN
        4119. BEGIN
        4120. LBARG$FM[0] = DEF$FAM;
        4121. END
        4122.  
        4123. PFP$WRD0[0] = 0; # SET FAMILY AND USER INDEX #
        4124. PFP$FAM[0] = DEF$FAM;
        4125. PFP$UI[0] = DEF$UI;
        4126. PFP$FG1[0] = TRUE;
        4127. PFP$FG4[0] = TRUE;
        4128. SETPFP(PFP);
        4129. IF PFP$STAT[0] NQ 0
        4130. THEN # FAMILY NOT FOUND #
        4131. BEGIN
        4132. LBMSG$LN[0] = MSG1;
        4133. MESSAGE(LBMSG[0],SYSUDF1);
        4134. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        4135. END
        4136.  
        4137. #
        4138. * OPEN SMUMAP.
        4139. #
        4140.  
        4141. CMAP$ID[0] = LBARG$SM[0]; # SET UP THE *SM* ID #
        4142. MOPEN(LBARG$SMID[0],CMAP$NAME[0],"RM",MSTAT);
        4143. IF MSTAT EQ S"NOERR"
        4144. THEN
        4145. BEGIN
        4146. LOFPROC(CMAP$NAME[0]); # ADD LFN TO LIST OF FILES #
        4147. END
        4148.  
        4149. PFP$UI[0] = DEF$UI + LBARG$SB[0];
        4150. PFP$FAM[0] = LBARG$FM[0];
        4151. SETPFP(PFP);
        4152. IF PFP$STAT[0] NQ 0
        4153. AND LBARG$OP[0] NQ "FX"
        4154. THEN # FAMILY NOT FOUND #
        4155. BEGIN
        4156. LBMSG$LN[0] = MSG1;
        4157. MESSAGE(LBMSG[0],SYSUDF1);
        4158. RESTPFP(PFP$ABORT); # RESTORE PFP #
        4159. END
        4160.  
        4161. #
        4162. * IF THERE IS ANY ERROR OTHER THAN
        4163. * *FILE ALREADY OPEN*, PROCESS THE
        4164. * ERROR STATUS.
        4165. #
        4166.  
        4167. IF MSTAT NQ S"NOERR" AND MSTAT NQ S"FOPEN"
        4168. THEN
        4169. BEGIN
        4170. LBRESP(MSTAT,0);
        4171. TEST DUMMY;
        4172. END
        4173.  
        4174. #
        4175. * PROCESS THE DIRECTIVE.
        4176. #
        4177.  
        4178. SLOWFOR J = 0 STEP 1 UNTIL 9
        4179. DO
        4180. BEGIN
        4181. IF DIR$NM[J] EQ LBARG$OP[0]
        4182. THEN # FIND MATCHING DIRECTIVE #
        4183. BEGIN
        4184. GOTO DIR$ACT[J];
        4185. END
        4186.  
        4187. END
        4188.  
        4189. ADDCUBE:
        4190. LBADCUB;
        4191. TEST DUMMY;
        4192.  
        4193. ADDCSU: # ADD *SM* TO FAMILY CATALOG #
        4194. LBADCSU;
        4195. TEST DUMMY;
        4196.  
        4197. ADDMSC: # ADD CARTRIDGES TO FAMILY/POOL #
        4198. LBADMSC;
        4199. TEST DUMMY;
        4200.  
        4201. FIXVSN: # FIX CARTRIDGE VSN #
        4202. LBFXVSN;
        4203. TEST DUMMY;
        4204.  
        4205. FLAGFRE: # TURN FREE FLAG ON OR OFF #
        4206.  
        4207. FLAGMSC: # TURN A FLAG ON OR OFF #
        4208. LBFLMSC;
        4209. TEST DUMMY;
        4210.  
        4211. RMVCSU: # REMOVE *SM* FROM FAMILY CATALOG #
        4212. LBRMCSU;
        4213. TEST DUMMY;
        4214.  
        4215. RMVCUBE: # REMOVE CUBE FROM FAMILY/POOL #
        4216. LBRMCUB;
        4217. TEST DUMMY;
        4218.  
        4219. RMVMSC: # REMOVE FAMILY/POOL CARTRIDGES #
        4220. LBRMMSC;
        4221. TEST DUMMY;
        4222.  
        4223. RSTRMSC: # RESTORE A LOST CARTRIDGE #
        4224. LBRSMSC;
        4225. TEST DUMMY;
        4226.  
        4227. END # PROCESS DIRECTIVES #
        4228.  
        4229. RETURN;
        4230.  
        4231. END # LBMAIN #
        4232.  
        4233. TERM
        4234. PROC LBOPT(ERRFLAG);
        4235. # TITLE LBOPT - TESTS FOR VALID *SSLABEL* DIRECTIVES. #
        4236.  
        4237. BEGIN # LBOPT #
        4238.  
        4239. #
        4240. ** LBOPT - TESTS FOR VALID *SSLABEL* DIRECTIVE OPTIONS.
        4241. *
        4242. * THIS PROCEDURE CHECKS THE *SSLABEL* DIRECTIVE OPTIONS
        4243. * SPECIFIED, AND IF AN INVALID OPTION IS FOUND THE
        4244. * ERROR PROCESSOR IS CALLED WITH THE APPROPRIATE
        4245. * ERROR CODE.
        4246. *
        4247. * PROC LBOPT(ERRFLAG)
        4248. *
        4249. * EXIT ALL THE VALID OPTIONS CHECKED OR A VALID
        4250. * OPTION VIOLATED.
        4251. * ERRFLAG, AN ITEM CONTAINING THE ERROR STATUS.
        4252. * 0, NO ERROR.
        4253. * 1, VALID OPTION VIOLATED.
        4254. *
        4255. * NOTES ALL DIRECTIVE OPTIONS ARE TESTED FOR INVALID VALUES.
        4256. * THE VALID OPTIONS ON *SSLABEL* DIRECTIVE CALLS ARE
        4257. * 1. *OP* MUST BE A LEGAL DIRECTIVE NAME.
        4258. * 2. *N* MUST BE 1 IF *CN* IS SPECIFIED.
        4259. * 3. *CN* MUST BE SPECIFIED WITH *RMVMSC* LOST
        4260. * OPTION.
        4261. * 4. *CN* MAY NOT BE SPECIFIED WHEN ANY *PK*
        4262. * OPTION IS USED.
        4263. * 5. *CN* MAY NOT BE SPECIFIED WITH *ADDCSU*,
        4264. * *RMVCSU*, *ADDCUBE* AND *RMVCUBE* DIRECTIVES.
        4265. * 6. VALID USES OF *PK* ARE
        4266. * OP=AM - PK=D OR PK=P
        4267. * OP=RM - PK=P OR PK=F
        4268. * OP=RB - PK=P OR PK=F OR PK=R
        4269. * PK=P MAY NOT BE SPECIFIED IF PT=P.
        4270. * 7. PT=P CANNOT BE SPECIFIED WHEN OP=AM AND
        4271. * *V* IS SPECIFIED.
        4272. * 8. VALID USES OF *PT* ARE
        4273. * OP=AM - PT=P OR PT=F
        4274. * OP=RM - PT=D OR PT=P
        4275. * OP=AB - PT=P OR PT=F OR PT=R
        4276. * 9. VALID USES OF *D* ARE FOR PK=D, OP=RS OR
        4277. * OP=FX.
        4278. * 10. *GR* MUST BE BETWEEN 1 AND 20 AND IS
        4279. * VALID ONLY WITH OP=AM AND OP=RM.
        4280. * 11. *LS* IS VALID ONLY WITH OP=RM.
        4281. * 12. *SM* MUST BE IN A TO M RANGE.
        4282. * 13. *ON* OR *OF* CAN BE SPECIFIED ONLY FOR OP=IB.
        4283. * 14. *YF* AND *ZF* MUST BOTH BE SPECIFIED IF
        4284. * EITHER IS SPECIFIED.
        4285. * 15. *YF* AND *ZF* CAN BE SPECIFIED ONLY IF BOTH
        4286. * *YI* AND *ZI* ARE SPECIFIED.
        4287. * 16. *YI* AND *YF* MUST BE BETWEEN 0 TO 21.
        4288. * 17. *ZI* AND *ZF* MUST BE BETWEEN 0 TO 15.
        4289. * 18. *YF* MUST BE GREATER THAN OR EQUAL TO
        4290. * *YI* IF BOTH ARE SPECIFIED.
        4291. * 19. *ZF* MUST BE GREATER THAN OR EQUAL TO
        4292. * *ZI* IF BOTH ARE SPECIFIED.
        4293. * 20. *SB* MUST BE FROM 0 TO 7.
        4294. * 21. *B* IS VALID ONLY WITH OP=AB. IT MUST
        4295. * 22. *CC* PARAMETER IS VALID ONLY WITH *AM*, MAY
        4296. * NOT BE USED WITH ANY OTHER OPTIONS, AND CAN
        4297. * ONLY BE EQUAL TO 0 OR 15.
        4298. * BE BETWEEN 0 AND 1931.
        4299. * ANY VIOLATION OF THE VALID OPTIONS CAUSES A
        4300. * MESSAGE TO BE PRINTED ON THE REPORT FILE AND
        4301. * IN THE DAYFILE AND AN ERROR STATUS IS RETURNED
        4302. * TO THE CALLING PROCEDURE. PROC *LBERR* DOES
        4303. * ALL THE ERROR PROCESSING.
        4304. #
        4305.  
        4306. ITEM ERRFLAG I; # ERROR STATUS #
        4307.  
        4308. #
        4309. **** PROC LBOPT - XREF LIST BEGIN.
        4310. #
        4311.  
        4312. XREF
        4313. BEGIN
        4314. PROC LBERR; # SSLABEL ERROR PROCESSOR #
        4315. END
        4316.  
        4317. #
        4318. **** PROC LBOPT - XREF LIST END.
        4319. #
        4320.  
        4321. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        4322. *CALL COMBFAS
        4323. *CALL COMTERR
        4324. *CALL COMTLAB
        4325. *CALL COMTLBP
        4326.  
        4327. ITEM FOUND B; # SEARCH FLAG #
        4328. ITEM I I; # LOOP VARIABLE #
        4329.  
        4330. CONTROL EJECT;
        4331.  
        4332. ERRFLAG = 0;
        4333.  
        4334. #
        4335. * TEST SSLABEL DIRECTIVE OPTIONS AND CALL LBERR WITH APPROPRIATE
        4336. * ERROR CODE IF ERRORS ARE FOUND.
        4337. * CHECK FOR A LEGAL DIRECTIVE NAME.
        4338. #
        4339.  
        4340. FOUND = FALSE;
        4341. SLOWFOR I = 0 STEP 1 UNTIL 9
        4342. DO
        4343. BEGIN
        4344. IF LBARG$OP[0] EQ DIR$NM[I]
        4345. THEN
        4346. BEGIN
        4347. FOUND = TRUE; # LEGAL DIRECTIVE NAME #
        4348. END
        4349.  
        4350. END
        4351.  
        4352. IF NOT FOUND
        4353. THEN
        4354. BEGIN
        4355. ERRCODE = S"ILL$DIRCTV"; # "ILLEGAL DIRECTIVE" #
        4356. LBERR(ERRCODE);
        4357. ERRFLAG = 1;
        4358. RETURN;
        4359. END
        4360.  
        4361. #
        4362. * CHECK IF *N* HAS A LEGAL VALUE.
        4363. #
        4364.  
        4365. IF LBARG$N[0] LS 1 OR LBARG$N[0] GR 100
        4366. THEN
        4367. BEGIN
        4368. ERRCODE = S"ILL$N"; # "ILLEGAL N" #
        4369. LBERR(ERRCODE);
        4370. ERRFLAG = 1;
        4371. RETURN;
        4372. END
        4373.  
        4374. #
        4375. * CHECK FOR A LEGAL VALUE OF *PK*.
        4376. #
        4377.  
        4378. IF LBARG$PK[0] NQ "P" ##
        4379. AND LBARG$PK[0] NQ "D" ##
        4380. AND LBARG$PK[0] NQ "F" ##
        4381. AND LBARG$PK[0] NQ "R" ##
        4382. AND LBARG$PK[0] NQ 0
        4383. THEN
        4384. BEGIN
        4385. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4386. LBERR(ERRCODE);
        4387. ERRFLAG = 1;
        4388. RETURN;
        4389. END
        4390.  
        4391. #
        4392. * CHECK FOR A LEGAL VALUE FOR *PT*.
        4393. #
        4394.  
        4395. IF LBARG$PT[0] NQ "P" ##
        4396. AND LBARG$PT[0] NQ "D" ##
        4397. AND LBARG$PT[0] NQ "F" ##
        4398. AND LBARG$PT[0] NQ "R"
        4399. THEN
        4400. BEGIN
        4401. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4402. LBERR(ERRCODE);
        4403. ERRFLAG = 1;
        4404. RETURN;
        4405. END
        4406.  
        4407. #
        4408. * CHECK IF *CN* IS SPECIFIED CORRECTLY.
        4409. #
        4410.  
        4411. IF LBARG$C[0] NQ 0 ##
        4412. AND (LBARG$OP[0] EQ "AS" OR LBARG$OP[0] EQ "RS" OR LBARG$OP[0]
        4413. EQ "AB" ##
        4414. OR LBARG$OP[0] EQ "RB")
        4415. THEN
        4416. BEGIN
        4417. ERRCODE = S"CSN$VIOL"; # "VSN OPTION VIOLATED" #
        4418. LBERR(ERRCODE);
        4419. ERRFLAG = 1;
        4420. RETURN;
        4421. END
        4422.  
        4423. #
        4424. * CHECK IF *CM* PARAMETER IS SPECIFIED CORRECTLY.
        4425. #
        4426.  
        4427. IF (LBARG$CM[0] NQ IBMCART ##
        4428. AND LBARG$C[0] NQ 0) ##
        4429. OR LBARG$CM[0] NQ IBMCART
        4430. THEN
        4431. BEGIN
        4432. ERRCODE = S"CSN$VIOL"; # *CSN* OPTION VIOLATED #
        4433. LBERR(ERRCODE);
        4434. ERRFLAG = 1;
        4435. RETURN;
        4436. END
        4437.  
        4438. #
        4439. * CHECK *N* OR *PK* IS SPECIFIED WHEN
        4440. * *V* IS SPECIFIED.
        4441. #
        4442.  
        4443. IF LBARG$C[0] NQ 0 ##
        4444. AND (LBARG$N[0] NQ 1 ##
        4445. OR LBARG$PK[0] NQ 0)
        4446. THEN
        4447. BEGIN
        4448. ERRCODE = S"CSN$VIOL"; # "VSN OPTION VIOLATED" #
        4449. LBERR(ERRCODE);
        4450. ERRFLAG = 1;
        4451. RETURN;
        4452. END
        4453.  
        4454. #
        4455. * CHECK IF *PT* IS SPECIFIED TO BE *P*
        4456. * WHEN *V* IS SPECIFIED FOR *AM*.
        4457. #
        4458.  
        4459. IF LBARG$C[0] NQ 0 ##
        4460. AND LBARG$OP[0] EQ "AM" ##
        4461. AND LBARG$PT[0] EQ "P"
        4462. THEN
        4463. BEGIN
        4464. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4465. LBERR(ERRCODE);
        4466. ERRFLAG = 1;
        4467. RETURN;
        4468. END
        4469.  
        4470. #
        4471. * CHECK IF *PK* AND *PT* ARE SPECIFIED
        4472. * CORRECTLY FOR *AM*.
        4473. #
        4474.  
        4475. IF LBARG$OP[0] EQ "AM" ##
        4476. AND LBARG$CC[0] EQ -1 AND ((LBARG$PK[0] NQ 0 ##
        4477. AND LBARG$PK[0] NQ "D" ##
        4478. AND LBARG$PK[0] NQ "P") ##
        4479. OR (LBARG$PT[0] NQ "P" ##
        4480. AND LBARG$PT[0] NQ "F"))
        4481. THEN
        4482. BEGIN
        4483. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4484. LBERR(ERRCODE);
        4485. ERRFLAG = 1;
        4486. RETURN;
        4487. END
        4488.  
        4489. #
        4490. * CHECK IF *PK* AND *PT* ARE SPECIFIED
        4491. * CORRECTLY FOR *RM*.
        4492. #
        4493.  
        4494. IF LBARG$OP[0] EQ "RM" ##
        4495. AND ((LBARG$PK[0] NQ 0 ##
        4496. AND LBARG$PK[0] NQ "P" ##
        4497. AND LBARG$PK[0] NQ "F") ##
        4498. OR (LBARG$PT[0] NQ "D" ##
        4499. AND LBARG$PT[0] NQ "P"))
        4500. THEN
        4501. BEGIN
        4502. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4503. LBERR(ERRCODE);
        4504. ERRFLAG = 1;
        4505. RETURN;
        4506. END
        4507.  
        4508. #
        4509. * CHECK IF *PK* IS SPECIFIED CORRECTLY
        4510. * FOR *RB*.
        4511. #
        4512.  
        4513. IF LBARG$OP[0] EQ "RB" ##
        4514. AND (LBARG$PK[0] NQ "P" ##
        4515. AND LBARG$PK[0] NQ "F" ##
        4516. AND LBARG$PK[0] NQ "R")
        4517. THEN
        4518. BEGIN
        4519. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4520. LBERR(ERRCODE);
        4521. ERRFLAG = 1;
        4522. RETURN;
        4523. END
        4524.  
        4525. #
        4526. * CHECK IF *PK* AND *PT* ARE BOTH SPECIFIED
        4527. * TO BE *P* FOR *AM* OR *RM*.
        4528. #
        4529.  
        4530. IF (LBARG$PK[0] EQ "P" ##
        4531. AND LBARG$PT[0] EQ "P") ##
        4532. AND LBARG$CC[0] EQ -1 ##
        4533. AND (LBARG$OP[0] EQ "AM" ##
        4534. OR LBARG$OP[0] EQ "RM")
        4535. THEN
        4536. BEGIN
        4537. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4538. LBERR(ERRCODE);
        4539. ERRFLAG = 1;
        4540. RETURN;
        4541. END
        4542.  
        4543. #
        4544. * CHECK IF *PT* IS SPECIFIED CORRECTLY FOR *AB*.
        4545. #
        4546.  
        4547. IF LBARG$OP[0] EQ "AB" ##
        4548. AND ((LBARG$PT[0] EQ "D") ##
        4549. OR (LBARG$N[0] NQ 1 ##
        4550. AND LBARG$PT[0] EQ "R"))
        4551. THEN
        4552. BEGIN
        4553. ERRCODE = S"PK$PT$VIOL"; # "PK,PT OPTION VIOLATED" #
        4554. LBERR(ERRCODE);
        4555. ERRFLAG = 1;
        4556. RETURN;
        4557. END
        4558.  
        4559. #
        4560. * CHECK IF *YI*, *ZI* OPTION IS SELECTED FOR *AB*.
        4561. #
        4562.  
        4563. IF LBARG$OP[0] EQ "AB" ##
        4564. AND LBARG$PT[0] EQ "R" ##
        4565. AND LBARG$YI[0] EQ -1 ##
        4566. AND LBARG$ZI[0] EQ -1
        4567. THEN
        4568. BEGIN
        4569. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4570. LBERR(ERRCODE);
        4571. ERRFLAG = 1;
        4572. RETURN;
        4573. END
        4574.  
        4575. #
        4576. * CHECK IF *YI*, *ZI* OPTION IS IMPROPERLY USED FOR *AM*.
        4577. #
        4578.  
        4579. IF LBARG$OP[0] EQ "AM" ##
        4580. AND (LBARG$YI[0] NQ -1 ##
        4581. OR LBARG$ZI[0] NQ -1) ##
        4582. AND LBARG$CC[0] EQ -1
        4583. THEN
        4584. BEGIN
        4585. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4586. LBERR(ERRCODE);
        4587. ERRFLAG = 1;
        4588. RETURN;
        4589. END
        4590.  
        4591.  
        4592. #
        4593. * CHECK IF *LOST OPTION* IS SPECIFIED CORRECTLY.
        4594. #
        4595.  
        4596. IF LBARG$LT[0] NQ 0 ##
        4597. AND (LBARG$OP[0] NQ "RM" ##
        4598. OR LBARG$C[0] EQ 0) ##
        4599. THEN
        4600. BEGIN
        4601. ERRCODE = S"LT$VIOL"; # "LT OPTION VIOLATED" #
        4602. LBERR(ERRCODE);
        4603. ERRFLAG = 1;
        4604. RETURN;
        4605. END
        4606.  
        4607. #
        4608. * CHECK IF GROUP NUMBER IS LEGAL.
        4609. #
        4610.  
        4611. IF ((LBARG$GR[0] GQ 0) ##
        4612. AND ((LBARG$OP[0] EQ "AS") ##
        4613. OR (LBARG$OP[0] EQ "AB") ##
        4614. OR (LBARG$OP[0] EQ "RS") ##
        4615. OR (LBARG$OP[0] EQ "RB") ##
        4616. OR (LBARG$OP[0] EQ "FX") ##
        4617. OR (LBARG$OP[0] EQ "RC") ##
        4618. OR (LBARG$OP[0] EQ "IB")))
        4619. THEN # INCORRECT USE OF GROUP #
        4620. BEGIN
        4621. ERRCODE = S"GR$INCORR";
        4622. LBERR(ERRCODE);
        4623. ERRFLAG = 1;
        4624. RETURN;
        4625. END
        4626.  
        4627. IF LBARG$GR[0] GR 20
        4628. OR LBARG$GR[0] EQ 0
        4629. THEN # GROUP OUT OF RANGE #
        4630. BEGIN
        4631. ERRCODE = S"GR$RANGE";
        4632. LBERR(ERRCODE);
        4633. ERRFLAG = 1;
        4634. RETURN;
        4635. END
        4636.  
        4637.  
        4638. #
        4639. * CHECK IF *PT* IS *P* AND *OP* IS *AM* WITH *GR* SPECIFIED.
        4640. #
        4641.  
        4642. IF LBARG$GR[0] GQ 0 AND LBARG$OP[0] EQ "AM" AND LBARG$PT[0] EQ "P
        4643. "
        4644. THEN
        4645. BEGIN
        4646. ERRCODE = S"GR$INCORR";
        4647. LBERR(ERRCODE);
        4648. ERRFLAG = 1;
        4649. RETURN;
        4650. END
        4651.  
        4652.  
        4653. #
        4654. * CHECK IF *CN* IS SPECIFIED FOR *IB* AND *FX*.
        4655. #
        4656.  
        4657. IF (LBARG$OP[0] EQ "IB" ##
        4658. OR LBARG$OP[0] EQ "FX") ##
        4659. AND LBARG$C[0] EQ 0
        4660. THEN
        4661. BEGIN
        4662. ERRCODE = S"CSN$VIOL"; # VSN OPTION VIOLATED #
        4663. LBERR(ERRCODE);
        4664. ERRFLAG = 1;
        4665. RETURN;
        4666. END
        4667.  
        4668. #
        4669. * CHECK IF *ON* OR *OF* IS SPECIFIED
        4670. * FOR ANY DIRECTIVE OTHER THAN *IB* OR *FC*.
        4671. #
        4672.  
        4673. IF (LBARG$OP[0] NQ "IB" AND LBARG$OP[0] NQ "FC") ##
        4674. AND(LBARG$ON[0] NQ 0 OR LBARG$OF[0] NQ 0)
        4675. THEN
        4676. BEGIN
        4677. ERRCODE = S"ON$OF$VIOL"; # "ON,OFF NOT SPECIFIED CORRECTLY"
        4678.   #
        4679. LBERR(ERRCODE);
        4680. ERRFLAG = 1;
        4681. RETURN;
        4682. END
        4683.  
        4684. #
        4685. * CHECK IF *ON* OR *OF* ARE SPECIFIED
        4686. * CORRECTLY FOR *IB* OR *FC*:
        4687. #
        4688.  
        4689. IF (LBARG$OP[0] EQ "IB" OR LBARG$OP[0] EQ "FC") ##
        4690. AND ((LBARG$ON[0] EQ 0 ##
        4691. AND LBARG$OF[0] EQ 0) ##
        4692. OR (LBARG$ON[0] NQ 0 ##
        4693. AND LBARG$OF[0] NQ 0))
        4694. THEN
        4695. BEGIN
        4696. ERRCODE = S"ON$OF$VIOL"; # "ON,OFF NOT SPECIFIED CORRECTLY"
        4697.   #
        4698. LBERR(ERRCODE);
        4699. ERRFLAG = 1;
        4700. RETURN;
        4701. END
        4702.  
        4703. #
        4704. * CHECK FOR A LEGAL VALUE FOR *CS*.
        4705. #
        4706.  
        4707. IF LBARG$SM[0] GR "H" ##
        4708. OR LBARG$SM[0] LS "A" ##
        4709. OR LBARG$ZSM[0] NQ 0
        4710. THEN
        4711. BEGIN
        4712. ERRCODE = S"ILL$SM"; # "ILLEGAL *SM* NUMBER" #
        4713. LBERR(ERRCODE);
        4714. ERRFLAG = 1;
        4715. RETURN;
        4716. END
        4717.  
        4718. #
        4719. * CHECK THE VALUE OF YS AND ZS.
        4720. #
        4721.  
        4722. IF LBARG$YI[0] GR MAX$Y ##
        4723. OR LBARG$YF[0] GR MAX$Y ##
        4724. OR LBARG$ZI[0] GR MAX$Z ##
        4725. OR LBARG$ZI[0] EQ Z$NO$CUBE ##
        4726. OR LBARG$ZF[0] GR MAX$Z ##
        4727. OR LBARG$ZF[0] EQ Z$NO$CUBE
        4728. THEN
        4729. BEGIN
        4730. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4731. LBERR(ERRCODE);
        4732. ERRFLAG = 1;
        4733. RETURN;
        4734. END
        4735.  
        4736. #
        4737. * CHECK IF *YI*, *ZI*, *YF* AND *ZF* ARE SPECIFIED
        4738. * CORRECTLY.
        4739. #
        4740.  
        4741. IF (LBARG$YI[0] EQ -1 ##
        4742. AND LBARG$YF[0] GR 0) ##
        4743. OR (LBARG$ZI[0] EQ -1 ##
        4744. AND LBARG$ZF[0] GR 0)
        4745. THEN
        4746. BEGIN
        4747. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4748. LBERR(ERRCODE);
        4749. ERRFLAG = 1;
        4750. RETURN;
        4751. END
        4752.  
        4753. #
        4754. * CHECK IF *N* IS SPECIFIED ALONG WITH
        4755. * *YI* OR *ZI*.
        4756. #
        4757.  
        4758. IF (LBARG$YI[0] GQ 0 OR LBARG$ZI[0] GQ 0) AND LBARG$N[0] GR 1
        4759. THEN
        4760. BEGIN
        4761. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4762. LBERR(ERRCODE);
        4763. ERRFLAG = 1;
        4764. RETURN;
        4765. END
        4766.  
        4767. #
        4768. * CHECK IF *YF* AND *ZF* ARE NOT
        4769. * SPECIFIED TOGETHER.
        4770. #
        4771.  
        4772. IF (LBARG$YF[0] GQ 0 ##
        4773. AND LBARG$ZF[0] EQ -1) ##
        4774. OR (LBARG$YF[0] EQ -1 AND LBARG$ZF[0] GQ 0)
        4775. THEN
        4776. BEGIN
        4777. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4778. LBERR(ERRCODE);
        4779. ERRFLAG = 1;
        4780. RETURN;
        4781. END
        4782.  
        4783. #
        4784. * CHECK IF *YF* IS GREATER THAN OR EQUAL
        4785. * TO *YI* WHEN BOTH ARE SPECIFIED.
        4786. #
        4787.  
        4788. IF ((LBARG$YI[0] NQ -1) ##
        4789. AND (LBARG$YF[0] NQ -1)) ##
        4790. AND (LBARG$YF[0] LS LBARG$YI[0])
        4791. THEN
        4792. BEGIN
        4793. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4794. LBERR(ERRCODE);
        4795. ERRFLAG = 1;
        4796. RETURN;
        4797. END
        4798.  
        4799. #
        4800. * CHECK IF *ZF* IS GREATER THAN OR EQUAL
        4801. * TO *ZI* WHEN BOTH ARE SPECIFIED.
        4802. #
        4803.  
        4804. IF ((LBARG$ZI[0] NQ -1) ##
        4805. AND (LBARG$ZF[0] NQ -1) ) ##
        4806. AND (LBARG$ZF[0] LS LBARG$ZI[0])
        4807. THEN
        4808. BEGIN
        4809. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4810. LBERR(ERRCODE);
        4811. ERRFLAG = 1;
        4812. RETURN;
        4813. END
        4814.  
        4815.  
        4816. #
        4817. * CHECK IF *YI* AND *ZI* SPECIFY NON-EXISTANT CUBES WHILE
        4818. * *YF* AND *ZF* ARE NOT SPECIFIED.
        4819. #
        4820.  
        4821. IF (LBARG$YF[0] EQ -1 AND LBARG$ZF[0] EQ -1)
        4822. AND LBARG$CC[0] EQ -1
        4823. THEN # SINGLE CUBE SPECIFIED #
        4824. BEGIN
        4825. IF (LBARG$ZI[0] EQ Z$NO$CUBE) ##
        4826. OR ((LBARG$ZI[0] EQ 0) ##
        4827. AND ((LBARG$YI[0] EQ 0) ##
        4828. OR (LBARG$YI[0] EQ 11) ##
        4829. OR (LBARG$YI[0] EQ 12) ##
        4830. OR (LBARG$YI[0] EQ 13) ##
        4831. OR (LBARG$YI[0] EQ 14) ##
        4832. OR (LBARG$YI[0] EQ 15))) ##
        4833. OR ((LBARG$ZI[0] EQ 1) ##
        4834. AND ((LBARG$YI[0] EQ 11) ##
        4835. OR (LBARG$YI[0] EQ 12) ##
        4836. OR (LBARG$YI[0] EQ 13) ##
        4837. OR (LBARG$YI[0] EQ 14) ##
        4838. OR (LBARG$YI[0] EQ 15))) ##
        4839. OR ((LBARG$ZI[0] EQ 15) ##
        4840. AND ((LBARG$YI[0] EQ 0) ##
        4841. OR (LBARG$YI[0] EQ 11) ##
        4842. OR (LBARG$YI[0] EQ 21))) ##
        4843. THEN # IGNORE NON-EXISTANT CUBE #
        4844. BEGIN
        4845. ERRCODE = S"YZ$VIOL"; # "Y,Z OPTION VIOLATED" #
        4846. LBERR(ERRCODE);
        4847. ERRFLAG =1;
        4848. RETURN;
        4849. END
        4850.  
        4851. END
        4852.  
        4853.  
        4854. #
        4855. * CHECK FOR A LEGAL VALUE FOR *SB*.
        4856. #
        4857.  
        4858. IF LBARG$SB[0] LS 0 OR LBARG$SB[0] GR 7
        4859. THEN
        4860. BEGIN
        4861. ERRCODE = S"ILL$SB"; # "ILLEGAL SUBFAMILY" #
        4862. LBERR(ERRCODE);
        4863. ERRFLAG = 1;
        4864. END
        4865.  
        4866. #
        4867. * CHECK FOR LEGAL VALUE OF *CC*.
        4868. #
        4869.  
        4870. IF (LBARG$CC[0] NQ -1 AND LBARG$OP NQ "AM") OR (LBARG$CC[0] NQ 0
        4871. AND LBARG$CC[0] NQ 15 AND LBARG$CC[0] NQ -1)
        4872. THEN
        4873. BEGIN
        4874. ERRCODE = S"ILL$DIRCTV";
        4875. LBERR(ERRCODE);
        4876. ERRFLAG = 1;
        4877. RETURN;
        4878. END
        4879.  
        4880. #
        4881. * CHECK FOR LEGAL *B* VALUE.
        4882. #
        4883.  
        4884. IF (LBARG$B[0] LS 0) OR (LBARG$B[0] GR 1931) ##
        4885. OR ((LBARG$B[0] NQ 600) ##
        4886. AND (LBARG$OP[0] NQ "AM"))
        4887. THEN # *B* INCORRECT #
        4888. BEGIN
        4889. ERRCODE = S"B$INCORR";
        4890. LBERR(ERRCODE);
        4891. ERRFLAG = 1;
        4892. RETURN;
        4893. END
        4894.  
        4895.  
        4896. RETURN; # RETURN ERRFLAG = NO ERROR #
        4897.  
        4898. END # LBOPT #
        4899.  
        4900. TERM
        4901. PROC LBRESP((RESP$CODE),(CALLTYP));
        4902. # TITLE LBRESP - ACTS UPON RESPONSE CODES FROM EXEC. #
        4903.  
        4904. BEGIN # LBRESP #
        4905.  
        4906. #
        4907. ** LBRESP - ACTS UPON RESPONSE CODES FROM EXEC.
        4908. *
        4909. * THIS PROC CHECKS THE RESPONSE CODE RETURNED BY EXEC
        4910. * AND CALLS *LBERR* WITH THE APPROPRIATE ERROR CODE IF
        4911. * ANY ERROR OCCURRED.
        4912. *
        4913. * PROC LBRESP((RESP$CODE),(CALLTYP))
        4914. *
        4915. * ENTRY RESP$CODE, CODE RETURNED BY EXEC IN RESPONSE
        4916. * TO A UCP REQUEST, OR BY A CATALOG/MAP
        4917. * ACCESS ROUTINE.
        4918. * CALLTYP, TYPE OF CALL.
        4919. * 0 - CATALOG/MAP ACCESS.
        4920. * 3 - TYPE 3 UCP REQUEST.
        4921. * 4 - TYPE 4 UCP REQUEST.
        4922. *
        4923. * EXIT PROC *LBERR* CALLED OR RETURN DIRECTLY TO CALLING PROC.
        4924. *
        4925. * MESSAGES SSLABEL ABNORMAL, LBRESP.
        4926. *
        4927. * NOTES PROC *LBRESP* CHECKS THE VALUE OF *RESP$CODE* AND CALLS
        4928. * *LBERR* WITH THE APPROPRIATE ERROR CODE IF ANY ERRORS
        4929. * ARE INDICATED.
        4930. #
        4931.  
        4932. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        4933. ITEM CALLTYP U; # TYPE OF CALL MADE #
        4934.  
        4935. #
        4936. **** PROC LBRESP - XREF LIST BEGIN.
        4937. #
        4938.  
        4939. XREF
        4940. BEGIN
        4941. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        4942. PROC MESSAGE; # DISPLAYS MESSAGES #
        4943. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        4944.   OR RETURN #
        4945. END
        4946.  
        4947. #
        4948. **** PROC LBRESP - XREF LIST END.
        4949. #
        4950.  
        4951. DEF PROCNAME #"LBRESP."#; # PROC NAME #
        4952.  
        4953. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        4954. *CALL COMBFAS
        4955. *CALL COMBCMS
        4956. *CALL COMBCPR
        4957. *CALL COMTERR
        4958. *CALL COMTLAB
        4959.  
        4960. #
        4961. * STATUS SWITCH FOR THE RESPONSE CODES
        4962. * RETURNED BY EXEC IN RESPONSE TO TYPE 3
        4963. * CALLSS REQUEST.
        4964. #
        4965.  
        4966. SWITCH RESP$ACT3:RESPTYP3 # ACTION ON RESPONSE TO TYPE 3
        4967.   REQUEST #
        4968. OK3$ACT:OK3, # REQUEST PROCESSED #
        4969. INTLCK$ACT:C$M$INTLCK, # CATALOG/MAP INTERLOCKED #
        4970. NOPEN$ACT:C$M$NOPEN, # CATALOG/MAP NOT OPEN #
        4971. SUBEX$ACT:SUB$CAT$EX, # SUB CATALOG ALREADY EXISTS #
        4972. NOSUB$ACT:NO$SUB$CAT, # NO SUCH SUBCATALOG #
        4973. PFPROB$ACT: PF$PROB; # PERMANENT FILE PROBLEM #
        4974.  
        4975. #
        4976. * STATUS SWITCH FOR THE RESPONSE RETURNED BY
        4977. * EXEC TO A TYPE 4 CALLSS REQUEST. ONLY THE
        4978. * APPLICABLE RESPONSE CODES ARE LISTED HERE.
        4979. #
        4980.  
        4981. SWITCH RESP$ACT4:RESPTYP4 # ACTION ON RESPONSE TO TYPE 4
        4982.   REQUEST #
        4983. OK4$ACT:OK4, # REQUEST PROCESSED #
        4984. CLBERR$ACT:CART$LB$ERR, # CARTRIDGE LABEL ERROR #
        4985. CUSERR$ACT:CSN$IN$USE, # CARTRIDGE IN USE #
        4986. SMOFF$ACT:SMA$OFF, # STORAGE MODULE OFF #
        4987. CEMERR$ACT:CELL$EMP,
        4988. CFLERR$ACT:CELL$FULL,
        4989. UNKERR$ACT:UNK$CART, # UNKNOWN LABEL ERROR #
        4990. URDERR$ACT:UN$RD$ERR, # UNRECOVERABLE READ ERROR #
        4991. UWTERR$ACT:UN$WRT$ERR, # UNRECOVERABLE WRITE ERROR #
        4992. MHDERR$ACT:M86$HDW$PR; # M86 HARDWARE PROBLEM #
        4993.  
        4994. CONTROL EJECT;
        4995.  
        4996. #
        4997. * DO PROCESSING APPROPRIATE TO TYPE OF RESPONSE CODE.
        4998. #
        4999.  
        5000. IF CALLTYP EQ TYP"TYP3"
        5001. THEN # TYPE 3 UCP REQUEST #
        5002. BEGIN
        5003. GOTO RESP$ACT3[RESP$CODE];
        5004. END
        5005.  
        5006. IF CALLTYP EQ TYP"TYP4"
        5007. THEN # TYPE 4 UCP REQUEST #
        5008. BEGIN
        5009. GOTO RESP$ACT4[RESP$CODE];
        5010. END
        5011.  
        5012. IF CALLTYP NQ 0
        5013. THEN # ILLEGAL CALL TYPE #
        5014. BEGIN
        5015. LBMSG$PROC[0] = PROCNAME;
        5016. MESSAGE(LBMSG[0],SYSUDF1);
        5017. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        5018. END
        5019.  
        5020. #
        5021. * ERROR PROCESSING FOR CATALOG/MAP ACCESS.
        5022. #
        5023.  
        5024. IF RESP$CODE EQ CMASTAT"INTLK"
        5025. THEN # CATALOG/MAP INTERLOCKED #
        5026. BEGIN
        5027. ERRCODE = S"CAT$MAP$LK";
        5028. LBERR(ERRCODE);
        5029. RETURN;
        5030. END
        5031.  
        5032. IF RESP$CODE EQ CMASTAT"ATTERR"
        5033. THEN # PROCESS ATTACH ERROR #
        5034. BEGIN
        5035. ERRCODE = S"PF$PROB";
        5036. LBERR(ERRCODE);
        5037. RETURN;
        5038. END
        5039.  
        5040. IF RESP$CODE EQ CMASTAT"NOSUBCAT"
        5041. THEN # NO SUCH SUBCATALOG #
        5042. BEGIN
        5043. ERRCODE = S"NO$CAT$MAP";
        5044. LBERR(ERRCODE);
        5045. RETURN;
        5046. END
        5047.  
        5048. IF RESP$CODE NQ CMASTAT"NOERR" AND RESP$CODE NQ CMASTAT"FOPEN"
        5049. THEN # ERROR OTHER THAN *CATALOG
        5050.   ALREADY OPEN* #
        5051. BEGIN
        5052. LBMSG$PROC[0] = PROCNAME;
        5053. MESSAGE(LBMSG[0],SYSUDF1);
        5054. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        5055. END
        5056.  
        5057. #
        5058. * ERROR PROCESSING FOR TYPE 3 REQUESTS TO EXEC.
        5059. #
        5060.  
        5061. OK3$ACT: # NO ERROR #
        5062. RETURN;
        5063.  
        5064. INTLCK$ACT: # CATALOG/MAP INTERLOCKED #
        5065. ERRCODE = S"CAT$MAP$LK";
        5066. LBERR(ERRCODE);
        5067. RETURN;
        5068.  
        5069. NOPEN$ACT: # CATALOG/MAP NOT OPEN #
        5070. ERRCODE = S"NOT$OPEN";
        5071. LBERR(ERRCODE);
        5072. RETURN;
        5073.  
        5074. SUBEX$ACT: # SUB CATALOG ALREADY EXISTS #
        5075. ERRCODE = S"SM$DEFND";
        5076. LBERR(ERRCODE);
        5077. RETURN;
        5078.  
        5079. NOSUB$ACT: # NO SUCH SUBCATALOG #
        5080. ERRCODE = S"NO$CAT$MAP";
        5081. LBERR(ERRCODE);
        5082. RETURN;
        5083.  
        5084. PFPROB$ACT: # PERMANENT FILE PROBLEM #
        5085. ERRCODE = S"PF$PROB";
        5086. LBERR(ERRCODE);
        5087. RETURN;
        5088.  
        5089. #
        5090. * ERROR PROCESSING FOR TYPE 4 REQUESTS TO EXEC.
        5091. #
        5092.  
        5093. OK4$ACT: # NO ERRORS #
        5094. RETURN;
        5095.  
        5096. CLBERR$ACT: # CARTRIDGE LABEL ERROR #
        5097.  
        5098. ERRCODE = S"LAB$ERR";
        5099. LBERR(ERRCODE);
        5100. RETURN;
        5101.  
        5102.  
        5103. CUSERR$ACT:
        5104.  
        5105. ERRCODE = S"CAR$IN$USE";
        5106. LBERR(ERRCODE);
        5107. RETURN;
        5108.  
        5109.  
        5110. CEMERR$ACT: # CARTRIDGE NOT FOUND #
        5111.  
        5112. ERRCODE = S"CR$NOTFND";
        5113. LBERR(ERRCODE);
        5114. RETURN;
        5115.  
        5116. CFLERR$ACT: # CELL IS FULL #
        5117.  
        5118. ERRCODE = S"CELL$FULL";
        5119. LBERR(ERRCODE);
        5120. RETURN;
        5121.  
        5122.  
        5123. UNKERR$ACT: # UNKNOWN LABEL ERROR #
        5124.  
        5125. ERRCODE = S"LAB$ERR";
        5126. LBERR(ERRCODE);
        5127. RETURN;
        5128.  
        5129.  
        5130. URDERR$ACT: # UNRECOVERABLE READ ERROR #
        5131. ERRCODE = S"UNRECV$RD";
        5132. LBERR(ERRCODE);
        5133. RETURN;
        5134.  
        5135. UWTERR$ACT: # UNRECOVERABLE WRITE ERROR #
        5136. ERRCODE = S"UNRECV$WRT";
        5137. LBERR(ERRCODE);
        5138. RETURN;
        5139.  
        5140. MHDERR$ACT: # MSF HARDWARE PROBLEM #
        5141. ERRCODE = S"M86$HARDWR";
        5142. LBERR(ERRCODE);
        5143. RETURN;
        5144. SMOFF$ACT:
        5145.  
        5146. ERRCODE = S"SM$OFF";
        5147. LBERR(ERRCODE);
        5148. RETURN;
        5149.  
        5150.  
        5151. END # LBRESP #
        5152.  
        5153. TERM
        5154. PROC LBRMCSU;
        5155. # TITLE LBRMCSU - REMOVE A *SM* FROM A FAMILY CATALOG. #
        5156.  
        5157. BEGIN # LBRMCSU #
        5158.  
        5159. #
        5160. ** LBRMCSU - REMOVE A *SM* FROM A FAMILY CATALOG.
        5161. *
        5162. * THIS PROC UPDATES THE CATALOG FOR A FAMILY TO REMOVE
        5163. * ASSIGNMENT OF A PARTICULAR CSU.
        5164. *
        5165. * PROC LBRMCSU.
        5166. *
        5167. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE
        5168. * PARAMETERS SET UP IN COMMON AREA DEFINED
        5169. * IN *COMTLBP*.
        5170. *
        5171. * EXIT *SM* REMOVED FROM FAMILY OR ERROR CONDITION.
        5172. *
        5173. * NOTES PROC *LBRMCSU* SEARCHES THE SMMAP FOR THE *SM*
        5174. * SPECIFIED TO VERIFY THAT NO CUBES ARE ASSIGNED
        5175. * TO THE FAMILY. A REQUEST IS THEN SENT TO EXEC
        5176. * TO UPDATE THE CATALOG TO REFLECT THE REMOVAL OF
        5177. * THE *SM*.
        5178. #
        5179.  
        5180. #
        5181. **** PROC LBRMCSU - XREF LIST BEGIN.
        5182. #
        5183.  
        5184. XREF
        5185. BEGIN
        5186. PROC CALL3; # ISSUES TYPE 3 CALLSS TO EXEC #
        5187. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        5188. PROC LBRESP; # PROCESSES RESPONSE FROM EXEC #
        5189. PROC SERCSU; # SEARCHES THE SMMAP #
        5190. END
        5191.  
        5192. #
        5193. **** PROC LBRMCSU - XREF LIST END.
        5194. #
        5195.  
        5196. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        5197. *CALL COMBFAS
        5198. *CALL COMBCPR
        5199. *CALL COMTERR
        5200. *CALL COMTLAB
        5201. *CALL COMTLBP
        5202.  
        5203. ITEM FLAG I; # ERROR FLAG #
        5204. ITEM REQCODE U; # REQUEST CODE #
        5205. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        5206. ITEM SERTYPE S:SERCH$TYPE; # SMMAP SEARCH TYPE #
        5207.  
        5208.  
        5209. ARRAY PK$CSU$ENT [0:0] P(4); # *PICK* SMMAP ENTRY #
        5210. BEGIN
        5211. ITEM PK$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        5212. ITEM PK$Y U(03,00,30); # Y COORDINATE #
        5213. ITEM PK$Z U(03,30,30); # Z COORDINATE #
        5214. END
        5215.  
        5216.  
        5217. CONTROL EJECT;
        5218.  
        5219. #
        5220. * SEARCH SMMAP FOR CUBES ASSIGNED TO FAMILY AND UPDATE CATALOG.
        5221. #
        5222.  
        5223. SERTYPE = S"ASGN$FAM";
        5224. SERCSU(SERTYPE,0,0,0,0,LBARG$FM[0],LBARG$SB[0], PK$CSU$ENT[0],
        5225. FLAG);
        5226.  
        5227. IF FLAG EQ OK
        5228. THEN # ENTRY FOUND #
        5229. BEGIN
        5230. ERRCODE = S"CB$ASGN$SB";
        5231. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5232. RETURN;
        5233. END
        5234.  
        5235. REQCODE = REQTYP3"RMV$CSU";
        5236. CALL3(REQCODE,0,0,0,RESP$CODE); # REMOVE *SM* FROM FAMILY #
        5237. IF RESP$CODE NQ RESPTYP3"OK3"
        5238. THEN # PROCESS THE RESPONSE #
        5239. BEGIN
        5240. LBRESP(RESP$CODE,TYP"TYP3");
        5241. END
        5242.  
        5243. RETURN;
        5244.  
        5245. END # LBRMCSU #
        5246.  
        5247. TERM
        5248. PROC LBRMCUB;
        5249. # TITLE LBRMCUB - REMOVES CUBES FROM FAMILY/POOL/RESERVED AREA. #
        5250.  
        5251. BEGIN # LBRMCUB #
        5252.  
        5253. #
        5254. ** LBRMCUB - REMOVES CUBES FROM FAMILY/POOL/RESERVED AREA.
        5255. *
        5256. * THIS PROC REMOVES ASSIGNED CUBES FROM A FAMILY, POOL,
        5257. * OR RESERVED AREA OF THE CSU.
        5258. *
        5259. * PROC LBRMCUB.
        5260. *
        5261. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE
        5262. * PARAMETERS SET UP IN COMMON AREA DEFINED
        5263. * IN *COMTLBP*.
        5264. *
        5265. * EXIT SPECIFIED NUMBER OR LOCATIONS OF CUBES HAVE
        5266. * BEEN REMOVED, OR ERROR CONDITION.
        5267. *
        5268. * NOTES PROC *LBRMCUB* REMOVES CUBES FROM A FAMILY,
        5269. * POOL, OR RESERVED AREA BY CHANGING THEIR STATUS
        5270. * FROM *ASSIGNED* TO *UNASSIGNED*. IF THE *N*
        5271. * OPTION IS USED THE SMMAP IS SEARCHED FOR EMPTY
        5272. * CUBES WITH THE APPROPRIATE ASSIGNMENT. IF THE
        5273. * LOCATION OPTION IS USED, THE SMMAP IS CHECKED
        5274. * TO ENSURE THAT THE SPECIFIC CUBES ARE EMPTY AND
        5275. * ASSIGNED AS EXPECTED. A REQUEST IS THEN SENT
        5276. * TO EXEC TO REMOVE THE CUBES FROM ASSIGNMENT.
        5277. #
        5278.  
        5279. #
        5280. **** PROC LBRMCUB - XREF LIST BEGIN.
        5281. #
        5282.  
        5283. XREF
        5284. BEGIN
        5285. PROC CALL3; # ISSUES TYPE 3 CALLSS TO EXEC #
        5286. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        5287. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        5288. PROC MFLUSH; # FLUSHES MAP BUFFER #
        5289. PROC SERCSU; # SEARCHES THE SMMAP #
        5290. PROC SETCORD; # SETS UP Y AND Z COORDINATES #
        5291. END
        5292.  
        5293. #
        5294. **** PROC LBRMCUB - XREF LIST END.
        5295. #
        5296.  
        5297. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        5298. *CALL COMBFAS
        5299. *CALL COMBCPR
        5300. *CALL COMBMAP
        5301. *CALL COMTERR
        5302. *CALL COMTLAB
        5303. *CALL COMTLBP
        5304.  
        5305. ITEM FLAG I; # ERROR FLAG #
        5306. ITEM I I; # LOOP VARIABLE #
        5307. ITEM LOC$OPTION B; # TRUE IF *LOC* OPTION FALSE IF
        5308.   *N* OPTION #
        5309. ITEM REQCODE U; # RESPONSE CODE FROM EXEC #
        5310. ITEM RESP$CODE U; # RESPONSE CODE FROM EXEC #
        5311. ITEM SERTYPE S:SERCH$TYPE; # TYPE OF SEARCH THROUGH SMMAP #
        5312. ITEM SP$CODE U; # CODE FOR CUBE/CARTRIDGE
        5313.   ASSIGNMENT #
        5314. ITEM SP$FAM C(7); # SPECIFIED FAMILY NAME #
        5315. ITEM SP$SUB U; # SPECIFIED SUB FAMILY #
        5316. ITEM SP$VSN C(8); # SPECIFIED CARTRIDGE *CSND* #
        5317. ITEM SP$Y U; # Y COORDINATE #
        5318. ITEM SP$Z U; # Z COORDINATE #
        5319.  
        5320.  
        5321. ARRAY PK$CSU$ENT [0:0] P(4); # *PICK* SMMAP ENTRY #
        5322. BEGIN
        5323. ITEM PK$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        5324. ITEM PK$Y U(03,00,30); # Y COORDINATE #
        5325. ITEM PK$Z U(03,30,30); # Z COORDINATE #
        5326. END
        5327.  
        5328.  
        5329. CONTROL EJECT;
        5330.  
        5331. #
        5332. * CHECK FOR *N* OPTION OR *LOC* OPTION.
        5333. #
        5334.  
        5335. LOC$OPTION = FALSE;
        5336. IF LBARG$YI[0] NQ -1 OR LBARG$ZI[0] NQ -1
        5337. THEN # *LOC* OPTION SPECIFIED #
        5338. BEGIN
        5339. SETCORD; # BUILD Y,Z MATRIX #
        5340. LOC$OPTION = TRUE;
        5341. END
        5342.  
        5343. #
        5344. * PROCESS EACH OF THE *N* CUBES SPECIFIED.
        5345. #
        5346.  
        5347. SP$VSN = " ";
        5348. SP$FAM = " ";
        5349. SP$SUB = 0;
        5350. FASTFOR I = 1 STEP 1 UNTIL LBARG$N[0]
        5351. DO
        5352. BEGIN # PROCESS *N* CUBES #
        5353. IF NOT LOC$OPTION
        5354. THEN
        5355. BEGIN # *N* OPTION #
        5356. SERTYPE = S"ASSIGN"; # SEARCH FOR ASSIGNED CUBE #
        5357. IF LBARG$PK[0] EQ "F"
        5358. THEN # REMOVE CUBE FROM FAMILY #
        5359. BEGIN
        5360. SP$CODE = CUBSTAT"SUBFAM";
        5361. SP$FAM = LBARG$FM[0];
        5362. SP$SUB = LBARG$SB[0];
        5363. END
        5364.  
        5365. IF LBARG$PK[0] EQ "P"
        5366. THEN # REMOVE CUBE FROM POOL #
        5367. BEGIN
        5368. SP$CODE = CUBSTAT"SCRPOOL";
        5369. END
        5370.  
        5371. IF LBARG$PK[0] EQ "R"
        5372. THEN # REMOVE FROM RESERVED AREA #
        5373. BEGIN
        5374. SP$CODE = CUBSTAT"ALTCSU";
        5375. END
        5376.  
        5377. END # *N* OPTION #
        5378.  
        5379. ELSE
        5380. BEGIN # *LOC* OPTION #
        5381. SERTYPE = S"LOC"; # LOOK FOR SPECIFIC LOCATION #
        5382. SP$Y = Y$COORD[I];
        5383. SP$Z = Z$COORD[I];
        5384. END # *LOC* OPTION #
        5385.  
        5386. #
        5387. * SEARCH THE SMMAP FOR THE SPECIFIED ENTRY.
        5388. #
        5389.  
        5390. SERCSU(SERTYPE,SP$Y,SP$Z,SP$CODE,SP$VSN,SP$FAM,SP$SUB,
        5391. PK$CSU$ENT[0],FLAG);
        5392. IF FLAG NQ OK
        5393. THEN # NO EMPTY CUBES #
        5394. BEGIN
        5395. NUMDONE = I - 1;
        5396. ERRCODE = S"NO$EMPCB";
        5397. LBERR(ERRCODE);
        5398. RETURN;
        5399. END
        5400.  
        5401. #
        5402. * CHECK CUBE ASSIGNMENT.
        5403. #
        5404.  
        5405. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        5406. IF CM$CSND[0] NQ " "
        5407. THEN # CUBE NOT EMPTY #
        5408. BEGIN
        5409. NUMDONE = I - 1;
        5410. ERRCODE = S"CB$NOT$EMP";
        5411. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5412. RETURN;
        5413. END
        5414.  
        5415. IF LBARG$PK[0] EQ "F" ##
        5416. AND CM$CODE[0] EQ CUBSTAT"SUBFAM" ##
        5417. AND CM$FMLYNM[0] EQ LBARG$FM[0] ##
        5418. AND CM$SUB[0] EQ LBARG$SB[0]
        5419. THEN # REMOVE CUBE FROM FAMILY #
        5420. BEGIN
        5421. REQCODE = REQTYP3"RMV$CUBE";
        5422. END
        5423.  
        5424. ELSE
        5425. BEGIN # REMOVE FROM POOL/RESERVED AREA #
        5426. IF (LBARG$PK[0] EQ "P" AND CM$CODE[0] EQ CUBSTAT"SCRPOOL")
        5427. OR (LBARG$PK[0] EQ "R" AND CM$CODE[0] EQ CUBSTAT"ALTCSU")
        5428. OR (LBARG$PK[0] EQ "R" AND CM$CODE[0] EQ CUBSTAT"SYSUSE")
        5429. THEN
        5430. BEGIN
        5431. REQCODE = REQTYP3"UPD$MAP"; # UPDATE SMMAP ENTRY #
        5432. CM$CODE[0] = CUBSTAT"UNASGN";
        5433. CM$FLAG1[0] = FALSE; # CLEAR ERROR FLAG IN MAP ENTRY #
        5434. END
        5435.  
        5436. ELSE # PROCESS ERROR CONDITION #
        5437. BEGIN
        5438. NUMDONE = I - 1;
        5439. ERRCODE = S"UNX$CB$ASN";
        5440. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5441. RETURN;
        5442. END
        5443.  
        5444. END # REMOVE FROM POOL/RESERVED AREA #
        5445.  
        5446. #
        5447. * ISSUE TYPE 3 CALLSS REQUEST AND DO ERROR PROCESSING IF AN
        5448. * ERROR STATUS IS RETURNED BY EXEC.
        5449. #
        5450.  
        5451. CALL3(REQCODE,PK$CSU$ENT[0],0,0,RESP$CODE);
        5452. IF RESP$CODE NQ RESPTYP3"OK3"
        5453. THEN # PROCESS THE RESPONSE #
        5454. BEGIN
        5455. LBRESP(RESP$CODE,TYP"TYP3");
        5456. RETURN;
        5457. END
        5458.  
        5459. MFLUSH;
        5460. END # PROCESS *N* CUBES #
        5461.  
        5462. RETURN;
        5463.  
        5464. END # LBRMCUB #
        5465.  
        5466. TERM
        5467. PROC LBRMMSC;
        5468. # TITLE LBRMMSC - REMOVES CARTRIDGES FROM A FAMILY OR POOL. #
        5469.  
        5470. BEGIN # LBRMMSC #
        5471.  
        5472. #
        5473. ** LBRMMSC - REMOVES CARTRIDGES FROM A FAMILY OR POOL.
        5474. *
        5475. * THIS PROC LOCATES AND REMOVES EMPTY CARTRIDGES.
        5476. *
        5477. * PROC LBRMMSC.
        5478. *
        5479. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE
        5480. * PARAMETERS SET UP IN COMMON AREA DEFINED
        5481. * IN *COMTLBP*.
        5482. * (LB$BUFP) = FWA OF A BUFFER 1101B WORDS LONG.
        5483. *
        5484. * EXIT CARTRIDGES REMOVED OR ERROR CONDITION.
        5485. *
        5486. * MESSAGES FAMILY NOT FOUND.
        5487. * CARTRIDGE NOT EMPTY, VSN.
        5488. *
        5489. * NOTES PROC *LBRMMSC* OPENS THE CATALOG AND SEARCHES IT
        5490. * FOR CARTRIDGES FREE IF NO CSN
        5491. * IS SPECIFIED. IF CSN IS SPECIFIED THE SMMAP IS
        5492. * SEARCHED FOR A MATCHING CSN. IF THE *LOST* OPTION
        5493. * IS SPECIFIED, THE CARTRIDGE IS REMOVED FROM THE
        5494. * FAMILY AFTER VERIFYING THAT IT IS MISSING AND
        5495. * ASSIGNED TO THE FAMILY. THE CARTRIDGE IS LOADED
        5496. * AND ITS LABEL IS CHECKED. A NEW SCRATCH LABEL IS
        5497. * WRITTEN AND THE CARTRIDGE IS UNLOADED TO THE POOL
        5498. * OR OUTPUT DRAWER, AS SPECIFIED BY *PT*.
        5499. #
        5500.  
        5501. #
        5502. **** PROC LBRMMSC - XREF LIST BEGIN.
        5503. #
        5504.  
        5505. XREF
        5506. BEGIN
        5507. PROC CALL3; # ISSUES TYPE 3 EXEC CALLSS #
        5508. PROC CALL4; # ISSUES TYPE 4 EXEC CALLSS #
        5509. PROC CCLOSE; # CLOSE SFMCAT #
        5510. PROC CGETFCT; # GETS AN FCT ENTRY #
        5511. PROC COPEN; # OPENS THE CATALOG #
        5512. PROC DLABFLD; # DISPLAY CARTRIDGE LABEL FIELDS #
        5513. PROC GENLAB; # GENERATES A NEW LABEL #
        5514. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        5515. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        5516. PROC LOFPROC; # LIST OF FILES PROCESSOR #
        5517. PROC MCLOSE; # CLOSE SMMAP #
        5518. PROC MESSAGE; # DISPLAYS MESSAGE #
        5519. PROC MFLUSH; # FLUSH MAP BUFFER #
        5520. PROC MOPEN; # OPEN SMMAP #
        5521. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        5522.   OR RETURN #
        5523. PROC SERAST; # SEARCH FOR EMPTY CARTRIDGES #
        5524. PROC SERCSU; # SEARCHES THE SMMAP #
        5525. PROC SETPFP; # SET FAMILY AND USER INDEX #
        5526. FUNC XCOD; # INTEGER TO DISPLAY CONVERSION #
        5527. END
        5528.  
        5529. #
        5530. **** PROC LBRMMSC - XREF LIST END.
        5531. #
        5532.  
        5533. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        5534. *CALL COMBFAS
        5535. *CALL COMBCMS
        5536. *CALL,COMBCMD
        5537. *CALL COMBCPR
        5538. *CALL COMBLBL
        5539. *CALL COMBMAP
        5540. *CALL COMBMCT
        5541. *CALL COMBPFP
        5542. *CALL COMSPFM
        5543. *CALL COMTERR
        5544. *CALL COMTLAB
        5545. *CALL COMTLBP
        5546.  
        5547. ITEM CART$CSN C(20); # CARTRIDGE SERIAL NUMBER #
        5548. ITEM ERR$CNT I; # ERROR COUNT #
        5549. ITEM FCTORD U; # EMPTY CARTRIDGE FCT ORDINAL #
        5550. ITEM FLAG I; # ERROR FLAG #
        5551. ITEM HR$ERR I; # HARD READ ERRORS #
        5552. ITEM I I; # LOOP VARIABLE #
        5553. ITEM LD$CNT I; # LOAD COUNT #
        5554. ITEM LD$ERR I; # LOAD ERRORS #
        5555. ITEM PS$CNT I; # PASS COUNT #
        5556. ITEM REQCODE I; # REQUEST CODE #
        5557. ITEM RESP$CODE I; # RESPONSE CODE #
        5558. ITEM SERTYPE S:SERCH$TYPE; # SEARCH TYPE #
        5559. ITEM SGROUP I; # SAVE GROUP PARAMETER #
        5560. ITEM SLOT I; # DRAWER NUMBER #
        5561. ITEM SP$CODE I; # SPECIFIED CODE #
        5562. ITEM SP$Y I; # SPECIFIED Y #
        5563. ITEM SP$Z I; # SPECIFIED Z #
        5564. ITEM SR$ERR I; # SOFT READ ERRORS #
        5565. ITEM STR$RD I; # STRIPES READ #
        5566. ITEM STR$WR I; # STRIPES WRITTEN #
        5567. ITEM STR$DM I; # STRIPES DEMARKED #
        5568. ITEM SW$ERR I; # SOFT WRITE ERRORS #
        5569.  
        5570. ARRAY CMAP$NM [0:0] P(1); # BUILD SMMAP NAME #
        5571. BEGIN
        5572. ITEM CMAP$NAME C(00,00,07); # SMMAP FILE NAME #
        5573. ITEM CMAP$IN C(00,00,05); # FIRST 5 CHARACTERS #
        5574. ITEM CMAP$ID C(00,30,01); # SM-ID #
        5575. ITEM CMAP$Z C(00,36,24) = [0]; # ZERO FILL #
        5576. END
        5577.  
        5578. ARRAY MSFCATNM [0:0] P(1); # CATALOG NAME #
        5579. BEGIN
        5580. ITEM MSFCAT$NM C(00,00,06); # FIRST 6 CHARACTERS #
        5581. ITEM MSFCAT$LST C(00,36,01); # LAST CHARACTER #
        5582. END
        5583.  
        5584. ARRAY PK$CSU$ENT [0:0] P(4); # *PICK* SMMAP ENTRY #
        5585. BEGIN
        5586. ITEM PK$MAPENT C(00,00,30); # THREE WORD SMMAP ENTRY #
        5587. ITEM PK$Y U(03,00,30); # Y COORDINATE #
        5588. ITEM PK$Z U(03,30,30); # Z COORDINATE #
        5589. END
        5590.  
        5591.  
        5592. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        5593. BEGIN
        5594. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        5595. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        5596. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        5597. ITEM PT$GR U(04,00,07); # GROUP #
        5598. ITEM PT$GRT U(04,07,04); # GROUP ORDINAL #
        5599. END
        5600.  
        5601.  
        5602. CONTROL EJECT;
        5603.  
        5604. #
        5605. * INITIALIZE POINTERS AND MISCELLANEOUS ITEMS.
        5606. #
        5607.  
        5608. PFP$WRD0[0] = 0;
        5609. PFP$FG1[0] = TRUE;
        5610. PFP$FG4[0] = TRUE;
        5611. P<FCT> = LB$BUFP;
        5612. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        5613. SGROUP = LBARG$GR[0];
        5614.  
        5615. #
        5616. * REMOVE EACH OF *N* CARTRIDGES FROM THE FAMILY OR POOL.
        5617. #
        5618.  
        5619. SLOWFOR I = 1 STEP 1 UNTIL LBARG$N[0]
        5620. DO
        5621. BEGIN # REMOVE CARTRIDGE #
        5622. LBARG$GR[0] = SGROUP;
        5623.  
        5624. #
        5625. * PROCESSING FOR *CSN NOT SPECIFIED*.
        5626. #
        5627.  
        5628. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        5629. IF LBARG$C[0] EQ 0
        5630. THEN
        5631. BEGIN # CSN NOT SPECIFIED #
        5632.  
        5633. IF LBARG$PK[0] EQ "F"
        5634. THEN
        5635. BEGIN # SELECT CARTRIDGE FROM FAMILY #
        5636.  
        5637. #
        5638. * OPEN CATALOG AND CHECK ERROR STATUS.
        5639. #
        5640.  
        5641. PFP$FAM[0] = LBARG$FM[0];
        5642. PFP$UI[0] = DEF$UI + LBARG$SB[0];
        5643. SETPFP(PFP);
        5644. IF PFP$STAT[0] NQ 0
        5645. THEN # FAMILY NOT FOUND #
        5646. BEGIN
        5647. LBMSG$LN[0] = " FAMILY NOT FOUND.";
        5648. MESSAGE(LBMSG[0],SYSUDF1);
        5649. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        5650. END
        5651.  
        5652. MSFCAT$NM[0] = SFMCAT; # SET UP CATALOG NAME #
        5653. MSFCAT$LST[0] = XCOD(LBARG$SB[0]);
        5654. COPEN(LBARG$FM[0],LBARG$SB[0],MSFCATNM[0],"RM",TRUE,FLAG);
        5655. IF FLAG EQ CMASTAT"NOERR"
        5656. THEN
        5657. BEGIN
        5658. LOFPROC(OCT$LFN[1]); # ADD LFN TO LIST OF FILES #
        5659. END
        5660.  
        5661. IF FLAG NQ CMASTAT"NOERR" AND FLAG NQ CMASTAT"FOPEN"
        5662. THEN # ERROR CONDITION OTHER THAN
        5663.   *CATALOG ALREADY OPEN* #
        5664. BEGIN
        5665. LBRESP(FLAG,0);
        5666. RETURN;
        5667. END
        5668.  
        5669.  
        5670. #
        5671. * SEARCH *AST* FOR EMPTY CARTRIDGE.
        5672. #
        5673.  
        5674. SERAST(FCTORD,FLAG);
        5675. IF FLAG NQ OK
        5676. THEN # NO EMPTY CARTRIDGE FOUND #
        5677. BEGIN
        5678. NUMDONE = I - 1;
        5679. ERRCODE = S"NO$EMP$CR";
        5680. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5681. RETURN;
        5682. END
        5683.  
        5684. #
        5685. * GET FCT ENTRY OF EMPTY CARTRIDGE AND SET LOAD, PASS,
        5686. * AND ERROR COUNTS FOR NEW LABEL.
        5687. #
        5688.  
        5689. CGETFCT(LBARG$FM[0],LBARG$SB[0],LBARG$SMID[0],FCTORD,
        5690. LB$BUFP,0,FLAG);
        5691. IF FLAG NQ OK
        5692. THEN # PROCESS ERROR STATUS #
        5693. BEGIN
        5694. LBRESP(FLAG,0);
        5695. RETURN;
        5696. END
        5697.  
        5698. LD$CNT = FCT$CRLD[0];
        5699. HR$ERR = FCT$HRDE[0];
        5700. SW$ERR = FCT$SWRE[0];
        5701. SR$ERR = FCT$SRDE[0];
        5702. STR$RD = FCT$STRD[0];
        5703. STR$WR = FCT$STWR[0];
        5704. STR$DM = FCT$STDM[0];
        5705.  
        5706. #
        5707. * GET SMMAP ENTRY.
        5708. #
        5709.  
        5710. SERTYPE = S"LOC";
        5711. SERCSU(SERTYPE,FCT$Y[0],FCT$Z[0],0,0,0,0, PK$CSU$ENT[0],
        5712. FLAG);
        5713. CCLOSE(LBARG$FM[0],LBARG$SB[0],0,FLAG);
        5714. END # SELECT CARTRIDGE FROM FAMILY #
        5715.  
        5716. IF LBARG$PK[0] EQ "P"
        5717. THEN
        5718. BEGIN # SELECT CARTRIDGE FROM POOL #
        5719. SERTYPE = S"CART$POOL";
        5720. SERCSU(SERTYPE,0,0,0,0,0,0,PK$CSU$ENT[0],FLAG);
        5721. IF FLAG NQ OK
        5722. THEN # POOL EMPTY #
        5723. BEGIN
        5724. NUMDONE = I - 1;
        5725. ERRCODE = S"NO$CR$PL";
        5726. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5727. RETURN;
        5728. END
        5729.  
        5730. CMAP$ID[0] = LBARG$SM[0];
        5731. CMAP$IN[0] = SMMAP;
        5732. END # SELECT CARTRIDGE FROM POOL #
        5733.  
        5734. END # VSN NOT SPECIFIED #
        5735.  
        5736. #
        5737. * PROCESSING FOR *VSN SPECIFIED*.
        5738. #
        5739.  
        5740. IF LBARG$C[0] NQ 0
        5741. THEN
        5742. BEGIN # VSN SPECIFIED #
        5743. SERTYPE = S"CSN$MATCH"; # SEARCH FOR VSN #
        5744. SERCSU(SERTYPE,0,0,0,LBARG$C[0],0,0,PK$CSU$ENT[0],FLAG);
        5745. IF FLAG NQ 0
        5746. THEN # VSN NOT FOUND #
        5747. BEGIN
        5748. ERRCODE = S"CSN$NOTFND";
        5749. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5750. RETURN;
        5751. END
        5752.  
        5753. #
        5754. * OPEN CATALOG AND CHECK ERROR STATUS.
        5755. #
        5756.  
        5757. IF CM$CODE[0] EQ CUBSTAT"SUBFAM"
        5758. THEN
        5759. BEGIN # OPEN CATALOG #
        5760. PFP$FAM[0] = CM$FMLYNM[0];
        5761. PFP$UI[0] = DEF$UI + CM$SUB[0];
        5762. SETPFP(PFP);
        5763. IF PFP$STAT[0] NQ 0
        5764. THEN # FAMILY NOT FOUND #
        5765. BEGIN
        5766. LBMSG$LN[0] = " FAMILY NOT FOUND.";
        5767. MESSAGE(LBMSG[0],SYSUDF1);
        5768. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        5769. END
        5770.  
        5771. MSFCAT$NM[0] = SFMCAT; # SET UP CATALOG NAME #
        5772. MSFCAT$LST[0] = XCOD(CM$SUB[0]);
        5773. COPEN(CM$FMLYNM[0],CM$SUB[0],MSFCATNM[0],"RM",TRUE,FLAG);
        5774. IF FLAG EQ CMASTAT"NOERR"
        5775. THEN
        5776. BEGIN
        5777. LOFPROC(OCT$LFN[1]); # ADD LFN TO LIST OF FILES #
        5778. END
        5779.  
        5780. IF FLAG NQ CMASTAT"NOERR" AND FLAG NQ CMASTAT"FOPEN"
        5781. THEN # ERROR CONDITION OTHER THAN
        5782.   *CATALOG ALREADY OPEN* #
        5783. BEGIN
        5784. LBRESP(FLAG,0);
        5785. RETURN;
        5786. END
        5787.  
        5788. END # OPEN CATALOG #
        5789.  
        5790. END # VSN SPECIFIED #
        5791.  
        5792. #
        5793. * *LOST* OPTION PROCESSING.
        5794. #
        5795.  
        5796. IF LBARG$LT[0] NQ 0
        5797. THEN
        5798. BEGIN # *LOST* OPTION SPECIFIED #
        5799. IF CM$CODE[0] NQ CUBSTAT"SUBFAM"
        5800. THEN # NOT A FAMILY CARTRIDGE #
        5801. BEGIN
        5802. ERRCODE = S"UNX$CR$ASN";
        5803. LBERR(ERRCODE);
        5804. RETURN;
        5805. END
        5806.  
        5807. #
        5808. * GET FCT ENTRY FOR SPECIFIED CARTRIDGE.
        5809. #
        5810.  
        5811. CGETFCT(CM$FMLYNM[0],CM$SUB[0],LBARG$SMID[0],CM$FCTORD[0],
        5812. LB$BUFP,0,FLAG);
        5813. IF FLAG NQ OK
        5814. THEN # PROCESS ERROR STATUS #
        5815. BEGIN
        5816. LBRESP(FLAG,0);
        5817. RETURN;
        5818. END
        5819.  
        5820. IF NOT FCT$LCF[0]
        5821. THEN # FCT *LOST* FLAG NOT SET #
        5822. BEGIN
        5823. ERRCODE = S"LOST$NSET";
        5824. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5825. RETURN;
        5826. END
        5827.  
        5828. REQCODE = REQTYP4"LOAD$CART";
        5829. CALL4(REQCODE,DRD$NUM,CART$CSN,PK$Y[0],PK$Z[0],RESP$CODE);
        5830. IF RESP$CODE EQ RESPTYP4"CELL$EMP"
        5831. THEN
        5832. BEGIN # REMOVE LOST CARTRIDGE FROM FAMILY #
        5833. REQCODE = REQTYP3"RMV$CART";
        5834. CALL3(REQCODE,PK$CSU$ENT,0,0,RESP$CODE);
        5835. IF RESP$CODE EQ RESPTYP3"MSC$NEMPTY"
        5836. THEN
        5837. BEGIN
        5838. LBMSG$LINE[0] = " CARTRIDGE NOT EMPTY, .";
        5839. LBMSG$CSN[0] = CM$CSND[0];
        5840. MESSAGE(LBMSG$BUF[0],SYSUDF1);
        5841. TEST I;
        5842. END
        5843.  
        5844. IF RESP$CODE NQ RESPTYP3"OK3"
        5845. THEN
        5846. BEGIN
        5847. LBRESP(RESP$CODE,TYP"TYP3");
        5848. END
        5849.  
        5850. RETURN;
        5851. END # REMOVE LOST CARTRIDGE FROM FAMILY #
        5852.  
        5853. ELSE
        5854. BEGIN # PROCESS ERROR STATUS #
        5855. IF RESP$CODE EQ RESPTYP4"OK4"
        5856. THEN
        5857. BEGIN
        5858. REQCODE = REQTYP4"UNLD$CART";
        5859. CALL4(REQCODE,0,0,PK$Y[0],PK$Z[0],RESP$CODE);
        5860. IF RESP$CODE NQ RESPTYP4"OK4"
        5861. THEN
        5862. BEGIN
        5863. LBRESP(RESP$CODE,TYP"TYP4");
        5864. RETURN;
        5865. END
        5866.  
        5867. ERRCODE = S"LOST$SET";
        5868. LBERR(ERRCODE);
        5869. RETURN;
        5870. END
        5871.  
        5872. ELSE # PROCESS DETAIL STATUS #
        5873. BEGIN
        5874. LBRESP(RESP$CODE,TYP"TYP4");
        5875. RETURN;
        5876. END
        5877.  
        5878. END # PROCESS ERROR STATUS #
        5879.  
        5880. END # *LOST* OPTION SPECIFIED #
        5881.  
        5882. #
        5883. * CHECK CARTRIDGE ASSIGNMENT AND *PT* OPTION.
        5884. #
        5885.  
        5886. IF CM$CODE[0] EQ CUBSTAT"SCRPOOL" AND LBARG$PT[0] EQ "P"
        5887. THEN # IGNORE THE CARTRIDGE #
        5888. BEGIN
        5889. TEST I;
        5890. END
        5891.  
        5892. #
        5893. * FIND EMPTY OUTPUT DRAWER OR CUBE IN POOL.
        5894. #
        5895.  
        5896. IF LBARG$PT[0] EQ "D"
        5897. THEN
        5898. BEGIN # FIND EMPTY OUTPUT DRAWER #
        5899. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        5900. PT$Y[0] = 12;
        5901. PT$Z[0] = 0;
        5902. CM$FCTORD[0] = 0;
        5903. CM$FMLYNM[0] = "";
        5904. END # FIND EMPTY OUTPUT DRAWER #
        5905.  
        5906. ELSE
        5907. BEGIN # FIND EMPTY CUBE IN POOL #
        5908. SERTYPE = S"ASSIGN";
        5909. SP$CODE = CUBSTAT"SCRPOOL";
        5910. SERCSU(SERTYPE,0,0,SP$CODE,"","",0,PT$CSU$ENT[0],FLAG);
        5911. IF FLAG NQ 0
        5912. THEN # NO EMPTY CUBES IN FAMILY/POOL #
        5913. BEGIN
        5914. NUMDONE = I - 1;
        5915. ERRCODE = S"NO$EMPCBFP";
        5916. LBERR(ERRCODE); # DO ERROR PROCESSING #
        5917. RETURN;
        5918. END
        5919.  
        5920. END # FIND EMPTY CUBE IN POOL #
        5921.  
        5922. #
        5923. * GET CARTRIDGE AND CHECK ITS LABEL.
        5924. #
        5925.  
        5926. REQCODE = REQTYP4"LOAD$CART";
        5927. CALL4(REQCODE,DRD$NUM,CART$CSN,PK$Y[0],PK$Z[0],RESP$CODE);
        5928. IF RESP$CODE NQ RESPTYP4"OK4" ##
        5929. THEN
        5930. BEGIN # LOAD FAILS #
        5931. IF RESP$CODE EQ RESPTYP4"CELL$EMP"
        5932. THEN
        5933. BEGIN # SET UP ERROR FLAGS #
        5934. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        5935. IF CM$CODE[0] EQ CUBSTAT"SCRPOOL"
        5936. THEN # SET ERROR FLAG IN SMMAP ENTRY #
        5937. BEGIN
        5938. CM$FLAG1[0] = TRUE;
        5939. CALL3(REQTYP3"UPD$MAP",PK$CSU$ENT[0],0,0,FLAG);
        5940. END
        5941.  
        5942. ELSE # SET LOST FLAG IN CATALOG ENTRY #
        5943. BEGIN
        5944. CALL3(REQTYP3"UPD$CAT",PK$CSU$ENT[0],UCF"LOST",1,FLAG);
        5945. END
        5946.  
        5947. NUMDONE = I - 1;
        5948. ERRCODE = S"CR$NOTFND"; # CARTRIDGE NOT FOUND #
        5949. LBERR(ERRCODE);
        5950. IF FLAG NQ RESPTYP3"OK3"
        5951. THEN
        5952. BEGIN
        5953. LBRESP(FLAG,TYP"TYP3");
        5954. RETURN;
        5955. END
        5956.  
        5957. RETURN;
        5958. END # SET UP ERROR FLAGS #
        5959.  
        5960. ELSE # PROCESS RESPONSE CODE #
        5961. BEGIN
        5962. LBRESP(RESP$CODE,TYP"TYP4");
        5963. IF RESP$CODE EQ RESPTYP4"CART$LB$ERR" ##
        5964. OR RESP$CODE EQ RESPTYP4"UNK$CART"
        5965. THEN # UNLOAD CARTRIDGE TO EXIT TRAY #
        5966. BEGIN
        5967. CALL4(REQTYP4"UNLD$CART",0,0,SM$EXIT$TY,SM$TY$Z, ##
        5968. RESP$CODE);
        5969. END
        5970.  
        5971. RETURN;
        5972. END
        5973.  
        5974. END # LOAD FAILS #
        5975.  
        5976.  
        5977. P<SMUMAP> = LOC(PK$CSU$ENT[0]);
        5978. P<LABEL$CART> = OLDLABP;
        5979.  
        5980. #
        5981. * VERIFY VSN, Y, Z IN THE LABEL.
        5982. #
        5983.  
        5984. IF LAB$CSND[0] NQ CM$CSND[0] ##
        5985. AND(LAB$Y[0] NQ PK$Y[0] OR LAB$Z[0] NQ PK$Z[0])
        5986. THEN
        5987. BEGIN # TEST Y,Z #
        5988. REQCODE = REQTYP4"UNLD$CART";
        5989. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        5990. IF RESP$CODE NQ RESPTYP4"OK4"
        5991. THEN
        5992. BEGIN
        5993. LBRESP(RESP$CODE,TYP"TYP4");
        5994. RETURN;
        5995. END
        5996.  
        5997. ERRCODE = S"M86$HARDWR"; # MSF HARDWARE PROBLEM #
        5998. LBERR(ERRCODE);
        5999. RETURN;
        6000. END # TEST Y,Z #
        6001.  
        6002. IF CM$CODE[0] EQ CUBSTAT"SCRPOOL"
        6003. THEN # CARTRIDGE FROM POOL #
        6004. BEGIN
        6005. LD$CNT = LAB$CRLD[0]; # USE OLD LOAD/PASS/ERROR COUNTS #
        6006. LD$ERR = LAB$LDER[0];
        6007. SR$ERR = LAB$SRDE[0];
        6008. SW$ERR = LAB$SWRE1[0];
        6009. B<28,4>SW$ERR = LAB$SWRE[0];
        6010. HR$ERR = LAB$HRDE[0];
        6011. STR$RD = LAB$STRD[0];
        6012. STR$WR = LAB$STWR1[0];
        6013. B<36,24>STR$WR = LAB$STWR[0];
        6014. STR$DM = LAB$STDM[0];
        6015. END
        6016.  
        6017. #
        6018. * CHECK IF CSU, Y, Z, FAMILY, AND SUBFAMILY DO NOT
        6019. * AGREE IN OLDLABEL AND SMMAP ENTRY.
        6020. #
        6021.  
        6022. IF LAB$SMID[0] NQ LBARG$SMID[0]
        6023. OR LAB$Y[0] NQ PK$Y[0]
        6024. OR LAB$Z[0] NQ PK$Z[0]
        6025. OR LAB$FMLY[0] NQ CM$FMLYNM[0]
        6026. OR LAB$SF[0] NQ CM$SUB[0]
        6027. THEN
        6028. BEGIN # SET UP ERROR FLAGS #
        6029. IF CM$CODE[0] EQ CUBSTAT"SCRPOOL"
        6030. THEN # SET ERROR FLAG IN SMMAP ENTRY #
        6031. BEGIN
        6032. CM$FLAG1[0] = TRUE;
        6033. CALL3(REQTYP3"UPD$MAP",PK$CSU$ENT[0],0,0,FLAG);
        6034. END
        6035.  
        6036. ELSE # SET LOST FLAG IN CATALOG ENTRY #
        6037. BEGIN
        6038. CALL3(REQTYP3"UPD$CAT",PK$CSU$ENT[0],UCF"LOST",1,FLAG);
        6039. END
        6040.  
        6041. IF FLAG NQ RESPTYP3"OK3"
        6042. THEN
        6043. BEGIN
        6044. LBRESP(FLAG,TYP"TYP3");
        6045. REQCODE = REQTYP4"UNLD$CART";
        6046. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6047. IF RESP$CODE NQ RESPTYP4"OK4"
        6048. THEN
        6049. BEGIN
        6050. LBRESP(RESP$CODE,TYP"TYP4");
        6051. RETURN;
        6052. END
        6053.  
        6054. RETURN;
        6055. END
        6056.  
        6057. DLABFLD;
        6058. REQCODE = REQTYP4"UNLD$CART";
        6059. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6060. IF RESP$CODE NQ RESPTYP4"OK4"
        6061. THEN
        6062. BEGIN
        6063. LBRESP(RESP$CODE,TYP"TYP4");
        6064. RETURN;
        6065. END
        6066.  
        6067. ERRCODE = S"UNXP$CYZFS";
        6068. LBERR(ERRCODE); # DO ERROR PROCESSING #
        6069. RETURN;
        6070. END # SET UP ERROR FLAGS #
        6071.  
        6072. #
        6073. * GENERATE LABEL AND UPDATE SMUMAP.
        6074. #
        6075.  
        6076. GENLAB(LABTYPE"SCR$LAB",PT$CSU$ENT[0],LD$CNT,LD$ERR, ##
        6077. SR$ERR,SW$ERR,HR$ERR,STR$RD,STR$WR,STR$DM);
        6078. P<LABEL$CART> = NEWLABP;
        6079. IF B<0,8>LAB$CSN[0] NQ X"C9" ##
        6080. OR B<8,8>LAB$CSN[0] NQ X"C2" OR B<16,8>LAB$CSN[0] NQ X"D4"
        6081. THEN # CARTRIDGE IS NOT IBM #
        6082. BEGIN
        6083. LAB$CCOD[0] = OTHCART;
        6084. END
        6085.  
        6086. ELSE
        6087. BEGIN
        6088. LAB$CCOD[0] = IBMCART;
        6089. END
        6090.  
        6091. LAB$CRLD[0] = LAB$CRLD[0] + 1; # UPDATE LOAD/PASS COUNTS #
        6092. IF LBARG$PT[0] EQ "D"
        6093. THEN # CLEAR CSU, Y, Z FIELDS #
        6094. BEGIN
        6095. LAB$SMID[0] = 0;
        6096. LAB$Y[0] = 12; # SET TO CAS EXIT #
        6097. LAB$Z[0] = 0;
        6098. END
        6099.  
        6100. P<SMUMAP>= LOC(PK$CSU$ENT[0]);
        6101. IF CM$CODE[0] EQ CUBSTAT"SUBFAM"
        6102. THEN # ASSIGNED TO FAMILY #
        6103. BEGIN
        6104. REQCODE = REQTYP3"RMV$CART";
        6105. END
        6106.  
        6107. ELSE # ASSIGNED TO POOL #
        6108. BEGIN
        6109. REQCODE = REQTYP3"UPD$MAP";
        6110. CM$CSND[0] = " "; # REMOVE VSN FROM SMMAP ENTRY #
        6111. CM$CCOD[0] = " ";
        6112. CM$FLAG1[0] = FALSE; # CLEAR ERROR FLAG IN MAP ENTRY #
        6113. END
        6114.  
        6115. CALL3(REQCODE,PK$CSU$ENT[0],0,0,RESP$CODE);
        6116. IF RESP$CODE NQ RESPTYP3"OK3"
        6117. THEN # FAMILY/POOL REMOVAL FAILS #
        6118. BEGIN # PROCESS ERROR RESPONSE #
        6119. IF RESP$CODE NQ RESPTYP3"MSC$NEMPTY"
        6120. THEN
        6121. BEGIN
        6122. LBRESP(RESP$CODE,TYP"TYP3");
        6123. REQCODE = REQTYP4"UNLD$CART";
        6124. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6125. IF RESP$CODE NQ RESPTYP4"OK4"
        6126. THEN
        6127. BEGIN
        6128. LBRESP(RESP$CODE,TYP"TYP4");
        6129. RETURN;
        6130. END
        6131.  
        6132. RETURN;
        6133. END
        6134.  
        6135. ELSE
        6136. BEGIN # PROCESS CARTRIDGE NOT EMPTY #
        6137.  
        6138.  
        6139. #
        6140. * UNLOAD CARTRIDGE BACK AT ORIGINAL LOCATION.
        6141. #
        6142.  
        6143. CALL4(REQTYP4"UNLD$CART",DRD$NUM,CART$CSN,PK$Y[0], ##
        6144. PK$Z[0],RESP$CODE);
        6145. IF RESP$CODE NQ RESPTYP4"OK4"
        6146. THEN
        6147. BEGIN
        6148. LBRESP(RESP$CODE,TYP"TYP4");
        6149. RETURN;
        6150. END
        6151.  
        6152. ERRCODE = S"CR$NTEMPT";
        6153. LBERR(ERRCODE);
        6154. END # PROCESS CARTRIDGE NOT EMPTY #
        6155.  
        6156. END # PROCESS ERROR RESPONSE #
        6157.  
        6158. #
        6159. * WRITE NEW LABEL AND PUT CARTRIDGE IN NEW LOCATION.
        6160. #
        6161.  
        6162. REQCODE = REQTYP4"WRT$LAB";
        6163. CALL4(REQCODE,DRD$NUM,CART$CSN,PT$Y,PT$Z,RESP$CODE);
        6164. IF RESP$CODE NQ RESPTYP4"OK4"
        6165. THEN # *WRITE* FAILS #
        6166. BEGIN
        6167. LBRESP(RESP$CODE,TYP"TYP4");
        6168. RETURN;
        6169. END
        6170.  
        6171. IF LBARG$PT[0] EQ "P"
        6172. THEN
        6173. BEGIN # ADD CARTRIDGE TO POOL #
        6174. REQCODE = REQTYP3"UPD$MAP";
        6175. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        6176. CM$CSND[0] = LAB$CSND[0];
        6177. CM$CCOD[0] = LAB$CCOD[0];
        6178.  
        6179. #
        6180. * ADD CARTRIDGE TO POOL.
        6181. #
        6182.  
        6183. CALL3(REQCODE,PT$CSU$ENT[0],0,0,RESP$CODE);
        6184. IF RESP$CODE NQ RESPTYP3"OK3"
        6185. THEN # MAP UPDATE FAILS #
        6186. BEGIN
        6187. LBRESP(RESP$CODE,TYP"TYP3");
        6188. RETURN;
        6189. END
        6190.  
        6191. END # ADD CARTRIDGE TO POOL #
        6192.  
        6193. MFLUSH; # FLUSH MAP BUFFER #
        6194. END
        6195.  
        6196.  
        6197. RETURN;
        6198.  
        6199. END # LBRMMSC #
        6200.  
        6201. TERM
        6202. PROC LBRSMSC;
        6203. # TITLE LBRSMSC - RESTORES A CARTRIDGE TO THE CSU. #
        6204.  
        6205. BEGIN # LBRSMSC #
        6206.  
        6207. #
        6208. ** LBRSMSC - RESTORES A CARTRIDGE TO THE CSU.
        6209. *
        6210. * THIS PROC GETS A CARTRIDGE FROM THE INPUT DRAWER AND RETURNS
        6211. * IT TO ITS ASSIGNED LOCATION.
        6212. *
        6213. * PROC LBRSMSC.
        6214. *
        6215. * ENTRY CRACKED AND SYNTAX CHECKED DIRECTIVE
        6216. * PARAMETERS SET UP IN COMMON AREA DEFINED
        6217. * IN *COMTLBP*.
        6218. *
        6219. * EXIT CARTRIDGE RESTORED OR ERROR CONDITION.
        6220. *
        6221. * NOTES PROC *LBRSMSC* CHECKS THAT THERE IS A CARTRIDGE IN
        6222. * AN INPUT DRAWER AS SPECIFIED, AND CALLS EXEC TO
        6223. * BRING THE CARTRIDGE TO A DRIVE AND READ ITS LABEL.
        6224. * IF THE LABEL HAS THE CORRECT *SM* NUMBER, AND IF
        6225. * A SMMAP ENTRY IS FOUND WITH MATCHING VSN, FAMILY,
        6226. * SUBFAMILY, AND COORDINATES, THEN EXEC IS CALLED TO
        6227. * REPLACE THE CARTRIDGE AND UPDATE THE CATALOG.
        6228. #
        6229.  
        6230. #
        6231. **** PROC LBRSMSC - XREF LIST BEGIN.
        6232. #
        6233.  
        6234. XREF
        6235. BEGIN
        6236. PROC CALL3; # ISSUES TYPE 3 CALLSS TO EXEC #
        6237. PROC CALL4; # ISSUES TYPE 4 CALLSS TO EXEC #
        6238. PROC DLABFLD; # DISPLAY CARTRIDGE LABEL FIELDS #
        6239. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        6240. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        6241. PROC SERCSU; # SEARCHES SMMAP #
        6242. END
        6243.  
        6244. #
        6245. **** PROC LBRSMSC - XREF LIST END.
        6246. #
        6247.  
        6248. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        6249. *CALL COMBFAS
        6250. *CALL COMBCPR
        6251. *CALL COMBLBL
        6252. *CALL COMBMAP
        6253. *CALL COMTERR
        6254. *CALL COMTLAB
        6255. *CALL COMTLBP
        6256. ITEM CART$CSN C(20); # CARTRIDGE SERIAL NUMBER #
        6257. ITEM CATFLD U; # CATALOG FIELD #
        6258. ITEM CATVALUE I; # CATALOG VALUE #
        6259. ITEM FLAG I; # ERROR FLAG #
        6260. ITEM I I; # INDUCTION VARIABLE #
        6261. ITEM REQCODE I; # REQUEST CODE #
        6262. ITEM RESP$CODE I; # RESPONSE CODE #
        6263. ITEM SERTYPE S:SERCH$TYPE; # SEARCH TYPE #
        6264. ITEM SLOT I; # DRAWER NUMBER #
        6265. ITEM SP$VSN C(8); # SPECIFIED *CSN* #
        6266. ITEM SP$Y I; # SPECIFIED Y #
        6267. ITEM SP$Z I; # SPECIFIED Z #
        6268.  
        6269.  
        6270. ARRAY PT$CSU$ENT [0:0] P(5); # *PUT* SMMAP ENTRY #
        6271. BEGIN
        6272. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        6273. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        6274. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        6275. ITEM PT$GR U(04,00,07); # GROUP #
        6276. ITEM PT$GRT U(04,07,04); # GROUP ORDINAL #
        6277. END
        6278.  
        6279. BASED
        6280. ARRAY TEMP$LAB [0:0] P(1);
        6281. BEGIN
        6282. ITEM TEMP$LABW U(00,00,60);
        6283. END
        6284.  
        6285.  
        6286. CONTROL EJECT;
        6287.  
        6288. #
        6289. * FIND CARTRIDGE IN SPECIFIED INPUT DRAWER AND LOAD IT.
        6290. #
        6291.  
        6292. REQCODE = REQTYP4"LOAD$CART";
        6293. PT$Y[0] = 14;
        6294. PT$Z[0] = 0;
        6295. CALL4(REQCODE,DRD$NUM,CART$CSN,PT$Y[0],PT$Z[0],RESP$CODE);
        6296. IF RESP$CODE NQ RESPTYP4"OK4" ##
        6297. THEN # LOAD FAILS #
        6298. BEGIN
        6299. LBRESP(RESP$CODE,TYP"TYP4");
        6300. RETURN;
        6301. END
        6302.  
        6303. DRD$NUM = CPR$DRD[0]; # SET UP TRANSPORT ID #
        6304.  
        6305. P<LABEL$CART> = OLDLABP;
        6306.  
        6307. #
        6308. * COMPARE THE CSU-ID, FAMILY AND THE SUBFAMILY IN THE LABEL
        6309. * AGAINST THE USER SPECIFIED VALUES.
        6310. #
        6311.  
        6312. IF LAB$SMID[0] NQ LBARG$SM[0]
        6313. THEN
        6314. BEGIN
        6315. DLABFLD; # DISPLAY LABEL FIELDS #
        6316. REQCODE = REQTYP4"UNLD$CART";
        6317. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6318. IF RESP$CODE NQ RESPTYP4"OK4"
        6319. THEN
        6320. BEGIN
        6321. LBRESP(RESP$CODE,TYP"TYP4");
        6322. RETURN;
        6323. END
        6324.  
        6325. ERRCODE = S"UNXP$CYZFS";
        6326. LBERR(ERRCODE); # DO ERROR PROCESSING #
        6327. RETURN;
        6328. END
        6329.  
        6330. SERTYPE = S"CSN$MATCH";
        6331. SP$VSN = LAB$CSND[0]; # SEARCH SMMAP FOR VSN MATCH #
        6332. SERCSU(SERTYPE,0,0,0,SP$VSN,0,0,PT$CSU$ENT[0],FLAG);
        6333. IF FLAG NQ OK
        6334. THEN # VSN NOT FOUND #
        6335. BEGIN
        6336. DLABFLD; # DISPLAY LABEL FIELDS #
        6337. REQCODE = REQTYP4"UNLD$CART";
        6338. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6339. IF RESP$CODE NQ RESPTYP4"OK4"
        6340. THEN
        6341. BEGIN
        6342. LBRESP(RESP$CODE,TYP"TYP4");
        6343. RETURN;
        6344. END
        6345.  
        6346. ERRCODE = S"CSN$NOTFND";
        6347. LBERR(ERRCODE); # DO ERROR PROCESSING #
        6348. RETURN;
        6349. END
        6350.  
        6351. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        6352.  
        6353. #
        6354. * CHECK TO SEE IF LABEL AND MAP ENTRY DIFFER ON
        6355. * Y, Z, FAMILY, OR SUBFAMILY.
        6356. #
        6357.  
        6358. IF LAB$Y[0] NQ PT$Y[0] ##
        6359. OR LAB$Z[0] NQ PT$Z[0] ##
        6360. OR LAB$FMLY[0] NQ CM$FMLYNM[0] ##
        6361. OR LAB$SF[0] NQ CM$SUB[0]
        6362. THEN
        6363. BEGIN
        6364. REQCODE = REQTYP4"UNLD$CART";
        6365. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6366. IF RESP$CODE NQ RESPTYP4"OK4"
        6367. THEN
        6368. BEGIN
        6369. LBRESP(RESP$CODE,TYP"TYP4");
        6370. RETURN;
        6371. END
        6372.  
        6373. DLABFLD; # DISPLAY LABEL FIELDS #
        6374. ERRCODE = S"UNXP$CYZFS";
        6375. LBERR(ERRCODE); # DO ERROR PROCESSING #
        6376. RETURN;
        6377. END
        6378.  
        6379. #
        6380. * CLEAR *LOST* FLAG IN THE CATALOG IF THE CARTRIDGE IS TO BE
        6381. * RESTORED TO THE FAMILY OR CLEAR SMMAP ERROR FLAG IF THE
        6382. * CARTRIDGE IS TO BE RESTORED TO THE POOL AND RETURN THE
        6383. * CARTRIDGE TO ITS ASSIGNED LOCATION.
        6384. #
        6385.  
        6386.  
        6387. IF CM$CODE[0] EQ CUBSTAT"SUBFAM"
        6388. THEN
        6389. BEGIN # CLEAR *LOST* FLAG #
        6390. REQCODE = REQTYP3"UPD$CAT";
        6391. CATFLD = UCF"LOST";
        6392. CATVALUE = 0; # CLEAR *LOST* FLAG IN CATALOG #
        6393. CALL3(REQCODE,PT$CSU$ENT[0],CATFLD,CATVALUE,RESP$CODE);
        6394. END # CLEAR *LOST* FLAG #
        6395.  
        6396. ELSE
        6397. BEGIN # CLEAR SMMAP ERROR FLAG #
        6398. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        6399. CM$FLAG1[0] = FALSE;
        6400. REQCODE = REQTYP3"UPD$MAP";
        6401. CALL3(REQCODE,PT$CSU$ENT[0],0,0,FLAG);
        6402. END # CLEAR SMMAP ERROR FLAG #
        6403.  
        6404. IF RESP$CODE NQ RESPTYP3"OK3"
        6405. THEN # UPDATE CATALOG/MAP FAILED #
        6406. BEGIN
        6407. REQCODE = REQTYP4"UNLD$CART";
        6408. CALL4(REQCODE,0,0,SM$EXIT$TY,SM$TY$Z,RESP$CODE);
        6409. IF RESP$CODE NQ RESPTYP4"OK4"
        6410. THEN
        6411. BEGIN
        6412. LBRESP(RESP$CODE,TYP"TYP4");
        6413. RETURN;
        6414. END
        6415.  
        6416. DLABFLD; # DISPLAY LABEL FIELDS #
        6417. LBRESP(RESP$CODE,TYP"TYP3");
        6418. RETURN;
        6419. END
        6420.  
        6421. #
        6422. * PUT CARTRIDGE IN ASSIGNED LOCATION.
        6423. #
        6424.  
        6425. P<LABEL$CART> = OLDLABP;
        6426. P<TEMP$LAB> = NEWLABP;
        6427. SLOWFOR I = 0 STEP 1 UNTIL LABLEN-1
        6428. DO # MOVE LABEL TO NEW BUFFER #
        6429. BEGIN
        6430. TEMP$LABW[I] = LAB$W1[I];
        6431. END
        6432.  
        6433. REQCODE = REQTYP4"UNLD$CART";
        6434. CALL4(REQCODE,DRD$NUM,CART$CSN,PT$Y[0],PT$Z[0],RESP$CODE);
        6435. IF RESP$CODE NQ RESPTYP4"OK4"
        6436. THEN # PUT FAILS #
        6437. BEGIN
        6438. DLABFLD; # DISPLAY LABEL FIELDS #
        6439. LBRESP(RESP$CODE,TYP"TYP4");
        6440. END
        6441.  
        6442. RETURN;
        6443.  
        6444. END # LBRSMSC #
        6445.  
        6446. TERM
        6447. PROC LBSTCLR;
        6448. # TITLE LBSTCLR - STORES A *CE* CARTRIDGE IN 0,0 OR 0,15. #
        6449.  
        6450. BEGIN # LBSTCLR #
        6451.  
        6452. #
        6453. ** LBSTCLR - STORES A *CE* CARTRIDGE IN 0,0 OR 0,15.
        6454. *
        6455. * THIS PROC STORES A SPECIAL CARTRIDGE IN ONE OF TWO SPECIFIC
        6456. * LOCATIONS.
        6457. *
        6458. * PROC LBSTCLR.
        6459. *
        6460. * ENTRY (LBARG$CC) = IF EQUAL TO 0, STORE CARTRIDGE FROM
        6461. * DRAWER TO LOCATION 0,0.
        6462. * IF EQUAL TO 15, STORE INTO 0,15.
        6463. *
        6464. * EXIT CARTRIDGE IN LOCATION SPECIFIED.
        6465. *
        6466. #
        6467.  
        6468. DEF LISTCON #0#; # DO NOT DEF LIST COMDECKS #
        6469.  
        6470. #
        6471. **** PROC LBSTCLR - XREF LIST BEGIN.
        6472. #
        6473.  
        6474. XREF
        6475. BEGIN
        6476. PROC CALL4; # MAKE TYPE 4 REQUESTS #
        6477. PROC CKLAB; # CHECK LABEL #
        6478. PROC GENLAB; # GENERATE CARTRIDGE LABEL #
        6479. PROC LBERR; # PROCESS ERROR RESPONSE #
        6480. PROC LBRESP; # PROCESS ERROR FROM EXEC #
        6481. PROC SERCSU; # SEARCH SMMAP #
        6482. END
        6483.  
        6484. #
        6485. **** PROC LBSTCLR - XREF LIST END.
        6486. #
        6487.  
        6488. *CALL COMBFAS
        6489. *CALL COMBCMD
        6490. *CALL COMBCPR
        6491. *CALL COMBLBL
        6492. *CALL COMBMAP
        6493. *CALL COMTERR
        6494. *CALL COMTLAB
        6495. *CALL COMTLBP
        6496.  
        6497. ITEM FLAG U; # RESPONSE FLAG #
        6498. ITEM Y U; # Y COORDINATE #
        6499. ITEM Z U; # Z COORDINATE #
        6500. ITEM SERTYPE S:SERCH$TYPE; # TYPE OF SERACH #
        6501.  
        6502. ARRAY PT$CSU$ENT [0:0] P(4); # *PUT* SMMAP ENTRY #
        6503. BEGIN
        6504. ITEM PT$MAPENT C(00,00,30); # THREE WORD MAP ENTRY #
        6505. ITEM PT$Y U(03,00,30); # Y COORDINATE #
        6506. ITEM PT$Z U(03,30,30); # Z COORDINATE #
        6507. END
        6508.  
        6509. CONTROL EJECT;
        6510.  
        6511. #
        6512. * LOAD CARTRIDGE FROM INPUT DRAWER AND READ LABEL.
        6513. #
        6514.  
        6515. Y = SM$ENT$TY;
        6516. Z = SM$TY$Z;
        6517. CALL4(REQTYP4"LOAD$CART",0,0,Y,Z,FLAG);
        6518. IF FLAG NQ RESPTYP4"OK4" ##
        6519. AND FLAG NQ RESPTYP4"UNK$CART" ##
        6520. AND FLAG NQ RESPTYP4"CART$LB$ERR"
        6521. THEN
        6522. BEGIN
        6523. CALL4(REQTYP4"UNLD$CART",0,0,SM$EXIT$TY,Z,FLAG);
        6524. IF FLAG NQ RESPTYP4"OK4"
        6525. THEN
        6526. BEGIN
        6527. LBRESP(FLAG,TYP"TYP4");
        6528. END
        6529.  
        6530. ERRCODE = S"M86$HARDWR";
        6531. LBERR(ERRCODE);
        6532. RETURN;
        6533. END
        6534.  
        6535. #
        6536. * SERACH SMMAP FOR DUPLICATE *CSN*.
        6537. #
        6538.  
        6539. SERTYPE = S"CSN$MATCH";
        6540. SERCSU(SERTYPE,0,0,0,LAB$CSND[0],0,0,PT$CSU$ENT[0],FLAG);
        6541. IF FLAG EQ 0
        6542. THEN # *CSN* IN MAP #
        6543. BEGIN
        6544. CALL4(REQTYP4"UNLD$CART",0,0,SM$EXIT$TY,SM$TY$Z,FLAG);
        6545. IF FLAG NQ RESPTYP4"OK4"
        6546. THEN
        6547. BEGIN
        6548. LBRESP(FLAG,TYP"TYP4");
        6549. RETURN;
        6550. END
        6551.  
        6552. ERRCODE = S"DUPL$CSN";
        6553. LBERR(ERRCODE);
        6554. RETURN;
        6555. END
        6556.  
        6557.  
        6558. #
        6559. * PUT CARTRIDGE BACK TO DRAWER IF LABEL IS FROM FAMILY OR POOL.
        6560. #
        6561.  
        6562. P<LABEL$CART> = OLDLABP;
        6563. CKLAB(FLAG);
        6564. IF FLAG EQ LABTYPE"FAM$LAB" ##
        6565. THEN
        6566. BEGIN
        6567. ERRCODE = S"GOOD$LAB";
        6568. LBERR(ERRCODE);
        6569. RETURN;
        6570. END
        6571.  
        6572.  
        6573. #
        6574. * GENERATE NEW LABEL.
        6575. #
        6576.  
        6577. P<SMUMAP> = LOC(PT$CSU$ENT[0]);
        6578. PT$Y[0] = 0;
        6579. PT$Z[0] = LBARG$CC[0];
        6580. CM$SUB[0] = 0;
        6581. CM$FMLYNM[0] = " ";
        6582. GENLAB(LABTYPE"SCR$LAB",PT$CSU$ENT[0],0,0,0,0,0,0);
        6583. LAB$CLF[0] = 2;
        6584. LAB$RCORD[0] = 6652;
        6585.  
        6586. #
        6587. * STORE CARTRIDGE.
        6588. #
        6589.  
        6590. CALL4(REQTYP4"WRT$LAB",0,0,PT$Y[0],PT$Z[0],FLAG);
        6591. IF FLAG NQ RESPTYP4"OK4"
        6592. THEN
        6593. BEGIN
        6594. LBRESP(FLAG,TYP"TYP4");
        6595. RETURN;
        6596. END
        6597.  
        6598.  
        6599. END
        6600.  
        6601. TERM
        6602. PROC SERAST(FCTORD,FLAG);
        6603. # TITLE SERAST - SEARCHES THE AST FOR AN EMPTY CARTRIDGE. #
        6604.  
        6605. BEGIN # SERAST #
        6606.  
        6607. #
        6608. ** SERAST - SEARCHES THE AST FOR AN EMPTY CARTRIDGE.
        6609. *
        6610. * THIS PROC READS THE *AST* AND IFNDS THE FIRST EMPTY
        6611. * CARTRIDGE IN A SPECIFIED GROUP.
        6612. *
        6613. * PROC SERAST(FCTORD,FLAG)
        6614. *
        6615. * ENTRY (LB$BUFP) = FWA OF A BUFFER 1101B WORDS LONG.
        6616. * (GROUP) = IF GROUP = 0 THEN THE GROUP PARAMETER
        6617. * IS IGNORED. OTHERWISE, SELECT FROM THE
        6618. * SPECIFIED GROUP.
        6619. *
        6620. * EXIT (FCTORD) = FCT ORDINAL OF EMPTY CARTRIDGE, IF ANY.
        6621. * FREE, IF ANY.
        6622. * (FLAG) = ITEM INDICATING RESULT OF SEARCH.
        6623. * 0, EMPTY CARTRIDGE FOUND.
        6624. * 1, NO EMPTY CARTRIDGES.
        6625. *
        6626. * NOTES PROC *SERAST* READS THE *AST* FOR THE SPECIFIED
        6627. * SUBFAMILY AND GROUP. THE *AST* IS SEARCHED
        6628. * THE SPECIFIED SUBFAMILY. THE AST IS SEARCHED
        6629. * SEQUENTIALLY FOR AN EMPTY CARTRIDGE. IF NO EMPTY
        6630. * CARTRIDGES EXIST, THEN * FLAG* IS SET TO 1.
        6631. #
        6632.  
        6633.  
        6634. #
        6635. **** PROC SERAST - XREF LIST BEGIN.
        6636. #
        6637.  
        6638. XREF
        6639. BEGIN
        6640. PROC CRDAST; # READS AVAILABLE STREAM TABLE #
        6641. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        6642. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        6643. END
        6644.  
        6645. #
        6646. **** PROC SERAST - XREF LIST END.
        6647. #
        6648.  
        6649. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        6650. *CALL COMBFAS
        6651. *CALL COMBCMD
        6652. *CALL COMBMCT
        6653. *CALL COMTLAB
        6654. *CALL COMTLBP
        6655.  
        6656. *CALL COMTERR
        6657.  
        6658. ITEM FCTORD U; # EMPTY CARTRIDGE FCT ORDINAL #
        6659. ITEM FLAG I; # ERROR FLAG #
        6660. ITEM GROUP I; # SPECIFIED GROUP #
        6661. ITEM I I; # INDUCTION VARIABLE #
        6662. ITEM START U; # BEGINNING OF SEARCH #
        6663. ITEM TERMX U; # END OF SEARCH #
        6664. CONTROL EJECT;
        6665.  
        6666. #
        6667. * READ AST.
        6668. #
        6669.  
        6670. CRDAST(LBARG$FM[0],LBARG$SB[0],LBARG$SMID[0],ASTBADR,0,FLAG);
        6671. IF FLAG NQ OK
        6672. THEN
        6673. BEGIN
        6674. LBRESP(FLAG,0);
        6675. RETURN;
        6676. END
        6677.  
        6678. #
        6679. * SET AST BASED ARRAY POINTER.
        6680. #
        6681.  
        6682. P<AST> = ASTBADR;
        6683.  
        6684. #
        6685. * SEARCH FOR FIRST EMPTY CARTIDGE IN SPECIFIED GROUP.
        6686. #
        6687.  
        6688. FLAG = 1;
        6689. FCTORD = -1;
        6690. IF LBARG$GR[0] LS 0
        6691. THEN # GROUP IS NOT SPECIFIED #
        6692. BEGIN
        6693. START = 16;
        6694. TERMX = MAXORD;
        6695. END
        6696.  
        6697. ELSE
        6698. BEGIN
        6699. START = LBARG$GR[0] * 16;
        6700. TERMX = START + 15;
        6701. END
        6702.  
        6703. SLOWFOR I = START STEP 1 WHILE (I LQ TERMX) AND (FCTORD EQ -1)
        6704. DO # SEARCH FOR EMPTY CARTRIDGE #
        6705. BEGIN
        6706. IF AST$STAT[I] EQ ASTENSTAT"ASS$CART" ##
        6707. AND AST$GR[I] NQ 0 ##
        6708. AND (AST$AULF[I] + AST$AUSF[I] + AST$FLAWS[I] EQ INAVOT)
        6709. THEN # CARTRIDGE IS FOUND #
        6710. BEGIN
        6711. FCTORD = I;
        6712. FLAG = 0;
        6713. TEST I;
        6714. END
        6715.  
        6716. END
        6717.  
        6718.  
        6719.  
        6720.  
        6721. RETURN;
        6722.  
        6723. END # SERAST #
        6724.  
        6725. TERM
        6726. PROC SERASTG(GROUP,GRT,FLAG);
        6727. # TITLE SERASTG - SEARCHES THE AST FOR AN AVAILABLE GROUP ORDINAL. #
        6728.  
        6729. BEGIN # SERASTG #
        6730.  
        6731. #
        6732. ** SERASTG - SEARCHES THE AST FOR AN AVAILABEL GROUP ORDINAL.
        6733. *
        6734. * THIS PROC READS THE AST AND FINDS
        6735. *
        6736. * PROC SERASTG(GROUP,GRT,FLAG)
        6737. *
        6738. * (GROUP) = IF NEGATIVE FIND DEFAULT GROUP AND
        6739. * ORDINAL, OTHERWISE FIND GROUP ORDINAL
        6740. * FOR THE SPECIFIED GROUP.
        6741. * ENTRY (LB$BUFP) = FWA OF A BUFFER 1101B WORDS LONG.
        6742. *
        6743. * EXIT
        6744. * (FLAG) = ITEM INDICATING RESULT OF SEARCH.
        6745. * (GROUP) = DEFAULT OR SPECIFIED GROUP.
        6746. * (GRT) = GROUP ORDINAL IF AVAILABLE.
        6747. *
        6748. * NOTES PROC *SERAST* READS THE AVAILABLE STREAM TABLE FOR
        6749. #
        6750.  
        6751. ITEM FCTORD U; # EMPTY CARTRIDGE FCT ORDINAL #
        6752. ITEM FLAG I; # ERROR FLAG #
        6753. ITEM GROUP I; # GROUP #
        6754. ITEM GRT I; # GROUP ORDINAL #
        6755. ITEM I I; # INDUCTION VARIABLE #
        6756. ITEM START U; # BEGINNING OF SEARCH #
        6757. ITEM TERMX U; # END OF SEARCH #
        6758.  
        6759. #
        6760. **** PROC SERAST - XREF LIST BEGIN.
        6761. #
        6762.  
        6763. XREF
        6764. BEGIN
        6765. PROC COPEN; # OPEN CATALOGS #
        6766. PROC CCLOSE; # CLOSE SFMCAT #
        6767. PROC CRDAST; # READS AVAILABLE STREAM TABLE #
        6768. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        6769. PROC LBRESP; # RESPONSE CODE PROCESSOR #
        6770. FUNC XCOD; # CONVERT TO DISPLAY CODE #
        6771. PROC LOFPROC; # LIST OF FILES #
        6772. END
        6773.  
        6774. #
        6775. **** PROC SERAST - XREF LIST END.
        6776. #
        6777.  
        6778. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        6779. *CALL COMBFAS
        6780. *CALL COMBCMD
        6781. *CALL COMBCMS
        6782. *CALL COMBMCT
        6783. *CALL COMTLAB
        6784. *CALL COMTLBP
        6785.  
        6786.  
        6787. *CALL COMTERR
        6788.  
        6789. ARRAY MSFCATNM [0:0] P(1); # CATALOG NAME #
        6790. BEGIN
        6791. ITEM MSFCAT$NM C(00,00,06); # FIRST SIX CHARACTERS #
        6792. ITEM MSFCAT$LST C(00,36,01); # LAST CHARACTER #
        6793. END
        6794.  
        6795. CONTROL EJECT;
        6796.  
        6797.  
        6798. #
        6799. * OPEN CATALOG.
        6800. #
        6801.  
        6802. MSFCAT$NM[0] = SFMCAT;
        6803. MSFCAT$LST[0] = XCOD(LBARG$SB[0]);
        6804. COPEN(LBARG$FM[0],LBARG$SB[0],MSFCATNM[0],"RM",TRUE,FLAG);
        6805. IF FLAG EQ CMASTAT"NOERR"
        6806. THEN
        6807. BEGIN
        6808. LOFPROC(OCT$LFN[1]); # ADD LFN TO LIST OF FILES #
        6809. END
        6810.  
        6811. IF FLAG NQ CMASTAT"NOERR" AND FLAG NQ CMASTAT"FOPEN"
        6812. THEN # ERROR CONDITION OTHER THAN
        6813.   CATALOG ALREADY OPEN #
        6814. BEGIN
        6815. LBRESP(FLAG,0);
        6816. RETURN;
        6817. END
        6818.  
        6819. #
        6820. * READ AST.
        6821. #
        6822.  
        6823. CRDAST(LBARG$FM[0],LBARG$SB[0],LBARG$SMID[0],ASTBADR,0,FLAG);
        6824. IF FLAG NQ OK
        6825. THEN
        6826. BEGIN
        6827. LBRESP(FLAG,0);
        6828. RETURN;
        6829. END
        6830.  
        6831.  
        6832. #
        6833. * SET AST BASED ARRAY POINTER.
        6834. #
        6835.  
        6836. P<AST> = ASTBADR;
        6837. CCLOSE(LBARG$FM[0],LBARG$SB[0],0,FLAG);
        6838.  
        6839. #
        6840. * FIND DEFAULT GROUP IF GROUP IS NEGATIVE, OR GROUP
        6841. * ORDINAL IF GROUP IS SPECIFIED.
        6842. #
        6843.  
        6844. FLAG = 1;
        6845. IF GROUP LS 0
        6846. THEN
        6847. BEGIN
        6848. SLOWFOR I = 16 STEP 1 ##
        6849. WHILE GROUP LS 0 ##
        6850. AND I LQ (MAXORD + 15)
        6851. DO # FIND DEFAULT GROUP #
        6852. BEGIN
        6853. IF (AST$STAT[I] NQ ASTENSTAT"ASS$CART") AND (AST$GR[I] EQ 0)
        6854. THEN # AVAILABLE ENTRY FOUND #
        6855. BEGIN
        6856. GROUP = I/16;
        6857. FLAG = 0;
        6858. TEST I;
        6859. END
        6860.  
        6861. END
        6862.  
        6863. IF FLAG NQ 0
        6864. THEN
        6865. BEGIN
        6866. RETURN;
        6867. END
        6868.  
        6869. END
        6870.  
        6871. #
        6872. * FIND ORDINAL WITHIN GROUP.
        6873. #
        6874.  
        6875. GRT = -1;
        6876. START = GROUP * 16;
        6877. TERMX = START + 15;
        6878. SLOWFOR I = START STEP 1 WHILE I LQ TERMX AND (GRT EQ -1)
        6879. DO # SEARCH GROUP FOR AVAILABLE ORD #
        6880. BEGIN
        6881. IF AST$GRT[I] EQ 0 AND AST$STAT[I] NQ ASTENSTAT"ASS$CART"
        6882. THEN
        6883. BEGIN
        6884. GRT = I - (I/16 * 16);
        6885. FLAG = 0;
        6886. TEST I;
        6887. END
        6888.  
        6889. END
        6890.  
        6891.  
        6892. RETURN;
        6893.  
        6894. END # SERAST #
        6895.  
        6896. TERM
        6897. PROC SERCSU((SERTYPE),(SP$Y),(SP$Z),(SP$CODE),(SP$VSN),(SP$FAM),##
        6898. (SP$SUB),PK$CSU$ENT,SERFLAG);
        6899. # TITLE SERCSU - SEARCHES SMMAP FOR A CUBE OR A CARTRIDGE. #
        6900.  
        6901. BEGIN # SERCSU #
        6902.  
        6903. #
        6904. ** SERCSU - SEARCHES SMMAP FOR A CUBE OR A CARTRIDGE.
        6905. *
        6906. * THIS PROC SEARCHES SMMAP FOR A SPECIFIC ENTRY.
        6907. *
        6908. * PROC SERCSU((SERTYPE),(SP$Y),(SP$Z),(SP$CODE),(SP$VSN),
        6909. * (SP$FAM),(SP$SUB),PK$CSU$ENT,SERFLAG)
        6910. *
        6911. * ENTRY SERTYPE, A STATUS ITEM SPECIFYING TYPE OF
        6912. * SEARCH TO BE CONDUCTED.
        6913. * S"LST$UNAS" SEARCH FOR LAST
        6914. * UNASSIGNED CUBE.
        6915. * S"LOC" SEARCH FOR A SPECIFIC
        6916. * LOCATION (SP$Y,SP$Z).
        6917. * S"ASSIGN" SEARCH FOR A SPECIFIC
        6918. * CARTRIDGE OR ANY CUBE
        6919. * ASSIGNED TO FAMILY OR
        6920. * POOL.
        6921. * S"CSN$MATCH" SEARCH FOR A MATCHING
        6922. * VSN.
        6923. * S"CART$POOL" SEARCH FOR ANY CARTRIDGE
        6924. * ASSIGNED TO A POOL.
        6925. * S"ASGN$FAM" SEARCH FOR ANY ENTRY
        6926. * ASSIGNED TO A GIVEN
        6927. * FAMILY.
        6928. * SP$Y, AN ITEM CONTAINING THE Y COORDINATE.
        6929. * SP$Z, AN ITEM CONTAINING THE Z COORDINATE.
        6930. * SP$CODE, A STATUS ITEM CONTAINING THE TYPE
        6931. * OF ASSIGNMENT OF CUBE OR CARTRIDGE.
        6932. * SP$VSN, AN ITEM CONTAINING THE VSN.
        6933. * SP$FAM, AN ITEM CONTAINING THE FAMILY.
        6934. * SP$SUB, AN ITEM CONTAINING THE SUB FAMILY.
        6935. *
        6936. * EXIT SEARCH COMPLETE.
        6937. * PK$CSU$ENT, AN ARRAY CONTAINING THE SMMAP
        6938. * ENTRY.
        6939. * SERFLAG, AN ITEM CONTAINING THE ERROR STATUS.
        6940. * 0 - ENTRY FOUND.
        6941. * 1 - ENTRY NOT FOUND.
        6942. *
        6943. * MESSAGES SSLABEL ABNORMAL, SERCSU.
        6944. *
        6945. * NOTES PROC *SERCSU* SEARCHES THE SMMAP FOR A
        6946. * SPECIFIC CUBE OR CARTRIDGE DEPENDING ON
        6947. * *SERTYPE*. THE ORDINAL OF THE SMMAP ENTRY
        6948. * IS MAPPED BACK INTO THE Y AND Z COORDINATES
        6949. * WHICH ARE PUT IN THE THIRD WORD ADDED TO THE
        6950. * TWO WORD SMMAP ENTRY IN *PK$CSU$ENT*. IF
        6951. * THE SPECIFIC ENTRY IS NOT FOUND, AN ERROR
        6952. * STATUS IS RETURNED BACK TO THE CALLING PROC.
        6953. #
        6954.  
        6955. ITEM SERTYPE U; # SMMAP SEARCH TYPE #
        6956. ITEM SP$Y I; # SPECIFIED Y COORDINATE OF
        6957.   CUBE/CARTRIDGE #
        6958. ITEM SP$Z I; # SPECIFIED Z COORDINATE OF
        6959.   CUBE/CARTRIDGE #
        6960. ITEM SP$CODE U; # CODE FOR CUBE/CARTRIDGE
        6961.   ASSIGNMENT #
        6962. ITEM SP$VSN C(8); # SPECIFIED *CSN* #
        6963. ITEM SP$FAM C(7); # SPECIFIED FAMILY TO PROCESS #
        6964. ITEM SP$SUB U; # SPECIFIED SUBFAMILY #
        6965.  
        6966. ARRAY PK$CSU$ENT [0:0] P(4); # *PICK* SMMAP ENTRY #
        6967. BEGIN
        6968. ITEM PK$MAPENT C(00,00,30); # THREE WORD SMMAP ENTRY #
        6969. ITEM PK$Y U(03,00,30); # Y COORDINATE #
        6970. ITEM PK$Z U(03,30,30); # Z COORDINATE #
        6971. END
        6972.  
        6973.  
        6974. ITEM SERFLAG I; # ERROR FLAG #
        6975.  
        6976. #
        6977. **** PROC SERCSU - XREF LIST BEGIN.
        6978. #
        6979.  
        6980. XREF
        6981. BEGIN
        6982. PROC MESSAGE; # DISPLAYS MESSAGES #
        6983. PROC MGETENT; # GETS SMMAP ENTRY #
        6984. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
        6985.   OR RETURN #
        6986. END
        6987.  
        6988. #
        6989. **** PROC SERCSU - XREF LIST END.
        6990. #
        6991.  
        6992. DEF PROCNAME #"SERCSU."#; # PROC NAME #
        6993.  
        6994. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        6995. *CALL COMBFAS
        6996. *CALL COMBCMS
        6997. *CALL COMBMAP
        6998. *CALL COMTLAB
        6999. *CALL COMTLBP
        7000.  
        7001. ITEM FLAG I; # ERROR FLAG #
        7002. ITEM I I; # LOOP VARIABLE #
        7003. ITEM PK$CSU$ADR I; # ADDRESS OF THE SMMAP ENTRY #
        7004.  
        7005. SWITCH SEARCH : SERCH$TYPE
        7006. SER$LSTUN: LST$UNAS, # SEARCH FOR LAST UNASSIGNED CUBE
        7007.   #
        7008. SER$LOC: LOC, # SEARCH FOR A LOCATION #
        7009. SER$ASG: ASSIGN, # SEARCH FOR A SPECIFIC CUBE OR
        7010.   CARTRIDGE ASSIGNED TO FAMILY OR
        7011.   POOL #
        7012. SER$VSN: CSN$MATCH, # SEARCH FOR A VSN #
        7013. SER$CARPL: CART$POOL, # SEARCH FOR CARTRIDGE IN POOL #
        7014. SER$ASNFM: ASGN$FAM; # SEARCH FOR AN ENTRY ASSIGNED TO
        7015.   A GIVEN FAMILY #
        7016.  
        7017. CONTROL EJECT;
        7018.  
        7019. SERFLAG = 1; # INITIALIZE ERROR FLAG TO AN
        7020.   ERROR CONDITION #
        7021.  
        7022. #
        7023. * CHECK *SERTYPE* FOR THE TYPE OF SEARCH TO BE
        7024. * CONDUCTED AND GO TO THE CORRESPONDING STATUS
        7025. * SWITCH TO PROCESS IT.
        7026. #
        7027.  
        7028. PK$CSU$ADR = LOC(PK$CSU$ENT[0]);
        7029. P<SMUMAP> = PK$CSU$ADR; # SMMAP ENTRY FORMAT #
        7030. GOTO SEARCH[SERTYPE];
        7031.  
        7032. #
        7033. * SEARCH FOR LAST UNASSIGNED CUBE.
        7034. #
        7035.  
        7036. SER$LSTUN:
        7037. SLOWFOR I = MAXORD STEP -1 UNTIL 1
        7038. DO
        7039. BEGIN # SEARCH SMMAP BACKWARDS #
        7040. MGETENT(LBARG$SMID[0],I,PK$CSU$ADR,FLAG);
        7041. IF FLAG NQ CMASTAT"NOERR"
        7042. THEN # ERROR CONDITION #
        7043. BEGIN
        7044. GOTO ERROR; # PROCESS THE ERROR #
        7045. END
        7046.  
        7047. IF CM$CODE[0] EQ CUBSTAT"UNASGN"
        7048. THEN # ENTRY IS FOUND #
        7049. BEGIN
        7050. GOTO SER$END;
        7051. END
        7052.  
        7053. END # SEARCH SMMAP BACKWARDS #
        7054.  
        7055. RETURN; # ENTRY NOT FOUND #
        7056.  
        7057. #
        7058. * SEARCH FOR A LOCATION IN CSU.
        7059. #
        7060.  
        7061. SER$LOC:
        7062. I = MAXORD - SP$Z - (SP$Y * (MAX$Z + 1)); # CALCULATE ORDINAL #
        7063. MGETENT(LBARG$SMID[0],I,PK$CSU$ADR,FLAG);
        7064. IF FLAG NQ CMASTAT"NOERR"
        7065. THEN # ERROR CONDITION #
        7066. BEGIN
        7067. GOTO ERROR; # PROCESS THE ERROR #
        7068. END
        7069.  
        7070. PK$Y[0] = SP$Y;
        7071. PK$Z[0] = SP$Z;
        7072. SERFLAG = 0; # CLEAR ERROR STATUS #
        7073. RETURN;
        7074.  
        7075. #
        7076. * SEARCH FOR A SPECIFIC CARTRIDGE.
        7077. #
        7078.  
        7079. SER$ASG:
        7080. SLOWFOR I = 1 STEP 1 UNTIL MAXORD
        7081. DO
        7082. BEGIN # SEARCH SMMAP #
        7083. MGETENT(LBARG$SMID[0],I,PK$CSU$ADR,FLAG);
        7084. IF FLAG NQ CMASTAT"NOERR"
        7085. THEN # ERROR CONDITION #
        7086. BEGIN
        7087. GOTO ERROR; # PROCESS THE ERROR #
        7088. END
        7089.  
        7090. #
        7091. * CHECK FAMILY, SUBFAMILY,
        7092. * ASSIGNMENT, AND VSN.
        7093. #
        7094.  
        7095. IF (CM$FMLYNM[0] EQ SP$FAM) ##
        7096. AND (CM$SUB[0] EQ SP$SUB) ##
        7097. AND (CM$CODE[0] EQ SP$CODE) ##
        7098. AND (CM$CSND[0] EQ SP$VSN)
        7099. THEN
        7100. BEGIN
        7101. GOTO SER$END; # ENTRY FOUND #
        7102. END
        7103.  
        7104. END # SEARCH SMMAP #
        7105.  
        7106. RETURN; # ENTRY NOT FOUND #
        7107.  
        7108. #
        7109. * SEARCH FOR A MATCHING VSN.
        7110. #
        7111.  
        7112. SER$VSN:
        7113. SLOWFOR I = 1 STEP 1 UNTIL MAXORD
        7114. DO
        7115. BEGIN # SEARCH SMMAP #
        7116. MGETENT(LBARG$SMID[0],I,PK$CSU$ADR,FLAG);
        7117. IF FLAG NQ CMASTAT"NOERR"
        7118. THEN # ABNORMAL ERROR CONDITION #
        7119. BEGIN
        7120. GOTO ERROR; # PROCESS THE ERROR #
        7121. END
        7122.  
        7123. IF CM$CSND[0] EQ SP$VSN
        7124. THEN # VSN MATCH FOUND #
        7125. BEGIN
        7126. GOTO SER$END;
        7127. END
        7128.  
        7129. END # SEARCH SMMAP #
        7130.  
        7131. RETURN; # ENTRY NOT FOUND #
        7132.  
        7133. #
        7134. * SEARCH FOR A CARTRIDGE IN POOL.
        7135. #
        7136.  
        7137. SER$CARPL:
        7138. SLOWFOR I = 1 STEP 1 UNTIL MAXORD
        7139. DO
        7140. BEGIN # SEARCH SMMAP #
        7141. MGETENT(LBARG$SMID[0],I,PK$CSU$ADR,FLAG);
        7142. IF FLAG NQ CMASTAT"NOERR"
        7143. THEN # ERROR CONDITION #
        7144. BEGIN
        7145. GOTO ERROR; # PROCESS THE ERROR #
        7146. END
        7147.  
        7148. IF CM$CODE[0] EQ CUBSTAT"SCRPOOL" ##
        7149. AND CM$CSND[0] NQ " " ##
        7150. AND NOT CM$FLAG1[0]
        7151. THEN # POOL CARTRIDGE FOUND #
        7152. BEGIN
        7153. GOTO SER$END;
        7154. END
        7155.  
        7156. END # SEARCH SMMAP #
        7157.  
        7158. RETURN; # ENTRY NOT FOUND #
        7159.  
        7160. #
        7161. * SEARCH FOR AN ENTRY ASSIGNED TO A GIVEN FAMILY.
        7162. #
        7163.  
        7164. SER$ASNFM:
        7165. SLOWFOR I = 1 STEP 1 UNTIL MAXORD
        7166. DO
        7167. BEGIN # SEARCH SMMAP #
        7168. MGETENT(LBARG$SMID[0],I,PK$CSU$ADR,FLAG);
        7169. IF FLAG NQ CMASTAT"NOERR"
        7170. THEN # ERROR CONDITION #
        7171. BEGIN
        7172. GOTO ERROR; # PROCESS THE ERROR #
        7173. END
        7174.  
        7175. IF CM$FMLYNM[0] EQ SP$FAM ##
        7176. AND CM$SUB[0] EQ SP$SUB
        7177. THEN # ENTRY FOUND #
        7178. BEGIN
        7179. SERFLAG = 0; # CLEAR ERROR STATUS #
        7180. RETURN;
        7181. END
        7182.  
        7183. END # SEARCH SMMAP #
        7184.  
        7185. RETURN; # ENTRY NOT FOUND #
        7186.  
        7187. #
        7188. * SET UP Y AND Z COORDINATES.
        7189. #
        7190.  
        7191. SER$END:
        7192. PK$Y[0] = (MAXORD - I)/(MAX$Z + 1);
        7193. PK$Z[0] = MAXORD - I - (MAX$Z + 1) * PK$Y[0];
        7194. SERFLAG = 0;
        7195. RETURN;
        7196.  
        7197. #
        7198. * PROCESS THE ERROR ENCOUNTERED WHILE
        7199. * SEARCHING THE SMUMAP.
        7200. #
        7201.  
        7202. ERROR:
        7203. LBMSG$PROC[0] = PROCNAME;
        7204. MESSAGE(LBMSG[0],SYSUDF1);
        7205. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
        7206.  
        7207. END # SERCSU #
        7208.  
        7209. TERM
        7210. PROC SETCORD;
        7211. # TITLE SETCORD - SETS Y,Z COORDINATES OF CUBES. #
        7212.  
        7213. BEGIN # SETCORD #
        7214.  
        7215. #
        7216. ** SETCORD - SETS Y,Z COORDINATES OF CUBES.
        7217. *
        7218. * THIS PROC SETS UP THE Y AND Z COORDINATE POSITIONS OF THE
        7219. * CUBES SPECIFIED, IN A TABLE *YZCOORD*. IT ALSO RETURNS THE
        7220. * NUMBER OF CUBES SITUATED WITHIN A SPECFIED AREA IN THE CSU.
        7221. *
        7222. * PROC SETCORD.
        7223. *
        7224. * ENTRY LBARG$YI, AN ITEM CONTAINING FIRST Y COORDINATE
        7225. * OR -1.
        7226. * LBARG$ZI, AN ITEM CONTAINING FIRST Z COORDINATE
        7227. * OR -1.
        7228. * LBARG$YF, AN ITEM CONTAINING SECOND Y COORDINATE
        7229. * OR -1.
        7230. * LBARG$ZF, AN ITEM CONTAINING SECOND Z COORDINATE
        7231. * OR -1.
        7232. *
        7233. * EXIT YZCOORD, AN ARRAY IN COMMON CONTAINING THE Y, Z
        7234. * COORDINATES OF ALL THE CUBES.
        7235. * LBARG$N, AN ITEM IN COMMON CONTAINING
        7236. * NUMBER OF CUBES.
        7237. *
        7238. * NOTES PROC *SETCORD* SETS UP THE Y AND Z COORDINATES OF
        7239. * ALL THE CUBES SITUATED IN THE AREA OF THE *SM*
        7240. * SPECIFIED BZ *YI*, *YF*, *ZI* AND *ZF*, IN THE
        7241. * ARRAY *YZCOORD*. IT ALSO CALCULATES THE NUMBER OF
        7242. * CUBES INVOLVED. IF MORE THAN *MAXNUM CUBE
        7243. * LOCATIONS ARE SPECIFIED, AN INFORMATIVE MESSAGE
        7244. * IS PLACED IN THE DAYFILE AND THE REPORT FILE
        7245. * AND ONLY *MAXNUM* CUBES ARE PROCESSED.
        7246. #
        7247.  
        7248. #
        7249. **** PROC SETCORD - XREF LIST BEGIN.
        7250. #
        7251.  
        7252. XREF
        7253. BEGIN
        7254. PROC LBERR; # *SSLABEL* ERROR PROCESSOR #
        7255. END
        7256.  
        7257. #
        7258. **** PROC SETCORD - XREF LIST END.
        7259. #
        7260.  
        7261. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
        7262. *CALL COMBFAS
        7263. *CALL COMTERR
        7264. *CALL COMTLAB
        7265. *CALL COMTLBP
        7266.  
        7267. ITEM I I; # LOOP VARIABLE #
        7268. ITEM J I; # LOOP VARIABLE #
        7269. ITEM K I; # COUNTER FOR NUMBER OF CUBES #
        7270.  
        7271. CONTROL EJECT;
        7272.  
        7273. #
        7274. * CHECK TO SEE IF A COLUMN OF CUBES, A ROW OF CUBES,
        7275. * A RECTANGLE OF CUBES OR A SINGLE CUBE LOCATION IS
        7276. * SPECIFIED.
        7277. * IF *YI* ALONE IS SPECIFIED, SELECT A COLUMN
        7278. * OF CUBES AT *YI*.
        7279. #
        7280.  
        7281. IF (LBARG$YI[0] NQ -1) AND (LBARG$ZI[0] EQ -1)
        7282. THEN
        7283. BEGIN
        7284. LBARG$YF[0] = LBARG$YI[0];
        7285. LBARG$ZI[0] = 0;
        7286. LBARG$ZF[0] = MAX$Z; # SET LIMIT ON Z COORDINATE #
        7287. END
        7288.  
        7289. #
        7290. * IF *ZI* ALONE IS SPECIFIED, SELECT A ROW
        7291. * OF CUBES AT *ZI*.
        7292. #
        7293.  
        7294. IF (LBARG$YI[0] EQ -1) AND (LBARG$ZI[0] NQ -1)
        7295. THEN
        7296. BEGIN
        7297. LBARG$YI[0] = 0;
        7298. LBARG$YF[0] = MAX$Y; # SET LIMIT ON Y COORDINATE #
        7299. LBARG$ZF[0] = LBARG$ZI[0];
        7300. END
        7301.  
        7302. #
        7303. * IF *YI* AND *ZI* ALONE ARE SPECIFIED, SELECT
        7304. * THE CUBE AT LOCATION (YI,ZI).
        7305. #
        7306.  
        7307. IF (LBARG$YI[0] NQ -1) ##
        7308. AND (LBARG$ZI[0] NQ -1) ##
        7309. AND (LBARG$YF[0] EQ -1)
        7310. THEN
        7311. BEGIN
        7312. LBARG$YF[0] = LBARG$YI[0];
        7313. LBARG$ZF[0] = LBARG$ZI[0];
        7314. END
        7315.  
        7316. #
        7317. * SET UP THE COORDINATE POSITIONS IN ARRAY *YZCOORD*.
        7318. #
        7319.  
        7320. K = 1;
        7321. SLOWFOR I = LBARG$YI[0] STEP 1 UNTIL LBARG$YF[0]
        7322. DO
        7323. BEGIN
        7324. SLOWFOR J = LBARG$ZI[0] STEP 1 UNTIL LBARG$ZF[0]
        7325. DO
        7326. BEGIN
        7327.  
        7328. #
        7329. * SKIP OVER THE COORDINATE POSITIONS WHERE
        7330. * NO CUBES EXIST. NO CUBES AT:
        7331. * (0,0), ((Y=6),Y=0,21), (0,15), (11,15), (21,15),
        7332. * ((Y,Z), Y= 11,15, Z= 0,1).
        7333. #
        7334.  
        7335.  
        7336. IF J EQ Z$NO$CUBE
        7337. THEN # NO CUBES AT THIS LOCATION #
        7338. BEGIN
        7339. TEST J;
        7340. END
        7341.  
        7342. IF ((J EQ 0) ##
        7343. AND((I EQ 0) ##
        7344. OR (I EQ 11) ##
        7345. OR (I EQ 12) ##
        7346. OR (I EQ 13) ##
        7347. OR (I EQ 14) ##
        7348. OR (I EQ 15))) ##
        7349. OR ((J EQ 1) ##
        7350. AND ((I EQ 11) ##
        7351. OR (I EQ 12) ##
        7352. OR (I EQ 13) ##
        7353. OR (I EQ 14) ##
        7354. OR (I EQ 15))) ##
        7355. OR ((J EQ 15) ##
        7356. AND ((I EQ 0) ##
        7357. OR (I EQ 11) ##
        7358. OR (I EQ 21))) ##
        7359. THEN # IGNORE NON-EXISTANT CUBES #
        7360. BEGIN
        7361. TEST J;
        7362. END
        7363.  
        7364.  
        7365. #
        7366. * CHECK IF MORE THAN *MAXNUM* CUBE LOCATIONS
        7367. * ARE SPECIFIED.
        7368. #
        7369.  
        7370. IF K GR MAXNUM
        7371. THEN
        7372. BEGIN
        7373. ERRCODE = S"NUM$CUBE";
        7374. LBERR(ERRCODE);
        7375. LBARG$N[0] = K - 1;
        7376. RETURN;
        7377. END
        7378.  
        7379. Y$COORD[K] = I; # SET UP Y AND Z COORDINATES #
        7380. Z$COORD[K] = J;
        7381. K = K + 1;
        7382. END
        7383.  
        7384. END
        7385.  
        7386. LBARG$N[0] = K - 1; # SET NUMBER OF CUBES #
        7387. RETURN;
        7388.  
        7389. END # SETCORD #
        7390.  
        7391. TERM
        5)

        SSLABEL

        Table Of Contents

        • [00001] PRGM SSLABEL
        • [00002] SSLABEL - INITIALIZES *SSLABEL*.
        • [00007] INITIALIZES *SSLABEL*.
        • [00238] PROC ABORT
        • [00239] PROC BZFILL
        • [00240] PROC CALL1
        • [00241] PROC GETFAM
        • [00242] PROC GETPFP
        • [00243] PROC GETSPS
        • [00244] PROC LBERR
        • [00245] PROC LBHEAD
        • [00246] PROC LBLOOP
        • [00248] PROC LBMAIN
        • [00249] PROC LBTAB
        • [00250] PROC MESSAGE
        • [00251] PROC PDATE
        • [00252] PROC READ
        • [00253] PROC RESTPFP
        • [00255] PROC RPCLOSE
        • [00256] PROC RPLINE
        • [00257] PROC RPOPEN
        • [00258] PROC RPSPACE
        • [00259] PROC VERSION
        • [00260] PROC XARG
        • [00261] PROC XZAP
        • [00262] PROC ZSETFET
        • [00473] PROC CALL11)
        • [02802] LBERR - *SSLABEL* ERROR PROCESSOR.
        • [02807] LBERR - *SSLABEL* ERROR PROCESSOR.
        • [02847] PROC MESSAGE
        • [02848] PROC RESTPFP
        • [02850] PROC RPCLOSE
        • [02851] PROC RPLINE
        • [02852] PROC RPSPACE
        • [02853] FUNC XCDD C(10)
        • [03096] PROC LBFLMSC
        • [03097] LBFLMSC - MODIFIES THE *INHIBIT* FLAG IN THE FCT.
        • [03102] LBFLMSC - MODIFIES THE *INHIBIT* FLAG IN THE FCT.
        • [03130] PROC CALL3
        • [03131] PROC LBERR
        • [03132] PROC LBRESP
        • [03133] PROC SERCSU
        • [03247] PROC LBFXVSN
        • [03248] LBFXVSN - REPLACES LABEL WITH SCRATCH LABEL.
        • [03253] LBFXVSN - REPLACES LABEL WITH A SCRATCH LABEL.
        • [03281] PROC CALL3
        • [03282] PROC CALL4
        • [03283] PROC CKLAB
        • [03284] PROC CONVSN
        • [03286] PROC DCEBC
        • [03287] PROC DLABFLD
        • [03288] PROC GENLAB
        • [03289] PROC LBERR
        • [03290] PROC LBRESP
        • [03291] PROC SERCSU
        • [03606] PROC LBHEAD2)
        • [03607] LBHEAD - WRITES HEADER LINE ON OUTPUT FILE.
        • [03612] LBHEAD - WRITES HEADER LINE ON OUTPUT FILE.
        • [03632] PROC RPLINEX
        • [03656] PROC LBLOOP3) [04902] LBRESP - ACTS UPON RESPONSE CODES FROM EXEC. [04907] LBRESP - ACTS UPON RESPONSE CODES FROM EXEC. [04941] PROC LBERR [04942] PROC MESSAGE [04943] PROC RESTPFP [05154] PROC LBRMCSU [05155] LBRMCSU - REMOVE A *SM* FROM A FAMILY CATALOG. [05160] LBRMCSU - REMOVE A *SM* FROM A FAMILY CATALOG. [05186] PROC CALL3 [05187] PROC LBERR [05188] PROC LBRESP [05189] PROC SERCSU [05248] PROC LBRMCUB [05249] LBRMCUB - REMOVES CUBES FROM FAMILY/POOL/RESERVED AREA. [05254] LBRMCUB - REMOVES CUBES FROM FAMILY/POOL/RESERVED AREA. [05285] PROC CALL3 [05286] PROC LBERR [05287] PROC LBRESP [05288] PROC MFLUSH [05289] PROC SERCSU [05290] PROC SETCORD [05467] PROC LBRMMSC [05468] LBRMMSC - REMOVES CARTRIDGES FROM A FAMILY OR POOL. [05473] LBRMMSC - REMOVES CARTRIDGES FROM A FAMILY OR POOL. [05507] PROC CALL3 [05508] PROC CALL4 [05509] PROC CCLOSE [05510] PROC CGETFCT [05511] PROC COPEN [05512] PROC DLABFLD [05513] PROC GENLAB [05514] PROC LBERR [05515] PROC LBRESP [05516] PROC LOFPROC [05517] PROC MCLOSE [05518] PROC MESSAGE [05519] PROC MFLUSH [05520] PROC MOPEN [05521] PROC RESTPFP [05523] PROC SERAST [05524] PROC SERCSU [05525] PROC SETPFP [05526] FUNC XCOD [06202] PROC LBRSMSC [06203] LBRSMSC - RESTORES A CARTRIDGE TO THE CSU. [06208] LBRSMSC - RESTORES A CARTRIDGE TO THE CSU. [06236] PROC CALL3 [06237] PROC CALL4 [06238] PROC DLABFLD [06239] PROC LBERR [06240] PROC LBRESP [06241] PROC SERCSU [06447] PROC LBSTCLR [06448] LBSTCLR - STORES A *CE* CARTRIDGE IN 0,0 OR 0,15. [06453] LBSTCLR - STORES A *CE* CARTRIDGE IN 0,0 OR 0,15. [06476] PROC CALL4 [06477] PROC CKLAB [06478] PROC GENLAB [06479] PROC LBERR [06480] PROC LBRESP [06481] PROC SERCSU [06602] PROC SERAST(FCTORD,FLAG) [06603] SERAST - SEARCHES THE AST FOR AN EMPTY CARTRIDGE. [06608] SERAST - SEARCHES THE AST FOR AN EMPTY CARTRIDGE. [06640] PROC CRDAST [06641] PROC LBERR [06642] PROC LBRESP [06726] PROC SERASTG(GROUP,GRT,FLAG) [06727] SERASTG - SEARCHES THE AST FOR AN AVAILABLE GROUP ORDINAL. [06732] SERASTG - SEARCHES THE AST FOR AN AVAILABEL GROUP ORDINAL. [06765] PROC COPEN [06766] PROC CCLOSE [06767] PROC CRDAST [06768] PROC LBERR [06769] PROC LBRESP [06770] FUNC XCOD [06771] PROC LOFPROC [06897] PROC SERCSU4)