By Patricia O'Brien, Technical Support
This article provides a CA-Ramis SBX procedure named SOURCEFD that can be used to extract a specified file description from the RAMASTER, RAMEXTMASTER or RAMIMSMASTER dictionary. The procedure creates a host system file which contains file definition statements within a free form, comma-edited MAINTAIN activity. The host file can then be used to recreate the file description or it can be edited to make changes to the file description.
SOURCEFD is provided as a sample and may be customized or modified to suit your specific needs. The source is provided in the attached file named Ramis_SourceFD.txt. Upload the text source to your mainframe using ASCII and CR/LF and compile it into your CA-Ramis user database.
Here are instructions for using the SOURCEFD procedure as provided:
SYNTAX: SOURCEFD filename [MSGL=msgl]
The 1-12 character filename of the file description to be extracted.
Optional parameter to override CA-Ramis message level during execution. This is useful when you wish to see the results of the DEFER'ed activities. The default message level is 64.
SOURCEFD supports the extract of file descriptions for CA-Ramis database files as well as external files with the FILETYPE: QSAM, VSAM, IMS, or ISAM.
SOURCEFD 'IMS filename'
As shown in the examples above, the external file FILETYPE should be provided with the FILENAME for external file descriptions. Single quotes are only needed for 'IMS' FILETYPE where the last position is a blank.
Two host files are required by the SOURCEFD procedure.
File RAMSAVEF is a temporary data set.
File RAMSAVES is the permanent data set where the MAINTAIN activity which contains the
generated file definition statements is written.
If you are running this in the CMS environment, this procedure will issue the following FILEDEFs:
SYS FILEDEF RAMSAVES CLEAR
SYS FILEDEF RAMSAVEF CLEAR
SYS FILEDEF RAMSAVES DISK RAMSAVES DATA A (LRECL 80 RECFM F BLKSIZE 80
SYS FILEDEF RAMSAVEF DISK RAMSAVEF DATA A
If you are running this in the TSO environment, this procedure will issue the following ALLOCates:
SYS ALLOC F(RAMSAVES) DA(RAMSAVES) SHR
SYS ALLOC F(RAMSAVEF) SP(1,1) TRACK REU
Data set userid.RAMSAVES must be created prior to running this procedure in TSO.
For example, RAMSAVES can be preallocated as follows:
F(RAMSAVES) DA(RAMSAVES) RECFM(F) LRECL(80) SP(1,1) TRACK REU
If you are running this in the OS batch environment, you need to supply the DD statements defining RAMSAVEF and RAMSAVES.
//RAMSAVEF DD DSN=&&RAMSAVEF,DISP=(NEW,PASS),UNIT=SYSDA,
//RAMSAVES DD DSN=new.dataset,DISP=(NEW,PASS),UNIT=unit,
Or, create a member of an existing PDS that has been defined with the DCB attributes of RECFM=F or FB and LRECL=80...
If you are running this in the VSE environment, you need to supply the DLBL/EXTENTS defining RAMSAVEF and RAMSAVES.
NOTE: RAMSAVES must be defined as fixed with a record length of 80 so that it can be edited.
Results in informational messages:
Extract is complete for file description:
CLIENT The host file RAMSAVES contains the extracted source.
The following extract is written to RAMSAVES:
Read More About It
For more information on writing, storing, and compiling SBX procedures, refer to the publication, CA-Ramis System Building Executive (SBX). For MAINTAIN, please refer to the publication, CA-Ramis Data Maintenance Facility (DMF). For TABLE and other reporting capabilities, refer to the publication, CA-Ramis Syntax Based Reporting.
Contribute Your Ideas
If you have a tried and true technique that you would like to share with the CA-Ramis community as a published article, please contact Computer Associates Support.