XREFjobs.doc - Cross-References for COBOL & JCL

Cross-References for COBOL & JCL - Contents


Part_1 - COBOL & JCL Inventory & Listing utilities
- uvlp__ scripts to list COBOL & JCL with headings, dates, filenames
- spreadA script to list module names 4 up
- cobmap1 utility convert copybooks to record layouts before listing

Part_2 - Cross-References for COBOL & JCL
xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM
xcobcopy2 - crossref all PROGRAMS copying any 1 COPYBOOK
xcobcall1 - list of all CALLED-PROGRAMs in each PROGRAM
xcobcall2 - crossref all PROGRAMS calling any 1 CALLED-PROGRAM
xcobfile2 - crossref all PROGRAMS using each external-file
xcobsql1 - list all SQL Includes in any 1 PROGRAM
xcobsql2 - crossref all PROGRAMS using any 1 SQL Include
xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT
xkshfile2 - crossref show all ksh SCRIPTs using any 1 DATAFILE
xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT
xkshprog2 - crossref show all ksh SCRIPTS executing any 1 PROGRAM
xkshproc1 - list all PROCs executed in each JCL/ksh/script
xkshproc2 - shows all JCL/ksh/scripts executing each PROC
xkshparm1 - list all SYSIN/PARM modules in each JCL/ksh/script
xkshparm2 - shows all JCL/ksh/scripts referencing each SYSIN/PARM
xrefall script to run all crossrefs with 1 command
x______ scripts to run crossrefs separately
sample reports
mvsfiles5A - script to trace data files in MVS JCL
- extracts all data files from jcl2 (JCL procs expanded)
- identify origin step# & destination step#s for each file

Part_3 - COBOL Files & JCL Job-Flow reports
- COBOL files report shows info for all files in each program
- Job-Flow report shows the files passed from step to step
- essential guide to testing & debugging
- combines the data file info from both the JCL & the COBOL programs
- scripts to generate COBOL files & Job-Flow reprots

Part_4 - General Purpose Cross-References

Part_5 - jobs to create table summary 'stat' reports (in subdir stats/...)
- read all COBOL programs &/or all JCL/scripts in directories
  statcbl1 - count copybooks, called programs,& file ORG types
  statmvsjcl1 - count PROGRAMs, PROCs,& DSN Top-Nodes
  statksh1 - count PROGRAMs, PROCs,& exportfile/gen Top-Nodes
- script 'statallmvs1' runs all jobs above

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Part_1. XREFjobs.doc - Cross-References for COBOL & JCL

Cross-References for COBOL & JCL - Contents


1A1. Introduction, Overview,& Summary of Reports Generated

1A2. 'uvlp__' scripts for laser printers ensure pg headings with vital info
(filename, date last modified, date listed, userID, line#, page#)

1B1. Inventory - Lists of all Filenames in relevant Directories

1C1. Content Listings of all JCLS - Before & After conversion

1D1. Content Listings of COBOL copybook 'MAPS' (with start/end bytes on right)
- DO list these cobmaps, NOT the copybooks (without this vital info)

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

1A1. XREFjobs.doc - Cross-References for COBOL & JCL

Overview/Summary

Before you begin test/debug, run these JCL & COBOL reports & cross-references. File them in a 3 ring binder with tabs. They will make your life a lot easier.

We assume here that you have already transferred all of your JCL & COBOL programs from the mainframe to Unix/Linux/Windows(SFU) & stored them in directories as recommended in MVSJCL.htm or MVSCOBOL.htm.

We further assume that you have converted the JCLs up to the 'jcl3' subdir, and the COBOL programs up to the 'cbls' subdir. IE, you are now ready to begin testing & debugging.

Here is a summary of the types of reports documented in this section.


 #1. Inventory lists & counts of all filenames in all directories of relevance.
     ==========================================================================

 #2. Contents listings of JCLs, scripts, control-cards,& copybook maps.
     ==================================================================

 #3. Cross-References of COBOL programs & JCL/scripts.
     =================================================
     - copybooks vs programs, datafiles vs Jobnames, Programs vs Jobnames

 #4. COBOL File Information reports (1 line per datafile)
     ====================================================
     - externalname, Org & Access, Open mode, record-size, copybook, internalname

 #5. JobFlow reports - combine file info from the JCL with the COBOL info above
     ==========================================================================
     - step#, programname, DDNname, COBOL info(above), DSNname

These will be explained in more detail below with the Operating Instructions to generate them using the test/demo files supplied. But first you need to have an organized way of housing them for easy access when required.

Three Ring Binders with Index Tabs

Before you start your conversion, be sure to obtain a good supply of 3-hole pre-punched paper, 3 ring binders & index tabs. The 3 ring binders should have the clear plastic pockets on the spines & covers so you can insert content identifications. The index tabs should be the 'Avery worksaver BIG TAB insertable dividers'.

Keeping your listings in 3 ring binders with Tabs to identify contents is far superior to the alternative (piles of loose paper all over the place). Note that the listings (of JCL, scripts, copybooks, etc) will appear in alphabetical sequence since unix maintains alpha sequence within directories.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

1A2. XREFjobs: JCL & COBOL Inventory & Listings

'uvlp__' scripts for Laser printers

The previous page stressed the importance of keeping your listings organized in 3-ring binders with indexed tab dividers between directories.

It is also vital that every page of those listings be identified (with originating filename, date last modified, date listed, userID, page#, etc). The 'uvlp' scripts will do that & much more.

There are several 'uvlp' scripts (uvlp12,uvlp14,uvlp12D,uvlp12L,uvlpd12,etc). These all call the 'uvlist' text file list utility which provides the page headings & handles the many options for: cpi, lpi, lpp, margins, spacing, point size, Simplex/Duplex, Portrait/Landscape, etc (see 'uvlist.doc). Note that the default options leave margins for 3-hole punched paper. These scripts are intended for laser printers that are PCL5 compatible and most are.

It is vital to Identify the various listings you make & when you made them. There are few things more frustrating than picking up some important listing & not knowing what the source filename is & when it was created.

The printer is identified by an environmental variable in your profile which you should modify to the laser printer nearest you (see the profiles for Vancouver Utilities listed at ADMjobs.htm#1C2).


 export UVLPDEST="-dlp0"  <-- modify profile with your printer -d destination
 =======================

There are many 'uvlp' scripts documented in uvlist.htm (uvlp12, uvlp14, etc). We will illustrate the commands for 'uvlp12' & 'uvlpd12'.


 uvlp12 jcl2/jar200.jcl   <-- list 1 file at a time
 ======================

 uvlpd12 jcl3             <-- list all files in the directory
 ============

uvlp12 & uvlpd12

'uvlp12' lists only 1 specified file & 'uvlpd12' will print all files in the specified directory.

But the important thing about using the 'uvlp' scripts for listing these files is that they provide page headings with vital information such as: filename, date last modified, date listed, user-ID, line#,& page#.

If you use the 'uvlp' scripts you wont have the aggravating problem of picking up a listing & wondering what the filename is & when it was created.

Mainframers might also be interested in the 'uvlp18' which will print mainframe style reports (132 chars wide) on 8 1/2 x 11 Portrait.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

1B1. XREFjobs: JCL & COBOL Inventory & Listings

Inventory - 4-up Lists of Filenames & Line Counts

We need to have inventory control lists & counts of all filenames in all directories relevant to the conversion (JCLs, PROCs, scripts, control cards, COBOL programs, COBOL copybooks, etc). The 'spreadA' script is provided to make '5-up' lists of the filenames found in a directory.


 #1. spreadA jcl2        - JCLs before conversion
     ============

 #2. spreadA jcl3        - JCLs after conversion (ksh scripts) ** sample below
     ============

 #3. spreadA procs       - PROCs (expanded when jcl1 copied to jcl2)
     =============

 #4. spreadA parms      - control cards (SORT FIELDS, etc) (for MVS)
     =============

 #5. spreadA cbls        - COBOL programs (converted)       ** see sample below
     ============

 #6. spreadA cpys        - COBOL copybooks
     ============

 #7. lslp $RUNDATA/mstr  - list the datafiles (1-up)
     ==================

spreadA sample reports

 spreadA  Directory: /home/mvstest/jcl3
 Options: q1a0b0c14s1n5  2005/03/08_08:34:56
 ================================================================================
 ikjeft01.ksh   jar100.ksh     jar200.ksh     jar300.ksh     jgl100.ksh
 jgl200.ksh     jgl300.ksh     jgl320.ksh     jgl360.ksh     jgl400.ksh
 jgl420.ksh     jgl500.ksh     jpy200.ksh     splitsl1.ksh
 00014 total items in tmp/jcl3
 spreadA  Directory: /home/mvstest/cbls
 Options: q1a0b0c14s1n5  2005/03/08_08:32:16
 ================================================================================
 car100.cbl     car200.cbl     car300.cbl     cgl100.cbl     cgl200.cbl
 00005 total items in tmp/cbls

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

1C1. XREFjobs: JCL & COBOL Inventory & Listings

List JCLs Before & After Conversion

Listing the JCLs & the converted ksh scripts will prove useful during testing & debugging. You can spot conversion problems easier & you have a place to plan & write any modifications required.


 #1. uvlpd12 jcl2      - list all JCLs before conversion
     ============

 #2. uvlpd12 jcl3      - list all JCLs after conversion (ksh scripts)
     ============

 #3. listall parms    - list all control cards (SORT FIELDs etc for MVS)
     =============

'uvlpd12' will print all files found in the directory and start each file on a new page (vs 'uvlp12' which lists just 1 specified file). We don't need to give examples of the 'uvlp' scripts since this documentation is an example.

'listall' is very useful for printing all contents of a directory which contains many small files, because it does not page break between files (just leaves a space). 'listall' is ideal for listing the 'parms' subdir which contains control cards (SORT FIELDS, etc).

listall - sample output


 #3. listall parms    - list all files in directory (space only between files)
     =============
 file# 1   - parms/ikjdemo1
 DSN SYSTEM(DB2P)
 RUN PROGRAM(IKJPROG1) PLAN(IKJPROG1) LIB('MEPP.WXS91.LOADLIB')
 END
 file# 2   - parms/pap100s1
 SORT FIELDS=(78,2,CH,A,61,15,CH,A,11,25,CH,A)
 file# 3   - parms/pgl200s1
 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 file# 4   - parms/ppy200s2
 SORT FIELDS=(1,19,CH,A,75,6,CH,A)

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

1D1. XREFjobs: JCL & COBOL Inventory & Listings

Don't list the COBOL programs

We wont list the COBOL programs (to save trees and) because they are little changed from the mainframe versions. During debugging, you can always list any particularly troublesome program as follows:


 uvlp12 cbls/car200.cbl   <-- list 1 specified file
 ======================

Don't list CopyBooks, Do list 'CobMaps'

During test/debug, we often need to check the datafile output field contents & we need to know the field start & end locations. The Vancouver Utilities includes 3 powerful utilities to make this easy (cobmap1, uvhd,& uvhdcob).

cobmap1
  • converts COBOL copybooks to 'cobmaps'
  • adds field start & end bytes on the right side
  • see short demo below & more in cobaids1.htm

Before begining test/debug, I suggest you generate the 'cobmaps' for all copybooks, print them,& house in a 3-ring binder for easy access.


 #1. uvcopyx cobmap1 cpys maps uop=q0i7p0  <-- generate 'cobmaps' from copybooks
     ====================================

 #2. uvlpd12 maps   <-- print all cobmaps
     ============

cobmap sample - maps/custmas

 cobmap1  start-end bytes for cobol record fields    200310101805  pg# 0001
 cpys/custmas.cpy                                  RCSZ=00256  bgn  end  lth typ
 * custmas - cobol copy book for customer.master file mvsjcl
      10 cm-num           pic  9(6).                          0000 0005  006 n  6
      10 cm-delete        pic  x(4).                          0006 0009  004
      10 cm-name          pic  x(25).                         0010 0034  025
      10 cm-adrs          pic  x(25).                         0035 0059  025
      10 cm-city          pic  x(16).                         0060 0075  016
      10 filler001        pic  x.                             0076 0076  001
      10 cm-prov          pic  x(2).                          0077 0078  002
      10 filler002        pic  x.                             0079 0079  001
      10 cm-postal        pic  x(10).                         0080 0089  010
      10 cm-phone         pic  x(12).                         0090 0101  012
      10 cm-contact       pic  x(18).                         0102 0119  018
      10 cm-thisyr-sales  pic  s9(7)v99 comp-3 occurs 12.     0120 0124  005pns 9
      10 cm-lastyr-sales  pic  s9(7)v99 comp-3 occurs 12.     0180 0184  005pns 9
      10 filler003        pic  x(16).                         0240 0255  016
 *RCSZ=00256                                                       0256

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Part_2. XREFjobs.doc - Cross-References for COBOL & JCL

Part 2 Cross-Refs for COBOL & JCL - Contents


2A1. Cross-References for COBOL programs/copybooks & JCL/scripts
summary of all cross-refs available

2B1. Operating Instructions to generate ALL Cross-Ref reports
xrefall - script leaves all reports in subdir xref/...

2B2. Operating Instructions to generate any 1 Cross-Ref report
xcobcopy2 - sample Op. Instrns. for COBOL copybooks

COBOL Cross-Ref sample reports


2C1. xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM
2C1. xcobcopy2 - crossref all PROGRAMS copying any 1 COPYBOOK
2C2. xcobcall1 - list of all CALLED-PROGRAMs in each PROGRAM
2C2. xcobcall2 - crossref all PROGRAMS calling any 1 CALLED-PROGRAM
2C3. xcobfile2 - crossref all PROGRAMS using each external-file
3C4. xcobsql1 - list all SQL Includes in any 1 PROGRAM
3C4. xcobsql2 - crossref all PROGRAMS using any 1 SQL Include

JCL Cross-Ref sample reports


2D1. xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT
2D2. xkshfile2 - crossref show all ksh SCRIPTs using any 1 DATAFILE
2E1. xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT
2E2. xkshprog2 - crossref show all ksh SCRIPTS executing any 1 PROGRAM
2F1. xkshproc1 - list all PROCs executed in each JCL/ksh/script
2F2. xkshproc2 - shows all JCL/ksh/scripts executing each PROC
2G1. xkshparm1 - list all SYSIN/PARM modules in each JCL/ksh/script
2G2. xkshparm2 - shows all JCL/ksh/scripts referencing each SYSIN/PARM

Data File Trace in MVS JCL


2H1. mvsfiles5A - script to trace data files in MVS JCL
- extracts all data files from subdir jcl2 (JCL procs expanded)
- identify originating step# & destination step#s for each file

scripts & uvcopy jobs used in Part 2


2X0. summary of scripts & uvcopy jobs used in Part 2
2X1. xrefall script listed
2X2. xcobcopy1 script listed

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2A1. XREFjobs.doc - Cross-References for COBOL & JCL/scripts

Cross References for COBOL & JCL/scripts

These cross-reference reports will be invaluable during testing & debugging. Before you start test/debug, run these reports & house in 3-ring binders (with indexed tabs) for instant accessibility when needed.

Cross-Ref Reports Available

xcobcall1
  • list of all CALLED-PROGRAMs in each PROGRAM
xcobcall2
  • crossref all PROGRAMS calling any 1 CALLED-PROGRAM
xcobcopy1
  • list all COPYBOOKS in any 1 PROGRAM
xcobcopy2
  • crossref all PROGRAMS copying any 1 COPYBOOK
xcobfile2
  • crossref all PROGRAMS using each external-file
xcobsql1
  • list all SQL Includes in any 1 PROGRAM
xcobsql2
  • crossref all PROGRAMS using any 1 SQL Include
xkshfile1
  • list all DATAFILES used in any 1 ksh SCRIPT
xkshfile2
  • crossref show all ksh SCRIPTs using any 1 DATAFILE
xkshprog1
  • list all PROGRAMs executed in any 1 ksh SCRIPT
xkshprog2
  • crossref show all ksh SCRIPTS executing any 1 PROGRAM
xkshproc1
  • list all PROCs executed in each JCL/ksh/script
xkshproc2
  • shows all JCL/ksh/scripts executing each PROC
xkshparm1
  • list all SYSIN/PARM modules in each JCL/ksh/script
xkshparm2
  • shows all JCL/ksh/scripts referencing each SYSIN/PARM
xmvsfile1
  • list all DSN filenames in any 1 MVS JCL
xmvsfile2
  • crossref show all JOBnames using any 1 DSN datafile
xmvsprog1
  • list all EXEC/PGM names in any 1 MVS JCL
xmvsprog2
  • crossref all MVS JOBnames for any 1 EXEC/PGM name
xmvsproc1
  • list all PROCs executed in each MVS JCL
xmvsproc2
  • shows all MVS JCL executing each PROC
xvsefile1
  • list all DSN filenames in any 1 VSE JCL
xvsefile2
  • crossref show all JOBnames using any 1 DSN datafile
xvseprog1
  • list all EXEC/PGM names in any 1 VSE JCL
xvseprog2
  • crossref all VSE JOBnames for any 1 EXEC/PGM name

The 4 'xksh' reports provide the same info as the 4 'xmvs' or 4 'xvse' reports.

The 'xksh' reports are generated from the 'jcl3' directory of converted scripts, whereas the 'xmvs' & 'xvse' reports are generated from the 'jcl2' directory of JCLs before conversion. The 'xksh' reports will be more relevant after test/debug since they can then be run using the 'jcls' directory of tested & debugged scripts.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2B1. XREFjobs.doc - Cross-References for COBOL

Operating Instructions for ALL Cross-Refs reports


 #1. xrefall cbls jcl3 ksh    <-- crossref COBOL & ksh scripts
     =====================

 #1a. xrefall cbls jcl2 mvs   <-- alternative for unconverted MVS JCL
      =====================

 #1b. xrefall cbls jcl2 vse   <-- alternative for unconverted VSE JCL
      =====================

 #2.  uvlpd12 xref            <-- print all files in the directory
      ============
  1. All cross-reference scripts leave the output reports in subdir xref/...

  2. arg3 on the xrefall command could be 'mvs' or 'vse' to crossreference unconverted MVS JCLs. arg2 would then have to be 'jcl2' to match.

  3. arg3 could be 'ksh' to crossref the converted Korn shell scripts. arg2 should then be 'jcl3' the output subdir for the JCL converter.

  4. If you are just starting to test/debug, arg2 must be 'jcl3' NOT 'jcls' Only 'jcl3' has ALL converted scripts, since we copy to 'jcls' 'one at a time' before starting debug of each jcl/script. After you have completed your conversion you would of course use 'jcls'.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2B2. XREFjobs.doc - Cross-References for COBOL

Op. Instrns. - Cross-Ref 1 at a time

We will use 'xcobcopy2' (COBOL copybook crossref) to illustrate the Op. Instrns. for 1 cross-ref report at a time (vs ALL shown above).


 xcobcopy2 directory options  <-- command format
 ===========================

 xcobcopy2 cbls [a16b16c4e1]  <-- cross-ref copybooks for prgms in cbls/...
 ===========================    - option defaults shown (described below)
 uop=q1a16b12c5e0d0j0l0s2w1 - option defaults
       a16                  - column to align references
          b12               - columns for fixed word horizontal spacing
          b30               - max cols, indicates variable (blank between)
             c5             - count max words per line (c5*b12=60+a16 = 76)
               e1           - bypass "*" col 7 & blank ". " (COBOL)
               e2           - target word must be enclosed in "quotes"
                 d1         - cnvrt "/" to " " (directory/filename)
                 d2         - cnvrt "_" to " " (printer class codes)
                 d4         - cnvrt "." to " " (drop extensions)
                 d8         - cnvrt "()" to " " (drop parens)
                   j1       - MVS JCL (bypasses //* cmts)
                   j2       - VSE JCL (bypasses * or /* cmts)
                   j4       - Korn shell scripts (bypasses # col1)
                     l1     - translate to lower case (keywords lower)
                       s2   - space2 (space1 in multiline groups)
                         w1 - target-word offset, to word after key-word
 User OPtion (uop) defaults  = q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1
  null to accept or re-specify (1 or more) -->
 080405:105049:xref2: sort phase complete, used 64 megabytes, sort output begin
 080405:105049:xref2: EOF fili01 rds=38 size=1963: tmp/grep1
 080405:105049:xref2: EOF filo01 wrts=16 size=526: tmp/xcobcopy2a
 chkcopy2 - *flag missing copybooks on COBOL cross-reference report
 080405:105049:chkcopy2: EOF fili01 rds=16 size=526: tmp/xcobcopy2a
 080405:105049:chkcopy2: EOF fili02 rds=6 size=74: tmp/cpys2
 080405:105049:chkcopy2: EOF filo01 wrts=16 size=536: xref/xcobcopy2
 report generated = xref/xcobcopy2
  - use uvlp12,uvlp14,uvlp16 to laser print at 12,14,16 cpi
 enter command (vi,cat,more,uvlp12,uvlp14,uvlp16,etc)  ----> more <--

sample report

 xcobcopy2 ** crossref all PROGRAMS using each COPYBOOK **
 Keyword=copy:include  Exclude=unix Include=.cpy  page#  1
 Directory=/home/mvstest/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1
 =======================================================2008/04/05_10:50:49
  custmas.cpy      car100.cbl      car120.cbl      car130.cbl      car140.cbl
  ____________6    car150.cbl      car200.cbl
 *paymas.cpy       cpy100.cbl
  saledtl.cpy_2    car150.cbl      car200.cbl

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2C1. XREFjobs.doc - Cross-References for COBOL

COBOL Cross-Ref Sample Reports

These sample reports are based on the supplied test/demo JCL & COBOL programs. We will illustrate: xcobcopy1/2, xcobcall1/2, xcobfile2, xcobsql1/2, xkshfile1/2, xkshprog1/2.

xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM

 xcobcopy1 ** list all COPYBOOKS in each PROGRAM **
 Keyword=copy:include  Exclude=unix Include=.cpy  page#  1
 Directory=/home/mvstest/testlibs/cbls
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1q0i7
 =======================================================2008/04/05_11:46:21
 car100.cbl       custmas.cpy
 car120.cbl       custmas.cpy
 car130.cbl       custmas.cpy
 car140.cbl       custmas.cpy
 car150.cbl_2     custmas.cpy     saledtl.cpy
 car200.cbl_4     custmas.cpy     saledtl.cpy     sdline.cpy      stline.cpy
 cpy100.cbl       paymas.cpy

xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK

 xcobcopy2 ** crossref all PROGRAMS using each COPYBOOK **
 Keyword=copy:include  Exclude=unix Include=.cpy  page#  1
 Directory=/home/mvstest/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1q0i7
 =======================================================2008/04/05_11:46:21
  custmas.cpy      car100.cbl      car120.cbl      car130.cbl      car140.cbl
  ____________6    car150.cbl      car200.cbl
 *paymas.cpy       cpy100.cbl
  saledtl.cpy_2    car150.cbl      car200.cbl
  sdline.cpy       car200.cbl
  stline.cpy       car200.cbl
Note
  • the '*' above indicates missing copybooks
  • this crossref script runs an additional uvcopy job
  • to check existence of the copybook in the 'cpys' subdir

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2C2. XREFjobs.doc - Cross-References for COBOL

xcobcall1 - list of all Called-Programs in each Program

 Keyword=call  Exclude= Include=  page#  1
 Directory=/home/mvstest/cbls
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1q0i7
 =======================================================2005/03/17_15:15:51
 car130.cbl       getparm
 car140.cbl       getparm

xcobcall2 - crossref all Programs calling any 1 Called-Program

 Keyword=call  Exclude= Include=  page#  1
 Directory=/home/mvstest/cbls
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1q0i7
 =======================================================2005/03/17_15:15:51
 *getparm_2        car130.cbl      car140.cbl
Note
  • the '*' above indicates missing called programs
  • this crossref script runs an additional uvcopy job
  • to check existence of the called program in the 'cbls' subdir

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2C3. XREFjobs.doc - Cross-References for COBOL

xcobfile2 - cross-ref programs using each filename

 xcobfile2 ** crossref all PROGRAMS using each external-file **
 Keyword=external  Exclude= Include=  page#  1
 Directory=/home/mvstest/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1l1
 =======================================================2007/06/10_19:19:39
 acctmas          cgl100.cbl
 actlist          cgl100.cbl
 custmas          car100.cbl      car120.cbl      car130.cbl      car140.cbl
 ________7        car150.cbl      car200.cbl      testunix1.cbl
 custmas1         car101.cbl
 glmsnew          cgl200.cbl
 glmsold          cgl200.cbl
 gltrans          cgl200.cbl
 nalist           car100.cbl      car101.cbl      car120.cbl      car130.cbl
 _______7         car140.cbl      car150.cbl      cpy100.cbl
 paymas           cpy100.cbl
 saledtl          car200.cbl
 salelst          car200.cbl

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2C4. XREFjobs.doc - Cross-References for COBOL

xcobsql1 list all SQL Includes in any 1 Program

 xcobsql1 ** list all SQL-INCLUDES in each PROGRAM **
 Keyword=sql include  Exclude=~~ Include=~~  page#  1
 Directory=/home5/efunds2/testlibs/cbls
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1l1w2
 =======================================================2008/04/05_15:50:52
 avf00800.cbl_4   sqlca.cpy       tdbns04.cpy     tdbns05.cpy     tdbrf14.cpy
 avf01000.cbl_2   sqlca.cpy       tdbdw19.cpy
 avf01300.cbl_2   sqlca.cpy       tdbrf14.cpy
 avf01400.cbl_2   sqlca.cpy       tdbrf14.cpy
 avf50000.cbl_2   sqlca.cpy       tdbrf01.cpy
 avf50200.cbl_4   sqlca.cpy       tdbrf01.cpy     tdbrf06.cpy     tdlrf01.cpy
 avf50300.cbl_2   sqlca.cpy       tdbrf01.cpy

xcobsql2 crossref all Programs using any 1 SQL Include

 xcobsql2 ** crossref all PROGRAMS using each SQL-INCLUDE **
 Keyword=sql include  Exclude=~~ Include=~~  page#  1
 Directory=/home5/efunds2/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1l1w2
 =======================================================2008/04/05_15:51:05
  actbp.cpy_4      dbasrb26.cbl    dbasrb27.cbl    dbasrb31.cbl    dbasrb32.cbl

actbpsum.cpy_2 dbasrb26.cbl dbasrb27.cbl

  actgbp.cpy_4     dbasrb26.cbl    dbasrb27.cbl    dbasrb31.cbl    dbasrb32.cbl
  actsmd.cpy_3     dbasrb30.cbl    dbasrb31.cbl    dbasrb32.cbl
  actsum.cpy_2     dbasrb26.cbl    dbasrb27.cbl
  bpsmd.cpy_3      dbasrb30.cbl    dbasrb31.cbl    dbasrb32.cbl
  cpy077.cpy       dba00300.cbl    nas20500.cbl    nas21200.cbl    nas21300.cbl
  __________       nas23500.cbl    nas24700.cbl    nas24800.cbl    nas24900.cbl
  ___________9     pdw20300.cbl
  cpy078.cpy       pdw20300.cbl

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2D1. XREFjobs.doc - Cross-References for JCL/scripts

xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT

 xkshfile1 ** list all DATAFILES used in any 1 ksh SCRIPT **
 Keyword=exportfile:exportgen  Exclude=autoload Include=  page#  1
 Directory=/home/mvstest/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a16b50c1j4w2q0i7
 =======================================================2005/03/08_09:05:02
 ikjeft01.ksh     $DW/mxplib/ikjdemo1
 jar100.ksh       ar/customer.master
 ___________2     ar/customer.namelist
 jar200.ksh       $DW/${JOBID}_tempsls_2
 __________       ar/customer.master.indexed
 __________       ar/sales.items
 ___________5     ar/sales.list
 jgl100.ksh       gl/account.acntlist_
 ___________2     gl/account.master_
 jgl200.ksh       $DW/${JOBID}_tempglt_2
 __________       gl/account.master__2
 __________       gl/account.trans
 ___________6     gl/ctlcdlib/pgl200s1
 jgl300.ksh       $DW/${JOBID}_tempglm_2
 ___________4     gl/account.master__2
 jgl320.ksh       $DW/${JOBID}_tempglm_2
 ___________4     gl/account.master__2
 jgl400.ksh       $DW/${JOBID}_tempglm_2
 ___________4     gl/account.master__2
 jgl420.ksh       $DW/${JOBID}_tempglm_2
 ___________4     gl/account.master__2
 jgl500.ksh       gl/account.acntlist_
 ___________2     gl/account.export
 jpy200.ksh       $DW/${JOBID}_temptc_2
 __________       py/ctlcdlib/ppy200s1
 __________       py/payroll.master_
 __________       py/time.cards
 ___________6     py/timecard.edit_
 splitsl1.ksh     ar/sales.items
 ____________     work/sales.group1
 _____________3   work/sales.group2

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2D2. XREFjobs.doc - Cross-References for JCL/scripts

xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE

 xkshfile2 ** crossref to show all ksh SCRIPTs using any 1 DATAFILE **
 Keyword=exportfile:exportgen  Exclude=autoload Include=  page#  1
 Directory=/home/mvstest/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a40b16c3j4w2q0i7
 =======================================================2005/03/08_09:05:03
 $DW/${JOBID}_tempglm                     jgl300.ksh_2    jgl320.ksh_2    jgl400.ksh_2
 _____________________8                   jgl420.ksh_2
 $DW/${JOBID}_tempglt_2                   jgl200.ksh_2
 $DW/${JOBID}_tempsls_2                   jar200.ksh_2
 $DW/${JOBID}_temptc_2                    jpy200.ksh_2
 $DW/mxplib/ikjdemo1                      ikjeft01.ksh
 ar/customer.master                       jar100.ksh
 ar/customer.master.indexed               jar200.ksh
 ar/customer.namelist                     jar100.ksh
 ar/sales.items_2                         jar200.ksh      splitsl1.ksh
 ar/sales.list                            jar200.ksh
 gl/account.acntlist__2                   jgl100.ksh      jgl500.ksh
 gl/account.export                        jgl500.ksh
 gl/account.master_                       jgl100.ksh      jgl200.ksh_2    jgl300.ksh_2
 ___________________11                    jgl320.ksh_2    jgl400.ksh_2    jgl420.ksh_2
 gl/account.trans                         jgl200.ksh
 gl/ctlcdlib/pgl200s1                     jgl200.ksh
 py/ctlcdlib/ppy200s1                     jpy200.ksh
 py/payroll.master_                       jpy200.ksh
 py/time.cards                            jpy200.ksh
 py/timecard.edit_                        jpy200.ksh
 work/sales.group1                        splitsl1.ksh
 work/sales.group2                        splitsl1.ksh

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2E1. XREFjobs.doc - Cross-References for JCL/scripts

xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT

 xkshprog1 ** list all PROGRAMs executed in any 1 ksh SCRIPT **
 Keyword=PROGID  Exclude= Include=  page#  1
 Directory=/home/mvstest/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4j4q0i7
 =======================================================2005/03/08_09:05:03
 ikjeft01.ksh     ikjeft01
 jar100.ksh       car100
 jar200.ksh_2     car200          sort
 jar300.ksh       car300
 jgl100.ksh       cgl100
 jgl200.ksh_2     cgl200          sort
 jgl300.ksh_2     idcams          iebgener
 jgl320.ksh_2     idcams          iebgener
 jgl360.ksh       idcams
 jgl400.ksh_2     cobol1          cobol2
 jgl420.ksh_2     cobol1          cobol2
 jgl500.ksh       iefbr14
 jpy200.ksh_2     cpy200          sort
 splitsl1.ksh     sort

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2E2. XREFjobs.doc - Cross-References for JCL/scripts

xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM

 xkshprog2 ** crossref to show all ksh SCRIPTS executing any 1 PROGRAM **
 Keyword=PROGID  Exclude= Include=  page#  1
 Directory=/home/mvstest/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4j4q0i7
 =======================================================2005/03/08_09:05:03
  car100           jar100.ksh
  car200           jar200.ksh
  car300           jar300.ksh
  cgl100           jgl100.ksh
  cgl200           jgl200.ksh
  cobol1_2         jgl400.ksh      jgl420.ksh
  cobol2_2         jgl400.ksh      jgl420.ksh
  cpy200           jpy200.ksh
 *idcams_3         jgl300.ksh      jgl320.ksh      jgl360.ksh
 *iebgener_2       jgl300.ksh      jgl320.ksh
 *iefbr14          jgl500.ksh
 *ikjeft01         ikjeft01.ksh
 *sort_4           jar200.ksh      jgl200.ksh      jpy200.ksh      splitsl1.ksh
Note
  • the '*' above indicates missing programs
  • this crossref script runs an additional uvcopy job
  • to check existence of the programs in the 'cbls' subdir
  • of course the mainframe utilities will not be found there

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2F1. CNVaids: Cross-References for JCL/scripts

xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT


 xkshproc1 jcl3  <-- run separately (or xrefall, create all rpts in xref/...)
 ==============
 xkshproc1 ** crossref all MVS JOBnames for each EXEC PROCname **
 Keyword=EXEC  Exclude=PGM Include=call  page#  1
 Directory=/home/mvstest/testlibs/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4w1q0i7
 =======================================================2009/05/08_15:57:05
 jgl100.ksh       PGL100
 jgl200.ksh       PGL200
 jpy200.ksh_3     PPY200          PPY299          PPY300

2F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC


 xkshproc2 jcl3  <-- run separately (or xrefall, create all rpts in xref/...)
 ==============
  xkshproc2 ** crossref all MVS JOBnames for each EXEC PROCname **
  Keyword=EXEC  Exclude=PGM Include=call  page#  1
  Directory=/home/mvstest/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4w1q0i7
  =======================================================2009/05/08_15:57:05
  PGL100           jgl100.ksh
  PGL200           jgl200.ksh
  PPY200           jpy200.ksh
 *PPY299           jpy200.ksh
  PPY300           jpy200.ksh

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2G1. CNVaids: Cross-References for JCL/scripts

xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT


 xkshparm1 jcl3  <-- run separately (or xrefall, create all rpts in xref/...)
 ==============
 xkshparm1 ** crossref to show all ksh SCRIPTS referencing each PARM **
 Keyword=parms  Exclude=~~ Include=exportfile  page#  1
 Directory=/home/mvstest/testlibs/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4d1j4l1w1q0i7
 =======================================================2009/05/08_15:57:05
 iebcopy.ksh      products
 ikjeft01.ksh     ikjdemo1
 jgl200.ksh       pgl200s1
 jgl910.ksh       pgl200s1
 jpy200.ksh       ppy200s1
 jpy910.ksh       pgl200s1

2G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM


 xkshparm2 jcl3  <-- run separately (or xrefall, create all rpts in xref/...)
 ==============
  xkshparm2 ** crossref to show all ksh SCRIPTS referencing each PARM **
  Keyword=parms  Exclude=~~ Include=exportfile  page#  1
  Directory=/home/mvstest/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4d1j4l1w1q0i7
  =======================================================2009/05/08_15:57:05
  ikjdemo1         ikjeft01.ksh
  pgl200s1_3       jgl200.ksh      jgl910.ksh      jpy910.ksh
 *ppy200s1         jpy200.ksh
  products         iebcopy.ksh

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2H1. JCL/COBOL test/demo Cross-References

mvsfiles5A - data file trace in MVS JCL

Script 'mvsfiles5A' creates a "data file trace" report from subdir jcl2 (MVS JCLs with procs expanded). You can run the script using our demo JCLs (& then run with your own MVS JCL).


 #1. Login mvstest1 --> /home/mvstest1
     or Login yourself --> your homedir
 #2. cdl --> $HOME/testlibs (alias cdl='cd $HOME/testlibs)

 #3. mkdir xmvs    <-- make subdir for temp files & final report
     ==========

 #4. mvsfiles5A jcl2 xmvs   <-- execute script to create report
     ====================

 #5. vi xmvs/mvsfiles3      <-- inspect report
     =================

xmvs/mvsfiles3 sample data file trace

 mvsfiles53 - data file trace from MVS JCL - 2011/12/12 08:29:51
 Jobname Step   Program  DDname   MOD Gen Rcsz From To  DSNname
 ================================================================================
 jgl200   001   SORT     SORTIN   O                     GL.ACCOUNT.TRAN1
 jgl200   001   SORT     SORTOUT  NCD  +1   80     002  GL.ACCOUNT.TRANS_
 jgl200   001   SORT     SYSIN                          GL.PARMS(PGL200S1)
 jgl200   002   CGL200   GLTRANS  O    +1      001      GL.ACCOUNT.TRANS_
 jgl200   002   CGL200   GLMSOLD  O     0               GL.ACCOUNT.MASTER_
 jgl200   002   CGL200   GLMSNEW  NCD  +1   80          GL.ACCOUNT.MASTER_
 jgl330   001   IEBGENER SYSUT1   S     0          002  GL.ACCOUNT.MASTER_
 jgl330   001   IEBGENER SYSUT2   NP        80     002  &&TEMPGLM
 jgl330   002   IDCAMS   TEMPGLM  OP           001      &&TEMPGLM
 jgl330   002   IDCAMS   ACNTMAS  NC   +1   80 001 003  GL.ACCOUNT.MASTER_
 jgl330   003   IEBGENER SYSUT1   S     0      002      GL.ACCOUNT.MASTER_
 jgl330   003   IEBGENER SYSUT2   NP        80          &&TEMPGLM2
  1. I have reduced the report to only 2 jobs (vs the dozen in our demo JCL). You can see 'jgl200' listed on page '2D1'. 'jgl330' is not 1 of our demo JCLs, but I included it to demo a 3 step JCL (our demos were max 2 steps).

  2. The report traces the data fiels thru a multi-step job by showing the 'FROM' origin step & the 'TO' destination step of the data files. This should help you identify the orignal input files required to test the job & distinguish tehm from the various inter-step files.

  3. 'MOD' codes are the 1st letters from DISP=(New,Keep,Delete), etc. 'Gen' codes are taken from GDG file suffixes (0), (+1), etc, which are replaced by the trailing underscore on the filenames.

  4. 'Rcsz' (record-size) is taken from LRECL on output files or RECSIZE in IEBGENER or IDCAMS. The JCL converter assumes input recsize same as output recsize on SORTs. You need to fix if a SORT changes recsize via OUTREC, etc.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2X0. XREFjobs.doc - Cross-References for COBOL & JCL/scripts

scripts used in Part 2


2X1. xrefall script listed

2X2. xcobcopy1 script listed

uvcopy jobs used in Part 2

The crossref scripts use 'grep' followed by a uvcopy jobs to do the data manipulation, counting,& formatting you see on the reports.

xref1
  • uvcopy job to create the 'listing' reports
  • showing all occurrences of an item within a file
xref2
  • uvcopy job to create the 'cross-reference' reports
  • showing all files using a specified item

xref1 & xref2 will not be shown here since they are several pages, but you can examine them as follows:


 vi /home/uvadm/sf/util/xref1   - uvcopy job to create listings
 ============================

 vi /home/uvadm/sf/util/xref2   - uvcopy job to create cross-refs
 ============================

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2X1. XREFjobs.doc - Cross-References for COBOL & JCL/scripts

xrefall - script to generate cross-refs

 #!/bin/ksh
 # xrefall - Korn shell script from UVSI stored in: /home/uvadm/sf/util
 # xrefall - script to generate all xref reports in batch mode
 #       --> cd $RUNLIBS  - change above dirs to be xrefd (cbls & jcls)
 echo "xrefall - generate COBOL & JCL cross-ref reports in subdir xref"
 if [[ -d "$1" && -d "$2" && ("$3" = mvs || "$3" = vse || "$3" = ksh) ]]; then :
  else echo "usage:   xrefall COBdir JCLdir mvs/vse/ksh"
       echo "         ================================="
       echo "example: xrefall cbls jcl3 ksh  <-- jcl3 to xref converted ksh"
       echo "         ====================="
       echo "example: xrefall cbls jcl2 mvs  <-- jcl2 to xref MVS JCL B4 convert"
       echo "         ====================="
       echo "note:    use jcl3 or jcls for ksh, use jcl2 for mvs or vse"
       exit 1
 fi
 cdir="$1"; jdir="$2"; mvk="$3"  #setup $symbols for coboldir & jcldir
 reply=n
 echo "xrefall - will write crossref reports into xref subdir ? y/n"
 read reply
 until [[ "$reply" = "y" || "$reply" = "n" ]]
       do echo "xrefall - write crossref reports into xref subdir ? y/n"
       read reply;done;
 export XREFALL=Y     # set env-var to stop prompts for vi/uvlp12
 #
 xcobcall1    $cdir q0i7  # list all calls in any 1 program
 xcobcall2    $cdir q0i7  # crossref all programs calling any 1 called-program
 xcobcopy1    $cdir q0i7  # list all copybooks in any 1 program
 xcobcopy2    $cdir q0i7  # crossref all programs copying any 1 copybook
 xcobfile2    $cdir q0i7  # crossref all programs using any 1 external filename
 x${mvk}file1 $jdir q0i7  # list all datafiles in any 1 jcl/script
 x${mvk}file2 $jdir q0i7  # crossref all jcl/scripts using any 1 datafile
 x${mvk}prog1 $jdir q0i7  # list all programs in any 1 jcl/script
 x${mvk}prog2 $jdir q0i7  # crossref all jcl/scripts executing any 1 program
 x${mvk}proc1 $jdir q0i7  # list all PROCs in any 1 jcl/script
 x${mvk}proc2 $jdir q0i7  # crossref all jcl/scripts calling any 1 PROC
 x${mvk}parm1 $jdir q0i7  # list all SYSIN/PARMs in any 1 jcl/script
 x${mvk}parm2 $jdir q0i7  # crossref all jcl/scripts referencing any 1 SYSIN/PARM
 uvcopy cobfil51,fild1=cbls,filo2=xref/cobfil51a,uop=r0q0i31  #COBOL files report
 #
 # show Op. Instrns. to print reports from xref subdir (laser print at 12 cpi)
 echo "---------------------------------------------------------------"
 echo "reports generated in xref subdir, view/print command examples:"
 echo "ls -l    xref          <-- list filenames of reports in xref subdir"
 echo "uvlp12   xref/???      <-- print 1 specified report"
 echo "uvlp12D  xref/???      <-- print 1 report DUPLEX"
 echo "uvlpd12  xref          <-- print ALL reports in xref subdir Simplex"
 echo "uvlpd12D xref          <-- print ALL reports in xref subdir DUPLEX"
 echo "more xref/*            <-- display all reports in xref subdir"
 exit 0

As you can see above, xrefall calls 8 sub-scripts to generate the 8 cross-ref reports (xcobcall1/2, xcobcopy1/2, xkshfile1/2,& xkshprog1/2). We will list 1 of these (xcobcopy1) on the following page --->

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

2X2. XREFjobs.doc - Cross-References for COBOL & JCL/scripts

xcobcopy1 - list all copybooks in any 1 program

 #!/bin/ksh
 # xcobcopy1 - list all COPYBOOKS in each PROGRAM
 echo "xcobcopy1 - list all COPYBOOKS in each PROGRAM"
 export JOBID="xcobcopy1"
 # xcobcopy1 cbls [options1]  <- default indir & options as follows
 # xcobcopy1 cbls  a16b16c4e3 <- 2 sets of options for 2 reports
 #                 a16         - column to begin references
 #                    b16      - width allowed for each reference
 #                       c4    - number of references per line
 #                         e1  - COBOL (bypass * col7)
 #                         e2  - targetword must be enclosed in "quotes"
 # arg1 must be a directory
 dir="$1"
 if [[ ! -d "$dir" ]]; then
    echo "usage:  xcobcopy1 directory options - arg1 must be directory"
    echo "        ============================"
    echo "sample: xcobcopy1 cbls a16b16c4e1   - arg2 options default as shown"
    echo "        =========================="
    echo "options: a16=cols for programnames, b16=cols for copybooknames"
    echo "         c4=copybooknames/line, e1=COBOL (ignore * col7)"
    exit 1; fi
 # setup default options, if not specified - use defaults
 ops=a16b16c4e3l1$2;    # append any user option overrides onto defaults
 if [[ ! -d tmp ]]; then mkdir tmp; fi  #make tmp if not already present
 # init output file, will append grep output for each program
 >tmp/grep1
 for i in $dir/*
     do \grep -i ' copy ' $i /dev/null >>tmp/grep1
        \grep -i ' include ' $i /dev/null >>tmp/grep1
     done
 # \grep disables any alias grep='grep -n' would create 2 ':'s vs 1
 # create full path name of directory, if not already
 if [[ $dir = /* ]]; then DIR=$dir; else DIR=${PWD}/$dir; fi
 export DIR=$DIR
 export TITLE="list all COPYBOOKS in each PROGRAM"
 uvcopy xref1,fili1=tmp/grep1,filo1=xref/xcobcopy1,arg1=copy:include\
 ,arg2=.cpy,arg3=unix,uop=$ops
 # arg3=unix excludes unixwork1 & unixproc1, inserted in all prgms by cnvrtr
 # inhibit prompt for vi/uvlp if batch run (batch will print all xref)
 if [[ "$XREFALL" != "Y" ]]; then
    echo "report generated = xref/xcobcopy1"
    echo " - use uvlp12,uvlp14,uvlp16 to laser print at 12,14,16 cpi"
    echo "--> enter command (vi,cat,more,uvlp12,uvlp14,uvlp16,etc)"
    read ans
    if [[ ! "$ans" = "" ]]; then
       $ans xref/xcobcopy1
    fi
 fi
 exit 0
Note
  • You can see the other cross-ref scripts in /home/uvadm/sf/util/...

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Part_3. XREFjobs.doc - Cross-References for COBOL & JCL

Part 3 COBOL files & JCL Job-Flow reports - Contents


3A1. COBOL Files Report
- script cobfiles5A generates the report from all programs in cbls/...
- output report in xref/cobfiles.rpt
- sample report shown (based on supplied demo COBOL programs)

3B1. Job-Flow reports
- your essential guide to testing & debugging
- combines the data file info from both the JCL & the COBOL programs
- script jobflow5A generates reports for all JCL/scripts in jcl3 or jcls
- output reports left in subdir jobflow/... with extension '.io'

3B2. sample report shown (based on supplied demo JCL)

3B3. Operating Instructions to create Job-Flow reports
- for all JCL/scripts, or for 1 JCL/script at a time

3X0. summary of scripts & uvcopy jobs used in Part 3

3X1. cobfiles5A script generates COBOL files report

3X2. jobflow5A script generates all JOb-Flow reports for all JCL/scripts

These reports will be invaluable when you start your testing & debugging.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3A1. XREFjobs.doc - COBOL files & JCL JobFlow reports

COBOL Files Report

Script 'cobfiles5A' generates 'cobfiles.rpt' & also loads an Indexed file for lookup by jobflow5A which creates jobflow reports with both JCL & COBOL program file information.

If you make changes to the COBOL programs, you can regenerate the COBOL Files report as follows:


 #1. cobfiles5A cbls  <-- generate COBOL Files Reports
     ===============    - input is the 'cbls' subdir
                        - output is the report in xref/cobfiles.rpt

 #2. uvlp12 xref/cobfiles.rpt   <-- print the COBOL Files report
     ========================       (80 chars wide on 8 1/2 x 11 Portrait)

uvcopy job 'cobfil51' extracts the essential file info from the COBOL programs into a concise report. The report prints 1 line for each file found in each program. The following items are listed for each file:

  1. external name from the 'select' stmnt (to match DDname in JCL)
  2. Organization & Access Method
  3. Open mode - Input, Output, Extend, Input-Output
  4. Record-size
  5. Copybook name (if any)
  6. internal name from the 'select' stmnt

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3A2. XREFjobs.doc - COBOL files & JCL JobFlow reports

COBOL Files report - sample

 cobfil51  ** COBOL Files Report ** Dir=cbls  2009/08/30_17:47:40
 progname.cbl DDname       OAM   open recsz  copybook.cpy  FDname / Key    lines
 ============================================se=in=up=de=========================
 car100.cbl   custmas      SS    I      256  custmas.cpy   custmas
 car100.cbl   nalist       L     O      120                nalist
                                                                              52
 car101.cbl   custmas1     SS    I      256                custmas1
 car101.cbl   nalist       L     O       90                nalist
                                                                              41
 car120.cbl   custmas      SS    I      256  custmas.cpy   custmas
 car120.cbl   nalist       L     O       90                nalist
                                                                              71
 car130.cbl   custmas      SS    I      256  custmas.cpy   custmas
 car130.cbl   nalist       L     O       90                nalist
                                                                              65
 car140.cbl   custmas      SS    I      256  custmas.cpy   custmas
 car140.cbl   nalist       L     O       90                nalist
                                                                              62
 car150.cbl   custmas      SS    I      256  custmas.cpy   custmas
 car150.cbl   nalist       L     O      120                nalist
                                                                              60
 car200.cbl   saledtl      SS    I       64  saledtl.cpy   saledtl
 car200.cbl   custmas      IR    I      256  custmas.cpy   custmas
 car200.cbl          key->                                    cm-cust
 car200.cbl   salelst      L     O      120  sdline.cpy    salelst
                                                                              65
 car300.cbl     -NoFiles-                                                     34
 cgl100.cbl   acctmas      SS    I       80                acctmas
 cgl100.cbl   actlist      L     O      120                actlist
                                                                              53
 cgl200.cbl   glmsold      SS    I       80                glmsold
 cgl200.cbl   glmsnew      SS    O       80                glmsnew
 cgl200.cbl   gltrans      SS    I       80                gltrans
                                                                              61
 cpy100.cbl   paymas       SS    I      256  paymas.cpy    paymas
 cpy100.cbl   nalist       L     O      120                nalist
                                                                              46
 sqlora1.cbl  cust1in      LS    I       80                cust1
 sqlora1.cbl  exec_sql                       cust1             I01
                                                                             110
 sqlora2.cbl  cust1out     LS    O       80                cust1
 sqlora2.cbl  exec_sql                       sqlca.cpy
 sqlora2.cbl  exec_sql                       cust1         S01
                                                                             112
 testunix1.cblcustmas      IS    I      256                custmas
 testunix1.cbl       key->                                    custnum
                                                                              76
 Total programs = 14, total files = 25

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3B1. XREFjobs.doc - COBOL files & JCL JobFlow reports

JobFlow Reports

Script 'jobflow5A' generates jobflow reports. You must have run 'cobfiles5A' to load an Indexed file for lookup by jobflow5A to include COBOL file information on the jobflow report.

You may regenerate the Job-Flow reports any time you make significant changes to the JCL/scripts during testing & debugging.


 #1. jobflow5A cbls jcl3      <-- generate All JobFlow Reports
     ===================

 #2. uvlpd12L jobflow         <-- Do *NOT* print ALL JobFlow reports
     ================             (120 chars wide 8 1/2 x 11 Landscape)

You probably do NOT want to print all jobflow reports, since the reports would be very long & many could go out of date before you use them. It is better to print the individual jobflow report just before you intend to start test/debug for each JCL/script.

You can re-generate the report for any 1 JCL/script using script 'jobflow51' (regenerate when ever you substantially modify the JCL/script).


 #1. jobflow51 jcls/jar200.ksh   <-- generate JobFlow report for 1 job only
     =========================

 #2. uvlp12L jobflow/jar200.io   <-- print jobflow report for 1 JCL only
     =========================

Using the Job-Flow reports

The 'JobFlow' reports are your guide to testing & debugging. They show you the programs & datafiles used in each step of each JCL/script.

I recommend you print these out before you start your testing & debugging.

The JObFlow reports extract the essential info about each datafile in each step. The file info from the COBOL program is inserted onto the matching info from the JCL. The following items are shown for each file in each step.

  1. JCL Job Step# & Program name
  2. JCL DDname (matching COBOL external name)
  3. COBOL Organization & Access Methods
  4. COBOL Open mode - Input, Output, Extend, Input-Output
  5. COBOL Record-size
  6. COBOL Copybook name (if any)
  7. JCL DSNname (physical filename)

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3B2. XREFjobs.doc - COBOL files & JCL JobFlow reports

JobFlow sample report

 jclfil53  ** JobFlow Report I/O files info **  20100329 page#0001
 stp# progname.cbl DDname  genf  OAM   open recsz  copybook.cpy  data-file-name
 ==============================================================================
 jar200.ksh
 0010 sort.cbl     sortin                                        ar/sales.items
                   sortout                                       $JTMP/__tempsls
 0010 uvsort       fili1=typ=RSF,rcs=64,       64                $SORTIN
                                                                 ar/sales.items
                   filo1=typ=RSF,rcs=64,       64                $SORTOUT
                                                                 $JTMP/__tempsls
                   keys=(30,6,c,a,0,6,c,a),del1=10(2c):65,del1=10(2c):85"
 0020 car200.cbl   sysout                                        $SYOT/${JOBID2}_${JSTEP}_${PROGID}
                   saledtl       SS_   I___    64  saledtl.cpy   $JTMP/%sales.sortfile
                   custmas       IR_   I___   256  custmas.cpy   ar/customer.master.indexed
                   sys035        S__   O___   120  sdline.cpy    $RPTS/salesrpt_E_car200_${JSTEP}_01
                   sysin                                         $JTMP/${JSTEP}_${PROGID}

JCL/script 'jar200.ksh' is a 2 step job with a SORT & a COBOL program with 4 data files.

The JobFlow reports are listed by 'uvlp12L' which allow for 120 characters wide on 8 1/2 x 11 Landscape. We have removed the JCL/script name from the left & scrunched up to fit this documentation.

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3B3. XREFjobs.doc - COBOL files & JCL JobFlow reports

Creating a JobFlow report for 1 job at a time

The operating Instructions on page '3B1' created all JobFlow reports (in subdir jobflow/...).

But, during test/debug, you may modify JCL/scripts & you might like to regenerate & print the updated JobFlow report for 1 specified JCL/script. 'jobflow51' is provided for just that purpose.

Note
  • You must have run 'cobfiles5A' & 'jobflow5A' to load indexed files
    of COBOL & JCL data-file info for use by jobflow51
  • see cobfiles5A op. instrns on page '3A1' & listing on page '3X1'
  • see jobflow5A op. instrns on page '3B1' & listing on page '3X2'

 #1. jobflow51 jcls/jar200.ksh   <-- generate JobFlow report for 1 job only
     =========================

 #2. uvlp12L jobflow/jar200.io    <-- print the jobflow report
     =========================

Actually jobflow51 will prompt you to print the report & is the default for a null response, but you may alternatively specify vi,more,cat,etc.

JobFlow Sample Report

 jclfil53  ** JobFlow Report I/O files info **  20100329 page#0001
 stp# progname.cbl DDname  genf  OAM   open recsz  copybook.cpy  data-file-name
 ==============================================================================
 jar200.ksh
 0010 sort.cbl     sortin                                        ar/sales.items
                   sortout                                       $JTMP/__tempsls
 0010 uvsort       fili1=typ=RSF,rcs=64,       64                $SORTIN
                                                                 ar/sales.items
                   filo1=typ=RSF,rcs=64,       64                $SORTOUT
                                                                 $JTMP/__tempsls
                   keys=(30,6,c,a,0,6,c,a),del1=10(2c):65,del1=10(2c):85"
 0020 car200.cbl   sysout                                        $SYOT/${JOBID2}_${JSTEP}_${PROGID}
                   saledtl       SS_   I___    64  saledtl.cpy   $JTMP/%sales.sortfile
                   custmas       IR_   I___   256  custmas.cpy   ar/customer.master.indexed
                   sys035        S__   O___   120  sdline.cpy    $RPTS/salesrpt_E_car200_${JSTEP}_01
                   sysin                                         $JTMP/${JSTEP}_${PROGID}

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3X0. XREFjobs.doc - COBOL files & JCL JobFlow reports

scripts used in Part 3


3X1. cobfiles5A - creates xref/cobfiles.rpt & loads xref/cobfilesI
- for use by the jobflow5A & jobflow51

3X2. jobflow5A - creates all jobflow reports in subdir jobflow/...
- from all JCL/scripts in subdir jcl3/... or jcls/...

uvcopy jobs used in Part 3

jobflow5A & jobflow51 employ several uvcopy jobs to do the data manipulation & reformatting required. These will not be listed here since they are several pages long. But you may examine any of them as shown below:

vi /home/uvadm/pf/IBM/cobfil51 - extract COBOL info from all programs in cbls

vi /home/uvadm/pf/IBM/cobfil52 - load COBOL info into Indexed file for jclfil52

vi /home/uvadm/pf/IBM/jclfil51 - extract JCL info from All scripts in jcl3/jcls

vi /home/uvadm/pf/IBM/jclfil52 - combine JCL & COBOL info into 1 report

vi /home/uvadm/pf/IBM/jclfil53 - modify the report to enhance readability

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3X1. XREFjobs.doc - COBOL files & JCL JobFlow reports

cobfiles5A script to create COBOL files report

 #!/bin/ksh
 # cobfiles5A - Korn shell script from UVSI stored in: /home/uvadm/sf/IBM/
 # cobfiles5A - create COBOL file info report for all programs in directory
 #            - and load indexed file for subsequent jobflow reports
 #            - by Owen Townsend, Sept 2007, see doc in CNVaids.doc#Part_5
 # Jan2010 - added cobmap1/cpyrcs1 to provide recsizes for copybooks
 #
 #*cobfiles5A - create COBOL file info report for all programs in directory
 #            - may follow with scripts to create jobflow reports
 # jobflow5A  - create jobflow reports for all JCL/scripts in a directory
 #            - assumes the indexed file of COBOL info already created
 # jobflow51  - create jobflow report for any 1 specified jcl/script (vs all)
 #
 cbls="$1"; cpys="$2"; maps="$3";   #setup $symbols for args (directories)
 echo "cobfiles5A - create COBOL file info report for all programs in subdir"
 echo " - reads all $cbls/* writes xref/cobfiles.rpt & loads xref/cobfilesI"
 if [[ -d "$cbls" && -d $cpys && -d $maps ]]; then :
  else echo "usage:   cobfiles5A COBOLdir copybookdir mapsdir"
       echo "         ======================================="
       echo "example: cobfiles5A  cbls  cpys  maps"
       echo "         ============================"
       echo "yours:   cobfiles5A $cbls $cpys $maps"
       echo "         ============================"
       exit 1
 fi
 echo " "
 echo "#1. uvcopyx cobmap1 - generate $maps (record layouts) from copybooks"
 echo "    - will remove any $maps/* & re-generate from copybooks"
 echo "    - enter to continue"; read x
 #
 rm -f $maps/*
 uvcopyx cobmap1 $cpys $maps uop=q0i7p0,rop=r0
 #============================================
 rmzf $maps   # remove any 0 length files (caused by procedure copybooks)"
 echo " "
 echo "#2. uvcopy cpyrcs1 - extract RCSZ from $maps, to show recsize on report"
 echo "    - enter to continue"; read x
 #
 uvcopy cpyrcs1,fild1=$maps,filo1=ctl/cpyrcs1,rop=r0
 #==================================================
 echo " "
 echo "#3. uvsort - sort/load ctl/cpyrcs1I Indexed file for cobfile51 recsizes"
 echo "    - enter to continue"; read x
 #
 uvsort "fili1=ctl/cpyrcs1,rcs=256,typ=LST,filo1=ctl/cpyrcs1I,rcs=63,typ=ISF\
 ,isk1=0(30),key1=0(30)"
 #==============================================================================
 echo " "
 echo "#4. uvcopy cobfil51 - extract file info from COBOL programs"; read x
 #
 uvcopy cobfil51,fild1=$cbls,filo2=xref/cobfiles.rpt,filr3=ctl/cpyrcs1I\
 ,uop=q0i7c1,rop=r0
 #=======================================================================
 echo " "
 echo "#5. uvcopy cobfil52 - load cobol info file for jobflow reports"; read x
 #
 uvcopy cobfil52,fili1=xref/cobfiles.rpt,filo2=xref/cobfilesI
 #===========================================================
 echo " "
 coblines=$(wc -l xref/cobfiles.rpt)    # get line count in cobol report
 echo "COBOL Files report line count = $coblines"
 echo "------ use following command to print reports"
 echo "uvlp12  xref/cobfiles.rpt  <-- print COBOL files report"
 echo "========================="
 echo "jobflow51 jcls/jobname.ksh <-- may run jobflow report for any JCL/script"
 echo "========================="
 exit 0

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

3X2. XREFjobs.doc - COBOL files & JCL JobFlow reports

jobflow5A script to generate All JobFlow reports

 #!/bin/ksh
 # jobflow5A - Korn shell script from UVSI stored in: /home/uvadm/sf/IBM/
 # jobflow5A - create ALL job flow reports with JCL & COBOL file info
 #           - by Owen Townsend, September 2007
 #
 #*jobflow5A - create ALL job flow reports with JCL & COBOL file info
 #           - assumes the indexed file of COBOL info already created
 #           - must have run uvcopy cobfil51 & cobfil52 or script cobfiles5A
 #           - writes output reports to jobflow/...
 # jobflow51 - create jobflow report for any 1 specified jcl/script (vs all)
 #           - writes output to jobflow/jobname.rpt
 #
 echo "jobflow5A - create jobflow reports for all JCL/scripts"
 echo " - reads all jcl/scripts, writes report in xref subdir"
 echo " - must have already created xref/cobfilesI Indexed file COBOL info"
 echo " - use 'cobfiles5A' script, easy way to create indexed file"
 #
 if [[ -d "$1" && -f xref/cobfilesI.dat ]]; then :
  else echo "usage:   jobflow5A jcldir   <-- arg1=Korn shell scripts"
       echo "         ================     - must specify arg1 input subdir"
       echo "example: jobflow5A jcl3     <-- subdir jcl3 before test/debug"
       echo "         ==============       - subdir jcls after test/debug"
       echo " - xref/cobfilesI must have been created (by cobfiles5A)"
       echo " - output reports will be created in subdir jobflow/..."
       exit 1
 fi
 jcldir="$1"; if [[ ! -d jobflow ]]; then mkdir jobflow; fi
 #
 uvcopy jclfil51,fild1=$jcldir,filo2=xref/jclfil51a
 #=================================================
 #      - extract info from JCL scripts
 #
 uvcopy jclfil52,fili1=xref/jclfil51a,filr2=xref/cobfilesI\
 ,filr3=ctl/datactl53I,filo4=xref/jclfil52a
 #=========================================================
 #      - complete the jcl report by inserting cobol info
 #
 uvcopy jclfil53,fili1=xref/jclfil52a,fild2=jobflow
 #==================================================
 #      - split multi-job input to separate files for each job in outdir
 #      - modify jobflow report to enhance readability
 #      - insert blank lines between jobs & steps, seq# steps
 #      - remove redundant repeating jobnames & stepnames
 #
 echo "JobFlow reports created in output directory jobflow/..."
 echo "----------------------- may print reports as follows:"
 echo "uvlpd12LD jobflow             <-- print all reports Landscape/Duplex"
 echo "=================          Note - usually Too Big to print"
 echo "jobflow51 $jcldir/jobname.ksh <-- generate report for 1 job at a time"
 echo "=============================   - regen to capture changes to JCL/script"
 echo "uvlp12L jobflow/jobxx.io      <-- print report for 1 job"
 echo "========================"
 exit 0

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Part_4. XREFjobs.doc - Cross-References for COBOL & JCL

xrefA - General Purpose Cross-Reference script

The Vancouver Utilities include several 'general purpose' cross-reference scripts that you may use to solve various problems when the need arises.

For example, we used the 'xrefA' script to create a report showing all jobnames referencing each ctlcdlib module found in jcls. We needed this to make manual corrections to some of the SORT INCLUDEs with complex AND/OR conditions that did not convert 100%. Here is the 'xrefA' script command format & an example of use:


 xrefA subdir keyword options 'report title'      <-- command format
 ===============================================
 xrefA jcl3 ctlcdlib w1d1 'ctlcdlib vs JCLnames'  <-- example of use

xrefA - sample Operating Instructions


 #1. xrefA jcl3 ctlcdlib w1d1 'ctlcdlib vs JCLnames'
     ===============================================

 #2. uvlp12 xref/ctlcdlib         - print report (listed below)
     ====================

Sample xrefA Report

 xrefA: DIR=/part4/libs/apay/jcl3  Keyword=ctlcdlib  page#  1
 Report: ctlcdlib vs JCLnames Options=w1d1 Exclude:  Include:
 =====================================================2002/10/03_12:04:11
 c9301130         c9t301sr.ksh
 c9301140_2       c9t301sr.ksh    c9t302sr.ksh
 c9a55111         c9a551j1.ksh

 c9a55310_3       c9a553j1.ksh    c9a553j2.ksh    c9a555j1.ksh
 ========================================================================
 EOD: 1130 lines selected from 1523 jobs in jcl3 (total 352193 lines)

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Part_5. XREFjobs.doc - Cross-References for COBOL & JCL

table summary 'stat' reports

There are several 'stat' reports which would complement the 'xref' & 'jobflow' reports documented here in XREFjobs.


5A1. statcbl1 - summary table stats from all COBOL programs in dir
- counts for each copybook, called program, file ORG type
- sample reports shown (Op. Instrns. on page '5D1')

5B1. statmvsjcl1 - summary table stats from all JCL in directory
- counts for each PROGRAM, each PROC,& each Top-Node
- sample reports shown (Op. Instrns. on page '5D1')

5C1. statksh1 - summary table stats from all Korn shell scripts
- counts for each PROGRAM, each PROC,& each Top-Node
- sample reports shown (Op. Instrns. on page '5D1')

5D1. Operating Instructions to run stat report jobs & script to run all jobs

5X1. statallmvs1 - script to run all reports above
- statallmvs1 script listed

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

5A1. XREFjobs.doc - 'stat' reports for COBOL & JCL

Note
  • sample reports were created from the test/demo files for 'MVSJCL.doc'
  • distributed in /home/uvadm/mvstest/testlibs/cbl0 & jcl0

statcbl1 - COBOL stat report samples

 statcbl1  2008/01/05_16:50:56  Summary of called programs in cbls
 tbl#002 pg#001     -argument-
 line#  count    %  called program
     1       2 100  getparm
             2*100   *TOTAL*
 statcbl1  2008/01/05_16:50:56  Summary of copybooks in cbls
 tbl#001 pg#001     -argument-
 line#  count    %  copybook
     1       6  17  custmas.cpy
     2       1   2  paymas.cpy
     3       2   5  saledtl.cpy
     4       1   2  sdline.cpy
     5       1   2  stline.cpy
     6      12  34  unixproc1.cpy
     7      12  34  unixwork1.cpy
            35*100   *TOTAL*
 statcbl1  2008/01/05_16:50:56  Summary of ORGANIZATION types in cbls
 tbl#003 pg#001     -argument-
 line#  count    %  organization
     1       2   8  indexed
     2       9  39  line sequential
     3      12  52  record sequential
            23*100   *TOTAL*

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

5B1. XREFjobs.doc - 'stat' reports for COBOL & JCL

statmvsjcl1 - mainframe JCL stat report samples

 statmvsjcl1  2008/01/05_16:50:56  Summary table of EXEC PGMs in jcl0
 tbl#001 pg#001     -argument-
 line#  count    %  EXEC PGM
     1      20  33  ALLCOBOL(3+digits)
     2       3   5  FTP
     3      13  21  IDCAMS
     4      10  16  IEBGENER
     5       5   8  IEFBR14
     6       1   1  IKJEFT01
     7       2   3  ISRSUPC
     8       1   1  MAILTOLN
     9       5   8  SORT
            60*100   *TOTAL*
 statmvsjcl1  2008/01/05_16:50:56  Summary table of EXEC PROCs in jcl0
 tbl#002 pg#001     -argument-
 line#  count    %  EXEC PROC
     1       1  33  PGL100
     2       1  33  PGL200
     3       1  33  PPY200
             3*100   *TOTAL*
 statmvsjcl1  2008/01/05_16:50:56  Summary table of DSN Top-Nodes in jcl0
 tbl#003 pg#001     -argument-
 line#  count    %  Top-Node
     1      26  19  &&(ALLTempFiles)
     2      31  23  AR
     3       1   0  ARTEST
     4       1   0  FTP
     5      55  41  GL
     6       1   0  GLTEST
     7       1   0  MXPLIB(IKJDEMO1)
     8      10   7  PY
     9       4   2  PYTEST
    10       2   1  RPTS
    11       2   1  WORK
           134*100   *TOTAL*

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

5C1. XREFjobs.doc - 'stat' reports for COBOL & JCL

statksh1 - Korn shell stat report samples

 statksh1  2008/01/05_16:50:56  Summary exportfile/exportgen subdirs in jcl3
 tbl#002 pg#001     -argument-
 line#  count    %  exportfile/gen subdir/
     1       3   1  exportfile $INPUT1
     2      32  15  exportfile $JTMP/
     3       1   0  exportfile $PARMFILE
     4       4   1  exportfile $RUNLIBS/
     5      12   5  exportfile $SYOT/
     6      26  12  exportfile $SYSIN
     7       1   0  exportfile $WRK/
     8      31  15  exportfile ar/
     9       8   3  exportfile gl/
    10       9   4  exportfile misc/
    11      10   4  exportfile py/
    12       2   0  exportfile rpts/
    13      26  12  exportgen0 gl/
    14       1   0  exportgen0 misc/
    15       1   0  exportgen0 py/
    16      24  11  exportgen1 $JTMP/
    17       1   0  exportgen2 $JTMP/
    18       1   0  exportgen3 $JTMP/
    19       3   1  exportgenall gl/
    20       1   0  exportgenall py/
    21       2   0  exportgenp gl/
    22       2   0  exportgenq gl/
    23       1   0  exportgenr gl/
    24       1   0  exportgenx gl/
           203*100   *TOTAL*
 statksh1  2008/01/05_16:50:56  Summary table of PROGIDs in jcl3
 tbl#001 pg#001     -argument-
 line#  count    %  PROGID
     1      25  37  ALLCOBOL(3+digits)
     2       3   4  ftp
     3      13  19  idcams
     4      10  15  iebgener
     5       5   7  iefbr14
     6       2   3  isrsupc
     7       1   1  mailtoln
     8       7  10  sort
            66*100   *TOTAL*

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

5D1. XREFjobs.doc - 'stat' reports for COBOL & JCL

running jobs to create stat reports


 #1. uvcopy statcbl1,fild1=cbl0
     [,filo1=stats/cbl0_copybooks,filo2=stats/cbl0_called,filo3=stats/cbl0_ORGs]
     ===========================================================================
     - specify cbl0 for original mainframe COBOL programs

 #2. uvcopy statcbl1,fild1=cbls
     [,filo1=stats/cbls_copybooks,filo2=stats/cbls_called,filo3=stats/cbls_ORGs]
     ===========================================================================
     - specify cbls for converted programs (for Micro Focus)

 #2a. uvcopy statcbl1    <-- same as above (files default as shown)
      ===============

 #3. uvcopy statmvsjcl1,fild1=jcl0,uop=a1c1
     ======================================
     [,filo1=stats/jcl0_pgms,filo2=stats/jcl0_procs,filo3=stats/jcl0_topnodes]
     =========================================================================
     - for original mainframe JCL

 #3a. uvcopy statmvsjcl1    <-- same as above (files default as shown)
      ==================

 #4. uvcopy statksh1,fild1=jcl3,uop=c1
     =================================
     [,filo1=stats/jcl3_pgms,filo2=stats/jcl3_exportfiles]
     =====================================================
     - for converted Korn shell scripts

 #4a. uvcopy statksh1    <-- same as above (files default as shown)
      ===============

script 'statallmvsjcl' to run all jobs above


 statallmvs1 all     <-- run all stat jobs, store reports in subdir stats/...
 ===============

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

5X1. XREFjobs.doc - 'stat' reports for COBOL & JCL

statallmvs1 script to create all stat reports

 # statallmvs1 - create all stat reports for COBOL & JCL
 #             - by Owen Townsend, UV Software, Jan 5/2008
 #
 if [[ "$1" != "all" ]]; then
    echo "usage: statallmvs1 all"
    echo "       ==============="
    echo "- must be in RUNLIBS (TESTLIBS/PRODLIBS) = $RUNLIBS"
    echo "- using subdirs: cbls,jcl2,jcl3,& stats"
    exit 9; fi
 echo "enter to run statcbl1 - copybooks, called-programs, ORGtypes"; read reply
 #
 uvcopy statcbl1,fild1=cbls,uop=q0i7,rop=r0\
 ,filo1=stats/cbls_copybooks,filo2=stats/cbls_called,filo3=stats/cbls_ORGtypes
 #============================================================================
 echo "enter to run statmvsjcl1 - PGMs,PROCs,Top-Nodes,parms,filenames,includes"
 read reply
 #
 uvcopy statmvsjcl1,fild1=jcl2,uop=q0a1c1,rop=r0\
 ,filo1=stats/jcl2_pgms,filo2=stats/jcl2_procs,filo3=stats/jcl2_topnodes\
 ,filo4=stats/jcl2_parms,filo5=stats/jcl2_filenames,filo6=stats/jcl2_includes
 #===========================================================================
 echo "enter to run statksh1 - pgms,exportfiles/gens,Top-Nodes,parms,filenames"
 read reply
 #
 uvcopy statksh1,fild1=jcl3,uop=q0i15c1,rop=r0\
 ,filo1=stats/jcl3_pgms,filo2=stats/jcl3_exportfiles\
 ,filo3=jcl3_topnodes,filo4=stats/jcl3_parms,filo5=stats/jcl3_filenames
 #=====================================================================
 echo "enter to display stats/... files created & print suggestions"
 read reply
 #
 ls -l stats      # list stat reports created
 echo "reports created in stats/... are listed above"
 echo " - may print all or individual reports as follows:"
 echo "uvlpd12 stats   <-- print all reports in subdir stats"
 echo "============="
 echo "uvlp12 stats/cbls_copybooks  <-- print 1 report"
 echo "==========================="
 exit 0
 #

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Permuted Index of Keywords from ** Headings **

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

2A1 Available: Cross-Ref Reports Available

1A1 Binders: Three Ring Binders with Index Tabs

2C2 Called-program: xcobcall1 - list of all Called-Programs in each Program
2C2 Called-program: xcobcall2 - crossref all Programs calling any 1 Called-Program
2C2 Calling: xcobcall2 - crossref all Programs calling any 1 Called-Program
3X1 Cobfiles5a: cobfiles5A script to create COBOL files report
1D1 Cobmap: sample - maps/custmas
1D1 Cobmaps: Don't list CopyBooks, Do list 'CobMaps'
1D1 Cobol: Don't list the COBOL programs
2A1 Cobol: Cross References for COBOL & JCL/scripts
2C1 Cobol: COBOL Cross-Ref Sample Reports
3A1 Cobol: COBOL Files Report
3A2 Cobol: COBOL Files report - sample
3X1 Cobol: cobfiles5A script to create COBOL files report
5A1 Cobol: statcbl1 - COBOL stat report samples
2C1 Copybook: xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK
1D1 Copybooks: Don't list CopyBooks, Do list 'CobMaps'
2C1 Copybooks: xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM
2X2 Copybooks: xcobcopy1 - list all copybooks in any 1 program
1B1 Counts: Inventory - 4-up Lists of Filenames & Line Counts
2A1 Cross: Cross References for COBOL & JCL/scripts
2A1 Cross-ref: Cross-Ref Reports Available
2B2 Cross-ref: Op. Instrns. - Cross-Ref 1 at a time
2C1 Cross-ref: COBOL Cross-Ref Sample Reports
2C3 Cross-ref: xcobfile2 - cross-ref programs using each filename
2B1 Cross-refs: Operating Instructions for ALL Cross-Refs reports
2X1 Cross-refs: xrefall - script to generate cross-refs
2C1 Crossref: xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK
2C2 Crossref: xcobcall2 - crossref all Programs calling any 1 Called-Program
2C4 Crossref: xcobsql2 crossref all Programs using any 1 SQL Include
2D2 Crossref: xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE
2E2 Crossref: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM
2F1 Crossref: 2F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC
2G1 Crossref: 2G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM
1D1 Custmas: cobmap sample - maps/custmas

2H1 Data: mvsfiles5A - data file trace in MVS JCL
2H1 Data: xmvs/mvsfiles3 sample data file trace
2D2 Datafile: xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE
2D1 Datafiles: xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT
1D1 Don: Don't list CopyBooks, Do list 'CobMaps'
1D1 Don: Don't list the COBOL programs

2E1 Executed: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT
2F1 Executed: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT
2E2 Executing: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM
2F1 Executing: 2F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC
2G1 Executing: 2G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM

2C3 Filename: xcobfile2 - cross-ref programs using each filename
1B1 Filenames: Inventory - 4-up Lists of Filenames & Line Counts

2X1 Generate: xrefall - script to generate cross-refs
3X2 Generate: jobflow5A script to generate All JobFlow reports

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

2C4 Include: xcobsql2 crossref all Programs using any 1 SQL Include
2C4 Includes: xcobsql1 list all SQL Includes in any 1 Program
2B2 Instrns.: Op. Instrns. - Cross-Ref 1 at a time
2B1 Instructions: Operating Instructions for ALL Cross-Refs reports
1B1 Inventory: Inventory - 4-up Lists of Filenames & Line Counts

3B3 Jo: Creating a JobFlow report for 1 job at a time
3B1 Job-flow: Using the Job-Flow reports
3B1 Jobflow: JobFlow Reports
3B2 Jobflow: JobFlow sample report
3B3 Jobflow: Creating a JobFlow report for 1 job at a time
3B3 Jobflow: JobFlow Sample Report
3X2 Jobflow: jobflow5A script to generate All JobFlow reports
3X2 Jobflow5a: jobflow5A script to generate All JobFlow reports

5C1 Korn: statksh1 - Korn shell stat report samples
2D1 Ksh: xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT
2D2 Ksh: xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE
2E1 Ksh: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT
2E2 Ksh: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM
2F1 Ksh: 2F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC
2F1 Ksh: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT
2G1 Ksh: 2G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM
2G1 Ksh: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT

1A2 Laser: 'uvlp__' scripts for Laser printers
1B1 Line: Inventory - 4-up Lists of Filenames & Line Counts
1C1 List: List JCLs Before & After Conversion
1D1 List: Don't list CopyBooks, Do list 'CobMaps'
1D1 List: Don't list CopyBooks, Do list 'CobMaps'
1D1 List: Don't list the COBOL programs
2C1 List: xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM
2C2 List: xcobcall1 - list of all Called-Programs in each Program
2C4 List: xcobsql1 list all SQL Includes in any 1 Program
2D1 List: xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT
2E1 List: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT
2F1 List: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT
2G1 List: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT
2X2 List: xcobcopy1 - list all copybooks in any 1 program
1C1 Listall: - sample output
1B1 Lists: Inventory - 4-up Lists of Filenames & Line Counts

5B1 Mainframe: statmvsjcl1 - mainframe JCL stat report samples
1D1 Maps: cobmap sample - maps/custmas
2H1 Mvs: mvsfiles5A - data file trace in MVS JCL
2H1 Mvsfiles3: xmvs/mvsfiles3 sample data file trace
2H1 Mvsfiles5a: mvsfiles5A - data file trace in MVS JCL

2B2 Op.: Op. Instrns. - Cross-Ref 1 at a time
2B1 Operating: Operating Instructions for ALL Cross-Refs reports
1A1 Overview: Overview/Summary

2G1 Parm: 2G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM
2G1 Parms: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT
2X0 Part: scripts used in Part 2
2X0 Part: uvcopy jobs used in Part 2
3X0 Part: scripts used in Part 3
3X0 Part: uvcopy jobs used in Part 3
1A2 Printers: 'uvlp__' scripts for Laser printers
2F1 Proc: 2F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC
2F1 Procs: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT
2C1 Program: xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM
2C2 Program: xcobcall1 - list of all Called-Programs in each Program
2C4 Program: xcobsql1 list all SQL Includes in any 1 Program
2E2 Program: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM
2X2 Program: xcobcopy1 - list all copybooks in any 1 program
1D1 Programs: Don't list the COBOL programs
2C1 Programs: xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK
2C2 Programs: xcobcall2 - crossref all Programs calling any 1 Called-Program
2C3 Programs: xcobfile2 - cross-ref programs using each filename
2C4 Programs: xcobsql2 crossref all Programs using any 1 SQL Include
2E1 Programs: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

2G1 Referenced: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT
2A1 References: Cross References for COBOL & JCL/scripts
1A1 Ring: Three Ring Binders with Index Tabs
5D1 Run: script 'statallmvsjcl' to run all jobs above
5D1 Running: jobs to create stat reports

1B1 Sample: spreadA sample reports
1C1 Sample: listall - sample output
1D1 Sample: cobmap sample - maps/custmas
2B2 Sample: report
2C1 Sample: COBOL Cross-Ref Sample Reports
2H1 Sample: xmvs/mvsfiles3 sample data file trace
3A2 Sample: COBOL Files report - sample
3B2 Sample: JobFlow sample report
3B3 Sample: JobFlow Sample Report
5A1 Samples: statcbl1 - COBOL stat report samples
5B1 Samples: statmvsjcl1 - mainframe JCL stat report samples
5C1 Samples: statksh1 - Korn shell stat report samples
5C1 Shell: statksh1 - Korn shell stat report samples
1B1 Spreada: spreadA sample reports
2C4 Sql: xcobsql1 list all SQL Includes in any 1 Program
2C4 Sql: xcobsql2 crossref all Programs using any 1 SQL Include
5A1 Stat: statcbl1 - COBOL stat report samples
5B1 Stat: statmvsjcl1 - mainframe JCL stat report samples
5C1 Stat: statksh1 - Korn shell stat report samples
5D1 Stat: running jobs to create stat reports
5X1 Stat: statallmvs1 script to create all stat reports
5X1 Statallmvs1: script to create all stat reports
5D1 Statallmvsjcl: script 'statallmvsjcl' to run all jobs above
5A1 Statcbl1: - COBOL stat report samples
5C1 Statksh1: - Korn shell stat report samples
5B1 Statmvsjcl1: - mainframe JCL stat report samples
1A1 Summary: Overview/Summary
2G1 Sysin: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT

1A1 Tabs: Three Ring Binders with Index Tabs
1A1 Three: Three Ring Binders with Index Tabs
2H1 Trace: mvsfiles5A - data file trace in MVS JCL
2H1 Trace: xmvs/mvsfiles3 sample data file trace

2X0 Uvcopy: jobs used in Part 2
3X0 Uvcopy: jobs used in Part 3
1A2 Uvlp12: & uvlpd12
1A2 Uvlp__: 'uvlp__' scripts for Laser printers
1A2 Uvlpd12: uvlp12 & uvlpd12

2C2 Xcobcall1: - list of all Called-Programs in each Program
2C2 Xcobcall2: - crossref all Programs calling any 1 Called-Program
2C1 Xcobcopy1: - list all COPYBOOKS in any 1 PROGRAM
2X2 Xcobcopy1: - list all copybooks in any 1 program
2C1 Xcobcopy2: - crossref all PROGRAMS using any 1 COPYBOOK
2C3 Xcobfile2: - cross-ref programs using each filename
2C4 Xcobsql1: list all SQL Includes in any 1 Program
2C4 Xcobsql2: crossref all Programs using any 1 SQL Include
2D1 Xkshfile1: - list all DATAFILES used in any 1 ksh SCRIPT
2D2 Xkshfile2: - crossref all ksh SCRIPTs using any 1 DATAFILE
2G1 Xkshparm1: - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT
2G1 Xkshparm2: 2G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM
2F1 Xkshproc1: - list all PROCs executed in any 1 ksh SCRIPT
2F1 Xkshproc2: 2F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC
2E1 Xkshprog1: - list all PROGRAMs executed in any 1 ksh SCRIPT
2E2 Xkshprog2: - crossref all ksh SCRIPTS executing any 1 PROGRAM
2H1 Xmvs: xmvs/mvsfiles3 sample data file trace
2X1 Xrefall: - script to generate cross-refs

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

Goto:   Begin this doc End this doc Index this doc Contents this library UVSI Home-Page

Visitor Counters for ThisYear and LastYear