User Tools

Site Tools


cdc:nos2.source:opl871:ssdef

Table of Contents

SSDEF

Table Of Contents

  • [00001] PRGM SSDEF
  • [00004] SSDEF - MAIN ROUTINE OF SSDEF.
  • [00009] INITIALIZE CATALOGS AND SMMAPS.
  • [00067] PROC ABORT
  • [00068] PROC DFCAT
  • [00069] PROC DFMAP
  • [00070] PROC DFTAB
  • [00071] PROC GETPFP
  • [00072] PROC GETSPS
  • [00073] PROC MESSAGE
  • [00074] PROC RESTPFP
  • [00075] PROC SSINIT
  • [00076] PROC XARG
  • [00215] PROC DFCAT
  • [00216] DFCAT - INITIALIZE 8 *M860* CATALOGS.
  • [00221] DFCAT - INITIALIZE 8 *M860* CATALOGS.
  • [00257] PROC BZFILL
  • [00258] PROC CINIT
  • [00259] PROC DELAY
  • [00260] PROC GETFAM
  • [00261] PROC LOFPROC
  • [00262] PROC MESSAGE
  • [00263] PROC PF
  • [00264] PROC RECALL
  • [00265] PROC RESTPFP
  • [00267] PROC RETERN
  • [00268] PROC REWIND
  • [00269] PROC RPHR
  • [00270] PROC SETPFP
  • [00271] FUNC XCOD
  • [00272] PROC XWOD
  • [00273] PROC ZSETFET
  • [00557] PROC DFMAP
  • [00558] DFMAP - INITIALIZES *SMMAP* FOR THE *SM* SPECIFIED.
  • [00563] DFMAP - INITIALIZES *SMMAP* FOR THE *SM* SPECIFIED.
  • [00593] PROC BZFILL
  • [00594] PROC GETFAM
  • [00595] PROC LOFPROC
  • [00596] PROC MESSAGE
  • [00597] PROC MINIT
  • [00598] PROC RESTPFP
  • [00600] PROC RETERN
  • [00601] PROC SETPFP
  • [00602] PROC XWOD
  • [00603] PROC ZSETFET

Source Code

SSDEF.txt
  1. PRGM SSDEF;
  2.  
  3.  
  4. # TITLE SSDEF - MAIN ROUTINE OF SSDEF. #
  5.  
  6. BEGIN # SSDEF #
  7.  
  8. #
  9. *** SSDEF - INITIALIZE CATALOGS AND SMMAPS.
  10. *
  11. * SSDEF ENSURES THAT CATALOGS AND SMMAPS ARE INITIALIZED.
  12. * SSDEF MUST BE RUN FROM THE MAINFRAME WHICH HAS ACCESS TO ALL
  13. * FAMILIES THAT MAY CONTAIN *M860* FILES.
  14. *
  15. *
  16. * SSDEF,PARAMETER,PARAMETER.
  17. *
  18. * PARAMETER DESCRIPTION
  19. *
  20. * SM USE *SM* A.
  21. *
  22. * SM=X USE *SM* X WHEN X IS ONE OF THE FOLLOWING:
  23. * A - *SM* A
  24. * B - *SM* B
  25. * C - *SM* C
  26. * D - *SM* D
  27. * E - *SM* E
  28. * F - *SM* F
  29. * G - *SM* G
  30. * H - *SM* H
  31. *
  32. * SM OMITTED *FM* OPTION MUST BE SPECIFIED.
  33. *
  34. * FM USE DEFAULT FAMILY.
  35. *
  36. * FM=FAMILY THE SPECIFIED FAMILY WILL BE USED.
  37. *
  38. * FM OMITTED *SM* OPTION MUST BE SPECIFIED.
  39. *
  40. * NOTE: ONE *SM* AND/OR ONE *FM* PARAMETER MUST BE SPECIFIED
  41. * FOR EACH EXECUTION OF *SSDEF*.
  42. *
  43. *
  44. * PRGM SSDEF.
  45. *
  46. * ENTRY. PARAMETERS ARE IN THE *RA* AREA.
  47. *
  48. * EXIT. SSDEF COMPLETE.
  49. * ERROR CONDITION - ABORT WITH DAYFILE MESSAGE.
  50. *
  51. * MESSAGES. SSDEF ABORT - SYNTAX ERROR.
  52. * SSDEF ABORT - NO PARAMETER SPECIFIED.
  53. * SSDEF - MUST BE SYSTEM ORIGIN.
  54. * SSDEF ABORT - ILLEGAL SM VALUE.
  55. * SSDEF ERRORS.
  56. * SSDEF COMPLETE.
  57. *
  58. * COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
  59. #
  60.  
  61. #
  62. **** PRGM SSDEF - XREF LIST BEGIN.
  63. #
  64.  
  65. XREF
  66. BEGIN
  67. PROC ABORT; # CALLS *ABORT* MACRO #
  68. PROC DFCAT; # INITIALIZES SFMCATN FILES #
  69. PROC DFMAP; # INITIALIZES SMMAPN FILES #
  70. PROC DFTAB; # SETS UP ARGUMENT LIST #
  71. PROC GETPFP; # GET USER INDEX AND FAMILY #
  72. PROC GETSPS; # GET SYSTEM ORIGIN STATUS #
  73. PROC MESSAGE; # CALLS MESSAGE MACRO #
  74. PROC RESTPFP; # RESTORE USER-S *PFP* #
  75. PROC SSINIT; # ACCESS ROUTINE INITIALIZER #
  76. PROC XARG; # CRACK PARAMETER LIST #
  77. END
  78.  
  79. #
  80. **** PRGM SSDEF - XREF LIST END.
  81. #
  82.  
  83. DEF SMMAX #"H"#; # MAXIMUM SM VALUE #
  84. DEF SMMIN #"A"#; # MINIMUM SM VALUE #
  85. DEF NOPARAM #-1#; # NO PARAMETER SPECIFIED #
  86. DEF RSLEN #1#; # RETURN STATUS WORD LENGTH #
  87. DEF SYNTAXOK #0#; # SYNTAX OK #
  88.  
  89. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  90.  
  91. CONTROL PRESET;
  92. *CALL COMBFAS
  93. *CALL COMBCMD
  94. *CALL COMBCMS
  95. *CALL COMBPFP
  96. *CALL COMTDEF
  97. *CALL COMTDFP
  98.  
  99. ITEM ARGLIST U; # ADDRESS OF ARGUMENT TABLE #
  100. ITEM FLAG U; # ERROR FLAG FOR ASARG #
  101. ITEM OPTION I; # OPTION TO SKIP PROGRAM NAME #
  102.  
  103. ARRAY SPSSTAT [0:0] S(1);
  104. BEGIN
  105. ITEM SPSSTATUS U(00,48,12); # RETURN STATUS #
  106. END
  107.  
  108. CONTROL EJECT;
  109.  
  110. #
  111. * IF THE USER HAS SYSTEM ORIGIN PRIVELEDGES, THEN SAVE THE USER-S
  112. * CURRENT PERMANENT FILE PARAMETERS.
  113. #
  114.  
  115. GETSPS(SPSSTAT); # GET SYSTEM ORIGIN STATUS #
  116. IF SPSSTATUS NQ 0
  117. THEN
  118. BEGIN
  119. MSG$LINE[0] = " SSDEF - MUST BE SYSTEM ORIGIN.";
  120. MESSAGE(MSG$BUF[0],SYSUDF1);
  121. ABORT;
  122. END
  123.  
  124.  
  125. GETPFP(PFP[0]);
  126. USER$FAM[0] = PFP$FAM[0];
  127. USER$UI[0] = PFP$UI[0];
  128. USER$PACK[0] = PFP$PACK[0];
  129.  
  130. #
  131. * CRACK THE PARAMETERS ON THE *SSDEF* CALL.
  132. #
  133.  
  134. DFTAB(ARGLIST); # SET UP THE ARGUMENT LIST #
  135. OPTION = 0; # SKIP OVER PROGRAM NAME #
  136. XARG(ARGLIST,OPTION,FLAG); # CRACK THE PARAMETERS #
  137.  
  138. IF FLAG NQ SYNTAXOK
  139. THEN
  140. BEGIN
  141. MSG$LINE[0] = " SSDEF ABORT - SYNTAX ERROR.";
  142. MESSAGE(MSG$BUF[0],SYSUDF1);
  143. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  144. END
  145.  
  146. #
  147. * CHECK FOR INVALID PARAMETER OPTIONS.
  148. #
  149.  
  150. IF(DARG$ISM EQ NOPARAM AND DARG$IFM EQ NOPARAM)
  151. THEN
  152. BEGIN
  153. MSG$LINE[0] = " SSDEF ABORT - NO PARAMETER SPECIFIED.";
  154. MESSAGE(MSG$BUF[0],SYSUDF1);
  155. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  156. END
  157.  
  158. IF DARG$ISM NQ NOPARAM ##
  159. AND (DARG$IRSM LS SMMIN ##
  160. OR DARG$IRSM GR SMMAX ##
  161. OR DARG$IRSMR NQ 0)
  162. THEN
  163. BEGIN
  164. MSG$LINE[0] = " SSDEF ABORT - ILLEGAL SM VALUE.";
  165. MESSAGE(MSG$BUF[0],SYSUDF1);
  166. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  167. END
  168.  
  169. #
  170. * CALL INITIALIZATION ROUTINE FOR CATALOG AND MAP ACCESS ROUTINES.
  171. #
  172.  
  173. SSINIT; # INITIALIZES ACCESS ROUTINES #
  174.  
  175. #
  176. * PROCESS PARAMETERS.
  177. #
  178.  
  179.  
  180. IF(DARG$IFM NQ NOPARAM)
  181. THEN
  182. BEGIN # FM PARAMETER SPECIFIED #
  183. DFCAT; # INITIALIZE SFMCAT FILES #
  184. END
  185.  
  186. IF(DARG$ISM NQ NOPARAM)
  187. THEN
  188. BEGIN # SM PARAMETER SPECIFIED #
  189. DFMAP; # INITIALIZE SMMAP #
  190. END
  191.  
  192. #
  193. * CHECK ERROR FLAG FOR SSDEF ERRORS.
  194. #
  195.  
  196. IF ERRFLAGDF OR ERRFAMDF
  197. THEN
  198. BEGIN
  199. MSG$LINE[0] = " SSDEF ERRORS.";
  200. MESSAGE(MSG$BUF[0],SYSUDF1);
  201. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  202. END
  203.  
  204. ELSE
  205. BEGIN
  206. MSG$LINE[0] = " SSDEF COMPLETE."; # SSDEF COMPLETE #
  207. MESSAGE(MSG$BUF[0],UDFL1);
  208. END
  209.  
  210. RESTPFP(PFP$END); # RESTORE USER-S *PFP* #
  211.  
  212. END # SSDEF #
  213.  
  214. TERM
  215. PROC DFCAT;
  216. # TITLE DFCAT - INITIALIZE 8 *M860* CATALOGS. #
  217.  
  218. BEGIN # DFCAT #
  219.  
  220. #
  221. ** DFCAT - INITIALIZE 8 *M860* CATALOGS.
  222. *
  223. * THIS PROCEDURE PERFORMS THE INITIALIZATION PROCESSING
  224. * FOR EACH *M860* CATALOG OF THE 8 SUB-FAMILIES.
  225. *
  226. * PROC DFCAT
  227. *
  228. * ENTRY INITIALIZATION FOR CATALOG AND MAP ACCESS COMPLETED.
  229. *
  230. * EXIT M860 CATALOGS INITIALIZED OR ERROR CONDITIONS
  231. * DEFINED BELOW.
  232. *
  233. * MESSAGES 1) PFN=PFN, FAMILY=FAMILY,
  234. * UI=UI - ALREADY PERMANENT.
  235. *
  236. * 2) PFN=PFN, FAMILY=FAMILY,
  237. * UI=UI - FILE INITIALIZED.
  238. *
  239. * 3) PFN=PFN, FAMILY=FAMILY,
  240. * UI=UI - CIO ERROR.
  241. *
  242. * 4) PFN=PFN, FAMILY=FAMILY,
  243. * UI=UI - DEFINE ERROR.
  244. *
  245. * 5) PFN=PFN, FAMILY=FAMILY,
  246. * UI=UI - FAMILY NOT FOUND.
  247. *
  248. * 6) SSDEF ABNORMAL - DFCAT.
  249. #
  250.  
  251. #
  252. **** PROC DFCAT - XREF LIST BEGIN.
  253. #
  254.  
  255. XREF
  256. BEGIN
  257. PROC BZFILL; # BLANK OR ZERO FILLS FIELD #
  258. PROC CINIT; # INITIALIZES M860 CATALOGS #
  259. PROC DELAY; # CALLS *RECALL* MACRO #
  260. PROC GETFAM; # GETS DEFAULT FAMILY #
  261. PROC LOFPROC; # LIST OF FILES PROCESSOR #
  262. PROC MESSAGE; # SENDS MESSAGE TO DAYFILE #
  263. PROC PF; # *PFM* REQUEST INTERFACE #
  264. PROC RECALL; # PERIODIC RECALL #
  265. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
  266.   OR RETURN #
  267. PROC RETERN; # RETURNS A FILE #
  268. PROC REWIND; # CALLS *REWIND* MACRO #
  269. PROC RPHR; # READS A *PRU* FROM FILE #
  270. PROC SETPFP; # SETS USER INDEX AND FAMILY #
  271. FUNC XCOD; # CHANGES INTEGER TO DISPLAY #
  272. PROC XWOD; # CHANGES OCTAL TO DISPLAY #
  273. PROC ZSETFET; # SETS UP *FET* FIELDS #
  274. END
  275.  
  276. #
  277. **** PROC DFCAT - XREF LIST END.
  278. #
  279.  
  280. DEF BLANK #" "#; # DISPLAY CODE FOR BLANK #
  281. DEF COMMA #","#; # DISPLAY CODE FOR COMMA #
  282. DEF FILLSIZE #7#; # FILL SIZE FOR BZFILL #
  283. DEF REQUESTDEF #0#; # DEFAULT FAMILY REQUESTED #
  284. DEF UN #0#; # USER NUMBER #
  285.  
  286. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  287.  
  288. *CALL COMBFAS
  289. *CALL COMBBZF
  290. *CALL COMBCMD
  291. *CALL COMBCMS
  292. *CALL COMBFET
  293. *CALL COMBPFP
  294. *CALL COMSPFM
  295. *CALL COMTDEF
  296. *CALL COMTDFP
  297.  
  298. ITEM BLKFILL S:TYPFILL = S"BFILL"; # BLANK FILL FOR BZFILL #
  299. ITEM BUSY B; # FILE BUSY FLAG #
  300. ITEM ERCINIT U; # *CINIT* RETURN CODE #
  301. ITEM FILE$DONE B; # FILE PROCESSING DONE FLAG #
  302. ITEM FOUND B; # CHARACTER FOUND FLAG #
  303. ITEM I U; # LOOP INDEX #
  304. ITEM J U; # DUMMY LOOP INDEX #
  305. ITEM K U; # DUMMY LOOP INDEX #
  306. ITEM MSGTEMP C(8); # TEMPORARY MESSAGE FIELD #
  307. ITEM STAT U; # STATUS FROM ATTACH #
  308. ITEM STATUSR U; # RETURN STATUS #
  309. ITEM UI U; # USER INDEX #
  310.  
  311. ARRAY CAT [0:0] P(1);
  312. BEGIN # CAT #
  313. ITEM CAT$PFN C(00,00,07) = ["SFMCAT "]; # NAME HEADER #
  314. ITEM CAT$LST C(00,36,01); # UNIQUE IDENTIFIER #
  315. END # CAT #
  316.  
  317. ARRAY MSGDETAIL1 [0:0] P(4);
  318. BEGIN # ARRAY MSGDETAIL1 #
  319. ITEM LEAD1 C(00,00,01) = [" "]; # LEADING BLANK #
  320. ITEM MSGPFNH C(00,06,04) = ["PFN="]; # PFN= #
  321. ITEM MSGPFN C(00,30,07); # FILE NAME #
  322. ITEM MSGFAMH C(01,12,09) = [", FAMILY="]; # FAMILY= #
  323. ITEM MSGFAM C(02,06,08); # FAMILY AND COMMA #
  324. ITEM MSGZRO1 U(03,00,12) = [0]; # TERMINATOR #
  325. END # ARRAY MSGDETAIL1 #
  326.  
  327. #
  328. * SWITCH FOR *CINIT* ERROR RETURN.
  329. #
  330.  
  331. SWITCH ERJMP:CMASTAT
  332. NOERRJ:NOERR, # FILE INITIALIZED #
  333. INTLZDJ:INTLZD, # ALREADY PERMANENT #
  334. CIOERRJ:CIOERR, # CIO ERROR #
  335. DEFERRJ:DEFERR; # DEFINE ERROR #
  336. CONTROL EJECT;
  337.  
  338. #
  339. * IF *FM* SPECIFIED GET DEFAULT FAMILY.
  340. #
  341.  
  342. IF DARG$FM EQ REQUESTDEF
  343. THEN
  344. BEGIN # DEFAULT FAMILY REQUESTED #
  345. GETFAM(FAMT,NDF,LINKDF,DEFAULTDF); # GET DEFAULT FAMILY #
  346. DARG$FM = FAM$NAME[DEFAULTDF]; # PUT NAME INTO ARGUMENT ARRAY
  347.   #
  348. DFLTFMDF = TRUE; # SET DEFAULT FAMILY FLAG #
  349. END # DEFAULT FAMILY REQUESTED #
  350.  
  351. #
  352. * BLANK FILL FAMILY NAME AND MOVE IT INTO DETAIL MESSAGE.
  353. #
  354.  
  355. MSGTEMP = DARG$FM; # TEMPORARY BUFFER FOR BZFILL #
  356. BZFILL(MSGTEMP,BLKFILL,FILLSIZE); # BLANK FILL #
  357. MSGFAM[0] = MSGTEMP; # SET FAMILY INTO MESSAGE #
  358.  
  359. #
  360. * PLACE COMMA AFTER FAMILY NAME.
  361. #
  362.  
  363. FOUND = FALSE; # FLAG TO INDICATE BLANK FOUND #
  364. FASTFOR I = 0 STEP 1 WHILE NOT FOUND
  365. DO
  366. BEGIN
  367. IF C<I,1>MSGFAM EQ BLANK
  368. THEN
  369. BEGIN # CHARACTER AT INDEX IS BLANK #
  370. FOUND = TRUE;
  371. C<I,1>MSGFAM = COMMA; # CHANGE BLANK TO COMMA #
  372. END # CHARACTER AT INDEX IS BLANK #
  373.  
  374. END
  375.  
  376. #
  377. * IF *ERRFLAGDF* NOT SET, CALL *CINIT* FOR EACH SUBFAMILY.
  378. #
  379.  
  380. ERRFLAGDF = FALSE;
  381.  
  382.  
  383. IF NOT ERRFLAGDF
  384. THEN
  385. BEGIN # *CINIT* CALLS #
  386. SLOWFOR I = 0 STEP 1 WHILE I LQ MAXSF
  387. DO
  388. BEGIN # FOR EACH SUBFAMILY #
  389. UI = DEF$UI + I; # CALCULATE USER INDEX #
  390. XWOD(UI,DIS); # CHANGE FROM OCTAL TO DISPLAY #
  391. MSGUIDF[0] = DIS$UI; # PLACE USER INDEX INTO MESSAGE #
  392.  
  393. CAT$LST[0] = XCOD(I); # CHANGE INDEX TO DISPLAY CODE #
  394. MSGPFN = CAT$PFN; # FILE NAME TO MESSAGE #
  395.  
  396. PFP$UI[0] = UI; # SET USER INDEX FOR *SETPFP* #
  397. PFP$FAM[0] = DARG$FM; # SET FAMILY NAME FOR *SETPFP* #
  398. PFP$FG1[0] = TRUE; # SET FAMILY BIT FOR *SETPFP* #
  399. PFP$FG4[0] = TRUE; # SET INDEX BIT FOR *SETPFP* #
  400.  
  401. SETPFP(PFP); # SET USER INDEX AND FAMILY #
  402.  
  403. IF PFP$STAT NQ 0
  404. THEN
  405. BEGIN
  406. MSGDETMSG[0] = "FAMILY NOT FOUND.";
  407. MESSAGE(MSGDETAIL1,SYSUDF1); # SEND MESSAGE TO DAYFILE #
  408. MESSAGE(MSGDETAIL2,SYSUDF1);
  409.  
  410. ERRFAMDF = TRUE;
  411. END
  412.  
  413. IF ERRFAMDF
  414. THEN
  415. BEGIN
  416. TEST I;
  417. END
  418.  
  419. #
  420. * *CINIT* IS CALLED TO INITIALIZE AN *M860* CATALOG IF THE
  421. * CATALOG IS CURRENTLY UNDEFINED. IF THE CATALOG IS ALREADY
  422. * PERMANENT, IT IS CHECKED TO DETERMINE WHETHER IT IS A VALID
  423. * CATALOG OR WHETHER IT IS AN EMPTY CATALOG CREATED BY
  424. * *PFDUMP* FOR INTERLOCKING PURPOSES. IF IT IS A *PFDUMP*
  425. * CATALOG, IT IS PURGED AND INITIALIZED BY *CINIT*.
  426. *
  427. * NOTE - *PFDUMP* CATALOGS ARE EMPTY AND CONSEQUENTLY CAN BE
  428. * IDENTIFIED BY REACHING AN *EOI* ON AN ATTEMPT TO READ
  429. * A *PRU*.
  430. #
  431.  
  432. FILE$DONE = FALSE;
  433. LOFPROC(CAT$PFN[0]); # ADD LFN TO LIST OF FILES #
  434. SLOWFOR J=0 WHILE NOT FILE$DONE
  435. DO
  436. BEGIN # CREATE CATALOG OR VERIFY ITS VALIDITY #
  437. ZSETFET(TFETADR,CAT$PFN[0],TBUFADR,TBUFL,RFETL);
  438. RETERN(TFET,RCL);
  439. CINIT(DARG$FM,I,CAT$PFN[0],ERCINIT);
  440.  
  441. #
  442. * PROCESS *CINIT* ERROR CODE.
  443. #
  444.  
  445. IF ERCINIT LS CMASTAT"NOERR" OR ERCINIT GR CMASTAT"STATLAST
  446. "
  447. THEN
  448. BEGIN # IF *ERCINIT* OUT OF RANGE #
  449. MSG$LINE[0] = " SSDEF ABNORMAL, DFCAT.";
  450. MESSAGE(MSG$BUF[0],SYSUDF1);
  451. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  452. END # IF *ERCINIT* OUT OF RANGE #
  453.  
  454.  
  455.  
  456. #
  457. * SIMULATED CASE STATEMENT FOR PROCESSING AN ERROR RESPONSE.
  458. #
  459.  
  460. GOTO ERJMP[ERCINIT];
  461.  
  462. NOERRJ: # FILE INITIALIZED #
  463. MSGDETMSG[0] = "FILE INITIALIZED. ";
  464. MESSAGE(MSGDETAIL1,UDFL1);
  465. MESSAGE(MSGDETAIL2,UDFL1);
  466. GOTO ENDCASE;
  467.  
  468. INTLZDJ: # ALREADY PERMANENT #
  469. ZSETFET(TFETADR,CAT$PFN[0],TBUFADR,TBUFL,RFETL);
  470.  
  471. BUSY = TRUE;
  472. SLOWFOR K=0 WHILE BUSY
  473. DO
  474. BEGIN # ATTACH *M860* CATALOG #
  475. PF("ATTACH",CAT$PFN[0],0,"RC",STAT,"NA",0,0);
  476.  
  477. IF STAT EQ FBS
  478. THEN
  479. BEGIN # DELAY AND RETRY *ATTACH* #
  480. STATUSR = 0;
  481. RECALL(STATUSR); # PERIODIC RECALL #
  482. TEST K;
  483. END # DELAY AND RETRY *ATTACH* #
  484.  
  485. BUSY = FALSE;
  486. END # ATTACH *M860* CATALOG #
  487.  
  488. REWIND(TFET[0],RCL);
  489. RPHR(TFET[0],RCL);
  490.  
  491. IF FET$AT NQ 0
  492. THEN
  493. BEGIN
  494. MSGDETMSG[0] = " CIO ERROR. ";
  495. GOTO ERRCASE;
  496. END
  497.  
  498. IF FET$EOI
  499. THEN
  500. BEGIN # EMPTY *PFDUMP* CREATED FILE FOUND #
  501. PF("PURGE",CAT$PFN[0],"RC",STAT,0);
  502.  
  503. IF STAT NQ 0
  504. THEN
  505. BEGIN
  506. MSG$LINE[0] = " SSDEF ABNORMAL, DFCAT.";
  507. MESSAGE(MSG$BUF[0],SYSUDF1);
  508. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  509. END
  510.  
  511. TEST J;
  512. END # EMPTY *PFDUMP* CREATED FILE FOUND #
  513.  
  514. ELSE # NOT *PFDUMP* CATALOG #
  515. BEGIN
  516. MSGDETMSG[0] = "ALREADY PERMANENT. ";
  517. MESSAGE(MSGDETAIL1[0],SYSUDF1);
  518. MESSAGE(MSGDETAIL2[0],SYSUDF1);
  519. ERRFLAGDF = TRUE;
  520. GOTO ENDCASE;
  521. END
  522.  
  523. CIOERRJ: # *CIO* ERROR #
  524. MSGDETMSG[0] = "CIO ERROR. ";
  525. GOTO ERRCASE;
  526.  
  527. DEFERRJ: # *DEFINE* ERROR #
  528. MSGDETMSG[0] = "DEFINE ERROR. ";
  529. GOTO ERRCASE;
  530.  
  531.  
  532. ERRCASE:
  533. MESSAGE(MSGDETAIL1,SYSUDF1);
  534. MESSAGE(MSGDETAIL2,SYSUDF1);
  535. ERRFLAGDF = TRUE;
  536. RETURN;
  537.  
  538. ENDCASE:
  539. FILE$DONE = TRUE;
  540.  
  541.  
  542. #
  543. * END OF CASE STATEMENT FOR PROCESSING AN ERROR RESPONSE.
  544. #
  545.  
  546. END # CREATE CATALOG OR VERIFY ITS VALIDITY #
  547.  
  548. END # FOR EACH SUBFAMILY #
  549.  
  550. END # *CINIT* CALLS #
  551.  
  552.  
  553.  
  554. END # DFCAT #
  555.  
  556. TERM
  557. PROC DFMAP;
  558. # TITLE DFMAP - INITIALIZES *SMMAP* FOR THE *SM* SPECIFIED. #
  559.  
  560. BEGIN # DFMAP #
  561.  
  562. #
  563. ** DFMAP - INITIALIZES *SMMAP* FOR THE *SM* SPECIFIED.
  564. *
  565. * THIS PROCEDURE PERFORMS THE INITIALIZATION PROCESSING
  566. * FOR THE *SM* SPECIFIED.
  567. *
  568. * PROC DFMAP
  569. *
  570. * ENTRY INITIALIZATION FOR CATALOG AND MAP ACCESS COMPLETED.
  571. *
  572. * EXIT MAP INITIALIZED OR ERROR CONDITIONS
  573. * DEFINED BELOW.
  574. *
  575. * MESSAGES 1) PFN=PFN, FAMILY=FAMILY,
  576. * UI=UI - FILE INITIALIZED.
  577. *
  578. * 2) PFN=PFN, FAMILY=FAMILY,
  579. * UI=UI - ALREADY PERMANENT.
  580. *
  581. * 3) PFN=PFN, FAMILY=FAMILY,
  582. * UI=UI - DEFINE ERROR.
  583. *
  584. * 4) SSDEF ABNORMAL, DFMAP.
  585. #
  586.  
  587. #
  588. **** PROC DFMAP - XREF LIST BEGIN.
  589. #
  590.  
  591. XREF
  592. BEGIN
  593. PROC BZFILL; # BLANK OR ZERO FILLS FIELD #
  594. PROC GETFAM; # GETS DEFAULT FAMILY #
  595. PROC LOFPROC; # LIST OF FILES PROCESSOR #
  596. PROC MESSAGE; # CALLS MESSAGE MACRO #
  597. PROC MINIT; # INITIALIZES SMMAP #
  598. PROC RESTPFP; # RESTORE USER-S *PFP* AND ABORT
  599.   OR RETURN #
  600. PROC RETERN; # RETURNS A FILE #
  601. PROC SETPFP; # SETS USER INDEX AND FAMILY #
  602. PROC XWOD; # CHANGES OCTAL TO DISPLAY CODE #
  603. PROC ZSETFET; # SETS UP *FET* FIELDS #
  604. END
  605.  
  606. #
  607. **** PROC DFMAP - XREF LIST END.
  608. #
  609.  
  610. DEF BLANK #" "#; # DISPLAY CODE FOR BLANK #
  611. DEF COMMA #","#; # DISPLAY CODE FOR COMMA #
  612. DEF FILLSIZE #7#; # FILL SIZE FOR BZFILL #
  613. DEF R #1#; # REQUEST RECALL FLAG #
  614.  
  615. DEF LISTCON #0#; # DO NOT LIST COMDECKS #
  616.  
  617. *CALL COMBFAS
  618. *CALL COMBBZF
  619. *CALL COMBCMD
  620. *CALL COMBCMS
  621. *CALL COMBPFP
  622. *CALL COMTDEF
  623. *CALL COMTDFP
  624.  
  625. ITEM BLKFILL S:TYPFILL = S"BFILL"; # BLANK FILL FOR BZFILL #
  626. ITEM ERMINIT U; # MINIT RETURN CODE #
  627. ITEM FOUND B; # CHARACTER FOUND FLAG #
  628. ITEM I U; # LOOP INDEX #
  629. ITEM MSGTEMP C(8); # TEMPORARY MESSAGE FIELD #
  630. ITEM ZEROFILL S:TYPFILL = S"ZFILL"; # ZERO FILL FOR BZFILL #
  631.  
  632.  
  633. ARRAY MAP [0:0] P(1);
  634. BEGIN # MAP #
  635. ITEM MAP$PFN C(00,00,07) = ["SMMAP"]; # FILE NAME HEADER #
  636. ITEM MAP$LST C(00,30,01); # UNIQUE IDENTIFIER #
  637. END # MAP #
  638.  
  639. ARRAY MSGDETAIL0 [0:0] P(3);
  640. BEGIN # ARRAY MSGDETAIL0 #
  641. ITEM LEAD0 C(00,00,01) = [" "]; # LEADING BLANK #
  642. ITEM MSGPFNH0 C(00,06,04) = ["PFN="]; # PFN= #
  643. ITEM MSGPFN0 C(00,30,06); # FILE NAME #
  644. ITEM MSGFAMH0 C(01,06,09) = [", FAMILY="]; # FAMILY= #
  645. ITEM MSGFAM0 C(02,00,08); # FAMILY AND COMMA #
  646. ITEM MSGZRO0 U(02,48,12) = [0]; # TERMINATOR #
  647. END # ARRAY MSGDETAIL0 #
  648.  
  649. SWITCH ERJMP:CMASTAT
  650. NOERRJ:NOERR, # FILE INITIALIZED #
  651. INTLZDJ:INTLZD, # ALREADY PERMANENT #
  652. DEFERRJ:DEFERR; # DEFINE ERROR #
  653. CONTROL EJECT;
  654.  
  655. #
  656. * CHECK FOR DEFAULT FAMILY.
  657. #
  658.  
  659. IF NOT DFLTFMDF
  660. THEN
  661. BEGIN # DEFAULT FAMILY NOT PREVIOUSLY DEFINED #
  662. GETFAM(FAMT,NDF,LINKDF,DEFAULTDF); # GET DEFAULT FAMILY #
  663. DARG$FM = FAM$NAME[DEFAULTDF]; # PUT NAME INTO ARGUMENT ARRAY
  664.   #
  665. END # DEFAULT FAMILY NOT PREVIOUSLY DEFINED #
  666.  
  667. #
  668. * BLANK FILL FAMILY NAME AND MOVE IT TO DETAILED MESSAGE.
  669. #
  670.  
  671. MSGTEMP = DARG$FM; # TEMPORARY BUFFER FOR BZFILL #
  672. BZFILL(MSGTEMP,BLKFILL,FILLSIZE); # BLANK FILL #
  673. MSGFAM0[0] = MSGTEMP; # SET FAMILY INTO MESSAGE #
  674.  
  675. #
  676. * PLACE COMMA AFTER FAMILY NAME.
  677. #
  678.  
  679. FOUND = FALSE; # FLAG TO INDICATE BLANK FOUND #
  680. FASTFOR I = 0 STEP 1 WHILE NOT FOUND
  681. DO
  682. BEGIN
  683. IF C<I,1>MSGFAM0 EQ BLANK
  684. THEN
  685. BEGIN # CHARACTER AT INDEX IS BLANK #
  686. FOUND = TRUE;
  687. C<I,1>MSGFAM0 = COMMA; # CHANGE BLANK TO COMMA #
  688. END # CHARACTER AT INDEX IS BLANK #
  689.  
  690. END
  691.  
  692.  
  693. #
  694. * CALL *SETPFP* TO SET USER INDEX AND FAMILY.
  695. #
  696.  
  697. XWOD(DEF$UI,DIS); # CHANGE OCTAL TO DISPLAY CODE #
  698. MSGUIDF[0] = DIS$UI; # SET USER INDEX INTO MESSAGE #
  699.  
  700. MAP$LST[0] = DARG$SM; # CREATE NAME FOR *MINIT* CALL #
  701. MSGPFN0[0] = MAP$PFN[0]; # PLACE FILE NAME INTO MESSAGE #
  702.  
  703. PFP$UI[0] = DEF$UI; # SET USER INDEX FOR *SETPFP* #
  704. PFP$FAM[0] = DARG$FM; # SET FAMILY NAME FOR *SETPFP* #
  705. PFP$FG1[0] = TRUE; # SET FAMILY BIT FOR *SETPFP* #
  706. PFP$FG4[0] = TRUE; # SET INDEX BIT FOR *SETPFP* #
  707.  
  708. SETPFP(PFP); # SET USER INDEX AND FAMILY #
  709. IF PFP$STAT NQ 0
  710. THEN
  711. BEGIN
  712. MSG$LINE[0] = " SSDEF ABNORMAL, DFMAP.";
  713. MESSAGE(MSG$BUF[0],SYSUDF1);
  714. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  715. END
  716.  
  717. #
  718. * CALL *MINIT* TO INITIALIZE **SM*MAP* FOR SPECIFIED *SM*.
  719. #
  720.  
  721.  
  722.  
  723. BZFILL(MAP,ZEROFILL,FILLSIZE); # ZERO FILL #
  724. ZSETFET(TFETADR,MAP$PFN[0],TBUFADR,TBUFL,RFETL);
  725. RETERN(TFET,RCL);
  726. LOFPROC(MAP$PFN[0]); # ADD LFN TO LIST OF FILES #
  727. MINIT(MAP$PFN[0],DARG$IRSM,ERMINIT); # INITIALIZE *SMMAP* #
  728.  
  729. #
  730. * PROCESS *MINIT* ERROR CODE.
  731. #
  732.  
  733. IF ERMINIT LS CMASTAT"NOERR" OR ERMINIT GR CMASTAT"STATLAST"
  734. THEN
  735. BEGIN # IF *ERMINIT* OUT OF RANGE #
  736. MSG$LINE[0] = " SSDEF ABNORMAL, DFMAP.";
  737. MESSAGE(MSG$BUF[0],SYSUDF1);
  738. RESTPFP(PFP$ABORT); # RESTORE USER-S *PFP* AND ABORT #
  739. END # IF *ERMINIT* OUT OF RANGE #
  740.  
  741.  
  742.  
  743. #
  744. * SIMULATED CASE STATEMENT FOR PROCESSING AN ERROR RESPONSE.
  745. #
  746.  
  747. GOTO ERJMP[ERMINIT];
  748.  
  749.  
  750. NOERRJ: # FILE INITIALIZED #
  751. MSGDETMSG[0] = "FILE INITIALIZED. ";
  752. GOTO ENDCASEOK;
  753.  
  754. INTLZDJ: # ALREADY PERMANENT #
  755. MSGDETMSG[0] = "ALREADY PERMANENT. ";
  756. ERRFLAGDF = TRUE;
  757. GOTO ENDCASE;
  758.  
  759. DEFERRJ: # *DEFINE* ERROR #
  760. MSGDETMSG[0] = "DEFINE ERROR. ";
  761. ERRFLAGDF = TRUE;
  762.  
  763. ENDCASE:
  764. MESSAGE(MSGDETAIL0,SYSUDF1);
  765. MESSAGE(MSGDETAIL2,SYSUDF1);
  766. RETURN;
  767.  
  768. #
  769. * END OF CASE STATEMENT FOR PROCESSING AN ERROR RESPONSE.
  770. #
  771.  
  772.  
  773. ENDCASEOK:
  774. MESSAGE(MSGDETAIL0,UDFL1);
  775. MESSAGE(MSGDETAIL2,UDFL1);
  776. RETURN;
  777.  
  778.  
  779. END # DFMAP #
  780.  
  781. TERM
cdc/nos2.source/opl871/ssdef.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator