SSC, Inc.

REXX Functions


ALXRCONC (Allocation/Concatenation of datasets)

>>--ALXRCONC(ddname,dsname,...,dsname)

Allocates and concatenates all dataset names listed to the 'ddname' provided. Returns a value of 'OK' if the allocations and concatenations were successful. If 'ddname' is currently allocated, then datasets will be concatenated to the existing allocation. If the dataset is already part of the concatenated list then no action will be taken.

   Examples:

   ALXRCONC('ISPPLIB','ISP.SISPPENU','SYS3.PANELLIB')  ->   OK
   ALXRCONC('ISPPLIB','ISP.SISPPENU',,
             'SYS3.PANELLIB',,
             'SYS2.ISPPLIB')                           ->   OK

   DDNAME  = 'ISPPLIB'
   DSNAME1 = 'ISP.SISPPENU'
   DSNAME2 = 'SYS3.PANELLIB'
   STATUS = ALXRCONC(DDNAME,DSNAME1,DSNAME2)
   IF STATUS = 'OK' THEN ...
   

Note: For a continuation you must use two commas; one as a delimiter within the function, and the other to inform REXX it is a continuation. Datasets must be fully qualified, and prefixes are not automatically provided for dataset names. Concatenation to an existing entry, that is OPEN, will fail.


ALXRDASD (Return DASD or Tape UCBs)

>>--ALXRDASD(variable_name,count,type,'NOVOL')

Performs a UCBSCAN of either all the DASD or all the TAPE UCBs defined to OS/390. This function uses the ALXEXCOM subroutine to STORE the values in REXX Variables, using the IBM IRXEXCOM facility. The 'variable_name', is a one to 17 character name, that will be used to build a compound variable containing the names of all returned UCBs. The 'count' is optional, with a default maximum of 1,000 UCBs. The 'type' is used to specify either 'DASD' or 'TAPE', with a default to 'DASD'. If 'DASD' is selected then an 'OBTAIN' of the VTOC is performed to retrieve the total number of cylinders on the volume (e.g. determine if it is a Model 3 or Model 9). The VTOC is also checked, and 'ENA' is returned for an enabled Indexed VTOC, and 'DIS' is returned for a disabled Indexed VTOC. If you do not wish to do an 'OBTAIN' of the VTOC, then code the 'NOVOL' parameter (there is less overhead, and only the UCB information is returned).

   Examples:

   ALXRDASD('DASDUCB')                                 OK
   ALXRDASD('TAPEUCB',500,'TAPE')                      OK
   ALXRDASD('DASDUCB',2000,,'NOVOL')                   OK
 

 


ALXRDDIR (Read PDS Directory)

>>--ALXRDDIR(ddname,variable_name,count,directory,prefix)

Reads the PDS Directory of the pre-allocated 'ddname' provided, and returns the member names. This function uses the ALXEXCOM subroutine to STORE the values in REXX Variables, using the IBM IRXEXCOM facility. The 'variable_name', is a one to 17 character name, that will be used to build a compound variable containing the member names in the PDS. The 'count' is optional, with a default maximum of 1,000 member names returned. For larger PDS files, or to lessen this value, a count value should be supplied. The 'directory' USERDATA, a YES or NO value, will return the 60 or so, bytes of user halfwords (e.g. ISPF or Link Edit information). The 'prefix' is when you want only the member names beginning with that value to be returned.

   Examples:

   ALXRDDIR('LOADLIB', 'MEMBER')                       OK
   ALXRDDIR('LOADLIB','MEMBER',9999,'YES')             OK
 

Note: If you request that the 60 or so bytes of directory user data be returned, then you must parse the compound variables to obtain the values. The member will be the first WORD, and the remainder will be the user data. The 0 stem of the 'variable_name' will contain the total number of members returned (e.g. Do I = 1 to MEMBER.0).

 


ALXRDOZE (Wait/Sleep)

>>--ALXRDOZE(seconds)

 

Will allow you to Wait (VM/CMS had a SLEEP function) for a specified number of seconds, not to exceed a request for 999 seconds. Maximum number of numeric values passed is three.

   Example:

   ALXRDOZE(30)                         ->   OKAY


ALXRFNDM (Return the Dataset name for a PDS member in a Concatenated list)

>>--ALXRFNDM(member,ddname)

Function will search a list of datasets concatenated to the 'ddname' supplied, and return the name of the dataset for the first occurrence of the member. The 'ddname' must be pre-allocated prior to invocation of the function.

   Examples:

   ALXRFNDM('IEBGENER','LOADLIB')          ->   SYS1.LINKLIB
   ALXRFNDM('IEBIBALL','LOADLIB')          ->   NOT_FOUND


ALXRFNDS (Return the Dataset name for a PDS member in LPALIST or LINKLIST)

>>--ALXRFNDS(member)

Function will search through the operating system Contents Directory Entry (CDE) in storage first, to determine if module is in the FIX list or Modified Link Pack area (MLPA). Regardless if it is found there, the LPALIST of datasets will be searched next, followed by the LINKLIST datasets.

   Examples:

   ALXRFNDS('ALLOCATE')          ->   SYS1.CMDLIB  LINKLIST
   ALXRFNDS('IEFBR14')           ->   SYS1.LPALIB  LPALIST
   ALXRFNDS('IGC00019')          ->   SYS1.LPALIB  FIX/MLPA
   ALXRFNDS('IEBIBALL')          ->   NOT_FOUND

