.LIT .ELI .C ;COMMERCIAL SUBROUTINE PACKAGE LIBRARY .S 2 .C ;DOCUMENTATION .C ;FOR IAS .S15 .C ;BY .C ;ROBERT E. SAINE .S 2 .C ;EASTMAN KODAK COMPANY .C ;COLOR PRINT AND PROCESS .C ;DALLAS, TEXAS .S 2 .C ;FEBRUARY 26, 1980 .NNM .PG .LIT .ELI .NM 3 .PG .PS 50,70 .PG .LIT ACTCHK .ELI .INDEX ACTCHK ENTRY POINT: ACTCHK .s 2 SOURCE: MACRO .S 2 CALL ACTCHK (TSK1,TSK2,A) .s .list .le ^&FUNCTION:\& .S To check for activity of a specified task within the system. .S 2 .le ^&PARAMETERS:\& .list .LE TSK1 .s 1 The name of the task to look for. This argument must be in RAD50. .LE TSK2 .s 1 The name of the calling task. This argument must be in RAD50. .LE A .s 1 The sampling rate in seconds. The default value is 5 seconds. .els .els ^&RESIDENCE:\& CSP.OLB .PG .LIT AD .ELI .INDEX AD .INDEX SD ENTRY POINTS: AD .LIT SD .ELI .S 2 SOURCE: MACRO .s 2 CALL AD (A,B,C) .s 1 .s .list .le ^&FUNCTION:\& .S 1 To perform addition upon the double integer values of B, and C placing the sum in A. .S 2 .le ^&PARAMETERS:\& .LIST .LE A .S 1 The standard precision real variable name which receives the sum of the addition. .s 1 .LE B .S 1 The standard precision real variable name which contains one of the double integers to add. .LE C .S 1 The standard precision real variable name which contains one of the double integers to add. .els .els .NOTE Entry point SD is the opposite function (A=B-C) with the same parameter descriptions. .en ^&RESIDENCE:\& CSP.OLB .PG .LIT ASIDI .ELI .INDEX ASIDI ENTRY POINTS: ASIDI .LIT SSIDI .ELI .S SOURCE: MACRO .s 2 .LIST .LE CALL ASIDI (A,B) .S 2 .list .le ^&FUNCTION:\& .S 1 To add a single-word integer to a double-word integer, returning the result in the second parameter (the double-word integer). .S 2 .le ^&PARAMETERS:\& .list .LE A .S 1 One word integer. .LE B .S 1 Double word integer. .els .els .S 3 .LE CALL SSIDI (A,B) .INDEX SSIDI .s 2 .list .le ^&FUNCTION:\& .S 1 To subtract a single-word integer from a double-word integer, returning the result in the double-word integer (the second parameter). .S2 .le ^&PARAMETERS:\& .list .LE A .s 1 One word integer. .LE B .s 1 Double word integer. .s 1 .els .els .ELS ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT ATTACH .ELI .INDEX ATTACH ENTRY POINT: ATTACH .s 2 SOURCE: MACRO .s CALL ATTACH (LUN,IDS) .s 2 .list .le ^&FUNCTION:\& .S Permits task to control device. .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical unit number of device. .LE IDS .s 1 Integer variable for ERROR return code. SUCCESS = 1. .els .le ^&DESCRIPTION:\& .S Prevents other tasks from using the LINE PRINTER for the duration of the "ATTACH". Effectively "locks" out the spooler and other tasks. .ELS .note At "RUN" time, ^&TI\& must be assigned to ^&LP\&. Hence, any input or output from the terminal must be from a specific TT #. ( i.e. I/O via TT1 , RUN command is of the form RUN TASK/TI=LP ). .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT A1A3B .ELI .INDEX A1A3B SOURCE: MACRO .S 1 ENTRY POINT: A1A3B .s 2 CALL A1A3B (ARRAY1,L1,U1,ARRAY2,L2,TABLE) .s .list .le ^&FUNCTION:\& .S To convert characters in a byte array, in A1 format, to A3 format (one character per byte to three characters per word) through the use of a conversion table. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY1 .s 1 A byte array containing the characters to be converted. .LE L1 .s 1 Lower bound on ARRAY1, inclusive. This argument may be an integer constant, integer expression, or integer variable. .LE U1 .S 1 Upper bound on ARRAY1. This argument may be an integer constant, integer expression, or integer variable. .LE ARRAY2 .S Target array for the A3 converted characters. This is an integer array. .LE L2 .S 1 Lower bound on ARRAY2. This argument may be an integer constant, integer expression, or integer variable. .LE TABLE .S 1 The name of an integer array in A1 format. This array contains the legal characters to be converted and must have a dimension of 40. .els .le ^&DESCRIPTION:\& .S Three characters are taken from ARRAY1, one at a time. The relative positions of each character is found in TABLE. Then these three positions (N1,N2,N3) are used to compute the information to be placed in ARRAY2 at the next available position (I). The computation is done: .S 2 .lit ARRAY2(i) = (N1-20)*1600 + (N2*40) + N3 .eli .els .note The relative position of TABLE run from 0-39, not 1-40. .en .NOTE If a character does not appear in TABLE, it will be coded as a blank. .EN ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LC .FL CAPITALIZE .LIT or , with "33 in the first position of output. .S 2 .le ^&PARAMETERS:\& .list .LE TI .s 1 .LE BYTARRAY .s 1 A bytearray which will return with the operator number in character format. .le NUM .s 1 Returns with the operator number in integer. .els .els .INDEX CLKNUM .s 3 .LE CALL CLKNUM (TI,BYTARRAY,NUM) .s .list .LE ^&FUNCTION:\& .S Reads a 3-digit clockcard number plus check-digit. Checks check-digit and requests re-entry if incorrect. Converts correct clockcard number from character format to integer. Exits to SYSCHECK after or . .S 2 .le ^&PARAMETERS:\& .list .LE TI .LE BYTARRAY .s 1 BYTARRAY will contain the clockcard number in character format upon returning to SYSCHECK. .le NUM .s 1 NUM will contain the integer version of the clockcard number upon returning. .els .els .INDEX CLKN1 .s 3 .LE CALL CLKN1 (TI,BYTARRAY,NUM) .s .list .LE ^&FUNCTION:\& .S Reads a 3-digit clockcard number plus check digit. Checks check-digit and requests re-entry if incorrect. Converts the clockcard number from character format to integer. Exits to SYSCHK on . .S 2 .le ^&PARAMETERS:\& .list .LE TI .LE BYTARRAY .s 1 BYTARRAY will contain the clockcard number in character format upon exit. .le NUM .s 1 NUM will contain the clockcard number in integer format. .els .ELS .ELS ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT CSRCTL .ELI .INDEX CSRCTL ENTRY POINTS: BELL .LIT DOWN EEOL EEOS EGM ENHM EXHM HOLD HOME RTNSCR SPACE TAB UP VSPOT XGM .ELI .s 2 SOURCE: MACRO .S 2 .list .le CALL BELL (LUN,NUM) .INDEX BELL .s .list .LE ^&FUNCTION:\& .S Rings bell on Decwriter, or sounds buzzer on CRT terminals .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE NUM .s 1 Number of audibles to produce with a 200 millisecond delay between each .els .els .INDEX DOWN .s 3 .le CALL DOWN (LUN,NUM) .s .list .LE ^&FUNCTION:\& .S Move the cursor down on the CRT terminal .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE NUM .s 1 Number of lines down to move the cursor. .els .ELS .INDEX EEOL .s 3 .le CALL EEOL (LUN) .s .list .le ^&FUNCTION:\& .S Erase to end of current line .s 2 .le ^&PARAMETERS:\& .list .LE LUN s 1 Logical Unit Number .els .ELS .s 3 .TP 5 .INDEX EEOS .le CALL EEOS (LUN) .s .list .LE ^&FUNCTION:\& .S Erase to end of screen .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .els .INDEX EGM .s 3 .le CALL EGM (LUN) .s .list .LE ^&FUNCTION:\& .S Enter Graphics Mode .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .le ^&DESCRIPTION:\& .S Enables print-out of graphics characters, as determined by the calling program .els .s 3 .TP 5 .INDEX ENHM .le CALL ENHM (LUN) .s .list .LE ^&FUNCTION:\& .S Enter Hold Mode .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .le ^&DESCRIPTION:\& .S Enables the "SCROLL" key on the CRT. Each time "SCROLL" is depressed, one line is brought up on the CRT. When "SCROLL" and "SHIFT" are depressed simultaneously, 24 lines are brought up on the CRT at a time. .els .INDEX EXHM .s 3 .LE CALL EXHM (LUN) .s .list .LE ^&FUNCTION:\& .S Exit Hold Mode .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .els .s 3 .TP 5 .INDEX HOLD .LE CALL HOLD (LUN,FLAG)) .s .list .LE ^&FUNCTION:\& .S Enters or exits HOLD mode depending on the flag setting .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE FLAG .s 1 If FLAG equals '1', then enter HOLD mode, .s 1 Else exit HOLD mode .els .els .INDEX HOME .s 3 .le CALL HOME (LUN) .s .list .LE ^&FUNCTION:\& .S Clears the screen and places the cursor to the home position ((row,column)= (1,1)) .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .els .s 3 .TP 5 .INDEX RTNCSR .le CALL RTNCSR (LUN) .s .list .LE ^&FUNCTION:\& .S Return cursor to the beginning of the line currently displayed .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .els .INDEX SPACE .s 3 .LE CALL SPACE (LUN,NUM) .s .list .LE ^&FUNCTION:\& .S Spaces the cursor on the current line .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE NUM .s 1 Number of spaces to move the cursor. If NUM is positive, the cursor is positioned right NUM spaces. .s 1 If Num is negative, the cursor is positioned left ABS(NUM) spaces. .els .els .INDEX TAB .s 3 .LE CALL TAB (LUN,NUM) .s .list .LE ^&FUNCTION:\& .S Move the cursor to the next TAB position "NUM" times. .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE NUM .s 1 Number of tabs required .els .els .INDEX UP .s 3 .LE CALL UP (LUN) .s .list .LE ^&FUNCTION:\& .S Move the cursor up one line on the CRT .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .els .s 3 .TP 5 .INDEX VSPOT .LE CALL VSPOT (LUN,I,J) .s .list .LE ^&FUNCTION:\& .S Moves cursor to position specified .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE I .s 1 The row to move the cursor to .le J .s 1 Column to move the cursor to .els .els .INDEX XGM .s 3 .LE CALL XGM (LUN) .s .list .LE ^&FUNCTION:\& .S Exit Graphics Mode .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .els .els .ELS .note The default value for any NUM argument is 1 .en .note The calling program and it's command file must reference CPPCOM as a COMMON area .EN ^&RESIDENCE\&: CSP.OLB .PS 50,70 .PG .LIT DD .ELI .INDEX DD .INDEX DDWS ENTRY POINTS: DD .LIT DDWS .ELI .s 2 SOURCE: MACRO .S 2 CALL DD (A,B,INT1,INT2) .BR CALL DDWS (A,B,INT1,INT2) .s .list .LE ^&FUNCTION:\& .S Performs division upon a double integer by a single integer placing the quotient in A and any remainder in INT2. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The R*4 variable which receives the quotient of the division in double integer format. .LE B .s 1 The R*4 variable which contains the double integer upon which division is to be performed (the dividend). .le INT1 .s 1 The single word integer which is to be the divisor. .le INT2 .s 1 The single word integer which will receive the remainder of the division. .els .ELS .note This routine does signed division and returns signed results. .en .NOTE Entry point DDWS is the same as DD. .en ^&RESIDENCE&\: CSP.OLB .PS 53,70 .PG .LIT DDRND .ELI ENTRY POINT: DDRND .INDEX DDRND .s 2 SOURCE: MACRO .S 2 CALL DDRND (A,B,INT1,INT2,ROUND1,ROUND2) .s .list .LE ^&FUNCTION:\& .S Divides double integer with rounded quotient and rounded remainder. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The R*4 variable which will receive the rounded quotient in double integer format. .LE B .s 1 The R*4 variable which is to be the dividend, and is in double integer format. .le INT1 .s 1 The integer divisor. .le INT2 .s 1 The integer variable which will receive the rounded remainder. .le ROUND1 .s 1 The specifier for the number of places to round to in the quotient. .TP 7 .le ROUND2 .s 1 The specifier for the number of places to round to in the remainder. .els .els ^&RESIDENCE\& CSP.OLB .PS 50,70 .PG .LIT DDWD .ELI .INDEX DDWD ENTRY POINT: DDWD .s 2 SOURCE: MACRO .S 2 CALL DDWD (A,B,C,REM) .s .list .LE ^&FUNCTION:\& .S Divides a double word dividend with a double word divisor returning a double word quotient and a double word remainder. A=B/C with REM. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The R*4 variable which will receive the quotient in double integer format. .LE B .s 1 The R*4 variable which contains the dividend in double integer format. .le C .s 1 The R*4 variable which contains the divisor in double integer format. .le REM .s 1 The R*4 variable which will receive the remainder in double integer format. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DELETE .ELI .INDEX DELETE ENTRY POINT: DELETE .s 2 SOURCE: MACRO .S 2 CALL DELETE (LUN,ERR) .s .list .LE ^&FUNCTION:\& .S A FORTRAN callable routine which deletes the file associated with LUN. .S .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE ERR .s 1 An integer variable which will receive either an error code or the completion code before returning to mainline. The error codes are the FDB error codes. .els .ELS .note The file must either be open, or FDBSET must be used along with CALL ASSIGN to fill the required information in the FDB. Invalid LUN's will result in a FORTRAN error trapped by the JCHNL routine. .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DFIX .ELI .INDEX DFIX ENTRY POINTS: DFIX .LIT DPFIX .ELI .s 2 SOURCE: MACRO .S 2 .LIST .LE CALL DFIX (A) .s .list .LE ^&FUNCTION:\& .S Converts the named R*4 variable from real format to double integer format. Only the integral portion of the floating point number is used. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The standard precision real variable which contains the floating point value to be converted. After the function has been applied, this variable will contain the double integer conversion. .els .note This entry point converts only R*4 variables. To convert R*8, use the other entry point DPFIX. .en .els .PG .INDEX DPFIX .s 3 .LE CALL DPFIX (A) .s .list .LE ^&FUNCTION:\& .S Converts R*8 variable from real format to double integer format. Only the integral part of the real variable is used in the conversion. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The R*8 variable that is to be converted to double integer format. .els .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DFLT .ELI .INDEX DFLT ENTRY POINT: DFLT .s 2 SOURCE: MACRO .S 2 CALL DFLT (A) .s .list .LE ^&FUNCTION:\& .S Converts from double integer format to real format. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The R*4 variable in double integer format that is converted from double integer format to real format. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DIFIX .ELI .INDEX DIFIX ENTRY POINT: DIFIX .s 2 SOURCE: MACRO .S 2 FUNCTION FORMAT: DIFIX (REAL) .s .list .LE ^&FUNCTION:\& .S To convert a standard precision real variable, expression, or constant to double integer format. .S 2 .le ^&PARAMETERS:\& .list .LE REAL .s 1 A real variable, expression, or constant .els .els .note Only the integral portion of the real argument is converted to double integer format. .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DIFLT .ELI .INDEX DIFLT ENTRY POINT: DIFLT .s 2 SOURCE: MACRO .S 2 CALL FUNCTION FORMAT: DIFLT (A) .s .list .LE ^&FUNCTION:\& .S Converts a double integer format R*4 variable to a real format R*4 variable. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 An R*4 variable in double integer format. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DIRND .ELI .INDEX DIRND ENTRY POINT: DIRND .s 2 SOURCE: MACRO .S 2 CALL DIRND (A,I1,I2) .s .list .LE ^&FUNCTION:\& .S .S Rounds a double integer variable with I1 number of implied decimal places to a double integer with I2 number of decimal places. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 An R*4 variable in double integer format. .LE I1 .s 1 An integer constant, integer expression, or integer variable. .le I2 .s 1 An integer constant, integer expression, or integer variable. .els .els .note The rounding technique used is half adjusting. .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DISGN .ELI .INDEX DISGN ENTRY POINT: DISGN .s 2 SOURCE: MACRO .S 2 CALL DISGN (A,I) .s .list .LE ^&FUNCTION:\& .S Performs sign testing on a double integer returning -1, 0, or +1 if the double integer is negative, 0, or positive, respectively. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The R*4 variable in double integer format which is tested. .LE I .s 1 The single integer variable which will receive the sign indication from this subroutine. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT DSORT .ELI .INDEX DSORT ENTRY POINT: DSORT .s 2 SOURCE: MACRO .S 2 .LIT CALL DSORT (LUN,NRECS,LREC,NKEYS,KSTRT,KLNTH, TYPE,KBUF,KBFSZ,KTMP) .ELI .s .list .LE ^&FUNCTION:\& .S This routine is used with a memory sort subroutine to perform an in place sort on a file of records maintained by DEC File Control Services (FCS). .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 Logical Unit Number .LE NRECS .s 1 Number of records to sort .le LREC .s 1 Length of record in words .s .LE NKEYS .s 1 Number of keys to sort on .LE KSTRT .s 1 An array of the key positions in the record to be sorted .le KLNTH .s 1 An array containing the length of the keys .TP 4 .LE TYPE .s 1 An array of the type of sort to perform. .LIT 1=numeric (ascending) 2=ASCII (ascending) 3=numeric (descending) 4=ASCII (descending) .eli .LE KBUFF .s 1 Sort buffer address. This buffer must be at least 512 words. .le KBFSZ .s 1 Sort buffer size in words .LE KTMP .s 1 Work area at least as large as the length of one record. .els .els .note The file to be sorted must be opened by the calling program. .en .note The sort buffer (KBUFF) should be sufficiently large and a multiple of the record length. .en .note At least one I/O command must be given to the file to be sorted to cause that file to be initialized. .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT FACESS .ELI .INDEX FACESS ENTRY POINT: FLAGC .LIT FLAGS .ELI .s 2 SOURCE: MACRO .S 2 .list .le CALL FLAGS (FLAG) .INDEX FLAGS .s .list .LE ^&FUNCTION:\& .S Gain access to a resource by setting flag as given in subroutine argument. (See note) .S 2 .le ^&PARAMETERS:\& .list .LE FLAG .s 1 The global event flag to set. .els .le ^&DESCRIPTION:\& .S This module also sends the flag number to '...GBL', if if it is an installed task. '...GBL' can then monitor the clearing of the flag and report any flags set for an unusual amount of time. .els .INDEX FLAGC .s 3 .LE CALL FLAGC (FLAG) .s .list .LE ^&FUNCTION:\& .S Give up the access to the resource by clearing the flag as given in the subroutine argument. .S 2 .le ^&PARAMETERS:\& .list .LE FLAG .s 1 The global event flag to be set. .els .els .ELS .note This module with its two entry points is used for the control of event flags used by multiple programs for gaining access to various resources of the system. Normally, the resource being shared is a disk file. This routine can also be used as a method of locking other programs out of a resource as required. .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT FILERR .ELI .INDEX FILERR ENTRY POINT: FILERR .s 2 SOURCE: FORTRAN .S 2 CALL FILERR (TI,FILE) .s .list .LE ^&FUNCTION:\& .S To give a definitive description of the type of error that has occurred on a file READ or WRITE. .S 2 .le ^&PARAMETERS:\& .list .LE TI .s 1 .LE FILE .s 1 The file descriptor on the file to be accessed. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT FILL .ELI .INDEX FILL ENTRY POINT: FILL .s 2 SOURCE: MACRO .S 2 CALL FILL (ARRAY,L,U,SPEC) .s .list .LE ^&FUNCTION:\& .S Fills an array with a specified character. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 An integer array which contains the array to be filled. .LE L .s 1 The lower bound on the area in the array to be filled. .le U .s 1 The upper bound on the area of the array to be filled. .le SPEC .s The specifier on what is to be filled into the defined area of the array. SPEC may be a quoted ASCII string, integer constant, integer variable, or integer expression. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT FILLB .ELI .INDEX FILLB ENTRY POINT: FILLB .s 2 SOURCE: MACRO .S 2 CALL FILLB (ARRAY,L,U,SPEC) .s .list .LE ^&FUNCTION:\& .S Performs the same function as FILL except that FILLB operates on a BYTE array. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 A BYTE array which contains the area to be filled. .LE L .s 1 The lower bound on the array to be filled. .le U .s 1 The upper bound on the array to be filled. .le SPEC .s The specifier on what is to be filled into the defined area of the array. SPEC may be a quoted ASCII string, integer constant, integer variable, or integer expression. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT FILLX .ELI .INDEX FILLX ENTRY POINT: FILLX .s 2 SOURCE: MACRO .S 2 CALL FILLX (RARRAY,L,U,VALUE) .s .list .LE ^&FUNCTION:\& .S To fill a real array with a specified real value. .S 2 .le ^&PARAMETERS:\& .list .LE RARRAY .s 1 Real array .LE L .s 1 Lower (starting) position to fill. .le U .s 1 Upper (ending) position to fill. .le VALUE .s 1 Value to be put into the array positions. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT FILL$ .ELI .INDEX FILL$ ENTRY POINT: FILL$ .s 2 SOURCE: MACRO .S 2 CALL FILL$ (ARRAY,L,U,CHAR) .s .list .LE ^&FUNCTION:\& .s To fill specified positions of an arrray with a specified character. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 The name of a one-dimensional integer array. .LE L .s 1 An integer constant, variable, or expression. This parameter is the lower (starting) position to be filled in the array. .le U .s 1 An integer constant, variable, or expression. This parameter represents the upper (ending) position to be filled in the array. .le CHAR .s 1 The character to be placed in the array. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT GETTI .ELI .INDEX GETTI ENTRY POINT: GETTI .s 2 SOURCE: MACRO .S 2 CALL GETTI (TILUN,TIPHY) .s .list .LE ^&FUNCTION:\& .S Get physical unit number for logical unit number input. .S 2 .le ^&PARAMETERS:\& .list .LE TILUN .s 1 Logical unit device (input). .LE TIPHY .s 1 Physical device unit number. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT GSORT .ELI .INDEX GSORT ENTRY POINT: GSORT .s 2 SOURCE: MACRO .S 2 CALL GSORT (IARRAY,I,J,L,NUM,TYPE) .s .list .LE ^&FUNCTION:\& .S General purpose core sorting subroutine for arrays of data. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .s 1 The name of a FORTRAN array. .LE I .s 1 The word size of each data group. .le J .s 1 The number of the data groups to be sorted (equal or less than the array dimension J). .le L .s 1 The position in the data group of the first word on which the sort is to be done. .le NUM .s 1 The number of sequential words to be used in the sort. .le TYPE .s 1 .lit Where 0=sort in ascending order, 1=sort in descending order. .eli .els .le ^&DESCRIPTION:\& .s The array should be dimensioned (I,J) where I is the number of words in each data group, or block, in the array, and J is the total number of groups of data that the array can contain. .els .lit EXAMPLE: DIMENSION IARRAY(3,5) Before (1,1), (2,1), (3,1) = 5,7,2 (1,2), (2,2), (3,2) = 5,6,7 (1,3), (2,3), (3,3) = 2,2,3 (1,4), (2,4), (3,4) = 2,3,4 (1,5), (2,5), (3,5) = 4,2,9 CALL GSORT (IARRAY,3,5,1,2,0) After (1,1), (2,1), (3,1) = 2,2,3 (1,2), (2,2), (3,2) = 2,3,4 (1,3), (2,3), (3,3) = 4,2,9 (1,4), (2,4), (3,4) = 5,6,7 (1,5), (2,5), (3,5) = 5,7,2 .eli .S 2 ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT HSWAP .ELI .INDEX HSWAP ENTRY POINT: HSWAP .s 2 SOURCE: MACRO .S 2 CALL HSWAP (ARRAY,NUM) .s .list .LE ^&FUNCTION:\& .S To swap the high and low order bytes of integer words in an array. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 The name of an INTEGER*2 array. .LE NUM .s 1 The number of elements in the ARRAY to be byte-swapped. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT INT .ELI .INDEX INT ENTRY POINT: INT .s 2 SOURCE: MACRO .S 2 FUNCTION CALL: INT (DBLINT) .s .list .LE ^&FUNCTION:\& .S To test the sign of a double integer. The value of the function returned is negative if the double integer is negative, zero if zero, and positive if the double integer is positive. .S 2 .le ^&PARAMETERS:\& .list .LE DBLINT .s 1 A standard precision real variable in double integer format. .els .els .note This routine is not available to the MACRO programmer since it is in the form of a FORTRAN function routine. .en ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT ISORT .ELI .INDEX ISORT ENTRY POINT: ISORT .s 2 SOURCE: MACRO .S 2 CALL ISORT (IARRAY,IOARRAY,NUM,TYPE) .s .list .LE ^&FUNCTION:\& .S To compute the sorted order of elements of an array. This routine does not actually sort the array, but instead fills out a second array with the subscripts of how the sorted array should appear. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .s 1 An integer array of data to be sorted. .LE IOARRAY .s 1 The array giving the sorted order before calling ISORT. If IOARRAY(1)=0, then IOARRAY(J) will be set to J before sorting. .le NUM .s 1 The number of array elements to sort in IARRAY and IOARRAY. .le TYPE .s 1 The control parameter for sorting. Non-negative for sorting in ascending order, negative for sorting in descending order. .els .els .PG .lit EXAMPLE: DIMENSION IARRAY(5),IOARAY(5) IOARAY(1)=0 Before IARRAY(1)=17 IOARAY(1)=0 IARRAY(2)=10 IARRAY(3)=07 IARRAY(4)=18 IARRAY(5)=25 CALL ISORT (IARRAY,IOARAY,5,+1) After IARRAY(1)=17 IOARAY(1)=3 IARRAY(2)=10 IOARAY(2)=2 IARRAY(3)=07 IOARAY(3)=1 IARRAY(4)=18 IOARAY(4)=4 IARRAY(5)=25 IOARAY(5)=5 .ELI .S 2 ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT JULIAN .ELI .INDEX JULIAN ENTRY POINT: JULIAN .s 2 SOURCE: MACRO .S 2 CALL JULIAN (YEAR,YRDAY,MO,DAY,WKDAY) .s .list .LE ^&FUNCTION:\& .S A FORTRAN subroutine to compute the day of the week or day of the year. .S 2 .le ^&PARAMETERS:\& .list .LE YEAR .s 1 Integer year .LE YRDAY .s 1 Integer day of the year. .le MO .s 1 Integer month. .le DAY .s 1 Integer day (1-31) .le WKDAY .s 1 Integer day of the week. (1-7) .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT KBASE .ELI .INDEX KBASE ENTRY POINT: KBASE .s 2 SOURCE: FORTRAN .S 2 CALL KBASE (BARRAY,L,U,KFACT) .s .list .LE ^&FUNCTION:\& .S To hash an index into an array. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 Byte array containing the key on which the hash is to be performed. .LE L .s 1 The lower bound of the key in the matrix. .le U .s 1 The upper bound on the key in the matrix. .le KFACT .s 1 Factor from the control file. This is equal to the number of records divided by (10*(U-L+1)). .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT KCBIT .ELI .INDEX KCBIT ENTRY POINT: KCBIT .s 2 SOURCE: FORTRAN .S 2 FUNCTION CALL: KCBIT (NWORD,NPOS) .s .list .LE ^&FUNCTION:\& .S To test any bit in an INTEGER*2 word. The value of the bit is returned as the value of the KCBIT. .S 2 .le ^&PARAMETERS:\& .list .LE NWORD .s 1 An integer word which will have a bit tested. .LE NPOS .s 1 The bit position to test. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT LASTKB .ELI .INDEX LASTKB ENTRY POINT: LASTKB .s 2 SOURCE: MACRO .S 2 CALL LASTKB (IARRAY,NUM) .s .list .LE ^&FUNCTION:\& .S To count the number of asterisks (*) in an integer array. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .LE NUM .s 1 This parameter will be returned as the number of asterisks in the ARRAY. If none are found, the value returned is 0. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT LITRAL .ELI .INDEX LITRAL ENTRY POINT: LITRAL .s 2 SOURCE: MACRO .S 2 CALL LITRAL (ARRAY,'STRING') .s .list .LE ^&FUNCTION:\& .S To fill an array with a quoted string. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 The ARRAY to be filled, starting at index position 1. .LE 'STRING' .s 1 A quoted ASCII string to be placed into ARRAY. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT LJUSTB .ELI .INDEX LJUSTB ENTRY POINT: LJUSTB .s 2 SOURCE: MACRO .S 2 CALL LJUSTB (BARRY,L,U) .s .list .LE ^&FUNCTION:\& .S To left justify data in a byte array. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 A byte array which contains the data before and after justification. .LE L .s 1 The lower bound indicating the "left" end of the data after justification. .le U .s 1 The upper bound indicating the "right" end of the data after justification. (Non-existant data on the right end will be filled with blanks.) .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MADIB .ELI .INDEX MADIB ENTRY POINT: MADIB .s 2 SOURCE: MACRO .S 2 CALL MADIB (IARRAY,L,U,DBLINT) .s .list .LE ^&FUNCTION:\& .S To convert A1 data into double integer format. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .s 1 The array containing the A1 data to be converted. .LE L .s 1 The lower bound of the field of data to be converted. .le U .s 1 The upper bound of the data to be converted. .le DBLINT .s 1 The double integer (INTEGER*4) which will receive the converted data. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MASIB .ELI .INDEX MASIB ENTRY POINT: MASIB .s 2 SOURCE: MACRO .S 2 CALL MASIB (ARRAY,L,U,INT) .s .list .LE ^&FUNCTION:\& .S To convert data in A1 format into single integer format. .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 The array containing the A1 data to be converted. .LE L .s 1 The lower bound on the field of data to be converted. .le U .s 1 The upper bound on the field of data to be converted. .le INT .s 1 The integer which will receive the numeric representation of the data after conversion. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MCRFNC .ELI .INDEX MCRFNC ENTRY POINT: MCRFNC .s 2 SOURCE: MACRO .S 2 CALL MCRFNC ('STRING',IDS) .s .list .LE ^&FUNCTION:\& .S To initiate a sub-task by use of the SPAWN directive. .S 2 .le ^&PARAMETERS:\& .list .LE 'STRING' .s 1 A quoted ASCII command string that would normally be submitted to MCR-MODE of PDX. The first three letters are interpreted as the MCR function to invoke, followed by a space and the command line to be passed. The command line is followed by a null or '#' character. .LE IDS .s 1 IDS is a two-way parameter. On input to this module, it indicates: .lit 0=return immediately, don't wait for completion. 1=return after the MCR task has been executed. .eli Upon return from this module: .lit 1=successful completion of the directive. negative=unsuccessful task execution. .eli .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MD .ELI .INDEX MD ENTRY POINT: MD .s 2 SOURCE: MACRO .S 2 CALL MD (A,B,C) .s .list .LE ^&FUNCTION:\& .S To perform multiplication upon the double integer value of B by the double integer value of C, placing the result in the double integer A. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 The standard precision real variable name which receives the product of the multiplication in double integer format. .LE B .s 1 The standard precision real variable name which contains the double integer upon which multiplication is to be performed. This argument is the multiplicand. .le C .s 1 The standard precision real variable name which contains the double integer which is to be multiplied. This argument is the multiplier. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MDIAB .ELI .INDEX MDIAB ENTRY POINT: MDIAB .s 2 SOURCE: MACRO .S 2 CALL MDIAB (BARRAY,L,U,DBLINT,TYPE) .s .list .LE ^&FUNCTION:\& .S To convert a double integer into A1 format and move it into a byte array (BARRAY) .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 The name of a byte array which will contain the field converted from the double word integer. .LE L .s 1 The lower bound that defines the start (left) of the field in BARRAY to receive the converted data. .le U .s 1 The upper bound that defines the end (right) of the field in BARRAY to receive the converted data. .le DBLINT .s 1 The name of a standard precision real variable which contains the double word integer to be converted to a numeric field. .le TYPE .s 1 The integer variable or constant that controls the editing performed upon the numeric field. (See Description) .els .le ^&DESCRIPTION:\& .S The double integer is converted one decimal digit at a time starting at L and continuing until U is reached. Left zeros are supplied to fill the field which may exceed ten positions. If the double integer is negative, an "11" zone is placed over the digit at U. Three types of editing can be performed upon the output field through the use of the TYPE parameter: .LIT TYPE = 0 -- the output field is not changed. It will have all left zeros and an "11" zone at U if DBLINT is negative. TYPE = -N - the output field has left zeros replaced by blanks until a digit is encountered or N places remain in the field (whichever comes first). If the field is negative, a minus sign is moved to U+1. If N is greater than the field specified N is considered to be zero (all blank zero field). TYPE = +N - the output field has left zeros replaced by blanks until a digit is encountered or the decimal point position is reached (whichever comes first). if the field is negative, a minus sign is moved to U+2. A decimal point is inserted after moving L digits one position to the right. If L is greater than the field specified, L is considered to be zero, and a decimal point is placed at U+1. EXAMPLE: BYTE LINE(120) CALL MDIAB (LINE,1,10,DBLINT,0) if - DBLINT=2 0000000002 in 1-10 DBLINT=-2 000000000K in 1-10 CALL MDIAB (LINE,1,10,DBLINT,-2) if - DBLINT=2 bbbbbbbb02 in 1-10 DBLINT=-2 bbbbbbbb02- in 1-11 CALL MDIAB (LINE,1,10,DBLINT,+2) if - DBLINT=2 bbbbbbb.02 in 1-10 DBLINT=-2 bbbbbbb.02- in 1-11 .eli .els .PS 50,70 ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MDII .ELI .INDEX MDII ENTRY POINTS: MDII .LIT MIDI .ELI .s 2 SOURCE: MACRO .S 2 .LIST .LE CALL MDII (INT,DBLINT) .s .list .LE ^&FUNCTION:\& .S To convert and move the double integer data at the real variable name DBLINT to an integer variable at the name INT. .S 2 .le ^&PARAMETERS:\& .list .LE INT .s 1 The standard precision integer varialbe name that will receive the integer value. .LE DBLINT .s 1 The standard precision real variable in double integer format which contains the double integer to be converted to single integer format. .els .els .S 2 .INDEX MIDI .LE CALL MIDI (INT,DBLINT) .s .list .LE ^&FUNCTION:\& .S To convert and move an integer variable or integer constant to double integer format and store that value at the parameter -- DBLINT. .S 2 .le ^&PARAMETERS:\& .list .LE INT .s 1 An integer variable or integer constant that is to be converted to double integer format. .LE DBLINT .s 1 A standard precision real variable name that is to receive the double integer specified by the first parameter -- INT. .els .els .ELS ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MDRND .ELI .INDEX MDRND ENTRY POINT: MDRND .s 2 SOURCE: MACRO .S 2 CALL MDRND (RESULT,A,B,IDECM,IDECW) .s .list .LE ^&FUNCTION:\& .S To multiply two double integers and round the result. .S 2 .le ^&PARAMETERS:\& .list .LE RESULT .s 1 A standard precision real variable which will receive the result of the multiplication and rounding operations. .LE A .s 1 A standard precision real variable in double integer format which will be the multiplicand. .le B .s 1 A standard precision real variable in double integer format which will be the multiplier. .le IDECM .s 1 An integer variable name which will contain the number of decimal places resulting from the multiplication operation. .TP 9 .le IDECW .s 1 An integer variable name which contains the number of decimal places wanted in the RESULT after rounding. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MOVA1B .ELI .INDEX MOVA1B ENTRY POINT: MOVA1B .s 2 SOURCE: MACRO .S 2 CALL MOVA1B (BARRAY,LB,UB,IARRAY,LI) .s .list .LE ^&FUNCTION:\& .S To move A1 data in an integer array into a byte array. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 The byte array which will receive the A1 data. .LE LB .s 1 The starting position in the byte array to receive the data. .le UB .s 1 The ending position in the byte array for the data move. .le IARRAY .s 1 An integer array containing the A1 data to be moved. .le LI .s 1 The starting (left) position in IARRAY fromm which the data is to be moved. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MOVE .ELI .INDEX MOVE ENTRY POINT: MOVE .s 2 SOURCE: MACRO .S 2 CALL MOVE (IARRA1,L1,U1,IARRA2,L2) .s .list .LE ^&FUNCTION:\& .S To move data from one array to another array. .S 2 .le ^&PARAMETERS:\& .list .LE IARRA1 .s 1 The name of a one-dimensional integer array. This is the the array from which data is moved. The data may be stored in any format, one character per word. .LE L1 .s 1 An integer constant, variable, or expression. This is the position of the first character of IARRA1 to be moved. .le U1 .s 1 An integer constant, variable, or expression. This is the position of the last character of IARRA1 to be moved. .le IARRA2 .s 1 The name of a one-dimensional array. This is the array to which data is moved, one character per word. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MOVEB .ELI .INDEX MOVEB ENTRY POINT: MOVEB .s 2 SOURCE: MACRO .S 2 CALL MOVEB (BARRA1,L1,U1,BARRA2,L2) .s .list .LE ^&FUNCTION:\& .S To move data from one byte array to another byte array. .S 2 .le ^&PARAMETERS:\& .list .LE BARRA1 .s 1 The name of a one-dimensional byte array. This is the the array from which data is moved. The data may be stored in any format, one character per byte. .LE L1 .s 1 An integer constant, variable, or expression. This is the position of the first character of BARRA1 to be moved. .le U1 .s 1 An integer constant, variable, or expression. This is the position of the last character of BARRA1 to be moved. .le IARRA2 .s 1 The name of a one-dimensional byte array. This is the array to which data is moved, one character per byte. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MOVEX .ELI .INDEX MOVEX ENTRY POINT: MOVEX .s 2 SOURCE: MACRO .S 2 CALL MOVEX (DARRA1,L1,U1,DARRA2,L2) .s .list .LE ^&FUNCTION:\& .S To move data from one 2-word array to another 2-word array. These arrays may be standard precision REAL, or INTEGER*4. .S 2 .le ^&PARAMETERS:\& .list .LE DARRA1 .s 1 The name of a one-dimensional array. This is the array from which data is moved. The data may be stored in any format. .LE L1 .s 1 An integer constant, variable, or expression. This is the position of the first character of DARRA1 to be moved. .le U1 .s 1 An integer constant, variable, or expression. This is the position of the last character of DARRA1 to be moved. .le DARRA2 .s 1 The name of a one-dimensional array. This is the array to which data is moved. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT MSIAB .ELI .INDEX MSIAB ENTRY POINT: MSIAB .s 2 SOURCE: MACRO .S 2 CALL MSIAB (BARRAY,L,U,INT,TYPE) .s .list .LE ^&FUNCTION:\& .S To convert an integer into A1 format and move it into a byte array (BARRAY) .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 The name of a byte array which will contain the field converted from the double word integer. .LE L .s 1 The lower bound that defines the start (left) of the field in BARRAY to receive the converted data. .le U .s 1 The upper bound that defines the end (right) of the field in BARRAY to receive the converted data. .le INT .s 1 The name of an integer which contains the data to be converted to an A1 format. .le TYPE .s 1 The integer variable or constant that controls the editing performed upon the numeric field. (See Description) .els .le ^&DESCRIPTION:\& .S The double integer is converted one decimal digit at a time starting at L and continuing until U is reached. Left zeros are supplied to fill the field which may exceed ten positions. If the double integer is negative, an "11" zone is placed over the digit at U. Three types of editing can be performed upon the output field through the use of the TYPE parameter: .LIT TYPE = 0 -- the output field is not changed. It will have all left zeros and an "11" zone at U if INT is negative. TYPE = -N - the output field has left zeros replaced by blanks until a digit is encountered or N places remain in the field (whichever comes first). If the field is negative, a minus sign is moved to U+1. If N is greater than the field specified N is considered to be zero (all blank zero field). TYPE = +N - the output field has left zeros replaced by blanks until a digit is encountered or the decimal point position is reached (whichever comes first). if the field is negative, a minus sign is moved to U+2. A decimal point is inserted after moving L digits one position to the right. If L is greater than the field specified, L is considered to be zero, and a decimal point is placed at U+1. EXAMPLE: BYTE LINE(120) CALL MSIAB (LINE,1,10,INT,0) if - INT=2 0000000002 in 1-10 INT=-2 000000000K in 1-10 CALL MSIAB (LINE,1,10,INT,-2) if - INT=2 bbbbbbbb02 in 1-10 INT=-2 bbbbbbbb02- in 1-11 CALL MSIAB (LINE,1,10,INT,+2) if - INT=2 bbbbbbb.02 in 1-10 INT=-2 bbbbbbb.02- in 1-11 .eli .els .PS 50,70 ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT NAMREV .ELI .INDEX NAMREV ENTRY POINT: NAMREV .s 2 SOURCE: FORTRAN .S 2 CALL NAMREV (NAME) .s .list .LE ^&FUNCTION:\& .S To reverse an employee name, last name first, etc. .S 2 .le ^&PARAMETERS:\& .list .LE NAME .s 1 A byte array(24) containing the name to be reversed. After execution of this routine, this array contains the reversed name. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT NBTST .ELI .INDEX NBTST ENTRY POINT: NBTST .s 2 SOURCE: MACRO .S 2 FUNCTION CALL: NBTST (IARRAY,BITNUM,TYPE) .s .list .LE ^&FUNCTION:\& .S To set, clear, or test a specified bit of an array. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .s 1 An integer array representing the bit map array. .LE BITNUM .s 1 An integer representing the bit number in IARRAY to test. .le TYPE .s 1 The type of operation to perform where: .lit TYPE = 0 Clear the indicated bit. TYPE = 1 Set the indicated bit. TYPE = 2 Swap the bit with the opposite of it's present setting. TYPE = 3 Test the bit. If bit is clear the value of this function is 0, if bit is set, function value is 1. .eli .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT NCALCB .ELI .INDEX CKDGTB ENTRY POINTS: CKDGTB .LIT NCALCB NCHEKB .ELI .s 2 SOURCE: MACRO .S 2 .LE CALL CKDGTB (BARRAY,L,U,TYPE) .s .list .LE ^&FUNCTION:\& .S To calculate (or check) a check-digit for the residing in BARRAY. .S 2 .TP 5 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 A byte array where number and check digit reside. .LE L .s 1 Lower bound of number in BARRAY. .le U .s 1 The upper position in BARRAY. .le TYPE .s 1 The operation to perform where: .lit TYPE = 1 Calculate a check digit. Type = 2 Determine validity of check digit. If TYPE = 2 then the returning code is: TYPE = 1 Check digit is not valid. TYPE = 2 Check digit is correct. .eli .els .els .INDEX NCALCB .s 2 .LE FUNCTION CALL: NCALCB (BARRAY,L,U) .s .list .LE ^&FUNCTION:\& .S To compute a check digit (mod 10). .S 2 .TP5 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 A byte array containing the number (in A1 format) for check digit computation. .LE L .s 1 The lower bound on the number in BARRAY. .le U .s 1 The upper bound on the number in BARRAY. .els .els .INDEX NCHEKB .s 2 .LE FUNCTION CALL: NCHEKB (BARRAY,L,U) .s .list .LE ^&FUNCTION:\& .S To determine the validity of a check digit. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 A byte array containing the number and its check digit. .LE L .s 1 The lower bound on the number in BARRAY. .le U .s 1 The location of the check-digit to be validated. .els .le ^&DESCRIPTION:\& .S If the check-digit is valid the value of this function is 0. .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT NCOMPB .ELI .INDEX NCOMPB ENTRY POINT: NCOMPB .s 2 SOURCE: MACRO .S 2 CALL NCOMPB (BARRA1,L1,U1,BARRA2,L2) .s .list .LE ^&FUNCTION:\& .S To do a logical comparison of data in two byte arrays, one position at a time. .S 2 .le ^&PARAMETERS:\& .list .LE BARRA1 .s 1 The name of a one-dimensional byte array containing the first data field to be compared. .LE L1 .s 1 The lower bound in BARRA1, indicating the position to begin comparison of this data field. .le U1 .s 1 The upper bound in BARRA1, indicating the last position of the data field to compare. .le BARRA2 .s 1 The name of a one-dimensional byte array, containing the second field to compare. .le L2 .s 1 The lower bound on the data in BARRA2. .els .TP 5 .le ^&DESCRIPTION:\& .S Corresponding characters of BARRA1 and BARRA2 are compared, one at a time beginning with BARRA1(L1) and BARRA2(L2). The routine continues until either a comparison fails, or BARRA1(U1) has been compared. The values of this function are: .lit - (minus) BARRA1 is less than BARRA2 0 (zero) BARRA1 is equal to BARRA2 + (plus) BARRA1 is greater than BARRA2 .eli .S 2 .ELS ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT NOLOCK .ELI .INDEX NOLOCK ENTRY POINT: NOLOCK .s 2 SOURCE: MACRO .S 2 CALL NOLOCK (LUN) .s .list .LE ^&FUNCTION:\& .S To prevent a file from being locked no matter how the task ends (normal completion, or abnormal termination). NOLOCK should be called after the FDBSET and before any I/O access is made. .S 2 .le ^&PARAMETERS:\& .list .LE LUN .s 1 The lun assigned to the file. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT NUMCKB .ELI .INDEX NUMCKB ENTRY POINT: NUMCKB .s 2 SOURCE: MACRO .S 2 FUNCTION CALL: NUMCKB (BARRAY,L,U) .s .list .LE ^&FUNCTION:\& .S To check a byte array and make sure that it is numeric. Any blanks found are replaced by zeros. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 A byte array containing the data to be checked. .LE L .s 1 The lower bound on the data in BARRAY to check. .le U .s 1 The upper bound on the data in BARRAY to check. .els .els ^&RESIDENCE:\& CSP.OLB .PS 52,70 .PG .LIT NZONEB .ELI .INDEX NZONEB ENTRY POINT: NZONEB .s 2 SOURCE: FORTRAN .S 2 CALL NZONEB (BARRAY,I,NEWZ,NOLDZ) .s .list .LE ^&FUNCTION:\& .S To check a zone and return with a code as to what the zone is. Also, modify the zone as specified by NEWZ. .S .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 The byte array containing the character to be checked. .LE I .s 1 The position in BARRAY that the character to be checked is located. .le NEWZ .s 1 An integer constant, intege r expression, or integer variable containing a code specifying the modification to be made on the zone. The zones are: .lit NEWZ Character 1 12 zone 2 11 zone 3 0 zone 4 no zone (blank) more than 4 no change .eli .TP8 .le NOLDZ .S An integer variable. This variable contains the code specifying what the zone was before the action performed as to the specification in NEWZ .els .ELS ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT RJUSTB .ELI .INDEX RJUSTB .INDEX JSTFYB ENTRY POINTS: RJUSTB .LIT JSTFYB .ELI .s 2 SOURCE: MACRO .S 2 CALL RJUSTB (BARRAY,L,R) .B (JSTFYB is the same entry point as RJUSTB and performs the same function.) .b .s .list .LE ^&FUNCTION:\& .S To right justify significant (non-blank) data in an array of A1 data. Elements vacated are filled with blanks. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 A byte array containing the field to be justified. .LE L .s 1 The left end of the field to be justified. .le R .s 1 The right end of the field to be justified. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT SBIT .ELI .INDEX SBIT .index SETBIT ENTRY POINTS: SBIT .LIT SETBIT CLRBIT CBIT CKBIT .ELI .s 2 SOURCE: MACRO .S 2 .LIST .LE CALL SBIT (ARRAY,IPOS),also CALL SETBIT (ARRAY,IPOS) .s .list .LE ^&FUNCTION:\& .S To set the bit specified by IPOS in ARRAY. .b (This routine assumes 15 bits per word.) .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 An integer array containing the data to be changed. .LE IPOS .s 1 The integer position in the array of the bit to be set. .els .els .PS 50,70 .index CLRBIT .S 2 .LE CALL CLRBIT (ARRAY,IPOS) .s .list .LE ^&FUNCTION:\& .S To clear a bit specified by IPOS in ARRAY. .b (This routine assumes 15 bits per word.) .S 2 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 An integer array containing the data to be cleared. .LE IPOS .s 1 The position in ARRAY of the bit to be cleared. .els .els .INDEX CBIT .INDEX CKBIT .S 2 .LE FUNCTION CALL: CBIT (ARRAY,IPOS) .LE FUNCTION CALL: CKBIT (ARRAY,IPOS) .s .list .LE ^&FUNCTION:\& .S A function routine that returns as its value 1 if the bit specified is on, and a 0 if the bit is off. .S 2 .TP 18 .le ^&PARAMETERS:\& .list .LE ARRAY .s 1 An integer array containg the bit to be checked. .LE IPOS .s 1 An integer containing the bit number in ARRAY to check. .b (This routine assumes 15 bits per word.) .els .els .ELS ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT SDABS .ELI .INDEX SDABS ENTRY POINT: SDABS .s 2 SOURCE: FORTRAN .S 2 CALL SDABS (A,B,C) .s .list .LE ^&FUNCTION:\& .S To subtract two double integers and return a double integer absolute value of the result. .S 2 .le ^&PARAMETERS:\& .list .LE A .s 1 A standard precision real variable. This variable will contain the result of this routine. .LE B .s 1 A standard precision real variable which contains the value upon which subtraction is to be performed. .le C .s 1 A standard precision real variable which contains the value to be subtracted. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT SHIFTB .ELI .INDEX SHIFTB ENTRY POINT: SHIFTB .s 2 SOURCE: MACRO .S 2 CALL SHIFTB (BARRAY,L,U,D) .s .list .LE ^&FUNCTION:\& .S To check a byte array for a decimal point and shift it out. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 The byte array containing the number to check for a decimal (in A1 format). .LE L .s 1 The lower bound of the array to begin checking for the decimal point. .le U .s 1 The upper bound on the array to stop checking for the decimal point. .le D .s 1 A real variable returned by SHIFTB to be used as a multiplication factor during "GET" or "GIT". .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT SYSCHK .ELI .INDEX SYSCHK ENTRY POINT: SYSCHK .s 2 SOURCE: MACRO .S 2 CALL SYSCHK .s .list .LE ^&FUNCTION:\& .S To start up the menu currently available on a terminal. .els ^&RESIDENCE:\& CSP.OLB .PS 50,80 .PG .LIT VQIO .ELI .INDEX VQIO .INDEX READA .INDEX READN .INDEX READNE .INDEX VQIO .INDEX VQION .INDEX VQIONE .INDEX VQIOWR ENTRY POINTS: .LIT THIS MODULE PROVIDES FOR VARIOUS CALLS TO COLLECT DATA FROM DATA ENTRY TERMINALS. THE DATA IS READ ONE CHARACTER AT A TIME UNTIL THE COUNT REQUESTED IS SATISFIED. THERE ARE VARIOUS ENTRY POINTS WHICH PROVIDE FOR COMBINATIONS OF THE FOLLOWING: 1) READ NO ECHO 2) READ WITH ECHO 3) READ - FILL WITH BLANKS ON 'RETURN' 4) READ - CR/LF ON 'RETURN' 5) READ - NUMERIC ONLY 6) READ - ALPHANUMERIC THE VARIOUS CALLS ARE AS FOLLOWS: 1) READ NO ECHO CALL VQIONE(DEV,IEFQ,ICNT,IBUFF,IEFM,KUNT,KTYP,KFLAG) CALL VQION ( " " " " " " " ) CALL READNE( " " " " " " " ) 2) READ WITH ECHO CALL VQIO (DEV,IEFQ,ICNT,IBUFF,IEFM,KUNT,KTYP,KFLAG) CALL READA ( " " " " " " " ) 3) READ WITH ECHO , CR/LF ON 'RETURN' CALL VQIOWR(DEV,IEFQ,ICNT,IBUFF,IEFM,KUNT,KTYP,KFLAG) 4) READ WITH ECHO , NUMERIC ONLY CALL READN (DEV,IEFQ,ICNT,IBUFF,IEFM,KUNT,KTYP,KFLAG) WHERE: DEV - LOGICAL UNIT NUMBER IEFQ - LOCAL FLAG AVAILABLE FOR SUBROUTINE USE. ICNT - NUMBER CHARACTER TO READ IBUFF - LOGICAL*1 ARRAY NAME IEFM - LOCAL FLAG AVAILABLE FOR SUBROUTINE USE (.NE.IEFQ) KUNT - NUMBER OF UNITS FOR TIME OUT PARAMETER KTYP - UNIT SIZE FOR TIME OUT PARAMETER (1=TICKS,2=SECONDS, 3=MINUTES,4=HOURS) .ELI ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT VTIN .ELI .INDEX VTIN .INDEX VTINP .INDEX ANS .INDEX ANSP .INDEX VTOUT .S SOURCE: MACRO .S2 ENTRY POINTS: .LIT USES LOCAL EVENT FLAG 19 !!. -- CALL VTOUT(TI,OUTPUTARRAY,[NUMCHAR],[CRGCTL],[WAIT]) -- CALL VTINP (TI,['PROMPT'],INPUT,[CHAR],[CARRIAGE CONTROL], [RETURN],[ECHO],[TIMEOUT]) -- CALL ANSP (TI,['PROMPT'],INPUT,[CARRIAGE CONTROL], [RETURN],[ECHO],[TIMEOUT]) -- CALL VTIN (TI,INARRAY,[CHAR],[TIMOUT],[NOECHO], [CARRIAGE CONTROL],[RETURN]) -- CALL ANSWER (TI,INARRAY,,[TIMEOUT],[NOECHO], [CARRIAGE CONTROL],[RETURN]) THE COUNT OF INPUT CHARACTERS MUST BE A VARIABLE. ---- IT IS MODIFIED BY THE ROUTINES TO THE COUNT OF CHARACTERS ACTUALLY ENTERED. IF NO 'PROMPT' ARGUMENT IS ENTERED, PROMPT DEFAULTS TO "??" IF NO CHARACTER COUNT IS GIVEN, DEFAULT IS 1. CARRIAGE CONTROL VALUES ARE : 1 FOR LINE FEED BEFORE I/O 2 FOR CARRIAGE RETURN BEFORE I/O 4 FOR LINE FEED AFTER I/O 8 FOR CARRIAGE CONTROL AFTER I/O VALUES MAY BE OR'D FOR MULTIPLE CONTROL DEFAULT IS NO CARRIAGE CONTROL WITH THIS REVISION, NO LONGER EXITS FROM THE PROGRAM. RETURNS "33 IN POSITION 1 OF THE INPUT ARRAY. CAUSES THE PROGRAM TO EXIT, UNLESS THE RETURN ARGUMENT IS USED, IN WHICH CASE CAUSES A RETURN TO THE MAINLINE WITH "33 IN POSITION 1 OF THE INPUT ARRAY. .ELI .S ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT WKNDNG .ELI .INDEX WKNDNG ENTRY POINT: WKNDNG .s 2 SOURCE: FORTRAN .S 2 CALL WKNDNG (MO,IDAY,IYEAR) .s .list .LE ^&FUNCTION:\& .S To compute the last week ending date. If this routine is called on a Sunday, that day is returned as the last week ending date. There are no input parameters to this routine. .S 2 .le ^&PARAMETERS:\& .list .LE MO .s 1 An integer variable which will return with the present month in integer format. .LE IDAY .s 1 An integer variable which will return with the present day in integer format. .le IYEAR .s 1 An integer variable which will return with the present year in two-digit integer format. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT ZFILL .ELI .INDEX ZFILL ENTRY POINT: ZFILL .s 2 SOURCE: MACRO .S 2 CALL ZFILL (IARRAY,L,U) .s .list .LE ^&FUNCTION:\& .S To fill leading zeros in an A1 array. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .s 1 An integer array in A1 format. .LE L .s 1 The starting position in IARRAY to begin filling. .le U .s 1 The last position in IARRAY. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT ZFILLB .ELI .INDEX ZFILLB ENTRY POINT: ZFILLB .s 2 SOURCE: MACRO .S 2 CALL ZFILLB (BARRAY,L,U) .s .list .LE ^&FUNCTION:\& .S To fill leading zeros in an A1 array. .S 2 .le ^&PARAMETERS:\& .list .LE IARRAY .s 1 A byte array in A1 format. .LE L .s 1 The starting position in IARRAY to begin filling. .le U .s 1 The last position in IARRAY. .els .els ^&RESIDENCE:\& CSP.OLB .PS 50,70 .PG .LIT ZSUPRB .ELI .INDEX ZSUPRB ENTRY POINT: ZSUPRB .s 2 SOURCE: FORTRAN .S 2 CALL ZSUPRB (BARRAY,L,U) .s .list .LE ^&FUNCTION:\& .S To scan a specified A1 field and change zeros ("0") to blanks until a significant digit is encountered. .S 2 .le ^&PARAMETERS:\& .list .LE BARRAY .s 1 The byte array containing the field to be scanned. .LE L .s 1 An integer constant, variable, or expression defining the starting position in BARRAY to scan. .le U .s 1 An integer constant, expression, or variable defining the upper position to end the scan (if no zeros are encountered before this position). .els .els ^&RESIDENCE:\& CSP.OLB .PG .PX