TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

Rexx Skeleton Tutorial

Skeleton Programming:

ISPF skeleton is a basic data layout which can be tailored to get the desired file content. ISPF skeletons are typically used in places, where it is needed to dynamically generate a JCL or dataset, the basic frame work of which is pre-determined.

This basic framework is called as a skeleton which can be modified dynamically by substituting values for transient components (or) by altering the structure driven by transient parameters.

ISPF skeleton comprises of static and variable components. The variable component can be tailored dynamically from REXX to get the desired file content.

The output can be stored in a dataset and made available for user‘s disposal. ISPF skeletons are normally used to generate JCLs, reports and format data.

Following are the typical characteristics of ISPF skeletons.

  • ISPF skeletons are stored in a separate PDS and accessed from REXX, by allocating it to ISPSLIB.

  • There are two types of records namely data records and control records.

  • Data records: comprise of static and dynamic components and will appear in the tailored output.

  • Control records: Control / drive the tailoring process and will not appear in the tailored output.

  • Blank records in the skeleton will be skipped and will not be written into the output dataset.


These are the ones which will be tailored and stored in the output dataset. It is combination of text, variables and special characters to create an output record. Data records can be up to 255 bytes in length.

Special characters are used to identify the type of operation that needs to be performed. For example, variables can be identified by prefixing them with '&'. Values for these variables can be set in REXX which will be substituted when file-tailoring is performed.

Special Characters:

Period . Used to concatenate strings. For example, &var.000 results in 5000 if &var = 5
Right Parenthesis ) Defines a control record
Question Mark ? Defines continuation character
Exclamation Mark ! Default tab character. Denotes the place where tabbing needs to be performed.
Less than, Vertical bar and greater than < | > Specify conditions as < string1 | string2 > If string1 is null string2 is used, Otherwise string1 is used.
Ampersand & Indicates start of variable

Sample Data record:

For example, let us consider that the skeleton comprises of the following contents.



Here &USER is variable and period '.' is the concatenation operator.

File tailoring is performed from REXX which invokes the skeleton and substitutes the variables with the actual values.

File tailoring operations

The output dataset will have USER substituted with IBMMFID and concatenated with 'C' as follows,


When the special characters themselves are to be used as text, two consecutive characters have to be used.

For example, //INPFILE DD DSN=&USER..SAMPLE.DATA. One of the two periods that follow &USER is treated as a concatenation operator and the other is considered as text.

The tailored output will be as follows:


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal