cdc:nos2.source:nam5871:csiccc
Table of Contents
CSICCC
Table Of Contents
- [00004] PROC CSICCC
- [00005] CONTROL CARD CRACKER.
- [00009] CONTROL CARD CRACKER.
- [00037] PROC CSIIAP
- [00038] PROC CSUCDB
- [00039] PROC MESSAGE
Source Code
- CSICCC.txt
- *DECK CSICCC
- USETEXT TEXTCS
- USETEXT TEXTSS
- PROC CSICCC;
- # TITLE - CONTROL CARD CRACKER. #
- BEGIN
- #
- ** CSICCC - CONTROL CARD CRACKER.
- *
- * J.C. LEE 81/01/02 (FOR NS)
- * D.K. ENDO 82/06/03 (MODIFIED FOR CS)
- *
- * THIS PROCEDURE CRACKS THE CONTROL, SAVES THE VALID VALUES, AND
- * FLAGS ERRORS IF FOUND.
- *
- * PROC CSICCC
- *
- * ENTRY 1. ARGUMENT LIST IN COMMUNICATION AREA
- *
- * EXIT 1. NIN, MC, CP AND BU VALUES.
- * 2. ERROR MESSAGE IN DAYFILE IF NEEDED.
- *
- * METHOD
- *
- * LOOP THRU THE ARGUMENT LIST. FOR EACH OPTION SEARCH THE PARAM
- * TABLE FOR VALID OPTION. IF FOUND, JUMP TO APPROPRIATE PARAGRAPH
- * TO CONVERT AND SAVE VALUE, ELSE FLAG AS ILLEGAL OPTION.
- *
- #
- #
- **** PROC CSICCC - XREF LIST BEGINS.
- #
- XREF
- BEGIN
- PROC CSIIAP; # INITIALIZATION ABORT PROCEDURE #
- PROC CSUCDB; # CONVERT DC DECIMAL TO BINARY #
- PROC MESSAGE; # PUTS MESSAGE IN DAYFILE #
- END
- #
- ****
- #
- #
- DEFINITIONS FOR PARAMETER INDEXES
- #
- DEF PAR$COUNT #04#; # NUMBER OF VALID CS PARAMETERS #
- DEF PAR$NIN #01#; # NIN INDEX #
- DEF PAR$MC #02#; # MC INDEX #
- DEF PAR$CP #03#; # CPU UTILIZATION INDEX #
- DEF PAR$BU #04#; # BUFFER AVAILABILITY INDEX #
- #
- MISCELLANEOUS DEFINITIONS
- #
- DEF COMMA # O"56" #;
- DEF EQUAL # O"54" #;
- DEF PERIOD # O"57" #;
- #
- REASON CODES FOR CONTROL CARD ERRORS
- #
- DEF RC$PARILL #01#; # ILLEGAL PARAMETER #
- DEF RC$PARFMT #02#; # PARAMETER FORMAT ERROR #
- DEF RC$PARVAL #03#; # BAD PARAMETER VALUE #
- DEF RC$PARDUP #04#; # DUPLICATE PARAMETER #
- DEF RC$PARMIS #05#; # MISSING REQUIRED PARAMETER #
- #
- LOCAL VARIABLES
- #
- ITEM ARGPTR I = 0; # ARGUMENT POINTER #
- ITEM ERR B; # ERROR INDICATOR #
- ITEM ERRCODE I = 0; # ERROR CODE #
- ITEM I I; # TEMPORARY VARIABLE #
- ITEM J U; # TEMPORARY VARIABLE #
- ITEM K U; # TEMPORARY VARIABLE #
- ITEM MATCH B; # FOUND VALID PARAMETER FLAG #
- ITEM NARGS U; # NO OF ARGUMENTS #
- BASED ARRAY ARG[1:22] S(1);
- BEGIN # RA.ARGR #
- ITEM ARG$SYMBO U(00,00,42); # ARGUMENT VALUE #
- ITEM ARG$SEPAR U(00,42,18); # ARGUMENT SEPARATOR #
- ITEM ARG$WORD U(00,00,60);
- END
- BASED ARRAY ACT[0:0] S(1);
- BEGIN
- ITEM ACT$COUNT U(00,42,18); # ARGUMENT COUNT #
- END
- ARRAY PAR [1:PAR$COUNT] S(1);
- BEGIN # VALID PARAMETER LIST #
- ITEM PAR$KEY U(00,00,42) = [ # KEYWORDS #
- O"16111600000000", # NIN #
- O"15030000000000", # MC #
- O"03200000000000", # CP #
- O"02250000000000", # BU #
- ];
- ITEM PAR$NCV U(00,42,12) = [ # CHARS ALLOWED FOR PARAM VALUE#
- 3, # UP TO 3 DEC CHARS FOR NIN #
- 7, # UP TO 7 DEC CHARS FOR MC #
- 3, # UP TO 3 DEC CHARS FOR CP #
- 3, # UP TO 3 DEC CHARS FOR BU #
- ];
- ITEM PAR$PRC B(00,54,06) = [ # PARAMETER PROCESSED FLAG #
- FALSE,
- FALSE,
- FALSE,
- FALSE,
- ];
- END
- DEF L$PARERR # 5 #;
- DEF DM$PARERR # DM$SYSLOC+DM$ABORT #;
- ARRAY MSG$PARERR [RC$PARILL:RC$PARMIS] S(L$PARERR);
- BEGIN # CONTROL CARD ERROR DIAGNOSTICS #
- ITEM PEM$TEXT C(00,00,40) = [ # MESSAGE TEXT #
- " CS/UNRECOGNIZED CONTROL CARD PARAMETER.",
- " CS/CONTROL CARD PARAMETER SYNTAX ERROR.",
- " CS/ILLEGAL CONTROL CARD PARAM VALUE.",
- " CS/DUPLICATE CONTROL CARD PARAMETER.",
- " CS/NIN IS NOT SPECIFIED.",
- ];
- ITEM PEM$END U(04,00,60) = [ RC$PARMIS(0) ];
- END
- SWITCH PARTYPE , # SWITCHES FOR PARAMETERS #
- TYPE$NIN,
- TYPE$MC,
- TYPE$CP,
- TYPE$BU;
- CONTROL EJECT;
- #
- POINT BASED ARRAY TO COMMUNICATION AREA TO GET ARGUMENT LIST
- AND ARGUMENT COUNT.
- #
- P<ARG> = 2;
- P<ACT> = O"64";
- #
- INITIALIZE VALUES TO DEFAULT.
- #
- MC = DEFMC$;
- CSCP = DEFCP$;
- CSBU = DEFBU$;
- #
- LOOP TO PROCESS ALL SPECIFIED PARAMETERS
- #
- NARGS = ACT$COUNT[0]; # NO OF ARGUMENTS #
- FOR ARGPTR=ARGPTR WHILE ARGPTR LS NARGS
- AND ERRCODE EQ 0
- DO # SCAN RA+2 THRU RA+22 FOR ARGUMENTS #
- BEGIN
- ARGPTR = ARGPTR + 1; # MOVE POINTER TO NEXT ARGUMENT #
- MATCH = FALSE;
- FOR I=1 STEP 1 WHILE I LQ PAR$COUNT
- AND NOT MATCH
- DO
- BEGIN
- IF ARG$SYMBO[ARGPTR] EQ PAR$KEY[I]
- THEN # FOUND VALID KEYWORD #
- BEGIN
- MATCH = TRUE;
- K = I; # SET TO KEYWORD INDEX #
- END
- END
- IF MATCH
- THEN # FOUND VALID PARAMETER #
- BEGIN
- I = ARGPTR + 1; # POINTER TO PARAMETER VALUE #
- IF (ARG$SEPAR[ARGPTR] EQ EQUAL)
- AND (I LQ NARGS)
- THEN # PARAMETER FORMAT OK #
- BEGIN
- ARGPTR = I; # UPDATE POINTER TO NEXT ARG #
- J = PAR$NCV[K]; # CHARS ALLOWED FOR VALUE #
- IF J EQ 7
- OR C<J,7-J>ARG$SYMBO[ARGPTR] EQ 0
- THEN # PARAMETER VALUE NOT EXCEEDING #
- BEGIN # MAX NUMBER OF CHARS ALLOWED #
- #
- SWITCH TO PARAMETER PROCESSING CASES
- #
- GOTO PARTYPE[K];
- TYPE$NIN:
- I = PAR$NIN;
- CSUCDB(ARG$WORD[ARGPTR],K,J,ERR); # CONVERT DEC TO BIN #
- CRNT$NIN = K; # SET NETWORK INVOCATION NUMBER #
- GOTO ENDPRC;
- TYPE$MC:
- I = PAR$MC;
- CSUCDB(ARG$WORD[ARGPTR],K,J,ERR) ; # CONVERT DEC TO BIN #
- MC = K;
- GOTO ENDPRC;
- TYPE$CP:
- I = PAR$CP;
- CSUCDB(ARG$WORD[ARGPTR],K,J,ERR);
- CSCP = K;
- GOTO ENDPRC;
- TYPE$BU:
- I=PAR$BU;
- CSUCDB(ARG$WORD[ARGPTR],K,J,ERR);
- CSBU = K;
- GOTO ENDPRC;
- ENDPRC:
- IF NOT ERR
- THEN # NO ERROR FOUND #
- BEGIN
- IF NOT PAR$PRC[I]
- THEN # PARAMETER NOT PROCESSED #
- BEGIN
- PAR$PRC[I] = TRUE; # SET PARAMETER PROCESSED FLAG #
- END
- ELSE # DUPLICATE PARAMETER #
- ERRCODE = RC$PARDUP;
- END
- ELSE # BAD PARAMETER VALUE #
- ERRCODE = RC$PARVAL;
- END
- ELSE # CHARS EXCEED ALLOWED VALUE #
- ERRCODE = RC$PARVAL;
- END
- ELSE # PARAMETER FORMAT ERROR #
- ERRCODE = RC$PARFMT;
- END
- ELSE # ILLEGAL PARAMETER #
- ERRCODE = RC$PARILL;
- END
- IF ERRCODE EQ 0
- AND NOT PAR$PRC[PAR$NIN]
- THEN # NIN MUST BE SPECIFIED #
- ERRCODE = RC$PARMIS;
- IF ((CSCP LS MINCP$) OR (CSCP GR MAXCP$))
- OR ((CSBU LS MINBU$) OR (CSBU GR MAXBU$))
- THEN
- BEGIN
- ERRCODE = RC$PARVAL;
- END
- IF ERRCODE NQ 0
- THEN # ERROR FOUND #
- BEGIN
- MESSAGE(MSG$PARERR[ERRCODE],0);
- CSIIAP;
- END
- RETURN;
- END
- TERM
cdc/nos2.source/nam5871/csiccc.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator