HLASM Toolkit Feature User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


z/OS JCL Example

HLASM Toolkit Feature User's Guide
GC26-8710-10

The simplified z/OS JCL in Figure 1 shows how to create the CF, LOC, LOOC, MWU, SWU, SOR, and TWU reports. Before running this example, edit the lines highlighted by numbers (such as  1 ) as described in the instructions following the example listing. For a full listing of the procedures supplied with ASMXREF, see Sample procedures.

Note: ASMXREF dynamically allocates data sets, therefore you do not need to allocate DD statements.
Figure 1. Sample z/OS ASMXREF JCL (part 1 of 3)
//ASMXRUN   JOB <JOB CARD PARAMETERS>                                     1 
//
//**********************************************************************
//*                                                                    *
//*   Licensed Materials - Property of IBM                             *
//*                                                                    *
//*   5692-234                                                         *
//*                                                                    *
//*   (C) Copyright IBM Corp. 1992, 2008. All Rights Reserved.         *
//*                                                                    *
//*   US Government Users Restricted Rights - Use,                     *
//*   duplication or disclosure restricted by GSA ADP                  *
//*   Schedule Contract for IBM Corp.                                  *
//*                                                                    *
//**********************************************************************
//*                                                                    *
//* ASMXRUN  JOB                                                       *
//*                                                                    *
//* THIS SAMPLE JCL WILL INVOKE THE ASMXSCAN AND ASMXRPT PROCEDURES.   *
//*                                                                    *
//*  CAUTION: THIS IS NEITHER A JCL PROCEDURE NOR A COMPLETE JOB.      *
//*  BEFORE USING THIS JOB, YOU WILL HAVE TO MAKE THE FOLLOWING        *
//*  MODIFICATIONS:                                                    *
//*                                                                    *
//* 1. CHANGE THE JOB CARD TO MEET YOUR SYSTEM REQUIREMENTS            *
//* 2. CHANGE #jcllib TO BE THE NAME OF THE USER JCL LIBRARY DATASET.  *
//* 3. CHANGE #user TO BE THE USER NAME                                *
//* 4. CHANGE #user.source TO BE THE SOURCE LIBRARY TO SCAN            *
//* 5. CHANGE #source.name TO BE THE SOURCE MEMBER NAME.               *
//* 6. CHANGE #lang TO BE THE LANGUAGE OF THE SOURCE MEMBER            *
//*    (E.G. ASM FOR ASSEMBLER SOURCE)                                 *
//*                                                                    *
//**********************************************************************
//* NOTE: UNCOMMENT THE FOLLOWING STATEMENT IF THE ASMXREF AND         *
//*       ASMXRPT PROCEDURES ARE PLACED IN YOUR USER JCL LIBRARY       *
//*       #jcllib RATHER THEN THE SYSTEM PROCEDURE LIBRARIES.          *
//**********************************************************************
//*JCL JCLLIB ORDER=(#jcllib)                                             2 
//*
Figure 2. Sample z/OS ASMXREF JCL (part 2 of 3)
//**********************************************************************
//* STEP 1 CREATE INTERMEDIATE FILE                                    *
//**********************************************************************
//STEP1  EXEC ASMXSCAN,PARM.ASMXREF='NODUP',USER=#user,                   3 
//       ASMPRFX=#hlq
//SYSIN  DD   *                                                           4 
* SAMPLE CONTROL FILE FOR XREF
*
  LIBRARY  LIB=#user.source,TYPE=PDS
     INCLUDE MOD=#source.name,LANGUAGE=#lang
*
  REPORT   REPORT=CF                           CONTROL FLOW
  REPORT   REPORT=LOC                          LINES OF CODE
  REPORT   REPORT=LOOOC                        LINES OF OO CODE
  REPORT   REPORT=MWU                          WHERE/WHAT USED
  REPORT   REPORT=SOR                          SPREAD SHEET ORIENTED
  REPORT   REPORT=SWU                          SYMBOL WHERE USED
  REPORT   REPORT=TWU                          TOKEN WHERE USED
/*
//*********************************************************************
//* STEP 1A  DELETION OF INTERMEDIATE FILE IN CASE STEP1 FAILS.       *
//*          THIS WILL ALLOW THE JOB TO BE RERUN WITHOUT MANUAL       *
//*          DELETION OF A DUPLICATE DATASET.                         *
//*********************************************************************
//DEL EXEC PGM=IDCAMS,COND=(0,EQ)
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  DELETE #user.TWU.TAGGED.FILE                                            5 
/*
//*********************************************************************
//* STEP 2   THIS PRODUCES THE CONTROL FLOW REPORT.                   *
//*********************************************************************
//STEP2 EXEC ASMXRPT,REPORT=CF,RECLEN=143,BLKSIZE=1430,USER=#user,
//          RPARM='60 MAC',COND=(0,NE),ASMPRFX=#hlq
//SYSINOU DD SYSOUT=*
//*
//*********************************************************************
//* STEP 3   THIS PRODUCES THE LINES OF CODE REPORT.                  *
//*********************************************************************
//STEP3 EXEC ASMXRPT,REPORT=LOC,RECLEN=145,BLKSIZE=1450,USER=#user,
//          RPARM='60 MOD',COND=(0,NE),ASMPRFX=#hlq
//SYSINOU DD SYSOUT=*
//*
//*********************************************************************
//* STEP 4   THIS PRODUCES THE LINES OF OO CODE REPORT.               *
//* NOTE: UNCOMMENT THE FOLLOWING STATEMENTS IF THE LOOC REPORT IS    *
//*       REQUIRED. THIS IS AVAILABLE FOR THE CPP LANGUAGE.           *
//*********************************************************************
//*STEP4 EXEC ASMXRPT,REPORT=LOOC,RECLEN=99,BLKSIZE=990,USER=#user,
//*          RPARM='60',COND=(0,NE),ASMPRFX=#hlq
//*SYSINOU DD SYSOUT=*
//*
//*********************************************************************
//* STEP 5   THIS PRODUCES THE MODULE WHERE USED (MWU) REPORT         *
//*********************************************************************
//STEP5 EXEC ASMXRPT,REPORT=MWU,RECLEN=96,BLKSIZE=3936,USER=#user,
//          RPARM='60 MAC',COND=(0,NE),ASMPRFX=#hlq
//SYSINOU DD SYSOUT=*
//*
Figure 3. Sample z/OS ASMXREF JCL (part 1 of 3)
//*********************************************************************
//* STEP 6   THIS PRODUCES THE SYMBOL WHERE USED (SWU) REPORT         *
//*********************************************************************
//STEP6 EXEC ASMXRPT,REPORT=SWU,RECLEN=93,BLKSIZE=3999,USER=#user,
//           RPARM='60 SYM',COND=(0,NE),ASMPRFX=#hlq
//SYSINOU DD SYSOUT=*
//*
//*********************************************************************
//* STEP 7   THIS PRODUCES THE TOKEN WHERE USED (TWU) REPORT          *
//*          NOTE: THE LAST STEP TO REFERENCE THE SYSINDS DATASET     *
//*          FOR THE TWU OR SOR REPORT SHOULD SPECIFY                 *
//*          DISP=(OLD,DELETE)                                        *
//*********************************************************************
//STEP7 EXEC ASMXRPT,REPORT=TWU,RECLEN=80,BLKSIZE=80,USER=#user,          6 
//           RPARM='',COND=(0,NE),ASMPRFX=#hlq
//SYSINDS DD DSN=*.STEP1.ASMXREF.XRFTWU,DISP=(OLD,KEEP)
//SYSINOU DD SYSOUT=*
//*
//*********************************************************************
//* STEP 8   THIS PRODUCES THE SPREADSHEET ORIENTED REPORT (SOR).     *
//*          NOTE: THE LAST STEP TO REFERENCE THE SYSINDS DATASET     *
//*          FOR THE TWU OR SOR REPORT SHOULD SPECIFY                 *
//*          DISP=(OLD,DELETE) IF YOU DON NOT WISH TO KEEP THE        *
//*          TASF FILE.                                               *
//*********************************************************************
//STEP8 EXEC ASMXRPT,REPORT=SOR,RECLEN=80,BLKSIZE=80,USER=#user
//           RPARM=', ''',COND=(0,NE),ASMPRFX=#hlq
//SYSINDS DD DSN=*.STEP1.ASMXREF.XRFTWU,DISP=(OLD,DELETE)
//*********************************************************************
//* NOTE: COMMENT THE FOLLOWING STATEMENT IF THE USER DOES NOT        *
//*       REQUIRE A SPREADSHEET DATASET TO BE CREATED.                *
//*********************************************************************
//SYSINOU DD SYSOUT=*
//
 1 
Add the job parameters to meet your system requirements.
 2 
If you store the ASMXSCAN or ASMXRPT procedures in the JCL library rather than the system procedure library, remove the comment characters on this line, and then replace #jcllib with the data set name of the JCL library.
 3 
Replace NODUP with the options you need for the ASMXREF run, and replace #user with your userid.
EXEC ASMXSCAN runs the procedure ASMXSCAN, which runs the program ASMXREF.ASMXREF requires that you specify at least one option with the PARM parameter. For details of the options available with ASMXREF see ASMXREF Options. The format of the ASMXREF statement is:
Read syntax diagramSkip visual syntax diagram
>>-//stepname--EXEC--ASMXSCAN----------------------------------->

>--+----------------------------------+--+--------------+------->
   |                    .-,------.    |  '-,USER=--user-'   
   |                    V        |    |                     
   '-,PARM.ASMXREF=--'----option-+--'-'                     

>--+----------------+------------------------------------------><
   '-,ASMPRFX=--hlq-'   

 4 
Enter the ASMXREF control statements you need, either immediately following the SYSIN DD * statement, as in the sample JCL shown in Figure 1, or enter the name of the data set that contains the control statements. For details on the control statements, see ASMXREF Control Statements.
 5 
Replace #user with your userid.
 6 
Replace #user with your userid and specify any options that you need for each report in RPARM. Run this procedure for each report that you need. The format of the statement is:
Read syntax diagramSkip visual syntax diagram
>>-//step--EXEC--ASMXRPT--,--REPORT=--+-CF---+--,--RPARM=--'---->
                                      +-LOC--+                 
                                      +-LOOC-+                 
                                      +-MWU--+                 
                                      +-SOR--+                 
                                      +-SWU--+                 
                                      '-TWU--'                 

>--+------------+--+--------------------+--+--------------+----->
   |        (1) |  |            (1) (2) |  |          (3) |   
   '-format-----'  '-sort_order---------'  '-sep_char-----'   

>--+-------------+--'--,--RECLEN=--record_length---------------->
   |         (3) |                                 
   '-t_delim-----'                                 

>--,--BLKSIZE=--block_size--+--------------+-------------------->
                            '-,USER=--user-'   

>--+----------------+------------------------------------------><
   '-,ASMPRFX=--hlq-'   

Notes:
  1. These options are not available for the SOR report.
  2. This option not required for the LOOC report.
  3. These options are available only for the SOR report.

For details of the reports available see Understanding the reports. For details of the options available, see ASMXREP Options. You must specify only one report with this statement.

Note: All the parameters are positional. You must enter them in the order shown above, or you can enter just the REP parameter and leave the other parameters blank. If you enter the parameters in the wrong order ASMXREF issues an error message.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014