Note: If the module is found in the FIX/MLPA entries, it does not necessarily mean it was loaded from the dataset returned. Software products can dynamically load to these areas, or they can be specified in the PARMLIB IEAFIXxx and IEALPAxx members. This function will search the CDE, then the LPA libraries, and lastly, the LINKLIST libraries.

 


ALXRGETM (Read a member of a PDS)

>>--ALXRGETM(member,ddname,variable_name,count)

 

Function will read a member of a PDS, to include load modules, and return the records in the 'variable_name' specified as a compound variable (e.g. PDSRECD.1). This function uses the ALXEXCOM subroutine to STORE the values in REXX Variables, using the IBM IRXEXCOM facility. The 'ddname' must be pre-allocated prior to invocation of the function. The '0' stem of the 'variable_name' will contain the number of records read. The 'count' field is optional, and will default to a maximum of 9,999 records.

   Examples:

   ALXRGETM('PROGRAM1',SOURCE','PDSRECD'')       ->   OK
   ALXRGETM('IEBIBALL','LOADLIB','PDSRECD')      ->   NOT_FOUND
   ALXRGETM('PROGRAM2','SOURCE',PDSRECD',9999)   ->   OK


ALXRPDSC (Scratch, Rename, or assign an Alias to a member of a PDS)

>>--ALXRPDSC(FUNCTION,ddname,member,new_member)
______________SCRATCH
______________RENAME
______________ALIAS

Function will allow for the manipulation of members in a PDS, to include: SCRATCHing, RENAMing, or assigning an ALIAS. The 'ddname' must be pre-allocated prior to invocation of the function. You must have update access to the PDS.

   Examples:

   ALXRPDSC('SCRATCH','LOADLIB','IEBIBALL')                 ->   OK
   ALXRPDSC('RENAME','LOADLIB','IEBIBALL','NEWIBALL')       ->   OK
   ALXRPDSC('ALIAS','LOADLIB','NEWIBALL','IEBIBALL')        ->   OK
 

Note: Function will return an error message if not successful.


ALXRWRTM (Write a member of a PDS)

>>--ALXRWRTM(member,ddname,variable_name,count,store_status,directory)

Function will write a member of a PDS, NOT TO include load modules, using the supplied compound 'variable_name' to supply the records.. This function uses the ALXEXCOM subroutine to FETCH the values from REXX Variables, using the IBM IRXEXCOM facility. The 'ddname' must be pre-allocated prior to invocation of the function. The 'count' must specify the number of records to write. The 'store_status' must specify either the keyword 'ADD', or 'REP', with a default value of 'ADD'. The 'directory' value will supply your directory information, with a maximum length of 60 bytes.

   Examples:

   ALXRWRTM('PROGRAM1',SOURCE','PDSRECD,500)            ->   OK
   ALXRWRTM('IEBIBALL','OBJLIB1','PDSRECD',333,'REP')   ->   OK

Note: The ALXRDDIR REXX function is able to read the 'directory' information stored by this function. This would allow for identifying relative information about a member in the PDS, without having to read the contents of the member itself.


ALXRWTO (Issue a Write To Operator (WTO))

>>--ALXRWTO('WTO',descriptor)
_____________________ROLL
_____________________NOROLL

Function will issue a WTO to the default ROUTECDE, with a default descriptor of rolling the WTO off the console. To leave the WTO highlighted, in a no roll status, then specify the descriptor NOROLL.

   Examples:

   ALXRWTO('This message will roll off  the console'')              ->  OK

ALXRWTO('This message will not roll of the console','NOROLL') -> OK


ALXRWTOR (Issue a Write To Operator with Reply (WTOR))

>>--ALXRWTOR('WTOR',reply_length)

Function will issue a WTOR, and return the reply. The reply_length must be specified to provide a limit for the expected reply.

   Example:

   ALXRWTOR('Do you wish to Shutdown ? Reply  YES or NO',3)      ->   YES

   Reply_Area = ALXRWTOR('Is it time to go home ? Reply Yes or No',3)
   If Reply_Area = 'YES' then ...


ALXEXCOM (Subroutine to STORE/FETCH REXX Variables)

This subroutine is invoked by all the above REXX functions that either STORE or FETCH variables to/from REXX. Programs can be written in any high level language, to take advantage of this subroutine, and the interface to the REXX IRXEXCOM facility. Some sample Assembler code will be provided, to describe the use of this subroutine.

SAMPLE	CSECT
|
|
LA       R1,ALXEXCOM_PARMLIST            Pass as parm value
L        R15,ALXEXCOM	                 Load VCON address
BALR     R14,R15
|
|
ALXEXCOM               DC    V(ALXEXCOM)
*
ALXEXCOM_PARMLIST      DC    A(ALEXCOM_FUNCTION)
ALXEXCOM_FUNCTION      DC    CL8'STORE '
ALXEXCOM_VARCOUNT      DC    F'2'
ALXEXCOM_RETCODE       DC    F'0'
VARIABLE1_NAME_LENGTH  DC    AL4(9)
VARIABLE1_NAME         DC    CL9'VARIABLE1
VARIABLE1_DATA_LENGTH  DC    AL4(14)
VARIABLE1_DATA         DC    CL14'VARIABLE1 DATA'
VARIABLE2_NAME_LENGTH  DC    AL4(9)
VARIABLE2_NAME         DC    CL9'VARIABLE2
VARIABLE2_DATA_LENGTH  DC    AL4(14)
VARIABLE2_DATA         DC    CL14'VARIABLE2 DATA'
|
|
END

HOME TOP Back Company History Areas of Expertise Project History

Last Updated: 31 December 2015
Bill Sweeney / (703) 777-2771 /WHSweeney@sscmainframe.com