cdc:nos2.source:nam5871:ndlckrg
Table of Contents
NDLCKRG
Table Of Contents
- [00005] PROC NDLCKRG(KWID,VALUE,VAL$STAT)
- [00009] CHECK RANGE FOR PARAMETER.
- [00042] PROC NDLEM2
- [00043] FUNC XCDD C(10)
- [00044] FUNC XCHD C(10)
Source Code
- NDLCKRG.txt
- *DECK NDLCKRG
- USETEXT NDLER2T
- USETEXT NDLTBLT
- USETEXT NDLDATT
- PROC NDLCKRG(KWID,VALUE,VAL$STAT);
- BEGIN
- *IF,DEF,IMS
- #
- ** NDLCKRG - CHECK RANGE FOR PARAMETER.
- *
- * D.K. ENDO 81/10/12
- *
- * THIS PROCEDURE CHECKS RANGE TABLE FOR PARAMETER AND THEN CHECKS
- * IF VALUE IS WITHIN RANGE.
- *
- * PROC NDLCKRG(KWID,VALUE,VAL$STAT)
- *
- * ENTRY KWID = KEYWORD I.D.
- * VALUE = VALUE ASSIGNED TO KEYWORD
- *
- * EXIT VAL$STAT = STATUS FLAG, SET IF VALUE IS O.K.
- *
- * METHOD
- *
- * SEARCH RANGE TABLE FOR KEYWORD I.D.
- * IF FOUND
- * CHECK IF VALUE IS WITHIN LEGAL LIMITS
- * IF NOT WITHIN RANGE
- * CONVERT NUMBER TO DISPLAY CODE.
- * FLAG ERROR -- VALUE OUT OF RANGE.
- *
- #
- *ENDIF
- ITEM KWID; # KEYWORD I.D. #
- ITEM VALUE; # VALUE ASSIGNED TO KEYWORD #
- ITEM VAL$STAT B; # RETURN STATUS -- SET IF VALUE IS O.K. #
- #
- **** PROC NDLCKRG - XREF LIST BEGINS
- #
- XREF
- BEGIN
- PROC NDLEM2; # MAKES ENTRY IN ERROR-FILE-2 #
- FUNC XCDD C(10); # CONVERTS INTEGER TO DECIMAL DISPLAY CODE#
- FUNC XCHD C(10); # CONVERTS INTERGER TO HEX DISPLAY CODE #
- END
- #
- ****
- #
- ITEM CHARVAL C(10); # CHARACTER TEMPORARY FOR VALUE #
- ITEM FOUND B; # KEYWORD I.D. FOUND FLAG #
- ITEM I; # SCRATCH ITEM #
- DEF MAXRT # 66 #;
- ARRAY RANGE$TABLE [0:MAXRT] S(2);
- BEGIN
- ITEM RTWC U(0,51,9) = [MAXRT];
- ITEM RTKWID U(0,0,9) = [, 21, # P1 #
- 23, # P2 #
- 30, # NI #
- 31, # PORT #
- 35, # AL #
- 37, # DFL #
- 38, # FRAME #
- 39, # RTIME #
- 40, # RCOUNT #
- 41, # NSVC #
- 46, # LCN #
- 55, # CA #
- 56, # CO #
- 58, # MREC #
- 59, # W #
- 61, # NCIR #
- 62, # NEN #
- 68, # ABL #
- 69, # DBZ #
- 70, # UBZ #
- 71, # DBL #
- 72, # UBL #
- 73, # XBZ #
- 74, # DO #
- 75, # STREAM #
- 76, # HN #
- 80, # P80 #
- 81, # P81 #
- 82, # P82 #
- 83, # P83 #
- 84, # P84 #
- 85, # P85 #
- 86, # P86 #
- 87, # P87 #
- 88, # P88 #
- 89, # P89 #
- 90, # AB #
- 92, # BS #
- 93, # B1 #
- 94, # B2 #
- 95, # CI #
- 96, # CN #
- 97, # CT #
- 98, # DLC #
- 100, # DLX #
- 103, # LI #
- 107, # PL #
- 108, # PW #
- 111, # XLC #
- 112, # XLX #
- 115, # ELX #
- 123, # EBX #
- 125, # MC #
- 126, # XLY #
- 130, # MCI #
- 131, # MLI #
- 146, # MXCOPYS #
- 154, # SNODE #
- 155, # DNODE #
- 156, # ACCLEV #
- 157, # DHOST #
- 158, # DPLR #
- 159, # DPLS #
- 162, # WR #
- 163, # WS #
- 200, # SHOST #
- ];
- ITEM RTTYPE U(0,9,3) = [, 2, # P1 #
- 2, # P2 #
- 1, # NI #
- 2, # PORT #
- 1, # AL #
- 1, # DFL #
- 1, # FRAME #
- 1, # RTIME #
- 1, # RCOUNT #
- 1, # NSVC #
- 1, # LCN #
- 2, # CA #
- 1, # CO #
- 1, # MREC #
- 1, # W #
- 1, # NCIR #
- 1, # NEN #
- 1, # ABL #
- 1, # DBZ #
- 1, # UBZ #
- 1, # DBL #
- 1, # UBL #
- 1, # XBZ #
- 1, # DO #
- 1, # STREAM #
- 1, # HN #
- 2, # P80 #
- 2, # P81 #
- 2, # P82 #
- 2, # P83 #
- 2, # P84 #
- 2, # P85 #
- 2, # P86 #
- 2, # P87 #
- 2, # P88 #
- 2, # P89 #
- 2, # AB #
- 2, # BS #
- 2, # B1 #
- 2, # B2 #
- 2, # CI #
- 2, # CN #
- 2, # CT #
- 1, # DLC #
- 2, # DLX #
- 1, # LI #
- 1, # PL #
- 1, # PW #
- 1, # XLC #
- 2, # XLX #
- 2, # ELX #
- 2, # EBX #
- 2, # MC #
- 2, # XLY #
- 1, # MCI #
- 1, # MLI #
- 1, # MXCOPYS #
- 1, # SNODE #
- 1, # DNODE #
- 1, # ACCLEV #
- 2, # DHOST #
- 1, # DPLR #
- 1, # DPLS #
- 1, # WR #
- 1, # WS #
- 2, # SHOST #
- ];
- ITEM RTMIN (0,12,18) = [, 1, # P1 #
- 1, # P2 #
- 1, # NI #
- 1, # PORT #
- 0, # AL #
- 16, # DFL #
- 1, # FRAME #
- 0, # RTIME #
- 1, # RCOUNT #
- 0, # NSVC #
- 0, # LCN #
- X"70", # CA #
- 1, # CO #
- 1, # MREC #
- 1, # W #
- 1, # NCIR #
- 1, # NEN #
- 1, # ABL #
- 1, # DBZ #
- 1, # UBZ #
- 1, # DBL #
- 1, # UBL #
- 200, # XBZ #
- 1, # DO #
- 1, # STREAM #
- 1, # HN #
- 0, # P80 #
- 0, # P81 #
- 0, # P82 #
- 0, # P83 #
- 0, # P84 #
- 0, # P85 #
- 0, # P86 #
- 0, # P87 #
- 0, # P88 #
- 0, # P89 #
- 0, # AB #
- 0, # BS #
- 0, # B1 #
- 0, # B2 #
- 0, # CI #
- 0, # CN #
- 0, # CT #
- 1, # DLC #
- 0, # DLX #
- 0, # LI #
- 0, # PL #
- 0, # PW #
- 1, # XLC #
- 0, # XLX #
- 0, # ELX #
- 0, # EBX #
- 0, # MC #
- 0, # XLY #
- 0, # MCI #
- 0, # MLI #
- 1, # MXCOPYS #
- 0, # SNODE #
- 0, # DNODE #
- 0, # ACCLEV #
- 0, # DHOST #
- 16, # DPLR #
- 16, # DPLS #
- 1, # WR #
- 1, # WS #
- 0, # SHOST #
- ];
- ITEM RTMAX (1,0,60) = [, 254, # P1 #
- 254, # P2 #
- 254, # NI #
- 254, # PORT #
- 7, # AL #
- 1024, # DFL #
- 7, # FRAME #
- 25500, # RTIME #
- 15, # RCOUNT #
- 255, # NSVC #
- 255, # LCN #
- X"7F", # CA #
- 255, # CO #
- 7, # MREC #
- 7, # W #
- 255, # NCIR #
- 255, # NEN #
- 7, # ABL #
- 2043, # DBZ #
- 20, # UBZ #
- 7, # DBL #
- 31, # UBL #
- 2043, # XBZ #
- 7, # DO #
- 7, # STREAM #
- 255, # HN #
- 255, # P80 #
- 255, # P81 #
- 255, # P82 #
- 255, # P83 #
- 255, # P84 #
- 255, # P85 #
- 255, # P86 #
- 255, # P87 #
- 255, # P88 #
- 255, # P89 #
- 127, # AB #
- 127, # BS #
- 127, # B1 #
- 127, # B2 #
- 99, # CI #
- 127, # CN #
- 127, # CT #
- 4095, # DLC #
- 255, # DLX #
- 99, # LI #
- 255, # PL #
- 255, # PW #
- 4095, # XLC #
- 255, # XLX #
- 127, # ELX #
- X"FF", # EBX #
- 255, # MC #
- 255, # XLY #
- 250, # MCI #
- 250, # MLI #
- 15, # MXCOPYS #
- 255, # SNODE #
- 255, # DNODE #
- 15, # ACCLEV #
- X"FF", #DHOST #
- 1024, # DPLR #
- 1024, # DPLS #
- 7, # WR #
- 7, # WS #
- X"FFFFFF", # SHOST #
- ];
- END
- SWITCH VALTYPE , # UNKNOWN #
- DECIMAL , # DECIMAL #
- HEXIDECIMAL ; # HEXIDEC #
- CONTROL EJECT;
- # #
- # NDLCKRG CODE BEGINS HERE #
- # #
- VAL$STAT = TRUE; # SET RETURN STATUS TO O.K. #
- FOUND = FALSE; # CLEAR FOUND FLAG #
- FOR I=1 STEP 1 WHILE NOT FOUND AND I LQ MAXRT DO
- BEGIN # SEARCH RANGE TABLE FOR KEYWORD I.D. #
- IF KWID EQ RTKWID[I]
- THEN # IF KEYWORD I.D. MATCHES #
- BEGIN
- FOUND = TRUE; # SET FOUND FLAG #
- IF VALUE LS RTMIN[I] OR VALUE GR RTMAX[I]
- THEN # VALUE IS OUT OF RANGE #
- BEGIN
- GOTO VALTYPE[RTTYPE[I]]; # CONVERT VALUE TO DISPLAY CODE #
- DECIMAL:
- CHARVAL = XCDD(VALUE); # CONVERT TO DISPLAY CODE #
- GOTO NEXT;
- HEXIDECIMAL:
- CHARVAL = XCHD(VALUE); # CONVERT TO HEXIDECIMAL #
- GOTO NEXT;
- NEXT:
- IF RTKWID[I] EQ KID"AL" # IF AL IS THE KEYWORD #
- THEN
- BEGIN
- NDLEM2(ERR163,STLNUM[0],CHARVAL); # FLAG WARNING #
- END
- ELSE
- BEGIN
- NDLEM2(ERR100,STLNUM[0],CHARVAL);
- END
- VAL$STAT = FALSE; # RETURN ERROR STATUS #
- END
- END
- END
- RETURN; # **** RETURN **** #
- END # NDLCKRG #
- TERM
cdc/nos2.source/nam5871/ndlckrg.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator