100% found this document useful (3 votes)
914 views5 pages

REXX Tool - Align The JCL Statements

This Rexx tool is used to format and align JCL statements to follow coding standards by placing the 'JOB', 'DD', and 'EXEC' statements in column 10. The tool is executed with the TSO command 'JCLALIGN' and prompts the user to enter the PDS and member name containing the JCL. It then processes the JCL, uppercasing all statements and padding/truncating as needed to align statement keywords in column 10 according to JCL rules. The reformatted JCL is overwritten back to the original data set.

Uploaded by

mukesh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
100% found this document useful (3 votes)
914 views5 pages

REXX Tool - Align The JCL Statements

This Rexx tool is used to format and align JCL statements to follow coding standards by placing the 'JOB', 'DD', and 'EXEC' statements in column 10. The tool is executed with the TSO command 'JCLALIGN' and prompts the user to enter the PDS and member name containing the JCL. It then processes the JCL, uppercasing all statements and padding/truncating as needed to align statement keywords in column 10 according to JCL rules. The reformatted JCL is overwritten back to the original data set.

Uploaded by

mukesh
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
You are on page 1/ 5

Align JCL

Overview

This Rexx tool can be used for formatting and alignment of the JCL statements to follow JCL
coding standards. (I.e. to align the 'JOB','DD' and 'EXEC' statement in 10th column). The tool can be
executed by the line command ‘TSO JCLALIGN’. It gets the location of the JCL in the format of
‘PDS(MEM)' and aligns the JCL statement according to the JCL coding rules

Tool to align JCL statements

Objective of the tool

 This Rexx tool can be used for formatting and alignment of the JCL statements to follow JCL
coding standards

Procedure to use the tool

 The below screen shots explain the usage of the tool


 Below screen shows the JCL statements before execution of the tool
 This Rexx tool can be executed by the line command ‘TSO JCLALIGN’

 This will ask for the PDS and member name where the JCL is present
 The tool will align the JCL statement according to the JCL coding rules
 The below screen shot shows the JCL after alignment
SOURCE CODE OF THE REXX TOOL WHICH ALIGNS JCL STATEMENTS

 Given below is the source code of the Rexx tool to align JCL statements

/****REXX***/

SAY 'ENTER THE JCL IN THE FORMAT -- PDS(MEM):'


/****ALLOCATING DD TO A LOGICAL NAME 'INPUTD'****************/
PULL INPUTDSN
/***INPUTDSN = INPUTDD ||'(' || INPUTMM || ')' ***********************/
"ALLOC FI(INPUTD) DA("INPUTDSN") SHR REUSE"

/****OPENING INPUTD AND ASSIGNING TO A ARRAY 'DATA' ********/


"EXECIO * DISKRU INPUTD (STEM DATA. FINIS"

/****PROGRAMMMING********************************************/

/****FINDING NO OF RECORDS*************************************/
LEN=DATA.0
/****UPPERCASING ALL THE RECORDS***************************/
DO I = 1 TO LEN
UPPER DATA.I
PARSE VAR DATA.I WORD1 WORD2 WORD3
IF (WORD2 = 'JOB') | (WORD2 = 'DD') | (WORD2 = 'EXEC') THEN
DO
LEN1 = LENGTH(WORD1)
DO
IF LEN1 < 10 THEN
DO
LEN3 = 10 - LEN1
DO J = 1 TO LEN3
IF WORD2 = 'JOB'
THEN WORD1 = WORD1||'X'
ELSE WORD1 = SUBSTR(WORD1,1,10' ')
END
END
IF LEN1 > 10 THEN
IF POS('.',WORD1) = 0 THEN
DO
SAY 'IN CORRECT DD/JOB NAME IN ' DATA.I
WORD1 = SUBSTR(WORD1,1,10)
END
IF WORD2 = 'JOB' THEN WORD2 = 'JOB'
IF WORD2 = 'DD' THEN WORD2 = 'DD'
IF WORD2 = 'EXEC' THEN WORD2 = 'EXEC'
DATA.I = WORD1 WORD2 WORD3
END
END
END

/****OVERWRITING THE FORMATTED JCL IN THE SAME DATA SET *****/


/**"ALLOC FI(OUTPUTD) DA('"INPUTDD"') SHR REUSE" ************/
/**"ALLOC FI(OUTPUTD) DA('ISDXO96.REXX.JCL.OUTPUT') SHR REUSE"***/

"EXECIO * DISKW INPUTD (STEM DATA. FINIS"

/****FRREING THE PHYSICAL DATASET******************************/


"FREE DD(INPUTD)"

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy