JCL Conversion - Related Documents

JCLcnv1demo.htm - DEMO conversions, sample JCL, scripts, executions *THIS DOC* JCLcnv2real.htm - comprehensive instructions for REAL conversions JCLcnv3aids.htm - conversion AIDS (cross-refs,tips,mass changes,etc) JCLcnv4gdg.htm - GDG file handler from UV Software DATAcnv1.htm - Data file conversion - Original Documentation DATAcnv2.htm - Data File Conversion - Comprehensive & Complete

JCLcnv1demo - Contents by Part


Part_0 Overview of the Conversion & Testing plans & procedures.

Part_1 Install Vancouver Utilities - brief review
- should already be installed following instructions in install.htm.
- setting up profiles for appsadm, programmers,& operators
- using 'stub' profiles in home dirs, calling a common profile
- a 'common_profile' makes site administration much easier
- 'stub_profile's (renamed as .profile or .bash_profile) in each user's
  homedir allows them to code their preferences
- setup 'appsadm' (applications administrator) homedir /home/appsadm
  to hold profiles modified for site, site specific scripts,crontabs,etc
- Preparations for UV Software Onsite Training & Conversion Assistance
- Directory & File-Design for JCL conversions
- RUNLIBS & RUNDATA environmental variables in profiles of prgmrs&oprtrs
  allow multiple sets of Libraries & Data, with no changes in JCL/scripts
- RUNLIBS/RUNDATA defined as testlibs/testdata OR prodlibs/proddata

Part_2 Sample JCL/scripts listings for test/demos
- original mainframe JCL + converted Korn shell script equivalents
  (JAR100.jcl,JAR120,JAR200,JGL100,JGL200,JGL300,JGL320,FTPPUT1,MAILSMTP,
  QJTLIST,EZTLIST,ICETOOL3)

Part_3 Converting the VU supplied demo JCL,PROCs,PARMs,COBOL,copybooks
- Directories for JCL conversions & testing
- setup userid userxx with superdirs testlibs & testdata
  or setup testlibs & testdata in your homedir (we will use 'userxx')
- script 'mvslibsdirs' sets up subdirs within testlibs
- script 'mvsdatadirs' sets up subdirs within testdata
- script 'copymvsctls' copies control files from uvadm
- copy demo JCL/PROCs/Parms/Includes to testlibs/jcl0,proc0,parm0,include0
- copy demo COBOL programs/copybooks to testlibs/cbl0,cpy0
- copy demo datafiles from uvadm to testdata/data1
- script 'cnvMF51Acpy' performs all steps of COBOL copybook conversion
- script 'cnvMF51A' performs all steps of COBOL program conversion
- script 'mfcbl5A' compiles all COBOL programs
- script 'jcl2ksh51A' performs all steps of JCL/PROCs/Parms conversion

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

JCLcnv1demo - Contents (continued)


Part_4 Execute converted JCL/scripts
- review testlibs & testdata sub-directories
Data-Files provided for Test/Demos
- ar.customer.master & ar.sales.items
- gl.account.master_000001 & gl.account.trans_000001
Job-Logging & Console-Logging
 Execute jar100.ksh to demo job-logging
 Execute all demo JCL/scripts & show joblogs
- jar100.ksh,jar200,jgl100,jgl200,jgl300,jgl320,ftpput1,mailsmtp,
- qjtlist.ksh,eztlist.ksh,icetool.ksh

Part_5 Test/Debug Tips & Techniques
 Test Environment, RUNLIBS & RUNDATA superdirs defined in your profile
- allows different programmers to have their own set of Libraries & Data
 JCL converted to scripts in Part_3, executed in Part_4, now tested in Part_5
 Use these tips for the Demo JCL/scripts or for your own JCL/scripts
 Converting Your files - brief review of DATAcnv1.htm.
 run 'testdatainit' before JCL/scripts
- to clear output files & make it easier to see outputs of current test
- use 'joblog' to capture the log from your JCL/script
 Test/Debug for difficult JCL/scripts
- save all data1/* in datasave/ & load data1/ with files for difficult job
 Iterations of test/investigate/modify as required
- Animator/Debugger for Micro Focus COBOL
 Check results of test/debug, investigate output files (use uvhd if packed)
Print-outs using 'uvlp' scripts assist test/debug
 Modifying no of gnerations in GDG control file & reloading Indexed file
 GDG files & step Restart
 Activating 'console-logging' vs 'job-logging'
 File Comparison for files with packed/binary &/or no LineFeeds
- unix 'diff' does not work for these types of files
- UV Software provides the 'uvcmp' utilities
- uvcopy jobs uvcmp1,2,3 & several scripts uvcmpFA1,uvcmpFE1,etc
  to make the uvcopy jobs easier to run.
- uvcmp prints mismatched record pairs in vertical hexadecimal
  flagging differences with '*'s, see sample report comparing
  2 generations of gl.account.master_000001 & _000002

Part_6 3rd party software conversions
Directories for 3rd party Conversions
QuikJob - Computer Associates mainframe utility
- sample conversion to uvcopy utility
Easytrieve - Computer Associates mainframe utility
- sample conversion to uvcopy utility
Teradata - converting mainframe Teradata to unix/linux

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

Part_0. MVS JCL test/demo conversions

Overview of Conversion & Testing plans

This document is intended for JCL conversion team members, who have completed the Vancouver Utilities training course, and are ready to start converting & testing JCL/scripts. We assume the following:

  1. UV Software (probably Owen Townsend) is onsite & has completed the Vancouver Utilities training course.

  2. All students have a login on the Unix/Linux system, and are ready to do some test/demo/training conversions/executions in their homedirs ($HOME/testlibs & $HOME/testdata) We will use 'userxx' to indicate your homedir.

  3. Setup test login 'mvstest' (or use your homedir, indicated by 'userxx') to convert/execute a sample set of JCL's selected from the UV Software supplied demo JCL (in /home/uvadm/mvstest/testlibs/jcl0/). Converting & executing these supplied samples will help you get familiar with these conversion procedures & you can compare your results to those listed in Part_3.

  4. Convert/execute a sample set of a few JCL's selected from YOUR mainframe JCLs/PROCs/Parms. Transfer from the mainframe to /home/mvstest/testlibs/ jcl0,proc0,parm0,include0. These samples could be used for a 'POC' (Proof Of Concept).

  5. Use '/home/mvstest/testlibs' if the POC team is working together. Could use $HOME/testlibs if team members want to work independently for initial self-training & to get familiar with the conversion & testing procedures.

  6. For the later real JCL conversion (following initial training & POC), you should setup common testlibs & testdata. These should not be in the homedirs since large sites would exceed storage available in homedirs. For example these might be /p1/apps/testlibs & /p2/apps/testdata. '/p1' & '/p2' are separate file systems with lots of capacity, especially /p2 for the data files which can be very large at many sites.

  7. Note that for the later real conversion, it is important that all programmers work on the 1 common set of testlibs/JCL & not in their homedirs (unless possibly each programmer works on a different system).

  8. During testing, it is probably best if each programmer can have his own set of testdata, so his test files are not modified by other programmers running their tests.

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

Overview of Conversion & Testing (continued)

  1. Note that this flexibility of using different sets of testlibs & testdata is achieved by defining environmental variables RUNLIBS & RUNDATA in the profiles of the various programmers, for example:

      export RUNLIBS=$HOME/testlibs
      export RUNDATA=$HOME/testdata
                       --- or ---
      export RUNLIBS=/home/userxx/testlibs
      export RUNDATA=/home/userxx/testdata
                       --- or ---
      export RUNLIBS=/p1/apps/testlibs
      export RUNDATA=/p2/apps/testdata
  1. For later production, we will copy JCL/script libraries & data files to the production machine & change the names of testlibs & testdata to 'prodlibs' & 'proddata'. We will then change the definitions of RUNLIBS/RUNDATA in operator profiles & appsadm profile for cron jobs to:

      export RUNLIBS=/p1/apps/prodlibs
      export RUNDATA=/p2/apps/proddata
  1. Using $RUNLIBS & $RUNDATA in profiles & in function jobset51 (called on line 10 of all converted JCL/scripts) mean that you never have to modify the JCL/scripts when used by different programmers or between test & production environments.

  2. We assume All JCL/PROCs/Parms/Includes (& COBOL programs & copybooks) have been transferred to unix/linux & stored somewhere accessible to team members (might be /home/mvstest/testlibsALL/jcl0,proc0,parm0,include0). If very large, team members might copy subsets/subsystems to /home/mvstest/testlibs/jcl0,proc0,parm0,include0 or to their homedirs $HOME/testlibs/jcl0,proc0,parm0,include0.

  3. We assume enough DATA has been transferred to test a few JCLs selected for the initial training exercise or POC. The DATA files might be stored in /home/mvstest/testdata/data1/... or $HOME/testdata/data. If data files are very large they should not be in homedirs, but rather in a separate file system (such as /p2/apps/testdata/data).

  4. Note that initial JCL/script testing will probably discover problems in the JCL conversion (unique to the site), that can be corrected. Then we can re-convert all JCL to greatly reduce any manual changes that might be required in the vast majority of JCL/scripts yet to be tested.

  5. Conversion Team members can make a valuable contribution by discovering conversion problems & suggesting conversion enhancements to UV Software.

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

Overview of Conversion & Testing (continued)

  1. Team-members can continue to have their own set of testdata in their homedir/testdata/... to avoid conflicts while testing. Note that the data superdir is defined by environmental-variable 'RUNDATA' in .profile.


      export RUNDATA=$HOME/testdata          <-- for individual training/testing
      =============================
      export RUNDATA=/home/mvstest/testdata  <-- for later serious testing
      =====================================
  1. You should have a clear understanding of the JCL conversion subdirs.

 jcl0 ----> jcl1 -------> jcl2 ----------> jcl3 ---------> jcls
    cleanup   PROC expand   convert to ksh   copy 1 at a time
                                             before test/debug
  1. We convert all JCL automatically from original mainframe JCL in jcl0/... thru to jcl3/... Team members should copy JCL/scripts 1 at a time manually from jcl3/ to jcls/ just before ready to test/debug each JCL/script.

  2. This allows us to automatically reconvert the vast majority of the JCL as team members discover problems & suggest improvements that can be made to the JCL converter, without losing any extensive editing made to the JCL/scripts in jcls/...

  3. Note that converted scripts are executed from jcls/... which is in the PATH defined in the profiles, for example:


      export PATH=$PATH:$RUNLIBS/jcls
      ===============================
  1. Using $RUNLIBS makes it easy to change our execution library from homedirs to a common library, as explained above without ever having to modify JCL/scripts for different directories (or production vs test).

Note
  • Please re-read & understand this part 0 overview/plan before proceeding
    to the detailed operating instructions covered in the following parts.

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

related links

This JCLcnv1demo.htm will present the step by step operating instructions to convert & test your JCL/scripts. There are several other documents that give more examples & explanations that you may need to consult.


MVSCOBOL.htm - mainframe COBOL conversions to Micro Focus COBOL on unix

DATAcnv1.htm - Basic DATA conversion with samples & explanations
- conversion jobs generated from COBOL copybooks
- simpler procedures for 1 file at a time

install.htm - installation guide for Vancouver Utilities software package

ADMjobs.htm - Administration guide for Vancouver Utilities
- setting up users intending to use Vancouver Utilities
- profiles required (common profile for easier admin)
- setup 'appsadm' for application logging, cron scheduling, etc
- backups, console logging, unix tools

CNVaids.htm - Conversion Aids for mainframe applications on unix systems
- many handy scripts to make life easier on unix systems
- data file maintenance utilities for unix systems
- JCL & COBOL cross-references

uvsort.htm - Vancouver Utility replacement for mainframe SORT or SYNCSORT
- unix system sort can NOT sort mainframe type files that
  do not have LineFeeds, can NOT sort on packed fields, etc

uvcp.htm - Vancouver Utility replacement for IDCAMS, IEBGENER, etc
- JCL converter converts IDCAMS,IEBGENER,etc to 'uvcp'
- can select/delete records, reformat records, etc

uvcopy.htm - most powerful Vancouver Utility
- replace complex mainframe utilities (EASYTRIEVE,QUIKJOB,etc)

uvhd.htm - interactive data file investigation utiltiy
- displays records in 'vertical hexadecimal'
- great for mainframe type files with packed/binary data
- browse,search,update,select,print,etc
- most customer's favorite utility

uvhdcob.htm - similar to uvhd, and also shows COBOL copybook fieldnames
beside data field contents

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

Part_1. MVS JCL test/demo conversions

Part 1 - Directories & Profiles for conversion


1A1. Install Vancouver Utilities - brief review
(should already be installed following instructions in install.htm).
1A3. 'uvadm' homedir contents

1B1. profiles provided in /home/uvadm/env
- to be copied & modified in /home/appsadm/env
1B2.  profiles are vital to Unix/Linux & mainframe conversions
- split to 2 components for greater flexibility & reduced maintenance
  (stub_profile & common_profile)

1B3. RUNLIBS & RUNDATA determine PATHs to programs & DATA
- many advantages, scripts are portable
- can have multiple sets of Libraries & DATA on same machine

1C0. profile summary
1C1.  'stub_profile' - modify & copy to user homedirs
- rename as .bash_profile for bash, .profile for ksh
- defines RUNLIBS as testlibs for programmers OR prodlibs for operators
- defines RUNDATA as testdata for programmers OR proddata for operators
1C2.  'common_profile' - called by 'stub_profile'
- defines search PATHs to libraries & data based on $RUNLIBS & $RUNDATA
'bashrc' - modify & copy to user homedirs (listing at ADMjobs.htm#1C3)
- rename as .bashrc (for bash), or .kshrc (for ksh)
- required for console logging to preserve aliases & umask

1C4. Recommended permissions for directories & files that must be shared
 by groups of programmers & opperators (as in mainframe conversions).
- 775 for directories, 664 for files, 002 umask in profiles
- programmers & operators in a common group (suggest 'apps')
- extending security to the group level

1D1. appsadm - Applications Administrator
- subdirs in appsadm homedir
- appsadm vs uvadm
1D2.  Setup 'appsadm' userid
1D3.  Setup 'appsadm' subdirs
- modify common_profile
1D4.  modify stub_profile_appsadm
1D5.  additional optional changes to stub profiles
 create _test & _prod versions of stub_profile
1D6.  Modify RUNLIBS & RUNDATA in _test & _prod stubs
1D8.  Setup user logins
 copy 'stub' profiles to homedirs
 copy .bashrc to homedirs

1E1. Directory & File-Design - Principles
1E2. RUNLIBS, RUNDATA,& CNVDATA - Concepts
1F1. directories for RUNLIBS & RUNDATA
RUNLIBS/RUNDATA = testlibs/testdata OR prodlibs/proddata

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

1A1. ADMjobs.doc - Applications Administration for Unix/Linux

Install Vancouver Utilities - short version

The Vancouver Utilities should already have been installed frollowing the instructions in install.htm, but here is a much shortened version assuming Linux (see install guide for other unix O/S's).

setup uvadm Vancouver Utilities admin account


 #1. login as 'root'

 #2. groupadd apps        <-- setup group 'apps', if not already setup
     =============          - OR use whatever groupID you wish
                            - BUT see notes below in '-g apps' paragraph

 #3a. useradd -m -g apps -s /bin/bash uvadm   <-- setup user 'uvadm'
      =====================================
 #3b. passwd uvadm        <-- setup password desired
      ============
 #3c. chmod 755 /home/uvadm  <-- allow other users to copy files from uvadm/...
      =====================    - required for many Vancouver Utility procedures
Note
  • also setup 'appsadm' required to store parts of Vancouver Utilities
  • that may be customized (avoid loss when new version uvadm installed)
  • profiles, functions, control files (env/... sfun/... ctl/...)
  • see appsadm setup & copy from uvadm on pages '1D1' - 1D3

 #4a. useradd -m -g apps -s /bin/bash appsadm   <-- setup user 'appsadm'
      =======================================
 #4b. passwd appsadm      <-- setup password desired
      ==============
 #4c. chmod 755 /home/appsadm <-- allow other users to copy files from appsadm/...
      =======================   - required for many Vancouver Utility procedures

 #5. exit (logout from root)

Download/Install Vancouver Utilities

This assumes UV Software has supplied you with a userid/password to download 'uvadm.zip' from the UV Software web site.


 #1, Login as 'uvadm' --> /home/uvadm

 #2. sftp uvsoft2@uvsoftware.ca  <-- Secure FTP userid 'uvsoft2'
     ==========================
 #2a. passwd --> xxxxxxx
 #2b. get uvadm.zip
 #2e. bye

 #3. unzip uvadm.zip
     ===============

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

1A2. Install Vancouver Utilities - short version

setup profile for uvadm


 #4. cp env/stub_profile .bash_profile  <-- copy rename for bash shell
     =================================

 #5. vi .bash_profile       <-- modify profile now or later ?
     ================         - see optional changes at '1D4'

 #5b. vi common_profile_uv  <-- modify common profile now or later ?
      ====================    - see optional changes at '1D4'

 #6. exit   <-- logout & back in to make new profile effective
     ====

 #7. Login uvadm --> /home/uvadm

After unzip, the stub_profiles & common profiles are available in /home/uvadm/env/ and you can copy the stub_profile over .bash_profile.

See profiles listed begining on page '1C0'. Note that the stub_profile (must be renamed as .bash_profile in homedir) calls the 'common_profile' from /home/uvadm/env/common_profile. A common_profile greatly reduces system admininstration since PATH's etc can be defined in 1 place for use by all users.

Only uvadm will call the common_profile from /home/uvadm. We will soon setup the 'appsadm' user & copy /home/uvadm/env/... to /home/appsadm. All other stub_profiles call the common_profile from /home/appsadm/env/common_profile. This allows you to install new versions of uvadm without disrupting the common_profile called by other users - Important since the common_profile usually is modified considerably depending on site requirements.

Note that the common_profile supplied is named 'common_profile_uv'. When you copy to /home/appsadm/env/.. (to be called by your .profiles) you should rename with a suffix for your company. For example if your company is the ABC Corp, call it 'common_profile_ABC'.

compiling Vancouver Utility C Programs


 #8. ccuvall LNX H64 uvlib64.a disamLNX64.a
     ======================================
     - compile Vancouver Utilities on Linux Intel 64 bit machine

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

1A3. MVS JCL test/demo conversions

uvadm - Vancouver Utility home directory

 /home/uvadm
 :-----bin             <-- binaries (uvcopy,uvsort,etc) distros are RedHat Linux
 :-----ctl               - control files for various purposes
 :-----dat1              - test data files
 :-----doc               - Vancouver Utilities documentation (text)
 :-----dochtml           - documentation in HTML (same as on www.uvsoftware.ca)
 :-----env          <----- profiles for Unix/Linux users & administrators
 :-----hdr               - hdr files for C compiles
 :-----htmlcode          - merged into dochtml when text converted to HTML
 :-----lib               - libraries for C compiles (subfunctions,DISAM,etc)
 :-----mvstest         <-- test/demos for MVS JCL/COBOL mainframe conversions
 :     :-----...         - many subdirs omitted, see page '3B2'
 :-----pf              <-- Parameter Files for uvcopy & uvqrpg
 :     :-----adm         - administrative jobs
 :     :-----demo        - demo jobs
 :     :-----IBM         - IBM mainframe conversion jobs
 :     :-----util        - utility jobs
 :-----sf              <-- Script Files
 :     :-----adm         - administrative scripts
 :     :-----demo        - demo scripts
 :     :-----IBM         - IBM mainframe conversion scripts
 :     :-----util        - utility scripts
 :-----sfun              - ksh functions used in converted JCL/scripts
 :                       - jobset51,jobend51,exportgen0,exportgen1,logmsg1,etc
 :-----src             <-- Vancouver Utilities C source code
 :-----srcf              - C source for various sub-functions
 :-----tf                - test files for various examples in doc
 :-----tmp               - tmp subdir (test/demo outputs)
 :-----vsetest         <-- test/demos for VSE JCL/COBOL mainframe conversions
 :     :-----...         - many subdirs omitted, see VSEJCL.htm

The profiles (listed on the following pages) are intended to be used with uvadm, appsadm, mvstest,& vsetest. You will need only minor changes to use for your programmers & operators.

The /home/uvadm sub-directories are illustrated here to clarify the procedures required should you find reasons to modify any of the Vancouver Utility scripts or uvcopy jobs or programs at your site.

Note that the uvadm subdirs for 'sf' (script files) & 'pf' (uvcopy parameter files) (or uvcopy jobs) are further sub-directoried as shown above, but there is no need for you to subdirectory sf & pf in appsadm or your homedir.

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

1B1. MVS JCL test/demo conversions

'profiles' provided in /home/uvadm/env

 /home/uvadm/env         <-- profiles provided here
 :-----stub_profile_uv     - copy/rename to .profile (ksh) or .bash_profile (bash)
 :                         - defines RUNLIBS/RUNDATA for programmers & operators
 :-----common_profile_uv <-- common profile (called by stub_profile)
 :                         - defines PATH's etc using $RUNLIBS/$RUNDATA
 /home/appsadm/env       <-- setup user 'appsadm' & copy from /home/uvadm/env/*
 :-----stub_profile_ABC    - customize & copy to homedirs .profile or .bash_profile
 :-----common_profile_ABC  - common profile (called by stub_profile)

Mainframe conversion sites should setup an application administrator userid 'appsadm', copy /home/uvadm/env/* to /home/appsadm/env,& customize profiles there depending on the locations of their libraries & data.

Do NOT customize profiles in /home/uvadm/env/... because they would be overwritten when a new version of Vancouver Utilities is installed.

We recommend the concept of 'stub' & 'common' profiles. The shell profile in each user's homedir is a 'stub' that calls 'common_profile' which are stored in /home/appsadm/env/...

  1. The supplied 'stub_profile' is copied to homedirs, renamed as '.bash_profile' for bash shell (Linux) & '.profile' for Korn shell (Unix), and then modified depending on whether the user is a programmer or operator. - defines RUNLIBS as testlibs for programmers OR prodlibs for operators - defines RUNDATA as testdata for programmers OR proddata for operators

  2. 'common_profile' then defines the 'PATH's using $RUNLIBS,$COBDIR,$UV,etc For example: export PATH=$PATH:$RUNLIBS/jcls (converted JCL/scripts). Defines software superdirs (uvadm, COBDIR, ORACLE_BASE, ORACLE_HOME, etc)

  3. '$RUNDATA' determines data-file locations indirectly as follows: $RUNDATA defines the superdir housing all data-files. All JCL/scripts call a common function 'jobset51' which changes directory to $RUNDATA (cd $RUNDATA). The JCL converter inserts jobset51 at the begining of all converted JCL/scripts and then addresses all data files relative to $RUNDATA.

Note that stub profiles must call 'common_profile' using '.' (dot execution), which means the 'export's made in the common_profile will still be effective on return to the users profile.

This system is a big advantage for any site with multiple users, it means the sysadmin can update common_profile once in 1 place & those changes are effective for all users.

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

1B2. MVS JCL test/demo conversions

Profiles are vital for Unix/Linux

Profiles are vital to the success of any Unix/Linux site and especially for sites converting from a mainframe. You can not find much practical advice on 'how to setup user profiles' in books or on the internet, so here are my methods which have been proven successful at over 50 conversion sites.

UV Software supplies the recommended profiles with the Vancouver Utilities, or you can save them from https://www.uvsoftware.ca/admjobs.htm#1C1 thru 1C6. BUT, before you try to use them, it is important to understand the concepts. I assume the reader has some basic understanding of profile functions.

The most important profile function is to define search 'PATH's to scripts, programs,& (indirectly) to data-files. Some other functions are to define aliases, terminal types,& to capture console logs.

Without direction, an inexperienced unix programmer would probably define everything (PATHs,aliases,etc) in the profile in his home directory. Then the 1st programmer's profile might be copied to the homedirs of other programmers working on the same system.

You can see a big problem developing - when they need to change search PATHs, etc, they would have to update the multiple profiles in the homedirs of all programmers & operators.

Here is a better system to overcome the problem described above, and to provide many other benefits described further below. The solution is to split the profile in 2 parts (stub_profile & common_profile).

stub_profile

common_profile

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

1B3. profiles for Vancouver Utilities on Unix/Linux

Advantages of $RUNLIBS/$RUNDATA defined in profiles

  1. You never need to change scripts between TESTING & PRODUCTION.

  2. Programmers can execute scripts/programs from $TESTLIBS/scripts/... that access data from $TESTDATA/data/... because their profiles define RUNLIBS/RUNDATA as TESTLIBS/TESTDATA.

  3. Operators & schedulers execute scripts/programs from $PRODLIBS/scripts that access data from $PRODDATA/data/... because their profiles define RUNLIBS/RUNDATA as PRODLIBS/PRODDATA.

  4. This system could allow testing & production on the same machine. They are usually on separate machines, but this system provides great flexibility

  5. Different programmers can have their own set of TESTDATA simply by changing the definition of RUNDATA in their profile.

  6. On production machines, operators & schedulrers could operate on different sets of data for different companies on the same machine, using the same scripts & programs with no changes required.

  7. The system administrator (appsadm) can make changes in 1 place to affect all users vs having to update profiles in all user homedirs.

  8. The sysadmin would control any updates to common_profile. On test systems the programmers would control updates to their stub_profile.

  9. Programmers have the flexibility required. They can select different sets of testdata by redefining RUNDATA in their profile

  10. GDG files provided by functions exportgen0 to get the current generation for reading & exportgen1 to determine the next generation for writing.

  11. Run JCL/scripts with the 'joblog' script to capture console logs, for example: --> joblog jobname <-- captures the log into $RUNDATA/joblog/jobname.log

  12. You can run scripts from anywhere, because 'jobset51' (function at begining of JCL/scripts) changes directory to $RUNDATA (the superdir for subdirs of data, joblogs, jobmsgs, jobtimes, sysouts).

  13. Restart at any step, to restart at step2, run the job as follows: --> joblog jobname STEP=S0020 <--

  14. KEYWORDS=VALUES on the command line are automatically available as $KEYWORD anywhere in your scripts, for example: --> joblog jobname DATE=20200512 <-- makes $DATE available in the script

  15. Critical messages (job start,step start,job end Normal/ABnormal,errmsgs) are date/time stamped & captured by the 'logmsg2' function into --> $RUNDATA/jobmsgs/yyyymmdd/yyyymmdd_jobname <--

  16. The 'testcc' function tests the status of each step with 1 line of code. Failure will display the status code & error messages & abort the job. 'testcc' failure ensures that any new generation GDG files are not committed.

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

1C0. profiles for Vancouver Utilities on Unix/Linux

Profile Summary


1C1. stub_profile - distributed in /home/uvadm/env/...
- copy (to user homedirs) & rename depending on the desired shell
  (.bash_profile for bash, .profile for ksh)
- modify RUNLIBS/RUNDATA differently for programmers or operators
- calls common_profile

1C2. common_profile - distributed in /home/uvadm/env/common_profile_uv
- you will copy/rename to /home/appsadm/env/common_profile_XXX
  (assigning a suffix for your company name, we will use _ABC)
- defines search PATHs to libraries & data based on $RUNLIBS & $RUNDATA
  defined in the stub_profiles of programmers & operators
  (see suggested directory designs in ADMjobs.doc Part 3)
- allows updates in 1 place to affect all users
- modify TERM & 'stty erase' character depending on most common terminal
  (distribution has TERM=linux & stty erase '^?')
 ADMjobs.htm#1C3 -  bashrc 'rc file' distributed in /home/uvadm/env/...
      - copy (to user homedirs) & rename depending on the desired shell
        (.bashrc for bash, .kshrc for ksh)
      - master version supplied without the '.' for visibility
      - required if you invoke another shell level (console logging script)
      - carries aliases & umask which get lost on another shell level
      - you should customize & store in /home/appsadm/env/...

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

1C1. profiles for Vancouver Utilities on Unix/Linux

stub_profile (.profile or .bash_profile)

 # bash_profile_uv - bash_profile for Vancouver Utilities
 # .bash_profile <-- must be copied/renamed to '.bash_profile' in your homedir
 #                 - a 'stub_profile' that calls a 'common_profile'
 #                 - by Owen Townsend, update Feb 2020
 #
 # bash/stub_profile_ABC - users should copy/rename their version of stub_profile
 #                         store their master copy in /home/appsadm/env/...
 #                         copy to user homedirs, renaming .profile or .bash_profile
 # common_profile_ABC - copy/rename their common_profile to /home/appsadm/env/...
 #                      called by their stub_profiles from $APPSADM/env/...
 #
 # bash_profile & common_profile - distributed in $UV/env/...
 # - copy to $APPSADM/env/... (/home/appsadm/env/...) & modify for your site
 # - do not modify profiles in $UV because new versions of uvadm would overwrite
 # - see stub/common profile listings at uvsoftware.ca/install.htm#A6 & A7
 #
 #           ** define RUNLIBS/RUNDATA/CNVDATA & call common_profile **
 #
 # stub_profile defines RUNLIBS/RUNDATA for common_profile to define PATHs to LIBS & DATA
 #  - Modify definitions below depending on your situation:
 #  - default is #3. RUNLIBS/RUNDATA/CNVDATA=$HOME/demo
 #  - change to  #1. RUNLIBS=$HOME/testlibs1 RUNDATA=$HOME/testdata1 CNVDATA=$HOME/cnvdata1
 #    for mainframe JCL conversions to Unix/Linux
 #
 # 1. Mainframe JCL/COBOL/DATA Migrations - libs/data in homedir for testing/training
 #    export RUNLIBS=$HOME/testlibs1 RUNDATA=$HOME/testdata1 CNVDATA=$HOME/cnvdata1
 #    =============================================================================
 #
 # 2. Mainframe JCL/COBOL/DATA Migrations - conversion/production, separate file systems
 #    export RUNLIBS=/p1/apps/ABClibs1 RUNDATA=/p2/apps/ABCdata1 CNVDATA=/p3/apps/ABCcnvdata1
 #    ======================================================================================
 #    - better to use larger file systems for production (p1,p2,p3/apps/ABC... vs $HOME)
 #    - appended digit '1' for future possible alternates ...libs2/...data2/...cnvdata2,etc
 #    - could have multi-companies/systems on same machine, example for ABC company
 #    - RUNDATA could be defined differently for different programmers for testing
 #    - see uvsoftware.ca/jclcnv1demo.htm#1B3 RUNLIBS/RUNDATA defines for migrations
 #
 # 3. Vancouver Utilities Demos/Tutorials - libs/data in $HOME/demo (use #1 for JCL conversions)
 export RUNLIBS=$HOME/demo RUNDATA=$HOME/demo CNVDATA=$HOME/demo
 #===============================================================
 #    - may define RUNLIBS/RUNDATA/CNVDATA the same for small projects (not major migrations)
 #    - see uvsoftware.ca/uvdemos.htm#1B5 more about RUNLIBS/RUNDATA stub/common profiles
 #
 # 4. Programmer testing/development projects, Example track US Election candidates
 #    export RUNLIBS=$HOME/demo/election1 RUNDATA=$HOME/demo/election1 CNVDATA=$HOME/demo/election1
 #    =============================================================================================
 #    - 1st demo election1/, then election2/, then election3, See uvsoftware.ca/uvdemos.htm#Part_9
 #

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

 export APPSADM=/home/appsadm #Jan2020 APPSADM def in .profile_bash (for WSL Windows Subsystem on Linux)
 # CALLER=$(cat /proc/$PPID/comm)
 echo "Executing--> .bash_profile (copied/renamed from \$APPSADM/env/bash_profile_uv)"
 echo " - Vancouver Utilities stub_profile in login homedir, will call common_profile"
 echo " - LOGNAME=$LOGNAME HOME=$HOME PWD=$PWD APPSADM=$APPSADM"
 echo "Calling--> . $APPSADM/env/common_profile_uv"
 #
 . /home/appsadm/env/common_profile_uv   # common_profile called from /home/appsadm/env/...
 #====================================   # - NOT from /home/uvadm/env/...
 # - must setup appsadm to store common_profile, so not lost when uvadm updated
 # - see more at www.uvsoftware.ca/install.htm#A4
 echo "HOSTNAME=$HOSTNAME LOGNAME=$LOGNAME APPSADM=$APPSADM UV=$UV"
 echo "RUNLIBS=$RUNLIBS RUNDATA=$RUNDATA"
 #
 #       ** misc items that user may need to override common_profile defs **
 # export TERM=linux       # TERM - modify depending on your terminal
 # stty erase '^?'         # erase char - modify depending on your terminal
 # stty intr '^C'          # interrupt ^C, (probably already default ?)
 # export UVLPDEST="-dlp0" # default destination for uvlp(uvlist) scripts
 #                         # change to a printer near you & un-comment
 #
 #                       ** user aliases, etc **
 # alias l='ls -l'         # save keystrokes on very often used commands
 # - see common_profile for several more aliases
 # - add more here depending on user preferences
 #
 #                     ** TEST or PRODuction **
 # export TESTPROD=P000   # P___ for PRODuction
 export TESTPROD=T000     # T___ for TEST
 # - PRODuction profiles TESTPROD=P*, developer TEST profiles TESTPROD=T*
 # - JCL/scripts can test $TESTPROD to control various differences desired
 # - used to determine if programmer 'T'esting or 'P'roduction
 # - bytes 2,3,4 of P/T___ reserved for future use as required
 #   if [[ "$TESTPROD" == P* ]]  <-- test only 1st byte for Test/Prod
 #   if [[ "$TESTPROD" != T* ]]  <-- assume Production if not Test
 #Note - Test/Prod code relevant only to mainframe migration JCL/scripts sites
 #     - migration sites would move this code up prior to calling common_profile
 #       so common_profile could modify PATH,etc depending on Test/Production
 #

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

 #                   ** Console Logging - optional **
 # - uncomment 9 '##' lines below to activate console logging
 # - must setup subdirs matching $LOGNAME in $LOGDIR/log1/...,log2/...,log3/...
 #   (usually LOGDIR=$APPSADM in common_profile)
 # - subdirs log1,log2,log3 hold logfiles for: current file, month, lastmonth
 # - see details at www.uvsoftware.ca/admjobs.htm#Part_6
 # - console logging for production operators to capture entire logon session
 # - programmers can use the 'joblog1' script to capture log for 1 job at a time
  ## login1 || exit 2          # exit here if 2nd login
  ## if [[ ! -f .bashrc ]]; then
        ## echo "logging requires .bashrc (copy/rename from $AA/env/bashrc)"; read reply; exit 99; fi
  ## logfixA $LOGNAME          # process log1 file to log2 (to allow read/print)
  ## echo "--> logview   <-- execute logview script to see prior console logs"
  ## echo "logging requires .bashrc/.kshrc with PS1='<@$HOST1:$LOGNAME:$PWD >'"
  ## echo "logging requires $LOGNAME subdirs in \$LOGDIR/log1 & log2"
  ## if [[ -d $LOGDIR/log1/$LOGNAME && ( -f .kshrc || -f .bashrc) ]]; then
  ##    echo "script $LOGDIR/log1/$LOGNAME/$(date +%y%m%d_%H%M%S)"
  ##    exec script $LOGDIR/log1/$LOGNAME/$(date +%y%m%d_%H%M%S)
  ## fi
 # 'exec script' must be the last non-comment line in the profile
 # 'script' disables aliases & umask 002 - put in .bashrc/.kshrc to be effective
 # ==============================
 # cp $APPSADM/env/bashrc .bashrc  # copy to your homedir restoring correct name
 # ==============================
 # After uvadm installed at $UV (/home/uvadm or /opt/uvsw/uvadm)
 # - setup appsadm at $APPSADM (/home/appsadm or /opt/uvsw/appsadm)
 # - copy $UV/env/* $APPSADM/env
 # - modify $APPSADM/env/common_profile & stub_profile for your site
 # - copy $APPSADM.env/stub_profile to user .profiles
 # Then all user profiles call common_profile from $APPSADM/env/...
 # to prevent loss of customized common_profile when new version uvadm installed

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

1C2. profiles for Vancouver Utilities on Unix/Linux

common_profile - called by stub_profile

 #*common_profile_uv      - common_profile for UV Software's offline machines
 #                        - complete Vancouver Utilities
 #                        - by Owen Townsend, Oct 2020
 #
 # common_profile_uv_web1 - for uvsoft webfaction sublogins uvsoft01-uvsoft19
 #                        - complete Vancouver Utilities including bin/... & src/...
 # common_profile_uv_web2 - for uvsoft webfaction sublogins uvsoft20-uvsoft29
 #                        - empty bin/... & src/... for uvsoft20-29
 #                        - bin PATH /home/uvsoft00/uvadm/bin/...
 #
 #Note - do not confuse 'common_profile_uv_web1/2' with 'common_profile_uv'
 #     - clients will use 'common_profile_uv" when they install on their machines
 #
 # common_profile_ABC - users should copy/rename their version of common_profile
 #                      & store their version in /home/appsadm/env/...
 #
 # bash_profile_uv  - also copy BASH/STUB profile to $APPSADM/env (/home/appsadm/env)
 #                    for site customizations
 # bash_profile_ABC - might append suffix to identify your customized versions
 #                  - then copy to user homedirs & renamed as .profile or .bash_profile
 #  - bash stub profile defines RUNLIBS/RUNDATA/CNVDATA for common_profile to modify PATHs
 #  - users may define depending on their current project (migrations,testing,development)
 #    export RUNLIBS=$HOME/testlibs RUNDATA=$HOME/testdata CNVDATA=$HOME/cnvdata
 #    export RUNLIBS=$HOME/demo RUNDATA=$HOME/demo CNVDATA=$HOME/demo
 #
 # common_profile & bash_profile - distributed in $UV/env/... (usually /home/uvadm/env)
 # - copy to $APPSADM/env/... (/home/appsadm/env/...) & modify for your site
 # - do not modify profiles in $UV because new versions of uvadm would overwrite
 # - see stub/common profile listings at uvsoftware.ca/install.htm#A6 & A7
 #
 #                  ** begin code for common_profile **
 #
 export UV=/home/uvadm           # UV homedir symbol used below
 # export APPSADM=/home/appsadm  # APPSADM defined in .bash_profile
 export LOGDIR=$APPSADM          # console logging subdirs log1,log2,log3
 export FPATH=$APPSADM/sfun      # Function FPATH here for echo displaays
 # CALLER=$(cat /proc/$PPID/comm)
 echo " "
 echo "Executing--> \$APPSADM/env/common_profile_uv (APPSADM=$APPSADM)"
 echo "LOGNAME=$LOGNAME BASHPID=$BASHPID process=$$"
 echo "HOME=$HOME APPSADM=$APPSADM UV=$UV FPATH=$FPATH"
 #
 # setup PATH for Vancouver Utilities programs & scripts (uvadm & appsadm)
 # - append onto system PATH, using symbols defined above ($UV, $APPSADM, etc)
 export PATH=$PATH:./sf:$HOME/sf:$HOME/bin:$APPSADM/sf:$APPSADM/bin
 export PATH=$PATH:$UV/sf/adm:$UV/sf/demo:$UV/sf/util:$UV/sf/IBM
 export PATH=$PATH:$UV/bin:$UV/help:./bin
 #Note - Search Priority for scripts & programs in subdirs sf/... & bin/...
 #     - #1=current directory, #2=$HOME, #3=$APPSADM, $4=$UV
 #     - #5=$UV/sf subdirectoried to adm,demo,util,IBM
 #
 # setup PATH for JCL/scripts converted from mainframe Vancouver Utils
 # - see www.uvsoftware.ca/jclcnv1demo.htm or www.uvsoftware.ca/vsejcl.htm
 export PATH=$PATH:$RUNLIBS/sf:$RUNLIBS/jcls:$RUNLIBS/jts:$RUNLIBS/db2s/
 #Jun2018 - added user written db2 utility scripts to the PATH
 #        - named as mainframe utilities - dsntiaul,dsnutilb,dsnuproc,etc
 #
 #Note Re 'FPATH' - defined prior to 'echo's above for console display
 # FPATH - defines directory of Korn shell functions (called by VU JCL/scripts)
 #       - jobset51,exportgen0,exportgen1,jobend51,jobabend51,testcc,logmsg,etc
 # export FPATH=$UV/sfun       # functions distributed in /home/uvadm/sfun/...
 # export FPATH=$APPSADM/sfun  # copied to /home/appsadm/sfun/... for customization
 # export FPATH=$RUNLIBS/sfun  # OR to $RUNLIBS for more flexibility if required
 #
 # setup 'PFPATH' for uvcopy & uvqrpg interpreter to find Parameter Files (jobs)
 export PFPATH=./pf,$RUNLIBS/pf,$RUNLIBS/pfs
 export PFPATH=$PFPATH,$HOME/pf,$UV/pf/adm,$UV/pf/demo,$UV/pf/util,$UV/pf/IBM
 # - UV/pf/... follows RUNLIBS,APPSADM,HOME to allow user duplicate names
 # - uvcopy accepts ',' delimiters as well as ':' in case of SFU on Windows
 #
 # define 'GDGCTL' location of gdgctl51I.dat/.idx
 # - see doc at www.uvsoftware.ca/jclcnv4gdg.htm#5G1
 if [[ -z "$GDGCTL" ]]; then export GDGCTL=$RUNDATA/ctl; fi #<-- set default
 # - see GDG control file discussed at www.uvsoftware.ca/jclcnv4gdg.htm#5A2
 #
 # Define CTLMAPDIR for uvhdcob (display COBOL copybook fieldnames beside data fields)
 # - see www.uvsoftware.ca/uvhdcob.htm#Part_5
 # - for uvhdc1 script, $UV/ctl/ctlfile_uvhdc1, $UV/mf/maps/copybooks
 export CTLMAPDIR=$HOME/mf/maps  #<-- uvhdc1 demos /home/uvadm/dat1/... & /home/uvadm/maps/...
 # export CTLMAPDIR=$RUNLIBS/maps #<-- comment out above defaults this for uvhdc2
 export COBMAPDIR=$RUNLIBS/maps  # for uvhdcob (display data with fieldnames)
 export UVHDCOBROP=m45           # uvhdcob display 45 lines
 # export UVHDROP=l64            # uvhd display 64 chars/line - default
 export UVHDROP=l100             # uvhd display 100 chars/line (if screen allows)
 #
 # Indexed file extension controls for Vancouver Utilities
 export ISDATEXT=".dat" # .dat/.idx Indexed files for uvsort,uvcopy,uvcp,etc
 #                      # uvsort,etc expects .dat on data partition of ISAM files
 #                      # COBOL equivalent is 'IDXNAMETYPE=2' in $EXTFH/extfh.cfg
 #                      # ISDATEXT new way to control DISAM .dat extension Apr2010
 export DISAMEXT="dat"  # DISAMEXT old way prior to Apr2010
 #                      # - omit both or set null if you want NO .dat extension
 #
 # printer destinations for VU laser printing scripts
 # - modify UVLPDEST to the network printer closest to you
 export UVLPDEST="-dMS610USB"    # default dest for uvlp(uvlist) scripts
 export UVLPOPTN="-onobanner"    # for unix/linux (SFU does not allow)
 export UVHDPRINT=uvlp16         # script for uvhd 'i' immediate print command
 export UVHDPWIDE=uvlp14L        # script for uvhd 'iprint' Landscape 100 chs/line
 #-----------------------------------------------------------------------------
 #
 #                  ** TERM, erase, interupt, etc **
 stty erase '^?'           # erase char - modify depending on your terminal
 #                         #  '^?' for linux/at386, '^H' for vt100,ansi,xterm
 # stty -icrnl             # ensure CR x'0D' omitted & only LF x'0A' inserted
 # stty intr '^C'          # interrupt ^C, (probably already default ?)
 #
 #                 ** UV Recommended items **
 umask 002                     # permissions 775 dirs, 664 files
 set -o ignoreeof              # disallow logoff via control D (use exit)
 export HOSTNAME               # should already be set
 export HOST=${HOSTNAME%%.*}   # extract 1st segment of $HOSTNAME
 devtty=$(tty)                 # capture terminal (might add to PS1 prompt)
 export tty=${devtty#/dev/}    # remove prefix /dev/
 export PS1='<@$HOST:$LOGNAME:$tty:$PWD> '
 export EDITOR=vi              # for Korn shell history
 export VISUAL=vi              # for Korn shell history
 export HISTSIZE=3000;         # Korn shell history file size
 export TD8=$(date +%Y%m%d)
 export TD6=$(date +%y%m%d)
 export EM=$HOME/em            # convenience for Owen (EMail directory)
 export EMTD6=$HOME/em/$TD6    # convenience for Owen (EMail directory)
 export AA=$APPSADM            # convenience since $APPSADM often used
 export RL=$RUNLIBS            # convenience since $RUNLIBS often used
 export RD=$RUNDATA            # convenience since $RUNDATA often used
 export UVBAK=/home2/uvbak     # convenience for backup scripts & alias
 export QJS=$RUNLIBS/qjs       # uvcopy jobs to replace QIKJOB
 export EZTS=$RUNLIBS/ezts     # uvcopy jobs to replace EASYTRIEVE
 export LOGMSGACK=n            # disable ACK option in logmsg2 in JCL/scripts
 export LC_ALL=C               # disable UTF8 in errmsgs for C compiler
 #                             # sort alpha ABC-Zabc-z vs AaBbCc-Zz
 export SPELLDIR=$APPSADM/admin/spell  # vim spellfiles for all users
 # - see script $UV/sf/adm/updatespellfile
 # - sorts spellfile.adds into $SPELLDIR/en-utf-8.add & overwrites existing
 #
 #                      ** aliases **
 # alias commands to prompt for overwrite (highly recommended)
 # - use option '-f' when you have many files  (rm -f tmp/*, etc)
 alias rm='rm -i'              # confirm removes
 alias mv='mv -i'              # confirm renames
 alias cp='cp -i'              # confirm copy overwrites
 alias l='ls -l'               # save keystrokes
 alias lsd='ls -l $1 | grep ^d'   # list directories only
 alias vi='vim'                # use vim for Linux
 # alias more='less'             # alias to 'less' if preferred
 alias grep='grep -nHd skip'   # ensure filename & line# on matching lines
 alias uname='uname -a'        # ensure -a on uname (All info)
 alias cdl='cd $RUNLIBS'       # quick access to LIBS superdir
 alias cdd='cd $RUNDATA'       # DATA superdir
 alias cdc='cd $CNVDATA'       # data CONVERSION superdir
 alias cdb='cd $UVBAK'         # UV Software backup superdir
 alias cdk='cd $CMPDATA'       # data COMPARISON superdir
 alias cde='cd $EM'            # EMail directory
 alias cdem='cd $EM/$TD6'      # EMail directory for today
 alias mkem='mkdir $EM/$TD6; cd $EM/$TD6; touch ${TD6}a; vi ${TD6}a;'
 alias tree='tree -F'          # append '/' on dirs & '*' on executables
 # aliases - ineffective if console logging activated (in user stub profile)
 #         - ifso, place aliases in .bashrc (or .kshrc, for ksh)
 #-------------------------------------------------------------------------
 # Verify that critical environmental variables have been defined
 # (by stub_profile or this common_profile)
 if [[ "$UV" = "" || "$APPSADM" = "" ]]; then
    echo "UV=$UV or APPSADM=$APPSADM not defined"
    echo "- enter to continue"; read $reply; fi
 if [[ "$RUNLIBS" = "" || "$RUNDATA" = "" ]]; then
    echo "RUNLIBS=$RUNLIBS or RUNDATA=$RUNDATA not defined"
    echo "- enter to continue"; read $reply; fi
 #-------------------------------------------------------------------------
 # keep logins with last 50 logins (mostly for SSH logins on UVSW website)
 test -d .login || mkdir .login  # make directory if not already present
 CLIENT=${SSH_CLIENT%% *}        # get SSH_CLIENT (IP#)
 echo "$LOGNAME $CLIENT $(date +%Y%m%d_%H%M)" >>.login/logins
 tail -n 50 .login/logins >.login/loginstmp
 mv -f .login/loginstmp .login/logins
 #-------------------------------------------------------------------------
 #        ** Micro Focus COBOL 2.2 update2 Eclipse on RHEL 7 June2015 **
 # export COBDIR=/opt/microfocus/VisualCOBOL
 # export JAVA_HOME=/usr/local/java32
 # export PATH=$COBDIR/bin:$JAVA_HOME/bin:$PATH
 # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COBDIR/lib:$JAVA_HOME/lib
 # export COBCPY=$COBDIR/cpylib
 # export CLASSPATH=$COBDIR/lib/mfcobol.jar:$COBDIR/lib/mfcobolrts.jar:$COBDIR/lib/mfsqljvm.jar
 # export COBMODE=64
 # export EXTFH=$UV/ctl/extfh.cfg   # file handler options IDXNAMETYPE=2 FILEMAXSIZE=8
 # export CBLX=$RUNLIBS/cblx    # path for loading COBOL programs
 #                       ** AIX COBOL **
 # set default file type for JCL converter to AIX COBOL
 # - other code at http://www.uvsoftware.ca/admjobs.htm#1C3 or $UV/env/archive/
 # export COBRTOPT=FILESYS=QSAM
 # converted JCL/scripts allow override via cft=XXX, for example:
 # exportfile CUSTMAS data1/ar.custmas.master #cft=QSAM  <-- as generated
 # exportfile CUSTMAS data1/ar.custmas.master cft=STL    <-- uncomment & change type
 #                  ** Microsoft SQL Server **
 # see www.uvsoftware.ca/sqldemo.htm#Part_6
 # export PATH=$PATH:/opt/mssql-tools/bin
 # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/microsoft/msodbcsql/lib64
 # export ODBCSQL="ODBC Driver 13 for SQL Server"
 # export DATABASE=testdb   # $(DATABASE) used in table create & load scripts
 # export ODBCINI=/etc/odbc.ini
 # export ODBCSYSINI=/etc/  #<-- Directory with ODBC config (not File odbcinst.ini)
 #            ** GNU COBOL testing Oct 2019 **
 # export GCHOME=/home/gcobol
 # export GCDIR=/home/gcobol/cob
 #         ** optional for WSL (Windows Subsystem for Linux) **
 #  Example#1 - export WINUSER using wslpath to get windows %USERPROFILE% (in C:\USERS\...)
 ## WINUSER=$(wslpath $(cmd.exe /C "echo %USERPROFILE%"))
 ## export WINUSER=$(echo $WINUSER | tr -d '\r')
 ## echo "WINUSER=$WINUSER"
 # Example#2 - setup variables for Both Windows & Linux using 'WSLENV' (translates path differences)
 ## C:\uvadm> set UVADM=C:\uvadm    <-- set variable in windows
 ##           set WSLENV=UVADM/p    <-- WSLENV sets up variable UVADM for Both Windows & Linux
 #  C:\uvadm> echo %UVADM%          --> shows value "C:\uvadm" as expected
 #  C:\uvadm> wsl                   <-- run WSL (or bash)
 #  /mnt/c/uvadm>                   <-- now running Linux, prompt changed as per common_profile
 #  /mnt/c/uvadm> echo $UVADM       <-- test, see if same variable now shows Linux path
 #  /mnt/c/uvadm> /mnt/c/uvadm      --> proves $UVADM on Linux equivalent of %UVADM% on Windows
 #             ** define directories for uvcopy mailx1 or mutt1 **
 # export MAILDATA=maildata        #<-- input data files
 # export MAILMSGS=mailmsgs        #<-- MSG files created for input to mailx utility
 # export MAILSCRIPTS=mailscripts  #<-- scripts created to execute mailx utility
 #            ** optional software **
 # - Micro Focus COBOL, AIX COBOL, GNU COBOL, COBOL-IT
 # - Microsoft SQL Server Oracle mySQL Morada RPG
 # - WSL (Windows Subsystem for Linux)
 #Note - code removed for seldom used items, Feb 2016
 # - but prior version saved in $UV/env/archive/common_profile_uv_20160215
 # - contains items that may need to be recovered, such as:
 # - Micro Focus COBOL, COBOL-IT, Oracle, MySQL, Morada RPG, SQL Server
 # - see listings at www.uvsoftware.ca/admjobs.htm#1C1 & 1C2,1C3,etc
 #------------------------- end of common_profile ---------------------------

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

1C3. profiles for Vancouver Utilities on Unix/Linux

control-M stub.ini & common.ini

Also see stub.ini & common.ini, which replace the profiles when JCL/scripts scheduled by control-M. Control-M can not use the profiles which setup $RUNDATA & $RUNLIBS for programmers & live operators.

'stub.ini' is called on line 9 of all converted JCL/scripts. Note that 'stub.ini' is changed to 'system.ini' (xwo.ini, xpp.ini, etc) to match the the system to which this JCL/script belongs. Here is a sample line 9 call:


 . $APPSADM/env/xwo.ini
 ======================

The stub.ini's export the RUNDATA & RUNLIBS locations for that system, and call $APPSADM/env/common.ini to setup the PATHs to scripts & DATA.

Note that the line 9 call to 'stub.ini' does not interfere with programmer testing of the same JCL/scripts (no changes required) because programmer profiles export TESTPROD=T (Testing), whereas control-M profile exports TESTPROD=P (Production). stub.ini tests $TESTPROD & does nothing if TESTPROD=T.

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

1C4. profiles for Vancouver Utilities on Unix/Linux

permissions: directories 775 & files 664

The profiles set umask 002, which means the permissions will be 775 for directories & 664 for files, created by users of these profiles with umask 002.

Also be sure to assign a common group-ID (we suggest 'apps') to the programmers & operators who are working on a common set of directories & files (JCL, COBOL,& DATAfiles).

Unix normally defaults umask 022, which means subdirs would be 755 & files 644, which would not allow users to write in directories created by other members of the team.

Making umask 002 (dirs 775 files 664) & ensuring all team members in a common group allows team members to write into a common set of directories for JCL, COBOL,& DATA. We are in effect extending security to the group.

Be sure to copy .bashrc or .kshrc to the homedirs of anybody using console logging. Console-Logging is activated by uncommenting 9 '##' lines at bottom of stub_profile. The 'script' command invokes another level of the shell, which loses aliases & 'umask' set in the common_profile. .bashrc/.kshrc restores these aliases & umask.

permissions vital for nightly cron jobs

Nightly batch jobs could fail due to files with bad permisions or group. Nightly batch jobs are scheduled by a crontab owned by 'appsadm' (see crontabs in ADMjobs.htm#Part_5). Files with bad permissions might be FTP'd to the site or somebody may have used 'root' to copy a file & forgot to fix permissions.

See 'chmod_custom1' ADMjobs.htm#7B8 sample script that could be run before nightly batch jobs to ensure permissions on all data directories/files 775/664 & group 'apps'. You could also reset owner to 'appsadm' if you want to see who changed what files during the day (or reset owner more infrequently). This sample script has hard-coded directories & permissions for reliability. You would customize for your site.

Note that 'root' should be used only when necessary (fixing permissions, etc). It is too dangerous to run application scripts with root privileges. Of course the chmod_custom1 script must be scheduled by a root crontab, but all batch jobs would be scheduled by 'appsadm' crontabs. And appsadm shares group 'apps' with all operators & programmers who access the data files.

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

1D1. MVS JCL test/demo conversions

setup appsadm - Application Administrator

We recommend you setup a login/userid 'appsadm' to serve as the applications administrator for the unix/linux site. The appsadm home directory would hold various scripts, crontabs, log files, etc used in application administration. Here are some suggested sub-directories:

 /home/appsadm
 :------bin              - binaries for site developed/modified programs
 :--UV--ctl              - control files for converting JCL & COBOL & GDG files
 :--UV--env              - profiles copied from /home/uvadm/env/...
 :                         modify appropriately for your site
 :------log1             - console logging files (currently active)
 :      :-----user1        - sub-directoried by user login
 :      :-----user2,etc
 :------log2             - console logging files (for current month)
 :      :-----user1
 :      :-----user2,etc
 :------log3             - console logging files (for last month)
 :------logs             - console logs from nightly 'cron' scripts
 :
 :------pf             <-- uvcopy jobs developed/modified by site admin
 :------sf             <-- shell scripts developed/modified by appsadm
 :--UV--sfun           <-- functions for JCL/scripts (jobset51,exportgen0,etc)
 :------src              - source for any programs developed/modified by appsadm
 :------tmp
Note
  • 'UV' marks directories that must be copied from uvadm to appsadm
  • other subdirs are optinal & may remain empty initially

appsadm vs uvadm

Do not confuse 'appsadm' (applications administrator userid/login) with 'uvadm' (the Vancouver Utilities administrator userid/login). Please see the uvadm subdirs illustrated on page '1A3'.

One important purpose of appsadm is to hold the modified versions of control files, profiles, scripts & uvcopy jobs that you need to customize at your site. Copy files you need to change from /home/uvadm/... to /home/appsadm/... Do NOT copy yet, see copy commands on page '1D3' after subdir setup on '1D2'.

      cp  /home/uvadm/ctl/*   /home/appsadm/ctl
      cp  /home/uvadm/env/*   /home/appsadm/env
      cp  /home/uvadm/sfun/*  /home/appsadm/sfun

This protects you from losing your customized versions when you install a future new version of Vancouver Utilities, which would overwrite /home/uvadm.

Note that the recommended profile (listed previously) searches PATH & PFPATH of appsadm before uvadm, so any scripts & uvcopy jobs that you modify will be found before any of the original scripts/jobs.

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

1D2. appsadm - Applications Administrator

Create 'appsadm'

We will use 'useradd' (command line method) here, but you can use the GUI sysadm screen if you prefer. In any case you have to login as 'root' to setup a new user, but be sure to login as 'appsadm' before you setup the profile, make subdirs,& copy any files.


 #1. login as 'root'

 #2. groupadd apps        <-- setup group 'apps', if not already setup
     =============            (when uvadm was setup in install.htm)

 #3.  useradd -m -g apps -s /bin/bash appsadm   <-- setup user 'appsadm'
      =======================================
 #3a. useradd -m -d /export/home/appsadm -g apps -s /bin/bash appsadm
      ===============================================================
      - must specify '-d ...' homedir option for SUN Solaris

 #3b. passwd appsadm        <-- setup password desired
      ==============
 #3c. chmod 755 /home/appsadm <-- allow other users to copy files from appsadm/...
      =======================   - required for many Vancouver Utility procedures

'-m' is the option to create the home directory (/home/appsadm).

'-g apps' assigns the group. Assign it as you wish, but it is VERY important that you assign the same group as for uvadm, and the programmers, analysts, & other users who are going to use the Vancouver Utilities & share information on your UNIX system. This is also related to the recommended system permissions for file read/write/execute, which extends security to the 'group' level, using 'umask 002'.

'-s /bin/bash' specifies the 'bash' shell (the default on Linux systems). For Unix I recommend 'ksh' if 'bash' not available.

These shells are much superior to 'sh' (Bourne shell, default on some Unix systems). The 'history' feature of bash & ksh is a reason enough to upgrade.

The Korn shell is recommended for all scripts - 1st line is '#!/bin/ksh'. All scripts used in the installation procedures have been verified under ksh. The JCL converters create 'ksh' shells since they use some features that are lacking in the 'bash' shell. But 'bash' is easier to use as the login shell.

While you are still logged in as 'root', you might as well setup other user logins, you will require. For example if you plan on running the test/demos described in JCLcnv1demo.htm or VSEJCL.htm, you will need to setup 'mvstest' or 'vsetest'.


 #4a. useradd -m -g apps -s /bin/bash mvstest   <-- for MVS JCL test/demos
      =======================================
 #4b. passwd mvstest          <-- setup password desired
      ==============
 #4c. chmod 755 /home/mvstest <-- allow other users to copy files from appsadm/...
      =======================   - required for many Vancouver Utility procedures

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

1D3. appsadm - Applications Administrator

setup 'appsadm' subdirs

Assuming that 'root' has already created the appsadm account, we will now setup subdirs, copy files from /home/uvadm,& modify as required.


 #1. login as 'appsadm' --> /home/appsadm

 #2a. mkdir bin ctl log1 log2 log3 logs pf sf sfun src tmp
      ====================================================
      - setup subdirs, see '1D1'

 #2b. mkdir log1/oper1 log2/oper1 log3/oper1 log1/oper2 log2/oper2 log3/oper2 etc
      =======================================================================
      - setup subdirs matching logins that will be using console logging

 #3. cp /home/uvadm/ctl/* ctl    <-- copy control files from uvadm to appsadm
     ========================

 #4. cp /home/uvadm/sfun/* sfun  <-- copy functions from uvadm to appsadm
     ==========================    - for JCL/scripts (jobset51,exportgen0,etc)

 #5. cp /home/uvadm/env/* env    <-- copy profiles from uvadm to appsadm
     =========================
     bashrc               - bash 'rc' aliases req'd if console logging
     kshrc                - rename as kshrc for Korn shell (vs bash shell)
     stub_profile_uv      - stub profile from /home/uvadm/env
     stub_profile_ABC     - copy/rename in appsadm/env for your site & modify
                          - modify RUNLIBS/RUNDATA for programmers & operators
                            copy to user .profile or .bash_profile
     common_profile_uv    - common profile from /home/uvadm/env
     common_profile_ABC   - copy/rename in appsadm/env for your site & modify
                            defines PATH's etc using $RUNLIBS/$RUNDATA
     stub_profile_test    - could make diff versions for prgmrs & oprtrs
     stub_profile_prod    - for copying to homedirs of new users

Alternate directories for uvadm & appsadm

The profile defaults assume you will install uvadm & appsadm in /home/... but it is easy to change to other locations by modifying the definitions of $UV & $APPSADM in the common_profile.


 export UV=/home/uvadm        <-- default location for uvadm
 =====================
 export APPSADM=/home/uvadm   <-- default location for appsadm
 ==========================

If you modify these, then it is convenient to use $UV & $APPSADM instead of any hard-coded directory paths you see in this documentation. For example #3,#4,#5 above would become:


 #3a. cp $UV/ctl/* ctl    <-- copy control files from uvadm to appsadm
      ================

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

1D4. appsadm - Applications Administrator

modify /home/appsadm/stub_profile

Note
  • these changes made only after copying profiles from uvadm to appsadm
  • original stub (uvadm) will be used only for uvadm, mvstest, vsetest
  • modified stub (appsadm) will be used for your programmers & operators
  • #5 above copied all profiles from /home/uvadm/env/* to /home/appsadm/env

 #6. vi env/stub_profile_ABC <-- modify 'stub_profile' for your site
     =======================

 #6a. Modify stub_profile to call common_profile from appsadm (NOT from uvadm)
      Very important because new versions of uvadm would overwrite env/profiles
      Note common_profile is '.' dot executed by stub_profile as follows:

      . /home/uvadm/env/common_profile_uv    #<-- as distributed in uvadm/env
      #=======*****======================

      . /home/appsadm/env/common_profile_ABC #<-- call from 'appsadm' for all users
      #=======*******=======================

 #6b. Define RUNLIBS/RUNDATA for programmers & operators
      export RUNLIBS=$HOME/testlibs  #<-- initial values for training
      export RUNDATA=$HOME/testdata
      =============================
      export RUNLIBS=/p1/apps/testlibs #<-- later for conversion project
      export RUNDATA=/p2/apps/testdata

 #6c. Make any other changes you need to the stub profile before you copy it
      to the home dirs of your programmers & operators.

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

1D5. appsadm - Applications Administrator

modify $APPSADM/common_profile


 #7. vi env/common_profile_ABC         <-- modify for your site
     =========================

 #7a. change 'COBDIR' to wherever you installed Micro Focus COBOL
      - COBDIR defined in the supplied common_profile_uv
      - as the default location for Micro Focus COBOL install which is:

      export COBDIR=/opt/microfocus/cobol
      ===================================

 #7b. Modify TERM & 'stty erase' character depending on user's terminal
       (distribution has TERM=linux & stty erase '^?')

       export TERM=linux    # TERM - modify depending on your terminal
       =================    # (vt100,xterm,at386,ansi,etc)

       stty erase '^?'      # erase char - modify depending on your terminal
       ===============      #  '^?' for linux/at386, '^H' for vt100,ansi,xterm

 #7c. Modify UVLPDEST to a central laser printer at your site.

       export UVLPDEST="-dlp0"     <-- change 'lp0' to your laser printer
       =======================
Note
  • TERM,erase,& UVLPDEST are defined initially only in the common_profile
  • as required users can redefine in their stub_profile
  • for example, users can define UVLPDEST to a printer near them

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

1D6. appsadm - Applications Administrator

additional optional changes to stub profiles

For most unix/linux OS's I think you can simply copy the supplied stub_profile to user homedirs, overwriting the default .profile or .bash_profile that is created when you setup new users (via useradd or the GUI).

But if desired you could read in the default .profile or .bash_profile, at the begining of the VU supplied stub_profile, before copying to user homedirs.


 #10c. vi env/stub_profile        <-- additional optional? change
       ===================
       - read in the '.profile' from your OS (SUN,HP,AIX,etc)
         at the begining of the supplied stub_profile
       - write & quit

 #10d. Should not define 'COBDIR' in user profiles. COBDIR should be defined
       only in the 'common_profile', since there is usually no need to have
       different COBDIRs for different users.

      export COBDIR=/opt/microfocus/cobol
      ===================================

#11. create _test & _prod versions of stub_profile

If you are performing JCL conversions, you will need different versions of the stub_profile for programmers & operators. It might be convenient to setup stub_profile_test & stub_profile_prod in /home/appsadm/env/... and then you can simply copy the appropriate version to the homedirs of your programmers & operators.

The main difference is the definition of RUNLIBS & RUNDATA which are intended to point to the 'test' or 'prod' libraries & data appropriate for the user (programmer or operator).


 #11. login appsadm --> /home/appsadm
      =============
      - we should already be in /home/appsadm with stub_profile in 'env'

 #11a. cp env/stub_profile env/stub_profile_test
       =========================================

 #11b. cp env/stub_profile env/stub_profile_prod
       =========================================

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

1D7. appsadm - Applications Administrator

#12. Modify RUNLIBS & RUNDATA in _test & _prod stubs

The supplied stub_profile defines RUNLIBS/RUNDATA as follows:


 export RUNLIBS=$HOME/testlibs
 #============================
 export RUNDATA=$HOME/testdata
 #============================

These definitions work well for the JCL conversion test/demo jobs documented here, but you could modify for your serious conversions depending on where you plan to store your own JCLs, COBOLs, & Data files. For example:

export RUNLIBS=/p1/apps/testlibs <-- in stub_profile for programmers export RUNDATA=/p1/apps/testdata

export RUNLIBS=/p2/apps/testlibs <-- in stub_profile for operators export RUNDATA=/p2/apps/testdata

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

1D8. appsadm - Applications Administrator

setup user logins


 #1. login as 'root'

 #2. groupadd apps        <-- setup group 'apps', if not already setup
     =============            (when uvadm was setup in install.htm)

 #3.  useradd -m -g apps -s /bin/bash userxx   <-- setup user 'userxx'
      ======================================
      - option -g specifies group 'apps'
      - use option '-s' to specify login shell as 'bash'
      - could specify '-s /bin/ksh' if preferred
      - JCL/scripts code 1st line '#!/bin/ksh' because only the Korn shell
        has '$FPATH' to functions $APPSADM/sfun/... (jobset51,exportgen0,etc)
        & allows 'autoload' at beginning of JCL/scripts
        to declare functions that may be called within that script

 #3a. useradd -m -d /export/home/userxx -g apps -s /bin/ksh userxx
      ============================================================
      - must specify '-d ...' homedir option for SUN Solaris
      - homedir defaults to /home/userxx if '-d' not specified

 #4. passwd userxx        <-- setup password desired
     ==============

 #5. chmod 755 /home/userxx  <-- allow users to copy files from other users
     ======================

 #6. cp env/stub_profile_uv /home/userxx/.bash_profile
     =================================================
     - copy supplied profiles to homedirs
Note
  • see supplied profile listed on page '1C1'
  • distributed in $UV/env/stub_profile_uv
  • you need to rename as .bash_profile or .profile
  • depending on shell (bash or Korn)
  • could 1st modify/rename for your site stub_profile_ABC

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

1D9. appsadm - Applications Administrator

copy 'stub' profiles to homedirs

If desired, you could setup master copies of the stub_profile for programmers & operators & copy them to the homedir of your programmers & operators, renaming as .bash_profile for bash (or .profile for ksh).


 #5a. cp env/stub_profile_test /home/prgmr1/.bash_profile
      ===================================================
      ... etc for other programmers ...

 #5b. cp env/stub_profile_prod /home/oper1/.profile
      =============================================
      ... etc for other operators ...

copy .bashrc/.kshrc to homedirs


 #6a. cp env/bashrc /home/prgmr1/.bashrc
      ==================================

 #6b. cp env/kshrc /home/oper1/.kshrc
      ===============================
      ... etc for other users (programmers & operators) ...

.bashrc/.kshrc should be copied to the homedirs of any programmers & operators who might use 'console logging' (see ADMjobs.htm#Part_6). Console logging is activated by uncommenting the 'script' command at the end of the profile. 'script' is another level of the shell which causes any 'aliases' & 'umask' in the profile to be lost.

See .bashrc/.kshrc listed at ADMjobs.htm#1C3. It contains the same aliases & umask as the common_profile (listed at ADMjobs.htm#1C2).

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

1E1. MVS JCL test/demo conversions

Directory & File-Design - Principles

  1. A good Directory Design is critical to the success of your conversion and to the future efficiency & flexibility of your unix/linux installation.

  2. The basic principle is to have multiple separate file systems and group your libraries & data into file systems in a manner that facilitates backup & restore. You can group libraries & data under super-directories (prodlibs,proddata,testlibs,testdata) that allow you to backup to multiple separate archives on tape & if necessary restore the desired archive without having to restore the entire tape (saving time & disc space).

  3. Separate file systems limit data corruption & protects against runaway programs. Runaway programs can fill up the Test Data file system without harming production data or libraries. Data directories can be very large & should be assigned to large file systems (library directories of programs & JCL are comparatively small).

  4. Testing & Production will probably be on separate machines, but this design allows them to be on 1 machine. You could also have different test libraries & data for different programmers

  5. This design follows good unix/linux principles. There are at least 3 or 4 levels of directories before files are assigned. This gives us more flexibility & better file protection.

  6. The design might allow for multiple related companies (aaco,bbco,ccco,etc), and/or multiple applications (apay,arcv,ordr,etc).

  7. Backup tapes are written as multiple archives. This makes it easy to recover systems separately. It is easy to have enough disc space to restore just the system in question & then retrieve desired files over to production data or libraries.

  8. On-disc backup is recommended for at least 1 day's data files & 2 days libraries. This is very convenient if you discover problems within 1 or 2 days. Programmers have the assurance that they can quickly recover from mistakes (rm *).

    RUNLIBS & RUNDATA

RUNLIBS & RUNDATA are the 2 critical environmental variables (defined in the profile of programmers & operators) that point to the appropriate Libraries & Data for Testing & Production (prodlibs/proddata or testlibs/testdata).

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

1E2. MVS JCL test/demo conversions

RUNLIBS, RUNDATA,& CNVDATA - Concepts

  1. RUNLIBS, RUNDATA,& CNVDATA are environmental variables (in the .profile of programmers & operators) that control access to JCL/scripts/programs & Data files.

  2. When programmers & operators enter JCL/script names to be executed, RUNLIBS (in the .profile) determines which Library directories are searched (Test or Production).

  3. When the JCL/script executes, RUNDATA determines which directories of Data files are accessed (Test data or Production data).

  4. CNVDATA is a convenience during conversion. $CNVDATA is coded in the conversion scripts so you can easily change locations just by changing your .profile.

Note
  • Most sites will have separate machines for Testing & production,
  • But RUNLIBS & RUNDATA are valuable constructs for the following reasons:
  1. RUNLIBS & RUNDATA mean you do not have to modify your JCL/scripts as you move them from testing machines to production machines. RUNLIBS & RUNDATA in the login .profiles supply the top-level portion of the pathnames to the Libraries & Data files.

  2. RUNLIBS & RUNDATA allow you to run various systems separately on the same machine. This is important if you want to maintain separate console logs for the various systems.

  3. RUNLIBS & RUNDATA allow you to control which operators can run which systems. Operators cannot run unauthorized systems, since their .profile PATH & RUNLIBS will not find the unauthorized JCL/scripts. Operators that need to run multiple systems would be provided with the multiple logins required. Terminal emulators make it easy to run the multiple sessions on 1 physical terminal.

  4. Dedicated logins can be used to enforce the tight control required for computer room batch shift operations. You might setup logins that match the system/application IDs. Examples might be apay,arcv,ordr for separate applications, or aaco,bbco,ccco,etc for separate companies.

  5. I suggest the above userids be used for your production operators. Your programmers would use their personal logins, but modify RUNLIBS & RUNDATA in their .profile as required for testing the various systems.

  6. The .profiles also include aliases (cdl,cdd,& cdc) which allow you to easily switch between the superdirs ($RUNLIBS,$RUNDATA,$CNVDATA).

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

1F1. MVS JCL test/demo conversions

directories for RUNLIBS & RUNDATA

Environmental variables RUNLIBS/RUNDATA defined in profiles of programmers & operators could allow small sites to use 1 machine for testing & production (larger sites would use separate machines for testing & production).

 /home             <-- home directories
 :----uvadm          <-- Vancouver Utilities
 :    :-----...        - about 25 subdirs, see page '1A3'
 :----appsadm        <-- Applications Administrator
 :    :-----...        - about 10 subdirs, see page '1D1'
 :----prgmr1
 :----prgmr2,3,4,etc
 :----oper1
 :----oper2,3,4,etc
 /p1/apps            <---- /p1 file system mount point
 :-----testlibs        <-- RUNLIBS=$TESTLIBS=/p1/apps/testlibs
 :     :-----cbls        - COBOL programs
 :     :-----jcls        - JCL/scripts
 :     :---etc---        - see other subdirs at '3B2'
 :-----testdata      <---- RUNDATA=$TESTDATA=/p1/apps/testdata
 :     :-----data1       - data files (or use topnodes as subdirs)
 :     :-----jobtmp      - job temporary files
 :     :---etc---        - see other subdirs at '3B4'
 /p2/apps            <---- /p2 file system mount point
 :-----prodlibs        <-- RUNLIBS=$PRODLIBS=/p2/apps/prodlibs
 :     :-----cbls        - COBOL programs (production)
 :     :-----jcls        - JCL/scripts (production)
 :     :---etc---
 :-----proddata
 :     :-----data1       - data files (or use topnodes as subdirs)
 :     :-----jobtmp      - job temporary files
 /p3/apps            <---- /p3 file system mount point
 :-----backup            - backup & restore directories
 :-----restore
 /p4/apps            <---- /p4 file system mount point
 :-----cnvdata           - data conversion directories
 :     :----d1ebc        - EBCDIC data files from mainframe
 :     :----d2asc        - converted to ASCII (preserving packed)

RUNLIBS/RUNDATA = testlibs/testdata OR prodlibs/proddata

RUNLIBS & RUNDATA are assigned in the profiles, which were discussed & listed begining on page '1C0. 'stub_profile's should define RUNLIBS & RUNDATA for use by the 'common_profile' as shown below:

      export RUNLIBS=/p1/apps/testlibs  <-- stub_profile_test for programmers
      export RUNDATA=/p1/apps/testdata
      export RUNLIBS=/p2/apps/prodlibs  <-- stub_profile_prod for operators
      export RUNDATA=/p2/apps/proddata

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

Part_2 MVS JCL test/demo conversions

Part 2 - Sample JCL/script Conversions


2A1. JAR100.jcl - simple 1 step JCL calling COBOL program to create report
2A2. jar100.ksh - Korn shell equivalent calling Micro Focus or AIX COBOL

2B1. JAR120.jcl - similar JCL, calling COBOL car120.cbl with LINKAGE section
to retrieve report date via PARM getenv
- requires COBOL conversion option 'm1' insert unixwork1/unixproc1
2B2. jar120.ksh - Korn shell equivalent

2C1. JAR200.jcl - 2 step JCL calling SORT & COBOL program
2C2. jar200.ksh - Korn shell calling uvsort & MF cobol

2D1. JGL100.jcl - 1 step JCL/PROC/COBOL using GDG files
2D2. jgl100.ksh - demo 'exportgen' functions replacing mainframe GDG
2D3. runsed1 - script to call 'sed' for mass changes to JCL/scripts
(example to remove '$JGDG/' for new exportgen1)

2E1. JGL200.jcl - 2 step JCL/PROC/COBOL using GDG files
2E2. jgl200.ksh - demo 'exportgen' functions replacing mainframe GDG

2F1. JGL230.jcl - 3 step SORT, COBOL update, COBOL list
2F2. jgl230.ksh - ksh equivalent

2G1. JGL320.jcl - 2 step JCL IEBGENER & IDCAMS with IF/THEN/ENDIF
2G2. jgl320.ksh - ksh with 'uvcp' replacements & if/then/fi

2H1. FTPPUT1.jcl - JCL to demo FTP conversion
2H2. ftpput1.ksh - ksh equivalent

2I1. MAILSMTP.jcl - JCL demo IEBGENER with SMTP MAIL
2I2. mailsmtp.ksh - ksh conversion to sendmail

2J1. QJTLIST.jcl - JCL demo QuikJob conversion (QuikJob code in parms module)
2J2. qjtlist.ksh - ksh converted script calling uvcopy

2K1. EZTLIST.jcl - JCL demo EasyTrieve conversion (code in parms module)
2K2. eztlist.ksh - ksh converted script calling uvcopy

2L1. ICETOOL3.jcl - JCL demo for ICETOOL SORT/COPY/INCLUDE/OUTREC (DFSORT)
2L2. icetool3.ksh - ksh converted script calling uvcp or uvsort

Notes re JCL/ksh conversion demos

  1. This JCLcnv1demo.htm#Part_2 lists the sample mainframe JCLs followed by the converted equivalent Korn shell scripts.


    2. Part_3 of this JCLcnv1demo.doc will show you how to convert the JCLs
    & Part_4 illustrates the executions with joblogs.
  2. In the JCL/ksh listings below, we have inserted a line sequence# for reference by any following explanations.

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

2A1. Sample JCL/scripts to demo Test procedures

JAR100.jcl

 j#001 //JAR100   JOB  'TEST MVS2UNIX CONVERSION',DATE=20080323
 j#002 //* CUSTOMER NAME & ADDRESS LIST (WITH DATE & RPT HDNGS)
 j#003 //STEP010  EXEC PGM=CAR100,PARM=2008
 j#004 //CUSTMAS  DD DSN=AR.CUSTOMER.MASTER,DISP=SHR
 j#005 //NALIST   DD DSN=AR.CUSTOMER.NAMEADRS.LIST100,DISP=(,CATLG,DELETE),
 j#006 //            UNIT=DISK,SPACE=(TRK,(25,25),RLSE),
 j#007 //            DCB=(MODEL.DSCB,LRECL=133,BLKSIZE=6118,RECFM=FBA)
 j#008 //SYSOUT   DD SYSOUT=*
 j#009 //* jclproc51 version 20181004, executed on 20190128:142224

2A2. jar100.ksh

 k#001 #!/bin/ksh
 k#002 ##JAR100   JOB  'TEST MVS2UNIX CONVERSION',DATE=20080323
 k#003 #export start=S0000   #<-- may uncomment & insert restart step#
 k#004 export jobid2=jar100 JOBID2=JAR100; scriptpath="$0"; args="$*"
 k#005 if [[ -z "$jobid1" ]]; then export jobid1=$jobid2; fi
 k#006 for arg in $args; do if [[ "$arg" == *=* ]]; then export $arg; fi; done
 k#007 integer JCC=0 SCC=0 LCC=0  # init step status return codes
 k#008 autoload jobset51 jobend51 jobabend51 logmsg1 logmsg2 stepctl51 evalcp1
 k#009 autoload exportfile exportfil1 exportfil2
 k#010 autoload exportgen0 exportgen1 exportgen2 exportgenall exportgenx
 k#011 jobset51    # call function for JCL/script initialization
 k#012 goto
 k#013 S0000=A
 k#014 # * CUSTOMER NAME $ ADDRESS LIST (WITH DATE $ RPT HDNGS)
 k#015 #1==================== jar100 begin step#S0010 CAR100 COBOL ================
 k#016 S0010=A
 k#017 alias goto="";
 k#018 stepctl51;
 k#019 goto
 k#020 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#021 logmsg2 "********** Begin Step $JSTEP/$XSTEP car100 COBOL **********"
 k#022 ##S001010  EXEC PGM=CAR100,PARM=2008
 k#023 export PROGID=car100  # XREFID=COBOL:car100,jar100
 k#024 export PARM="2008"
 k#025 exportfile  CUSTMAS data1/ar.customer.master #SHR
 k#026 exportfile  NALIST data1/ar.customer.nameadrs.list100 #(,CATLG,DELETE)
 k#027 exportfile SYSOUT $SYOT/${jobid2}_${JSTEP}_SYSOUT_$(date +%y%m%d_%H%M%S)
 k#028 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/car100"
 k#029 #3----------------------------------------------------------------------
 k#030 cobrun $ANIM $CBLX/car100
 k#031 #4----------------------------------------------------------------------
 k#032 testcc $? $SMAX
 k#033 # * jclproc51 version 20181004, executed on 20190128:142224
 k#034 #8======================================================================
 k#035 S9000=A
 k#036 jobend51 #move any new GDG files from jobtmp to intended outdirs
 k#037 logmsg2 "JobEnd=Normal, JCC=$JCC, StepsExecuted=$XSTEP, LastStep=$JSTEP"
 k#038 # jclunix51 options=a2b0c8d1e2f0g1h0i0j0k15l0m4n3o8p0q0r0s0t15u0v0w0x0y6z0
 k#039 exit $JCC #jclunix51 version=20190119, converted 20190128:142234 sitename=UV Software

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

Notes re JCL/ksh samples

  1. I have inserted reference numbers prior to actual JCL & script line contents for use when explaining some items in the various JCL/script conversions. For example JCL line j#004 is converted to script line k#025 (see above).

  2. The 1st 13 & last 6 lines of each converted script are the same, except for JCL/script name. These lines will be omitted from subsequent listings.

  3. 'jobset51' (called on line 10 of each converted JCL/script) is a very important setup function. jobset51 makes these scripts work (without changes) in different locations for different programmers, operators, schedulers. jobset51 changes to $RUNDATA, data super-directory defined in the profile. jobset51 uses $RUNLIBS to access the programs called by the scripts. jobset51 sets up subdirs for temporary files, such as new GDGs to be restored at successsful EOJ. More jobset51 explanation starting at MVSJCL.htm#1C4 (separate document from this JCLcnv1demo.doc) - use right click, open in new tab, so you don't lose your place here.

  4. See other jar100 explanations starting at MVSJCL.htm#1C9 thru 1C14. (DD to exportfile, EXEC to cobrun, testing COBOL return code & abort if bad)


 #4. joblog jar100.ksh <-- execute & capture log in $RUNDATA/joblog/jar100.log
     =================   - see joblog on page '4F1'

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

2B1. Sample JCL/scripts to demo Test procedures

JAR120.jcl

 j#001 //JAR120   JOB  (1234),'TEST MVS JCL CONVERSION FOR PARM DATA'
 j#002 //* - COBOL CAR120 with LINKAGE section, get PARM date via getenv
 j#003 //* - requires COBOL conversion option 'm1' insert unixwork1/unixproc1
 j#004 //STEP010  EXEC PGM=CAR120,PARM='July 30, 2016'
 j#005 //CUSTMAS  DD DSN=AR.CUSTOMER.MASTER,DISP=SHR
 j#006 //NALIST   DD DSN=AR.CUSTOMER.NAMEADRS.LIST120,DISP=(,CATLG,DELETE),
 j#007 //            UNIT=DISK,SPACE=(TRK,(25,25),RLSE),
 j#008 //            DCB=(MODEL.DSCB,LRECL=133,BLKSIZE=6118,RECFM=FBA)
 j#009 //SYSOUT   DD SYSOUT=*
 j#010 //SYSIN    DD *
 j#011 Acme Auto Supply
 j#012 /*
 j#013 //* jclproc51 version 20181004, executed on 20190128:142224

2B2. jar120.ksh

Note
  • 1st 13 lines of converted script omitted (similar for all jobs)
 k#014 # * - COBOL CAR120 with LINKAGE section, get PARM date via getenv
 k#015 # * - requires COBOL conversion option 'm1' insert unixwork1/unixproc1
 k#016 #1==================== jar120 begin step#S0010 CAR120 COBOL ================
 k#017 S0010=A
 k#018 alias goto="";
 k#019 stepctl51;
 k#020 goto
 k#021 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#022 logmsg2 "********** Begin Step $JSTEP/$XSTEP car120 COBOL **********"
 k#023 ##S001010  EXEC PGM=CAR120,PARM='July 30, 2016'
 k#024 export PROGID=car120  # XREFID=COBOL:car120,jar120
 k#025 export PARM="July 30, 2016"
 k#026 exportfile  CUSTMAS data1/ar.customer.master #SHR
 k#027 exportfile  NALIST data1/ar.customer.nameadrs.list120 #(,CATLG,DELETE)
 k#028 exportfile SYSOUT $SYOT/${jobid2}_${JSTEP}_SYSOUT_$(date +%y%m%d_%H%M%S)
 k#029 exportfile SYSIN $JTMP/${JSTEP}_${PROGID}_SYSIN
 k#030 cat > $SYSIN <</*
 k#031 Acme Auto Supply
 k#032 /*
 k#033 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/car120"
 k#034 #3----------------------------------------------------------------------
 k#035 cobrun $ANIM $CBLX/car120
 k#036 #4----------------------------------------------------------------------
 k#037 testcc $? $SMAX
 k#038 # * jclproc51 version 20181004, executed on 20190128:142224
 k#039 #8======================================================================
 k#040 S9000=A
 k#041 jobend51 #move any new GDG files from jobtmp to intended outdirs
 k#042 logmsg2 "JobEnd=Normal, JCC=$JCC, StepsExecuted=$XSTEP, LastStep=$JSTEP"
 k#043 # jclunix51 options=a2b0c8d1e2f0g1h0i0j0k15l0m4n3o8p0q0r0s0t15u0v0w0x0y6z0
 k#044 exit $JCC #jclunix51 version=20190119, converted 20190128:142234 sitename=UV Software

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

2B3. Notes re jar120.jcl & car120.cbl

  1. jar120.jcl is similar to jar100.jcl, but retrieves the report date via JCL PARM & COBOL program car120.cbl with a LINKAGE section.

  2. The preceding jar100.jcl called car100.cbl which retrieved the system date via 'accept from date' vs the LINKAGE section PARM.

  3. To inserting the code to handle PARM data, you must convert the COBOL programs using option 'm1' which inserts unixwork1.cpy in the WORKING-STORAGE section and unixproc1.cpy in the PROCEDURE DIVISION.

  4. See car120.cbl COBOL progam listed at https://uvsoftware.ca/mvscobol.htm#3C3. unixwork1.cpy & unixproc1.cpy at https://uvsoftware.ca/mvscobol.htm#2E3 & 2E4. unixwork1/unixproc1 are for Micro Focus COBOL, unixwork3/unixproc3 are for AIX COBOL.

  5. The COBOL conversion default option is 'm0' to simplify conversions for these initial demos. I suggest you convert with defaults & execute the demo JCL/COBOL in parts 3 & 4. Then you might re-convert the COBOL with option 'm1' to see the effects of inserting unixwork1/unixproc1 for PARM & other reasons.

  6. The COBOL conversion scripts cnvMF51A or cnvAIXcblA do prompt to allow you to override the default options - watch carefully & read the many comments.

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

2C1. Sample JCL/scripts to demo Test procedures

JAR200.jcl

 j#001 //JAR200   JOB  (1234),'TEST/DEMO MVS JCL CONVERT'
 j#002 //* SORT AR.SALES.ITEMS BY PRODUCT CODE FOR LISTING
 j#003 //STEP010  EXEC PGM=SORT,REGION=2048K
 j#004 //SORTIN   DD DSN=AR.SALES.ITEMS,DISP=SHR
 j#005 //SORTOUT  DD DSN=&&TEMPSLS,DISP=(NEW,PASS),
 j#006 //            DCB=(LRECL=64,BLKSIZE=6400,RECFM=FB),
 j#007 //            SPACE=(TRK,(50,50),RLSE),UNIT=DISK
 j#008 //SYSIN    DD *
 j#009 SORT FIELDS=(31,6,CH,A,1,6,CH,A)
 j#010 OMIT COND=((11,2,CH,EQ,C'65'),OR,(COND=(11,2,CH,EQ,C'85'))
 j#011 /*
 j#012 /=* LIST AR.SALES.ITEMS IN PRODUCT CODE SEQUENCE
 j#013 //*============================ step# 0020 ============================
 j#014 //STEP020  EXEC PGM=CAR200,COND=(4,LT,STEP010),PARM=2006
 j#015 //SALEDTL  DD DSN=&&TEMPSLS,DISP=(OLD,PASS)
 j#016 //CUSTMAS  DD DSN=AR.CUSTOMER.MASTER.INDEXED,DISP=SHR
 j#017 //SALELST  DD DSN=AR.SALES.LIST,DISP=(,CATLG,DELETE),
 j#018 //            UNIT=DISK,SPACE=(TRK,(25,25),RLSE),
 j#019 //            DCB=(MODEL.DSCB,LRECL=133,BLKSIZE=6118,RECFM=FBA)

2C2. jar200.ksh

Note
  • 1st 13 & last 6 lines of converted script omitted (similar for all conversions)

 k#014 # * SORT AR.SALES.ITEMS BY PRODUCT CODE FOR LISTING
 k#015 #1==================== jar200 begin step#S0010 SORT ================
 k#016 S0010=A
 k#017 alias goto="";
 k#018 stepctl51;
 k#019 goto
 k#020 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#021 logmsg2 "********** Begin Step $JSTEP/$XSTEP sort  **********"
 k#022 ##S001010  EXEC PGM=SORT,REGION=2048K
 k#023 export PROGID=sort  # XREFID=sort,jar200
 k#024 export PARM=""
 k#025 exportfile  SORTIN data1/ar.sales.items #SHR
 k#026 exportfile  SORTOUT $JTMP/__jar200_tempsls #(NEW,PASS)
 k#027 exportfile SYSIN $JTMP/${JSTEP}_${PROGID}_SYSIN
 k#028 cat > $SYSIN <</*
 k#029 SORT FIELDS=(31,6,CH,A,1,6,CH,A)
 k#030 OMIT COND=((11,2,CH,EQ,C'65'),OR,(COND=(11,2,CH,EQ,C'85'))
 k#031 /*
 k#032 logmsg2 "Executing--> uvsort fili1=\$SORTIN,typ=RSF,rcs=0064,filo1=\$SORTO..."
 k#033 #3----------------------------------------------------------------------
 k#034 uvsort "fili1=$SORTIN,typ=RSF,rcs=0064,filo1=$SORTOUT,typ=RSF,rcs=0064,keys=(30,6,c,a,0,6,c,a),del1=10(2c):65\
 k#035 ,del1=10(2c):85"
 k#036 #4----------------------------------------------------------------------
 k#037 testcc $? $SMAX
 k#038 # * LIST AR.SALES.ITEMS IN PRODUCT CODE SEQUENCE
 k#039 #1==================== jar200 begin step#S0020 CAR200 COBOL ================
 k#040 S0020=A
 k#041 alias goto="";
 k#042 if ((S0010C >  4)); then   # COND=(4,LT,STEP010)
 k#043 logmsg2 "----->BYPASSING S0020, COND if ((S0010C >  4)),& S0010C = $S0010C"
 k#044    SCC=0;
 k#045    alias goto="<<S9000=\A"; fi
 k#046 goto
 k#047 stepctl51;
 k#048 goto
 k#049 export JSTEP=S0020; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#050 logmsg2 "********** Begin Step $JSTEP/$XSTEP car200 COBOL **********"
 k#051 ##S002020  EXEC PGM=CAR200,COND=(4,LT,STEP010),PARM=2006
 k#052 export PROGID=car200  # XREFID=COBOL:car200,jar200
 k#053 export PARM="2006"
 k#054 exportfile  SALEDTL $JTMP/__jar200_tempsls #(OLD,PASS)
 k#055 exportfile  CUSTMAS data1/ar.customer.master.indexed #SHR
 k#056 exportfile  SALELST data1/ar.sales.list #(,CATLG,DELETE)
 k#057 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/car200"
 k#058 #3----------------------------------------------------------------------
 k#059 cobrun $ANIM $CBLX/car200
 k#060 #4----------------------------------------------------------------------
 k#061 testcc $? $SMAX
 k#062 # * jclproc51 version 20181004, executed on 20190128:142224
Note
  • See jar200 explanations starting at MVSJCL.htm#1D1 thru 1D4.
  • SORT FIELDS converted to uvsort keys, OMITs converted to selects

 joblog jar200.ksh <-- execute & capture log in $RUNDATA/joblog/jar200.log
 =================   - see joblog on page '4F3'

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

2D1. Sample JCL/scripts to demo Test procedures

JGL100.jcl

 J#001 //JGL100   JOB  (1234),'LIST GL MASTER CHART OF ACCOUNTS'         00000010
 J#002 //* MVS JCL CONVERSION DEMO - PROCs & GDG files                   00000020
 J#003 //STEPA    EXEC PGL100,HLQ=GL,YEAREND=2003                        00000030

PGL100.prc

 P#001 //PGL100   PROC HLQ=GL,YEAREND=2002                               00000010
 P#002 //* LIST G/L CHART OF ACCOUNTS FROM ACCOUNT.MASTER                00000020
 P#003 //STEP010  EXEC PGM=CGL100,REGION=1024K,PARM=&YEAREND             00000030
 P#004 //ACCTMAS  DD DSN=&HLQ..ACCOUNT.MASTER(0),DISP=SHR                00000040
 P#005 //ACTLIST  DD DSN=&HLQ..ACCOUNT.ACNTLIST(+1),                     00000050
 P#005 //            DISP=(,CATLG,DELETE),                               00000060
 P#006 //            UNIT=DISK,SPACE=(TRK,(25,25),RLSE),                 00000070
 P#007 //            DCB=(MODEL.DSCB,LRECL=133,BLKSIZE=6118,RECFM=FBA)   00000080
 P#008 //SYSOUT   DD SYSOUT=*                                            00000090
Note
  • PROCs expanded jcl0/JGL100.jcl + procs/PGL100 --> jcl2/jgl100.jcl

jgl100.jcl

 j#001 //JGL100   JOB  'LIST GL MASTER CHART OF ACCOUNTS'
 j#002 //* MVS JCL CONVERSION DEMO - PROCs & GDG files
 j#003 //*
 j#004 //*<STEPA    EXEC PGL100,HLQ=GL,YEAREND=2003                   #<-PROC1call
 j#005 //*PGL100   PROC HLQ=GL,YEAREND=2002                           #<-PROC1
 j#006 // SET HLQ=GL,YEAREND=2002
 j#007 //*<STEPA    EXEC PGL100,HLQ=GL,YEAREND=2003                    #<-PROC1exp
 j#008 // SET HLQ=GL,YEAREND=2003
 j#009 //*
 j#010 //STEP010  EXEC PGM=CGL100,REGION=1024K,PARM=&YEAREND,PN=STEPA
 j#011 //ACCTMAS  DD DSN=GL.ACCOUNT.MASTER(0),DISP=SHR
 j#012 //ACTLIST  DD DSN=GL.ACCOUNT.ACNTLIST(+1),DISP=(,CATLG,DELETE),
 j#013 //            UNIT=DISK,SPACE=(TRK,(25,25),RLSE),
 j#014 //            DCB=(MODEL.DSCB,LRECL=133,BLKSIZE=6118,RECFM=FBA)
 j#015 //SYSOUT   DD SYSOUT=*
 j#016 //*@. procs expanded by UVSW jclproc51 20160215:123747

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

2D2. jgl100.ksh


 k#014 # * MVS JCL CONVERSION DEMO - PROCs $ GDG files
 k#015 #0====================== begin proc PGL100 ========================
 k#016 ##STEPA    EXEC PGL100,HLQ=GL,YEAREND=2003                     #<-PROC1call
 k#017 # *PGL100   PROC HLQ=GL,YEAREND=2002                           #<-PROC1
 k#018 ##STEPA    EXEC PGL100,HLQ=GL,YEAREND=2003                     #<-PROC1exp
 k#019 #1==================== jgl100 begin step#S0010 CGL100 COBOL ================
 k#020 S0010=A
 k#021 HLQ="GL";YEAREND="2002";
 k#022 HLQ="GL";YEAREND="2003";
 k#023 alias goto="";
 k#024 stepctl51;
 k#025 goto
 k#026 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#027 logmsg2 "********** Begin Step $JSTEP/$XSTEP cgl100 COBOL **********"
 k#028 ##S001010  EXEC PGM=CGL100,REGION=1024K,PARM=2003,PN=STEPA
 k#029 export PROGID=cgl100  # XREFID=COBOL:cgl100,jgl100
 k#030 export PARM="2003"
 k#031 exportgen0 0 ACCTMAS data1/gl.account.master_ #SHR
 k#032 exportgen1 +1 ACTLIST data1/gl.account.acntlist_ #(,CATLG,DELETE)
 k#033 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#034 exportfile SYSOUT $SYOT/${jobid2}_${JSTEP}_SYSOUT_$(date +%y%m%d_%H%M%S)
 k#035 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/cgl100"
 k#036 #3----------------------------------------------------------------------
 k#037 cobrun $ANIM $CBLX/cgl100
 k#038 #4----------------------------------------------------------------------
 k#039 testcc $? $SMAX
 k#040 # * jclproc51 version 20181004, executed on 20190128:142224
Note
  • See jgl100 explanations starting at MVSJCL.htm#1E1 thru 1E4.
  • PROCs expanded, GDG files converted to exportgen0/exportgen1 functions

 joblog jgl100.ksh <-- execute & capture log in $RUNDATA/joblog/jgl100.log
 =================   - see joblog on page '4F4'

Notes re GDG changes May 2012

As of May 2012, exportgen1 (to create new generation) has been changed. The '$JGDG/' must no longer be specified on the filename. Here is the old & the new format:


      exportgen1 +1 ACTLIST $JGDG/data1/gl.account.acntlist_  #<-- old format
      =====================================================
      exportgen1 +1 ACTLIST gl.account.acntlist_   #<-- new format May2012+
      ==========================================

The old version of exportgen1 allowed for new GDGs only within $RUNDATA. The new version allows for new GDGs in other application superdirs. See more about GDG files at JCLcnv4gdg.htm.

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

2D3. exportgen1 changed to allow new GDGs outsside of $RUNDATA

runsed1 script to remove $JGDG/

If you have existing JCL/scripts that you need to modify to allow use of the new 'exportgen1' function to allow new GDGs to be created in directories other that $RUNDATA, you can use the 'runsed1' script to mass change as follows:


 #1. Login

 #2. cdl --> $RUNLIBS

 #3. mv jcls jcls.old        <-- change name of existing JCL/script library
     ================

 #4. mkdir jcls              <-- make new directory to receive modifed scripts
     ==========

 #5. runsed1 jcls.old jcls   <-- runsed1 to copy scripts from jcls.old to jcls
     =====================     - prompts for sed command, enter as follows:

      --> s!$JGDG/!!g    <-- Substitute '$JGDG' with nothing (!!)
          ===========       - '!' is pattern delimiter
                            - '/' usual delimiter not used since part of pattern
      --> ^D             <-- control-D to end sed script input

runsed1 script - execute sed on all files in directory

 #!/bin/ksh
 # runsed1 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
 # runsed1 - run sed script to process all files from 1 dir to a 2nd dir
 d1=$1; d2=$2; sedscript=tmp/runsed1
 if [[ -d $d1 && -d $d2 ]]; then :
    else echo "usage: runsed1 dir1 dir2"; exit 9; fi
 if [[ ! -d tmp ]]; then mkdir tmp; fi
 # prompt for sed script entry, using cat ended by control-d
 echo "enter sed script commands, end via control-D"
 echo "--> s/ lp / llp /g <-- sample sed to change ' lp ' to ' llp '"
 echo "--> ^D             <-- enter control-D to end sed lines entry"
 cat >$sedscript         # enter lines, end via ctl-D
 for i in $d1/*
 do
    f=${i##*/}
    let x=x+1
    echo "file# $x - $d1/$f"
    sed -f $sedscript $d1/$f >$d2/$f
 done
 echo "total $x files processed from $d1 to $d2 by $sedscript"
 echo "sed script saved in $sedscript, rerun via runsed2 (vs runsed1)"
 exit 0

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

2E1. Sample JCL/scripts to demo Test procedures

JGL200.jcl

 j#001 //JGL200   JOB  (1234),'TEST/DEMO MVS JCL CONVERSION'
 j#002 //* SORT TRANSACTIONS & UPDATE GL ACCOUNT MASTER
 j#003 //* - demo GDG processing, write gltrans(+1) & read back as (+1)
 j#004 //*
 j#005 //*<STEPA    EXEC PGL200,HLQ=GL,YEAREND=2003                   #<-PROC1call
 j#006 //*PGL200   PROC HLQ=GL,YEAREND=2002                           #<-PROC1
 j#007 // SET HLQ=GL,YEAREND=2002
 j#008 //*<STEPA    EXEC PGL200,HLQ=GL,YEAREND=2003                    #<-PROC1exp
 j#009 // SET HLQ=GL,YEAREND=2003
 j#010 //*
 j#011 //STEP010  EXEC PGM=SORT,REGION=2048K,PN=STEPA
 j#012 //SORTIN   DD DSN=GL.ACCOUNT.TRAN1,DISP=OLD
 j#013 //SORTOUT  DD DSN=GL.ACCOUNT.TRANS(+1),DISP=(,CATLG,DELETE),
 j#014 //            DCB=(LRECL=80,BLKSIZE=8000,RECFM=FB),
 j#015 //            SPACE=(TRK,(50,50),RLSE),UNIT=DISK
 j#016 //SYSIN    DD DSN=GL.PARMS(PGL200S1)
 j#017 //*@*
 j#018 //*============================ step# 0020 ============================
 j#019 //STEP020  EXEC PGM=CGL200,COND=(4,LT,STEP010),PARM=&YEAREND
 j#020 //GLTRANS  DD DSN=GL.ACCOUNT.TRANS(+1),DISP=OLD
 j#021 //GLMSOLD  DD DSN=GL.ACCOUNT.MASTER(0),DISP=OLD
 j#022 //GLMSNEW  DD DSN=GL.ACCOUNT.MASTER(+1),DISP=(,CATLG,DELETE),
 j#023 //            UNIT=DISK,SPACE=(TRK,(50,50),RLSE),
 j#024 //            DCB=(MODEL.DSCB,LRECL=128,BLKSIZE=6118,RECFM=FBA)
 j#025 //*@. procs expanded by UVSW jclproc51 20160215:123747

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

2E2. jgl200.ksh

 k#014 # * SORT TRANSACTIONS $ UPDATE GL ACCOUNT MASTER
 k#015 # * - demo GDG processing, write gltrans(+1) $ read back as (+1)
 k#016 #0====================== begin proc PGL200 ========================
 k#017 ##STEPA    EXEC PGL200,HLQ=GL,YEAREND=2003                     #<-PROC1call
 k#018 # *PGL200   PROC HLQ=GL,YEAREND=2002                           #<-PROC1
 k#019 ##STEPA    EXEC PGL200,HLQ=GL,YEAREND=2003                     #<-PROC1exp
 k#020 #1==================== jgl200 begin step#S0010 SORT ================
 k#021 S0010=A
 k#022 HLQ="GL";YEAREND="2002";
 k#023 HLQ="GL";YEAREND="2003";
 k#024 alias goto="";
 k#025 stepctl51;
 k#026 goto
 k#027 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#028 logmsg2 "********** Begin Step $JSTEP/$XSTEP sort  **********"
 k#029 ##S001010  EXEC PGM=SORT,REGION=2048K,PN=STEPA
 k#030 export PROGID=sort  # XREFID=sort,jgl200
 k#031 export PARM=""
 k#032 exportfile  SORTIN data1/gl.account.tran1 #OLD
 k#033 exportgen1 +1 SORTOUT data1/gl.account.trans_ #(,CATLG,DELETE)
 k#034 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#035 exportfile  SYSIN $RUNLIBS/parms/pgl200s1
 k#036 #2--------parms/pgl200s1 --------
 k#037 #= SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 k#038 logmsg2 "Executing--> uvsort fili1=\$SORTIN,typ=RSF,rcs=0100,filo1=\$SORTO..."
 k#039 #3----------------------------------------------------------------------
 k#040 uvsort "fili1=$SORTIN,typ=RSF,rcs=0100,filo1=$SORTOUT,typ=RSF,rcs=0080,keys=(0,8,c,a,68,12,c,a)"
 k#041 #4----------------------------------------------------------------------
 k#042 testcc $? $SMAX
 k#043 #1==================== jgl200 begin step#S0020 CGL200 COBOL ================
 k#044 S0020=A
 k#045 alias goto="";
 k#046 if ((S0010C >  4)); then   # COND=(4,LT,STEP010)
 k#047 logmsg2 "----->BYPASSING S0020, COND if ((S0010C >  4)),& S0010C = $S0010C"
 k#048    SCC=0;
 k#049    alias goto="<<S9000=\A"; fi
 k#050 goto
 k#051 stepctl51;
 k#052 goto
 k#053 export JSTEP=S0020; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#054 logmsg2 "********** Begin Step $JSTEP/$XSTEP cgl200 COBOL **********"
 k#055 ##S002020  EXEC PGM=CGL200,COND=(4,LT,STEP010),PARM=2003
 k#056 export PROGID=cgl200  # XREFID=COBOL:cgl200,jgl200
 k#057 export PARM="2003"
 k#058 exportgen1 +1 GLTRANS data1/gl.account.trans_ #OLD
 k#059 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#060 exportgen0 0 GLMSOLD data1/gl.account.master_ #OLD
 k#061 exportgen1 +1 GLMSNEW data1/gl.account.master_ #(,CATLG,DELETE)
 k#062 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/cgl200"
 k#063 #3----------------------------------------------------------------------
 k#064 cobrun $ANIM $CBLX/cgl200
 k#065 #4----------------------------------------------------------------------

 joblog jgl200.ksh <-- execute & capture log in $RUNDATA/joblog/jgl200.log
 =================   - see joblog on page '4F5'

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

Notes re GDG changes May 2012

As of May 2012, exportgen1 (to create new generation) has been changed. The '$JGDG/' must no longer be specified on the filename. Here is the old & the new format:


      exportgen1 +1 GLTRANS $JGDG/data1/gl.account.trans_  #<-- old format
      ===================================================
      exportgen1 +1 GLTRANS data1/gl.account.trans_        #<-- new format
      =============================================

The old version of exportgen1 allowed for new GDGs only within $RUNDATA. The new version allows for new GDGs in other application superdirs. See more about GDG files at JCLcnv4gdg.htm.

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

2F1. Sample JCL/scripts to demo Test procedures

JGL230.jcl

 j#001 //JGL230   JOB  '3 step job to demo mvsfiles51, Dec23/2013'
 j#002 //* SORT TRANS, UPDATE GLMASTER,& list GLMASTER
 j#004 //* SORT GL TRANSACTIONS BEFORE UPDATING ACCOUNT MASTER
 j#005 //STEP010  EXEC PGM=SORT
 j#006 //SORTIN   DD DSN=GL.ACCOUNT.TRAN1,DISP=OLD
 j#007 //SORTOUT  DD DSN=GL.ACCOUNT.TRANS(+1),DISP=(,CATLG,DELETE),
 j#008 //            DCB=(LRECL=80,BLKSIZE=8000,RECFM=FB),
 j#009 //            SPACE=(TRK,(50,50),RLSE),UNIT=DISK
 j#010 //SYSIN    DD *
 j#011 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 j#012 INCLUDE COND=(55,2,CH,EQ,C'BC')
 j#013 /*
 j#014 //*@* UPDATE ACCOUNT.MASTER WITH TRANSACTION DETAIL
 j#015 //*============================ step# 0020 ============================
 j#016 //STEP020  EXEC PGM=CGL200,PARM=&YEAREND
 j#017 //GLTRANS  DD DSN=GL.ACCOUNT.TRANS(+1),DISP=OLD
 j#018 //GLMSOLD  DD DSN=GL.ACCOUNT.MASTER(0),DISP=OLD
 j#019 //GLMSNEW  DD DSN=GL.ACCOUNT.MASTER(+1),DISP=(,CATLG,DELETE),
 j#020 //            UNIT=DISK,SPACE=(TRK,(50,50),RLSE),
 j#021 //            DCB=(MODEL.DSCB,LRECL=128,BLKSIZE=6118,RECFM=FBA)
 j#022 //*@*
 j#023 //*============================ step# 0030 ============================
 j#024 //* list the account master
 j#025 //STEP030  EXEC PGM=CGL100,REGION=1024K,PARM=&YEAREND
 j#026 //ACCTMAS  DD DSN=GL.ACCOUNT.MASTER(0),DISP=SHR
 j#027 //ACTLIST  DD DSN=GL.ACCOUNT.ACNTLIST(+1),DISP=(MOD,KEEP,DELETE),
 j#028 //            UNIT=DISK,SPACE=(TRK,(25,25),RLSE),
 j#029 //            DCB=(MODEL.DSCB,LRECL=133,BLKSIZE=6118,RECFM=FBA)
 j#030 //SYSOUT   DD SYSOUT=*
 j#031 //*@.@. procs expanded by UVSW jclproc51 20160215:123747

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

2F2. Sample JCL/scripts to demo Test procedures

2F2. jgl230.ksh

 k#014 # * SORT TRANS, UPDATE GLMASTER,$ list GLMASTER
 k#015 # * SORT GL TRANSACTIONS BEFORE UPDATING ACCOUNT MASTER
 k#016 # *May21/2018 - correct INCLUDE column 55 to 56 to match data
 k#017 #1==================== jgl230 begin step#S0010 SORT ================
 k#018 S0010=A
 k#019 alias goto="";
 k#020 stepctl51;
 k#021 goto
 k#022 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#023 logmsg2 "********** Begin Step $JSTEP/$XSTEP sort  **********"
 k#024 ##S001010  EXEC PGM=SORT
 k#025 export PROGID=sort  # XREFID=sort,jgl230
 k#026 export PARM=""
 k#027 exportfile  SORTIN data1/gl.account.tran1 #OLD
 k#028 exportgen1 +1 SORTOUT data1/gl.account.trans_ #(,CATLG,DELETE)
 k#029 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#030 exportfile SYSIN $JTMP/${JSTEP}_${PROGID}_SYSIN
 k#031 cat > $SYSIN <</*
 k#032 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
 k#033 INCLUDE COND=(56,2,CH,EQ,C'BC')
 k#034 /*
 k#035 logmsg2 "Executing--> uvsort fili1=\$SORTIN,typ=RSF,rcs=0100,filo1=\$SORTO..."
 k#036 #3----------------------------------------------------------------------
 k#037 uvsort "fili1=$SORTIN,typ=RSF,rcs=0100,filo1=$SORTOUT,typ=RSF,rcs=0080,keys=(0,8,c,a,68,12,c,a)\
 k#038 ,sel1=55(2c):BC"
 k#039 #4----------------------------------------------------------------------
 k#040 testcc $? $SMAX
 k#041 # * UPDATE ACCOUNT.MASTER WITH TRANSACTION DETAIL
 k#042 #1==================== jgl230 begin step#S0020 CGL200 COBOL ================
 k#043 S0020=A
 k#044 alias goto="";
 k#045 stepctl51;
 k#046 goto
 k#047 export JSTEP=S0020; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#048 logmsg2 "********** Begin Step $JSTEP/$XSTEP cgl200 COBOL **********"
 k#049 ##S002020  EXEC PGM=CGL200,PARM=&YEAREND
 k#050 export PROGID=cgl200  # XREFID=COBOL:cgl200,jgl230
 k#051 export PARM="${YEAREND}"
 k#052 exportgen1 +1 GLTRANS data1/gl.account.trans_ #OLD
 k#053 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#054 exportgen0 0 GLMSOLD data1/gl.account.master_ #OLD
 k#055 exportgen1 +1 GLMSNEW data1/gl.account.master_ #(,CATLG,DELETE)
 k#056 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/cgl200"
 k#057 #3----------------------------------------------------------------------
 k#058 cobrun $ANIM $CBLX/cgl200
 k#059 #4----------------------------------------------------------------------
 k#060 testcc $? $SMAX
 k#061 # * list the account master
 k#062 #1==================== jgl230 begin step#S0030 CGL100 COBOL ================
 k#063 S0030=A
 k#064 alias goto="";
 k#065 stepctl51;
 k#066 goto
 k#067 export JSTEP=S0030; ((XSTEP+=1)); SCC=0; SMAX=4;
 k#068 logmsg2 "********** Begin Step $JSTEP/$XSTEP cgl100 COBOL **********"
 k#069 ##S003030  EXEC PGM=CGL100,REGION=1024K,PARM=&YEAREND
 k#070 export PROGID=cgl100  # XREFID=COBOL:cgl100,jgl230
 k#071 export PARM="${YEAREND}"
 k#072 exportgen0 0 ACCTMAS data1/gl.account.master_ #SHR
 k#073 exportgen1 +1 ACTLIST data1/gl.account.acntlist_ #(MOD,KEEP,DELETE)
 k#074 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#075 touch $ACTLIST
 k#076 exportfile SYSOUT $SYOT/${jobid2}_${JSTEP}_SYSOUT_$(date +%y%m%d_%H%M%S)
 k#077 logmsg2 "Executing--> cobrun \$ANIM \$CBLX/cgl100"
 k#078 #3----------------------------------------------------------------------
 k#079 cobrun $ANIM $CBLX/cgl100
 k#080 #4----------------------------------------------------------------------
 k#081 testcc $? $SMAX
 k#082 # * jclproc51 version 20181004, executed on 20190128:142224
 k#083 #8======================================================================
 k#084 S9000=A
 k#085 jobend51 #move any new GDG files from jobtmp to intended outdirs
 k#086 logmsg2 "JobEnd=Normal, JCC=$JCC, StepsExecuted=$XSTEP, LastStep=$JSTEP"
 k#087 # jclunix51 options=a2b0c8d1e2f0g1h0i0j0k15l0m4n3o8p0q0r0s0t15u0v0w0x0y6z0
 k#088 exit $JCC #jclunix51 version=20190119, converted 20190128:142234 sitename=UV Software

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

2G1. Sample JCL/scripts to demo Test procedures

JGL320.jcl

 j#001 //JGL320   JOB  (1234),'TEST MVS JCL CONVERSION'
 j#002 //* DEMO CONVERSION OF IEBGENER (TO UVCP) & IDCAMS (TO CP)
 j#003 //* COPY GL.ACCOUNT.MASTER TO A TEMP/WORK FILE & BACK (GEN# +1)
 j#004 //* - demos IF/THEN/ENDIF (vs CONDition codes in JGL320)
 j#005 //* - change input filename (step1 will fail) & step2 will be skipped
 j#006 //STEP010  EXEC PGM=IEBGENER
 j#007 //SYSUT1   DD   DSN=GL.ACCOUNT.MASTER(0),DISP=SHR
 j#008 //SYSUT2   DD   DSN=&&TEMPGLM,DISP=(NEW,PASS),DCB=(LRECL=128)
 j#009 //*@*
 j#010 //*============================ step# 0020 ============================
 j#011 // IF (RC = 0) THEN #J001(1)
 j#012 //*
 j#013 //STEP020  EXEC PGM=IDCAMS,COND=(4,LT,STEP010)
 j#014 //TEMPGLM  DD   DSN=&&TEMPGLM,DISP=(OLD,PASS)
 j#015 //ACNTMAS  DD   DSN=GL.ACCOUNT.MASTER(+1),DISP=(NEW,CATLG),LRECL=128
 j#016 //SYSIN    DD   *
 j#017   REPRO INFILE(TEMPGLM) OUTFILE(ACNTMAS) RECORDSIZE(128)
 j#018 /*
 j#019 //*@.
 j#020 // ENDIF #J001(1) # IF (RC = 0) THEN #J001(1)
 j#021 //**. procs expanded by UVSW jclproc51 20160215:123747

2G2. jgl320.ksh

 k#014 # * DEMO CONVERSION OF IEBGENER (TO UVCP) $ IDCAMS (TO CP)
 k#015 # * COPY GL.ACCOUNT.MASTER TO A TEMP/WORK FILE $ BACK (GEN# +1)
 k#016 # * - demos IF/THEN/ENDIF (vs CONDition codes in JGL320)
 k#017 # * - change input filename (step1 will fail) $ step2 will be skipped
 k#018 #1==================== jgl320 begin step#S0010 IEBGENER ================
 k#019 S0010=A
 k#020 alias goto="";
 k#021 stepctl51;
 k#022 goto
 k#023 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#024 logmsg2 "********** Begin Step $JSTEP/$XSTEP iebgener  **********"
 k#025 ##S001010  EXEC PGM=IEBGENER
 k#026 export PROGID=iebgener  # XREFID=iebgener,jgl320
 k#027 export PARM=""
 k#028 exportgen0 0 SYSUT1 data1/gl.account.master_ #SHR
 k#029 exportfile  SYSUT2 $JTMP/__jgl320_tempglm #(NEW,PASS)
 k#030 logmsg2 "Executing--> uvcp fili1=\$SYSUT1,typ=RSF,rcs=0128,filo1=\$SYSUT2,..."
 k#031 #3----------------------------------------------------------------------
 k#032 uvcp "fili1=$SYSUT1,typ=RSF,rcs=0128,filo1=$SYSUT2,typ=RSF,rcs=0128"
 k#033 #4----------------------------------------------------------------------
 k#034 testcc $? $SMAX
 k#035 if ((S0010C == 0)); then #IF (RC = 0) THEN #J001(1)
 k#036 #1==================== jgl320 begin step#S0020 IDCAMS ================
 k#037 S0020=A
 k#038 alias goto="";
 k#039 if ((S0010C >  4)); then   # COND=(4,LT,STEP010)
 k#040 logmsg2 "----->BYPASSING S0020, COND if ((S0010C >  4)),& S0010C = $S0010C"
 k#041    SCC=0;
 k#042    alias goto="<<S9000=\A"; fi
 k#043 goto
 k#044 stepctl51;
 k#045 goto
 k#046 export JSTEP=S0020; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#047 logmsg2 "********** Begin Step $JSTEP/$XSTEP idcams  **********"
 k#048 ##S002020  EXEC PGM=IDCAMS,COND=(4,LT,STEP010)
 k#049 export PROGID=idcams  # XREFID=idcams,jgl320
 k#050 export PARM=""
 k#051 exportfile  TEMPGLM $JTMP/__jgl320_tempglm #(OLD,PASS)
 k#052 exportgen1 +1 ACNTMAS data1/gl.account.master_ #(NEW,CATLG)
 k#053 #exportgen1 GDGs written to jobtmp/$jobid2 restored to outdir at Normal EOJ
 k#054 exportfile SYSIN $JTMP/${JSTEP}_${PROGID}_SYSIN
 k#055 cat > $SYSIN <</*
 k#056   REPRO INFILE(TEMPGLM) OUTFILE(ACNTMAS) RECORDSIZE(128)
 k#057 /*
 k#058 logmsg2 "Executing--> uvcp fili1=\$TEMPGLM,typ=RSF,rcs=0128,filo1=\$ACNTMA..."
 k#059 #3----------------------------------------------------------------------
 k#060 uvcp "fili1=$TEMPGLM,typ=RSF,rcs=0128,filo1=$ACNTMAS,typ=RSF,rcs=0128";
 k#061 testcc $? $SMAX
 k#062 #4----------------------------------------------------------------------
 k#063 fi  #ENDIF #J001(1) # IF (RC = 0) THEN #J001(1)
 k#064 # * jclproc51 version 20181004, executed on 20190128:142224
Note
  • IEBGENER & IDCAMS converted to 'uvcp'
Note
  • See CONDition code conversions to if/then/goto/fi
    starting at MVSJCL.htm#1G1 thru 1G2.
Note
  • See IF/THEN/ELSE conversions to if/then/fi expanations
    starting at MVSJCL.htm#1G3 thru 1G5.

 joblog jgl320.ksh <-- execute & capture log in $RUNDATA/joblog/jg3200.log
 =================   - see joblog on page '4F7'

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

2H1. Sample JCL/scripts to demo Test procedures

FTPPUT1.jcl

j#001 //FTPPUT1 JOB 'test FTP conversion' j#002 //* j#003 //FTPSTEP1 EXEC PGM=FTP,PARM='127.0.0.1' j#004 //INPUT DD * j#005 mvstest mvstest00 j#006 cd testdata j#007 binary j#008 put GL.ACCOUNT.TRANS(0) j#009 quit j#010 /*

2H2. ftpput1.ksh

 k#014 #1==================== ftpput1 begin step#S0010 FTP ================
 k#015 S0010=A
 k#016 alias goto="";
 k#017 stepctl51;
 k#018 goto
 k#019 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#020 logmsg2 "********** Begin Step $JSTEP/$XSTEP ftp  **********"
 k#021 ##S0010EP1 EXEC PGM=FTP,PARM='127.0.0.1'
 k#022 export PROGID=ftp  # XREFID=ftp,ftpput1
 k#023 export PARM="127.0.0.1"
 k#024 exportfile INPUT $JTMP/${JSTEP}_${PROGID}_INPUT
 k#025 cat > $INPUT <</*
 k#026 mvstest mvstest00
 k#027 cd testdata
 k#028 binary
 k#029 put GL.ACCOUNT.TRANS(0)
 k#030 quit
 k#031 /*
 k#032 exportgen0 0 FTPPUT01 data1/gl.account.trans_
 k#033 #2------------------------------------------------
 k#034 exportfile FTPTMP2 $JTMP/${JSTEP}_${PROGID}_FTPTMP2
 k#035 cat > $FTPTMP2 <</*FTP2
 k#036 open 127.0.0.1
 k#037 user mvstest mvstest00
 k#038 cd testdata
 k#039 binary
 k#040 put $FTPPUT01
 k#041 quit
 k#042 /*FTP2
 k#043 logmsg2 "Executing--> ftp -i -n -u -v <\$FTPTMP2"
 k#044 #3----------------------------------------------------------------------
 k#045 ftp -i -n -u -v <$FTPTMP2
 k#046 #4----------------------------------------------------------------------
 k#047 testcc $? $SMAX
 k#048 # * jclproc51 version 20181004, executed on 20190128:142224

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

2I1. Sample JCL/scripts to demo Test procedures

MAILSMTP.jcl

 j#001 //MAILSMTP JOB  'test/demo SMTP MAIL convert to sendmail'
 j#002 //*
 j#003 //STEP010  EXEC PGM=IEBGENER
 j#004 //SYSUT2     DD   SYSOUT=(B,SMTP)
 j#005 //SYSUT1     DD   *
 j#006 TO: appsadm
 j#007 FROM: mvstest
 j#008 SUBJECT: testing SMTP/sendmail to other unix logins
 j#009
 j#010 Hello: appsadm, sending this mail from batch job MAILSMTP (a test)
 j#011 Note: the blank line between SUBJECT: & message is mandatory
 j#012 Similar mail might be used to alert you of problems in batch jobs ?
 j#013 This mail from 1 unix login to another unix login
 j#014 Not sure if we can send to an internet email address yet ?
 j#016 /*

2I2. mailsmtp.ksh

 k#014 #1==================== mailsmtp begin step#S0010 IEBGENER ================
 k#015 S0010=A
 k#016 alias goto="";
 k#017 stepctl51;
 k#018 goto
 k#019 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#020 logmsg2 "********** Begin Step $JSTEP/$XSTEP iebgener  **********"
 k#021 ##S001010  EXEC PGM=IEBGENER
 k#022 export PROGID=iebgener  # XREFID=iebgener,mailsmtp
 k#023 export PARM=""
 k#024 exportfile SYSUT2 $SYOT/${jobid2}_${JSTEP}_SYSUT2_$(date +%y%m%d_%H%M%S)
 k#025 exportfile SYSUT1 $JTMP/${JSTEP}_${PROGID}_SYSUT1
 k#026 cat > $SYSUT1 <</*
 k#027 TO: appsadm
 k#028 FROM: mvstest
 k#029 SUBJECT: testing SMTP/sendmail to other unix logins
 k#030
 k#031 Hello: appsadm, sending this mail from batch job MAILSMTP (a test)
 k#032 Note: the blank line between SUBJECT: $ message is mandatory
 k#033 Similar mail might be used to alert you of problems in batch jobs ?
 k#034 This mail from 1 unix login to another unix login
 k#035 Not sure if we can send to an internet email address yet ?
 k#036 (may need to install more software ?)
 k#037 /*
 k#038 logmsg2 "Executing--> sendmail -t <\$SYSUT1"
 k#039 #3----------------------------------------------------------------------
 k#040 sendmail -t <$SYSUT1
 k#041 #4----------------------------------------------------------------------
 k#042 testcc $? $SMAX
 k#043 # * jclproc51 version 20181004, executed on 20190128:142224

 joblog mailsmtp.ksh <-- execute & capture log in $RUNDATA/joblog/mailsmtp.log
 ===================   - see joblog on page '4F9'

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

2J1. Sample JCL/scripts to demo Test procedures

QJTLIST.jcl

 j#001 //QJTLIST  JOB  'CUSTOMER MASTER TELEPHONE LIST'
 j#002 //* demo quikjob conversion to uvcopy, Oct 2011
 j#003 //QJTL100  EXEC PGM=QUIKJOB
 j#004 //SYSUT1   DD  DSN=AR.CUSTOMER.MASTER,DISP=SHR
 j#005 //SYSUT2   DD  DSN=AR.CUSTMAS.TELLIST,DISP=(,CATLG,DELETE),
 j#006 //             SPACE=(133,(1,1),RLSE),AVGREC=K,RECFM=FB,LRECL=133
 j#007 //SYSIN    DD  DSN=AR.QJLIB(QJTLIST1),DISP=SHR

2J2. qjtlist.ksh


 k#014 # * demo quikjob conversion to uvcopy, Oct 2011
 k#015 #1==================== qjtlist begin step#S0010 QUIKJOB ================
 k#016 S0010=A
 k#017 alias goto="";
 k#018 stepctl51;
 k#019 goto
 k#020 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#021 logmsg2 "********** Begin Step $JSTEP/$XSTEP quikjob  **********"
 k#022 ##S001000  EXEC PGM=QUIKJOB
 k#023 export PROGID=quikjob  # XREFID=quikjob,qjtlist
 k#024 export PARM=""
 k#025 exportfile  SYSUT1 data1/ar.customer.master #SHR
 k#026 exportfile  SYSUT2 data1/ar.custmas.tellist #(,CATLG,DELETE)_FB
 k#027 exportfile  SYSIN $RUNLIBS/parms/qjtlist1
 k#028 logmsg2 "Executing--> uvcopy \$QJS/qjtlist1"
 k#029 #3----------------------------------------------------------------------
 k#030 uvcopy $QJS/qjtlist1
 k#031 #4----------------------------------------------------------------------
 k#032 testcc $? $SMAX
 k#033 # * jclproc51 version 20181004, executed on 20190128:142224
 k#034 #8======================================================================
 k#035 S9000=A
 k#036 jobend51 #move any new GDG files from jobtmp to intended outdirs
 k#037 logmsg2 "JobEnd=Normal, JCC=$JCC, StepsExecuted=$XSTEP, LastStep=$JSTEP"
 k#038 # jclunix51 options=a2b0c8d1e2f0g1h0i0j0k15l0m4n3o8p0q0r0s0t15u0v0w0x0y6z0
 k#039 exit $JCC #jclunix51 version=20190119, converted 20190128:142234 sitename=UV Software

 joblog qjtlist.ksh <-- execute & capture log in $RUNDATA/joblog/qjtlist.log
 ==================
Note
  • see the execution joblog on page '4F10'
  • see the original QuikJob code on page '6B2'
  • see the converted eqivalent uvcopy code on '6B3'

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

2K1. Sample JCL/scripts to demo Test procedures

EZTLIST.jcl

 j#001 //EZTLIST  JOB  'CUSTOMER MASTER TELEPHONE LIST'
 j#002 //* demo EasyTrieve conversion to uvcopy, Oct 2011
 j#003 //EZTL100  EXEC PGM=EZTPA00
 j#004 //CUSTMAS  DD  DSN=AR.CUSTOMER.MASTER,DISP=SHR
 j#005 //EZTLIST  DD  DSN=AR.CUSTOMER.EZTLIST,DISP=(,CATLG,DELETE),
 j#006 //             SPACE=(133,(1,1),RLSE),AVGREC=K,RECFM=FB,LRECL=133
 j#007 //SYSIN    DD  DSN=AR.EZLIB(EZTLIST1),DISP=SHR

2K2. eztlist.ksh


 k#014 # * demo EasyTrieve conversion to uvcopy, Oct 2011
 k#015 #1==================== eztlist begin step#S0010 EZTPA00 ================
 k#016 S0010=A
 k#017 alias goto="";
 k#018 stepctl51;
 k#019 goto
 k#020 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#021 logmsg2 "********** Begin Step $JSTEP/$XSTEP eztpa00  **********"
 k#022 ##S001000  EXEC PGM=EZTPA00
 k#023 export PROGID=eztpa00  # XREFID=eztpa00,eztlist,ERRnf
 k#024 export PARM=""
 k#025 exportfile  CUSTMAS data1/ar.customer.master #SHR
 k#026 exportfile  EZTLIST data1/ar.customer.eztlist #(,CATLG,DELETE)_FB
 k#027 #ERR! SYSIN_notfound: parms/eztlist1 in eztlist step#S0010 eztpa00
 k#028 #ERR+ DSN=AR.EZLIB(EZTLIST1);DISP=SHR
 k#029 #ERR@  in#8 out#26 file: eztlist
 k#030 exportfile  SYSIN $RUNLIBS/parms/eztlist1
 k#031 #2--------parms/eztlist1 --------
 k#032 #= SYSIN_notfound: parms/eztlist1 in eztlist step#S0010 eztpa00
 k#033 logmsg2 "Executing--> uvcopy \$EZTS/eztlist1"
 k#034 #3----------------------------------------------------------------------
 k#035 uvcopy $EZTS/eztlist1
 k#036 #4----------------------------------------------------------------------
 k#037 testcc $? $SMAX
 k#038 # * jclproc51 version 20181004, executed on 20190128:142224
 k#039 #8======================================================================
 k#040 S9000=A
 k#041 jobend51 #move any new GDG files from jobtmp to intended outdirs
 k#042 logmsg2 "JobEnd=Normal, JCC=$JCC, StepsExecuted=$XSTEP, LastStep=$JSTEP"
 k#043 # jclunix51 options=a2b0c8d1e2f0g1h0i0j0k15l0m4n3o8p0q0r0s0t15u0v0w0x0y6z0
 k#044 exit $JCC #jclunix51 version=20190119, converted 20190128:142234 sitename=UV Software

 joblog eztlist.ksh <-- execute & capture log in $RUNDATA/joblog/eztlist.log
 ==================
Note
  • see the execution joblog on page '4F11'
  • see the original EasyTrieve code on page '6C2'
  • see the converted eqivalent uvcopy code on '6C3'

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

2L1. Sample JCL/scripts to demo Test procedures

                         ** ICETOOL3.jcl **
 j#001 //ICETOOL3 JOB  test ICETOOL TOOLIN SORT/INCLUDE/OUTREC
 j#002 //STEP01   EXEC PGM=ICETOOL
 j#003 //IN1      DD DSN=AR.SALES.ITEMS,DISP=SHR
 j#004 //OUT1     DD DSN=AR.SALES.ITEMS3,DISP=NEW,
 j#005 //            DCB=(LRECL=46,BLKSIZE=6400,RECFM=FB),
 j#006 //            SPACE=(TRK,(50,50),RLSE),UNIT=DISK
 j#007 //TOOLIN   DD *
 j#008   SORT  FROM(IN1)  TO(OUT1)  USING(OUTR)
 j#009 /*
 j#010 //OUTRCNTL DD *
 j#011 SORT FIELDS=(31,6)
 j#012 INCLUDE COND=((31,3,CH,EQ,C'HAX'),OR,(31,3,CH,EQ,C'SAW'))
 j#013 OUTREC FIELDS=(C'CUSTOMER=',1,6,C'_PRODUCT=',31,6,C'_SALES=',54,9)
 j#014 /*

2L2. icetool3.ksh

 k#014 #1==================== icetool3 begin step#S0010 ICETOOL ================
 k#015 S0010=A
 k#016 alias goto="";
 k#017 stepctl51;
 k#018 goto
 k#019 export JSTEP=S0010; ((XSTEP+=1)); SCC=0; SMAX=0;
 k#020 logmsg2 "********** Begin Step $JSTEP/$XSTEP icetool  **********"
 k#021 ##S00101   EXEC PGM=ICETOOL
 k#022 export PROGID=icetool  # XREFID=icetool,icetool3
 k#023 export PARM=""
 k#024 exportfile  IN1 data1/ar.sales.items #SHR
 k#025 exportfile  OUT1 data1/ar.sales.items3 #NEW
 k#026 exportfile TOOLIN $JTMP/${JSTEP}_${PROGID}_TOOLIN
 k#027 cat > $TOOLIN <</*
 k#028   SORT  FROM(IN1)  TO(OUT1)  USING(OUTR)
 k#029 /*
 k#030 exportfile OUTRCNTL $JTMP/${JSTEP}_${PROGID}_OUTRCNTL
 k#031 cat > $OUTRCNTL <</*
 k#032 SORT FIELDS=(31,6)
 k#033 INCLUDE COND=((31,3,CH,EQ,C'HAX'),OR,(31,3,CH,EQ,C'SAW'))
 k#034 OUTREC FIELDS=(C'CUSTOMER=',1,6,C'_PRODUCT=',31,6,C'_SALES=',54,9)
 k#035 /*
 k#036 logmsg2 "Executing--> uvsort fili1=\$IN1,typ=RSF,rcs=0064,filo1=\$OUT1,typ..."
 k#037 #3----------------------------------------------------------------------
 k#038 uvsort "fili1=$IN1,typ=RSF,rcs=0064,filo1=$OUT1,typ=RSF,rcs=0046,keys=(30,6,,),sel1=30(3c):HAX,sel1=30(3c):SAW\
 k#039 ,mvco=0(9):CUSTOMER=,mvco=9(6)0,mvco=15(9):_PRODUCT=,mvco=24(6)30,mvco=30(7):_SALES=,mvco=37(9)53"
 k#040 #4----------------------------------------------------------------------
 k#041 testcc $? $SMAX
 k#042 # * jclproc51 version 20181004, executed on 20190128:142224
Note
  • see execution joblog & output file on page '4F12'
  • see input data file listed on page '4C2'

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

Part_3 JCL/COBOL Conversion Procedures

Part 3 - Contents


3A1. Converting mainframe JCL to unix Korn shell scripts.
Converting mainframe COBOL to Micro Focus COBOL or AIX COBOL.

3B1. HomeDirs for JCL conversions & testing
3B2.  test/demo LIBRARIES (JCL,COBOL,etc) supplied by UV Software
3B3.  test/demo DATA-FILES supplied by UV Software
3B4.  test/demo JCL conversion in mvstest or your homedir /home/userxx
3B5.  conversion scripts expect you to stay in the working directory
- do not change into subdirs

3C1. setup user login mvstest/userxx & profile
- OR use your homedir subdirs testlibs/testdata
- may need to add supplementary group to match dirs/files to be updated
3C2.  setup .profile & .kshrc
3C3.  assuming Vancouver Utilities (uvadm) installed, appsadm setup
 and common_profiles copied from $UV/env/* to $APPSADM/env
 and JCL/script functions copied from $UV/sfun/* to $APPSADM/sfun

3D1. setup directories for demo conversions
- super-directories testlibs & testdata
- setsup subdirs with scripts 'mvslibsdirs' & 'mvsdatadirs'
- copy control files from uvadm with script 'copymvsctls'
- modify JCL converter options file 'jclunixop51'

3D2. Run script --> CopyMvsDemoFiles to copy files for conversion demos:
 copy demo JCLs,PROCs,& Parms
- from $UV/mvstest/jcl0,proc0,parm0.include0
  to your testlibs/jcl0,proc0,parm0
 copy COBOL programs & copybooks
- from $UV/mvstest/cbl0,cpy0 to your testlibs/cbl0,cpy0
 copy DATA for JCL/script demo executions
- ASCII datafiles provided for testing in Part_4
- see EBCDIC to ASCII DATA file conversions in DATAcnv1.htm#Part_3.

3D3. Correction for INCLUDEs in proc0 vs include0
Use uvcopy 'selectf1' utility to select modules from proc0/* that do NOT
have the word ' PROC'. selectf1 makes a script of 'cp' commands for the
files that do NOT have the word ' PROC' in the file.

3D4. COBOL/JCL conversion for Micro Focus COBOL - Instruction Summary

3D5. COBOL/JCL conversion for AIX COBOL - Instruction Summary
Note
  • 3D4 & 3D5 are SUMMARY instructions for conversion of COBOL & JCL.
  • For 1st conversions, I suggest you follow the DETAILED instructions
    for COBOL on pages '3E1' - 3E4 & for JCL on pages '3F1' - 3F4.
  • The DETAILED instructions include the console logs of demo conversions
    indicating the required responses to the prompts.

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

Part 3 - Contents (continued)


3E1. COBOL Conversion for Micro Focus & AIX - Detailed Instructions
cnvMF51Acpy - convert all COBOL copybooks for Micro Focus COBOL
cnvMF51A - convert all COBOL programs for Micro Focus COBOL
cnvAIXcpyA - convert all COBOL copybooks for AIX COBOL
cnvAIXcblA - convert all COBOL copybooks for AIX COBOL
3E2. console log from cnvMF51Acpy copybook conversion
3E3. console log from cnvMF51A program conversion
3E4. compiling the demo COBOL programs
3E5. console log from compiling COBOL programs
Note
  • you should perform the COBOL conversions BEFORE the JCL conversions
  • because COBOL conversions create control files used by JCL conversions
    to supply record-sizes for SORTs, etc in the JCL/scripts

3F1. JCL Conversion for Micro Focus & AIX - Detailed Instructions

3F2. subdirs/files to convert JCLs/PROCs/Parms
- script 'jcl2ksh51A' performs all steps fo Micro Focus COBOL
- use 'jcl2ksh53A' to convert JCL intended to execute AIX COBOL

3F3. console log from jcl2ksh51A
- note responses for your JCL conversions

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

3A1. JCL/COBOL Conversion Procedures

1. JCL/COBOL demo conversions using supplied test files

To become familiar with the UV Software JCL/COBOL conversions, we suggest that you first perform the JCL/COBOL conversions using the demo files supplied by UV Software. You can setup testlibs & testdata directories in your homedir and copy the demo files from UV Software installed at /home/uvadm/mvstest/... We will use 'userxx' to indicate your user login ID.

Script 'CopyMvsDemoFiles' (listed on page '3D2') will copy the demo files:

2. transfer all YOUR JCL/COBOL to unix & convert

After you become familiar with the JCL/COBOL conversion methods, you can transfer ALL your JCL/COBOL/DATA to unix & perform initial conversions. You could do this using subdirs in your homedir, but better to setup in a separate file system with lots of space if you have thousands of files.

You would not want to store your full set of libraries (JCLs,PROCs,Parms, COBOL programs & copybooks) & especially your full set of DATA, in the homedirs. Your full set of libraries & DATA should be stored in separate file-systems with higher capacities than homedirs. This also protects the separate file-systems from possible shortages & corruptions that could affect other file-systems.

The full set of libraries & DATA must also be setup to ensure shared access by all the programmers & operators that will be working on them (vs the homedirs which could have write access restricted to the owners). You might name your full set of files as testlibs, testdata, cnvdata OR ALLtestlibs, ALLtestdata, ALLcnvdata.

3. select small set of JCL/COBOL/DATA for POC

We suggest you might then optimize your conversions on smaller samples of your JCL/COBOL/DATA before tackling the possible thousands of JCLs/COBOLs. You might setup POC superdirs as testlibs1, testdata1, cnvdata1 OR POCtestlibs, POCtestdata, POCcnvdata.

Note that you can update your profile definitions of RUNLIBS,RUNDATA,CNVDATA to the set of libraries & data you are currently working on.

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

3B1. JCL/COBOL Conversion Procedures

HomeDirs for JCL conversions & testing

Here is a summary of the home directories used for JCL conversion & testing. We are showing only a few subdirs in uvadm & appsadm. See all subdirs in 'mvstest' on the next page.

 /home/uvadm      <-- Vancouver Utilities home directory
 :                      - showing only a few of the more important subdirs
 :                      - see all 25 subdirs on page '1A3'
 :-----bin                <-- executables (uvcopy,uvsort,jclunix51,etc)
 :-----ctl                <-- control files for various purposes
 :-----pf                 <-- Parameter Files for uvcopy & uvqrpg
 :-----sf                 <-- Script Files
 :-----src                <-- Vancouver Utilities C source code
 :-----mvstest            <-- sample JCL & DATA provided by UV Software
 :     :-----testlibs       - 30 library subdirs (see all next page)
 :     :     :-----cbl0     - COBOL programs
 :     :     :-----cpy0     - COBOL copybooks
 :     :     :-----jcl0     - JCL
 :     :     :-----parm0    - Parms
 :     :     :-----proc0    - PROCs
 :     :     :-----include0 - INCLUDEs
 :     :     :-----qj0      - QuikJobs selected from parms
 :     :     :-----ezt0     - EasyTrieves selected from parms
 :     :-----testdata       - 10 DATA subdirs (see all next page)
 :     :     :-----data1    - ar.master, gl.master, etc
 /home/appsadm     <-- Applications Administrator
 :                      - showing only a few of the more important subdirs
 :                      - see all 15 subdirs on page '1D1'
 :-----ctl                 <-- control files
 :-----env                 <-- common_profiles customized for site
 :-----log1                <-- console logging files (currently active)
 :     :-----user1           - sub-directoried by user login
 :     :-----.etc.
 :-----log2                <-- console logging files (for current month)
 :     :-----user1
 :     :-----.etc.
 :-----pf                  <-- uvcopy jobs developed by site admin
 :-----sf                  <-- shell scripts developed by appsadm
 :-----sfun                 - ksh functions used in converted JCL/scripts
 :                          - jobset51,jobend51,exportgen0,exportgen1,logmsg1,etc
 /home/userxx        <-- setup testlibs/testdata in your homedir
 :-----testlibs      <-- sample JCL/COBOL for user self-training
 :     :-----cbl0      - COBOL programs
 :     :-----cpy0      - COBOL copybooks
 :     :-----jcl0      - JCL selected from /home/uvadm/mvstest/testlibs/jcl0
 :     :-----parm0     - Parms
 :     :-----proc0     - PROCs
 :     :-----include0 - INCLUDEs
 :     :-----qj0       - QuikJobs selected from parms
 :     :-----ezt0      - EasyTrieves selected from parms
 :-----testdata      <-- sample DATA files for user self-training
 :     :-----data1     - data files from /home/uvadm/mvstest/testdata/data1

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

3B2. JCL/COBOL Conversion Procedures

test/demo LIBRARIES supplied by UV Software

 /home/uvadm/mvstest   <-- test/demo libraries supplied in /home/uvadm/...
 /home/userxx          <-- can copy to your homedir
 :-----testlibs
 :     :---I--cbl0        - COBOL programs ('*' means files present)
 :     :------cbl1        - cleaned up, cols 1-6 & 73-80 cleared, etc
 :     :------cbl2        - cnvMF5 converts mainframe COBOL to MicroFocus COBOL
 :     :------cbl3        - sysin1 converts instream ACCEPTs to READs from a file
 :     :------cbl4        - sysout1 converts DISPLAY on SYSOUT to WRITE to a file
 :     :----F-cbls        - copy here (standard source library) before compiling
 :     :------cblst       - cobol source listings from compiles
 :     :------cblx        - compiled COBOL programs (.int's)
 :     :---I--cpy0        - for COBOL copybooks
 :     :------cpy1        - cleaned up, cols 1-6 & 73-80 cleared, etc
 :     :------cpy2        - cnvMF5 converts mainframe COBOL to MicroFocus COBOL
 :     :----F-cpys        - copy here (standard copybook library)
 :     :---I--ctl         - conversion control files (jclunixop51,cobdirectives)
 :     :------errs        - JCL converter writes ERROR reports here
 :     :---I--jcl0        - test/demo JCLs supplied
 :     :------jcl1        - intermediate conversion 73-80 cleared
 :     :------jcl2        - PROCs expanded from procs
 :     :------jcl3        - JCLs converted to Korn shell scripts
 :     :------jcl4        - file info added as #cmts (I/O,recsize,Pack/Bin)
 :     :----F-jcls        - copy here manually 1 by 1 during test/debug
 :     :------maps        - 'cobmaps' record layouts generated from copybooks
 :     :------pf          - uvcopy jobs to replace utilities (easytrieve,etc)
 :     :---I--parm0       - control cards & includes (SORT FIELDS, etc)
 :     :------parms       - control cards with 73-80 cleared
 :     :---I--proc0       - test/demo PROCs supplied
 :     :------procs       - will be merged with jcl1, output to jcl2
 :     :---I--include0    - test/demo INCLUDEs supplied
 :     :------includes    - will be merged with jcl1, output to jcl2
 :     :------qj0         - QuikJobs selected from parms
 :     :------qj1         - QuikJobs cleanup (73-80 cleared, lower cased)
 :     :------qj2         - QuikJobs converted to uvcopy
 :     :------qjs         - copied to execution subdir (protect reconvert)
 :     :------ezt0        - EasyTrieves selected from parms
 :     :------ezt1        - EasyTrieves cleanup (73-80 cleared, lower cased)
 :     :------ezt2        - Easytrieves converted to uvcopy
 :     :------ezts        - copy to Execution subdir (protect recconvert)
 :     :------sf          - for misc scripts you may wish to write
 :     :------sqls        - DB2/Oracle scripts to create/load tables
 :     :------tmp         - tmp subdir used by uvsort & various conversions
 :     :------xref        - cross-references (see XREFjobs.htm)
 ---I-- Marks subdirs Initialized with mainframe components to be converted
        - COBOL programs, copybooks, JCLs, PROCs, Parms,& data1
        - control files required for conversions or executions
 ----F- - marks the Final result outputs of the conversion
          most other subdirs can go away after the conversion is complete

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

3B3. JCL/COBOL Conversion Procedures

library subdirs for production (after conversion)

The previous page illustrated the many library subdirs requiired for conversion There were many because most conversions are multi-stage, but only the final stage subdir is required for production as shown below:

 /home/userxx        <-- do not use homedir for production
 /p1                 <-- could setup libraries in separate file system
 :-----testlibs         <-- libraries for JCL & COBOL conversions
 :-----prodlibs         <-- rename to prodlibs or just libs
 :     :------cbls        - COBOL program source
 :     :------cblst       - cobol source listings from compiles
 :     :------cblx        - compiled COBOL programs
 :     :------parms       - SYSIN modules (control cards)
 :     :------cpys        - COBOL copybooks
 :     :------ctl         - control files (cobdirectives,etc)
 :     :------jcls        - JCL/scripts (Korn shells converted from JCLs)
 :     :------pf          - uvcopy jobs to replace misc utilities
 :     :------sf          - for misc scripts for admin, maintenance, etc
 :     :------sqls        - DB2/Oracle scripts to create/load tables
 :     :------tmp         - tmp subdir used by uvsort & misc
 :     :------xref        - cross-refs (JCL/scripts,COBOLs,copybooks,etc)

data subdirs for test/demo executions

 /home/userxx        <-- do not use homedir for production
 /p2                 <-- could setup data in separate file system
 :-----testdata         <-- data dirs (defined as $RUNDATA in JCL/scripts)
 :-----proddata         <-- rename to proddata or just data
 :     :------data1       - datafiles (data1 for future flexibility)
 :     :------ctl         - GDG control file
 :     :------joblog      - programmer debug log files
 :     :------jobmsgs     - status msgs from JCL/scripts
 :     :------jobtimes    - job/step times date stamped history files
 :     :------jobtmp      - temporary files for SYSIN instream data
 :     :------sysout      - SYSOUT printer files
 :     :------tmp         - tmp subdir for uvsort & misc use

subdirs for DATA conversion

 /home/userxx        <-- do not use homedir for real conversion
 /p3                 <-- could setup data in separate file system
 :-----cnvdata          <-- data conversion superdir $CNVDATA
 :     :-----d1ebc        - EBCDIC files from mainframe for conversion
 :     :-----d2asc        - files converted to ASCII with same record layout
 :     :-----d3ebc        - files converted back to EBCDIC for return to mainframe
 :     :-----d4pipe       - data files converted to '|' pipe delimited format
 :     :-----cpys         - COBOL copybooks
 :     :-----maps         - cobmaps (record layouts) generated from copybooks
 :     :-----pfx1         - uvcopy jobs to convert EBCDIC to ASCII (gen from cobmaps)
 :     :-----pfp1         - uvcopy jobs to convert to pipe delimited (from copybooks)
 :     :-----sqlTC1       - scripts to CREATE SQL tables (generated from copybooks)
 :     :-----sqlTL1       - scripts to  LOAD  SQL tables (generated from copybooks)

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

3B4. JCL/COBOL Conversion Procedures

test/demo JCL conversion in your homedir (userxx)

The testlibs/subdirs in your homedir (userxx) are the same as in /home/uvadm/mvstest/testlibs. Here we are showing only the subdirs to which you will copy the selected JCL/PROCs/Parms/COBOL/copybooks. We are omitting the other subdirs required to convert & execute the JCL/scripts & programs.

 /home/userxx        <-- user homedir
 :-----testlibs      <-- testlibs with small set of JCL for training
 :     :--UV--cbl0       - COBOL programs
 :     :--UV--cpy0       - COBOL copybooks
 :     :--UV--ctl        - conversion control files (jclunixop5,cobdirectives)
 :     :--UV--jcl0       - test/demo JCLs supplied
 :     :--UV--parm0      - control cards & includes (SORT FIELDS, etc)
 :     :--UV--proc0      - test/demo PROCs supplied
 :     :--UV-include0    - test/demo INCLUDEs
 :     :------qj0        - QuikJobs (selected from parm0)
 :     :------ezt0       - EasyTrieves (selected from parm0)

testdata in your homedir

 /home/userxx         <--- your homedir
 :-----testdata       <--- data files superdir
 :     :--*--data1       - data files
 :     :--*--datasave    - backup, allow clear data1/.. to files for 1 job debug
 :     :--*--dataMF      - datafiles from MainFrame for comparison
 :     :--*--ctl         - GDG control file
 :     :--0--jobctl      - jobstop control files to debug JCL/script
 :     :--0--joblog      - programmer debug log files
 :     :--0--jobmsgs     - status msgs from JCL/scripts (step begin/end)
 :     :--0--jobtimes    - job/step times date stamped history files
 :     :--0--jobtmp      - temporary files for SYSIN data & GDG temp files
 :     :     :----JOBXX - jobtmp subdir created by jobset51 (script line 10)
 :     :     :    :-----GDG
 :     :     :    :     :-----data1 - new GDG files restored to data1/... at EOJ
 :     :--0--sysout      - SYSOUT printer files
 :     :     :----yymmdd - date stamped subdir for print files
 :     :     :    :-----JOBXX_S0010_SYSPRINT  - named by job+step+DDname
 :     :--0--tmp         - tmp subdir for uvsort & misc use
 :     :--0--tape1       - tape files become GDG files on disc

test/debug tips for difficult jobs

dataMF/...
  • datafiles from MainFrame for comparison
datasave/...
  • backup all data1/... files here before debug difficult job
  • then remove all data1/* & copyback only files for the debug job
data1/...
  • could init to only files required for difficult debug jobs

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

3B5. JCL/COBOL Conversion Procedures

stay in the 'working directory'

The conversion scripts expect you to stay in the 'working directory'. The working directory should contain only subdirectories, and all files should reside within sub-directories. In the following example, your working directory is 'testlibs'

 /p1
 :-----testlibs         <-- working directory
 :     :-----cbl0         - COBOL source from mainframe
 :     :-----cbls         - COBOL converted for Micro Focus
 :     :-----cblx         - compile output (.int .idy .cbl .err)
 :     :-----cpys         - COBOL copybooks
 :     :-----jcl0         - JCL from mainframe
 :     :-----jcls         - JCL converted to Unix/Linux scripts
 :     :-----tmp          - temp files (keep working dir clean)

You should work 1 level above your files & address your files through a sub- directory. In the example above, you would edit your programs as follows:

 cd /p1/testlibs        <-- change to working directory
 cdl                    <-- alias 'cdl' changes to $RUNLIBS (defined in profile)

 vi cbls/apay100.cbl    <-- address program thru subdir
 ===================

advantages of working above subdirs

  1. Helps maintain a clean well organized workplace - Since all files are in subdirs, you can probably list all your subdirs on 1 screen, which reminds you of your subdir organization.

  2. Protects your files, even the infamous 'rm *' would do no harm at the working directory level, since all files are in subdirs.

  3. Garbage files (accidentally created) are highlighted & can be easily removed or moved to their proper subdir. When you list your subdirs, any files (non-subdirs) will stick out like a sore thumb.

  4. Subdirs allow you to maintain the same filename for data & programs in the various stages of conversion (conversion scripts exxpect this).

  5. Many scripts require addressing multiple files in multiple subdirs and it is then best to work 1 level above the subdirs. For example:


    jcl2ksh51 jcl0/JAR100.jcl  <-- convert JCL from jcl0->jcl1->jcl2->jcl3->jcls
    ========================= - script assumes jcl0,jcl1,jcl2,jcl3 are below you

    mfcbl1 car100.cbl   <-- compile 1 COBOL program, expects
    =================     - source in cbls/, copybooks in cpys/, writes to cblx/

Please see https://www.uvsoftware.ca/uvtrain.htm#Part_1 for more unix/linux operating tips, vi summary, & training exercises.

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

3C1. JCL/COBOL Conversion Procedures

setup your login & profile

You must already have installed Vancouver Utilities & the uvadm/appsadm accounts as explained in 'Part_1' of this document or in install.htm.

You can perform the demo conversions in a new user such as 'mvstest' or your homedir. We will assume the test user is 'userxx'.

In either case you MUST HAVE setup user 'appsadm', copied profiles from /home/uvadm/env/... to /home/appsadm/env/..., & modified the profiles as appropriate for your site. See instructions on pages '1D2' - '1D8'.


 #1. login as 'root'

 #2. groupadd apps      <-- setup group 'apps', if not already setup
     =============          (when uvadm & appsadm were setup)

 #3.  useradd -m -g apps -s /bin/bash userxx   <-- setup user 'userxx'
      ======================================
      - option -g specifies group 'apps'
      - use option '-s' to specify login shell as 'bash'
      - could specify '-s /bin/ksh' if preferred
      - JCL/scripts code 1st line '#!/bin/ksh' because only the Korn shell
        has '$FPATH' to functions $APPSADM/sfun/... (jobset51,exportgen0,etc)
        & allows 'autoload' at beginning of JCL/scripts
        to declare functions that may be called within that script

 #3a. useradd -m -d /export/home/userxx -g apps -s /bin/ksh userxx
      ============================================================
      - must specify '-d ...' homedir option for SUN Solaris
      - homedir defaults to /home/userxx if '-d' not specified

 #4. passwd userxx           <-- setup password desired
     =============

 #5. chmod 755 /home/userxx  <-- allow users to copy files from other users
     ======================

add supplementary Group

You must be in the same group as the directories & files you need to update. The directories must have permissions 775 & the files must be 664. If your userid has already been setup with a different group, you could add a supplementary group to match the directories & files to be updated.


 #6. usermod -G apps userxx   -G for supplementary group (vs -g for primary)

 #7.  exit     <-- logout from root

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

3C2. JCL/COBOL Conversion Procedures

setup .profile & .kshrc

Copy the Vancouver Utilities profile & kshrc from $APPSADM/env/stub_profile and kshrc if not already done by your sysadmin. See listings of stub_profile on page '1C1'. The stub_profile calls the common_profile listed on page '1C2'. You do not copy since it is called from $APPSADM/env/...


 #1. login userxx --> /home/userxx
     (whatever your userid is)

 #2a. cp /home/appsadm/env/stub_profile .profile
      ==========================================
      - if prompted, reply 'y' to overwrite existing .profile

 #2b. cp /home/appsadm/env/stub_profile .bash_profile
      ===============================================
      - alternative for the Bash shell

 #3a. cp /home/appsadm/env/kshrc .kshrc
      =================================
      - if prompted, reply 'y' to overwrite existing .kshrc

 #3b. cp /home/appsadm/env/bashrc .bashrc
      ===================================
      - alternative for the Bash shell
Note
  • Alternatives if you have some profile content to be preserved
  • above #2 & #3 will overwite existing profiles & rc files
  • use cat >> if you have some content you want to preserve

 #2a. cat /home/appsadm/env/stub_profile >>.profile
      =============================================
      - use cat >> to append VU profile on existing profile

 #2b. cat /home/appsadm/env/stub_profile >>.bash_profile
      ==================================================

 #3a. cat /home/appsadm/env/kshrc >>.kshrc
      ====================================

 #3b. cat /home/appsadm/env/bashrc >>.bashrc
      ======================================

 #4. Logout & login to activate new profiles
     =======================================

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

3C3. JCL/COBOL Conversion Procedures

Updates for new versions of Vancouver Utilities

The above (setup your userid & profile) assumes that the Vancouver Utilities have been installed as per https://uvsoftware.ca/install.htm#B1 - B6. This must have included setup $APPSADM (page B4) & copying common_profiles & functions from $UV/env & $UV/sfun to $APPSADM/env & $APPSADM/env.

Updating functions in $APPSADM/sfun

 The 1st time UV install instructions setup user appsadm and copied the
 JCL/script functions from $UV/sfun/* to $APPSADM/sfun/
 - see #3B on page B4 of install guide https://uvsoftware.ca/install.htm#B4
 This is done because users may need to modify the functions (jobset51, etc)
 and they would not want to overwrite their modifications when a new version
 of Vanouver Utilities is installed in /home/uvadm (/home/appsadm/ unchanged).

BUT, if you have not yet made any customizations in $APPSADM/sfun & know that the new version of $UV does contain desired uppdates (in /home/uvadm/sfun/.) then you should copy $UV/sfun/* to $APPSADM/sfun/. (#3B on page B4).


 #1.  Login appsadm --> /home/appsadm
      ===============================
 #3b. cp /home/uvadm/sfun/* sfun/
      ===========================

Updating common_profiles in $APPSADM/env

The 1st time UV install instructions setup user appsadm and copied the common_profiles from $UV/env/* to $APPSADM/env/ (see #3C on page B4).

It is less likely that you want to copy new common_profiles from new $UV/env to $APPSADM/env/ since you must have had this working on 1st version, but if desired you could.


 #1.  Login appsadm --> /home/appsadm
      ===============================
 #3c. cp /home/uvadm/env/* env/
      =========================

You will then need to repeat the customization of your common_profile as per #4a - #6a on page B4 ('https://uvsoftware.ca/install.htm#B4').

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

3D1. JCL/COBOL Conversion Procedures

setup directories for test/demo conversions


 #1. login yourself --> /home/userxx

 #2a. mkdir testlibs   <-- make superdir for JCL/COBOL subdirs
 #2b. mkdir testdata   <-- make superdir for DATA subdirs
 #2c. mkdir cnvdata    <-- make superdir for DATA conversion

 #3a. cdl     <-- alias cdl='cd $RUNLIBS' --> cd testlibs
      ===

 #3b. mvslibsdirs  <-- setup 30 subdirs for JCL & COBOL conversions
      ===========

 #4a. cdd     <-- alias cdd='cd $RUNDATA' --> cd testdata
      ====

 #4b. mvsdatadirs  <-- setup 12 DATA subdirs for later execution JCL/scripts
      ===========

 #5a. cdc     <-- alias cdd='cd $CNVDATA' --> cd cnvdata
      ====

 #5b. cnvdatadirs  <-- setup 30 subdirs for DATA conversion EBCDIC to ASCII
      ===========

 #6a. cdl     <-- alias cdl='cd $RUNLIBS' --> cd testlibs
      ===

 #6b. copymvsctls  <-- script to copy control files from /home/uvadm/ctl
      ===========      to $RUNLIBS/ctl/...
                      - see copymvsctls listed at JCLcnv2real.htm#4C0

 #6c. l ctl        <-- list ctlfiles copied to $RUNLIBS/ctl/...
      =====
      -rw-rw-r-- 1 userxx apps  3993 Oct 17 09:28 cnvcob5.tbl
      -rw-rw-r-- 1 userxx apps  1989 Oct 17 09:28 cobdirectives
      -rw-rw-r-- 1 userxx apps  2586 Oct 17 09:28 extfh.cfg
      -rw-rw-r-- 1 userxx apps 15337 Oct 17 09:28 jclunixop51
             -------- several files not shown --------

 #7a. vi ctl/jclunixop51  <-- customize JCL converter options ?
      ==================    - for Micro Focus COBOL

 #7b. vi ctl/jclunixop53  <-- customize JCL converter options ?
      ==================    - for AIX COBOL
Note

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

3D2. JCL/COBOL Conversion Procedures

copy JCLs for conversion demo


 #7. Run script 'CopyMvsDemoFiles' to copy files to demo conversions/executions

 #7a. CopyMvsDemoFiles
      ================

CopyMvsDemoFiles - listing

 # CopyMvsDemoFiles - copy files to demo Vancouver Utility conversions
 #                  - by Owen Townsend, UV Software, Jan 2013
 # - see https://www.uvsoftware.ca/mvsjcltest.htm#3D1 - 3D3
 # - MVS JCL/COBOL/DATA conversions to Unix/Linux systems
 # - JCL to Korn shell scripts, COBOL to Micro Focus COBOL or AIX COBOL
 # - EBCDIC DATA to ASCII preserving packed/binary & fixing zoned signs
 #
 # Must have setup userid mvstest OR setup testlibs & testdata in your homedir
 # Must have setup profile with:
 # - export RUNLIBS=$HOME/testlibs
 # - export RUNDATA=$HOME/testdata
 #
 # Must have setup superdirs testlibs/testdata
 # - & run scripts mvslibsddirs/mvsdatadirs to setup subdirs
 # mvslibsdirs - setup subdirs jcl0,proc0,parm0,cbl0,cpy0,etc
 # mvsdatadirs - setup subdirs data1,jobtmp,joblog,etc
 #
 echo "CopyMvsDemoFiles - copy files to demo Vancouver Utility conversions"
 echo " - enter to execute"; read reply;
 #
 cd $RUNLIBS   #<-- cd to copy libraries
 #
 #    ** copy JCL for conversion to Korn shell scripts **
 cp /home/uvadm/mvstest/testlibs/jcl0/jar100.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/jar120.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/jar200.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/jgl100.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/jgl200.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/jgl230.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/jgl320.jcl   jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/ftpput1.jcl  jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/mailsmtp.jcl jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/qjtlist.jcl  jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/eztlist.jcl  jcl0
 cp /home/uvadm/mvstest/testlibs/jcl0/icetool3.jcl jcl0
 #
 #         ** copy PROCs for JCL conversion **
 cp /home/uvadm/mvstest/testlibs/proc0/pgl100.prc proc0
 cp /home/uvadm/mvstest/testlibs/proc0/pgl200.prc proc0
 #
 #         ** copy Parms for JCL conversion **
 cp /home/uvadm/mvstest/testlibs/parm0/pgl200s1 parm0
 cp /home/uvadm/mvstest/testlibs/parm0/qjtlist1 parm0
 #
 #  ** copy COBOL programs for conversion & execution **
 cp /home/uvadm/mvstest/testlibs/cbl0/car100.cbl cbl0
 cp /home/uvadm/mvstest/testlibs/cbl0/car120.cbl cbl0
 cp /home/uvadm/mvstest/testlibs/cbl0/car200.cbl cbl0
 cp /home/uvadm/mvstest/testlibs/cbl0/cgl100.cbl cbl0
 cp /home/uvadm/mvstest/testlibs/cbl0/cgl200.cbl cbl0
 #
 #            **copy COBOL copybooks **
 cp /home/uvadm/mvstest/testlibs/cpy0/custmas.cpy    cpy0
 cp /home/uvadm/mvstest/testlibs/cpy0/custmas255.cpy cpy0
 cp /home/uvadm/mvstest/testlibs/cpy0/saledtl.cpy    cpy0
 cp /home/uvadm/mvstest/testlibs/cpy0/sdline.cpy     cpy0
 cp /home/uvadm/mvstest/testlibs/cpy0/stline.cpy     cpy0
 cp /home/uvadm/mvstest/testlibs/cpy0/unixproc1.cpy  cpy0
 cp /home/uvadm/mvstest/testlibs/cpy0/unixwork1.cpy  cpy0
 #
 cd $RUNDATA   #<-- cd to copy DATA files
 #
 #        ** copy DATA for JCL/script/COBOL demos **
 cp /home/uvadm/mvstest/testdata/data1/ar.customer.master*      data1
 cp /home/uvadm/mvstest/testdata/data1/ar.sales.items           data1
 cp /home/uvadm/mvstest/testdata/data1/gl.account.master_000001 data1
 cp /home/uvadm/mvstest/testdata/data1/gl.account.trans_000001  data1
 cp /home/uvadm/mvstest/testdata/data1/gl.account.tran1         data1
 #
 echo "-------- DemoFiles copied, may investigate as follows: --------"
 echo "cd $RUNLIBS <-- change to LIBS superdir"
 echo "l jcl0      <-- mainframe JCL to be converted to Korn shell scripts"
 echo "l proc0     <-- PROCs to expand PROC calls in JCLs"
 echo "l parm0     <-- SYSIN modules referenced in JCLs"
 echo "l cbl0      <-- mainframe COBOL programs to be converted"
 echo "l cpy0      <-- COBOL copybooks for programs & DATA conversions"
 echo "llr         <-- script to list all dirs/files (recursive)"
 echo "---------"
 echo "cd $RUNDATA <-- change to DATA superdir"
 echo "l data1     <-- DATA files for JCL/COBOL executions"
 echo "llr         <-- script to list all dirs/files (recursive)"
 #

Notes re DATA files

  1. Demo data files supplied by UV Software are ASCII (no conversion required)

  2. But for your conversion you will need to convert your mainframe files from EBCDIC to ASCII - see https://uvsoftware.ca/datacnv1.htm#Part_3

  3. If packed/binary fields are present, you cannot simply FTP with translate which would destroy packed/binary fields.

  4. You must FTP in binary mode & use the Vancouver Utility conversion methods which generate conversion jobs automatically from the COBOL copybooks. See https://uvsoftware.ca/datacnv1.htm#Part_6

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

3D3. JCL/COBOL Conversion Procedures

Correction for INCLUDEs in proc0 vs include0

Some mainframe sites keep their INCLUDE modules in the same library as PROCs and we need to separate them into the separate directory include0. You can use the uvcopy 'selectf1' utility to select modules from proc0/* that do NOT have the word ' PROC'. selectf1 makes a script of 'cp' commands for the files that do NOT have ' PROC' in the file.

To test this, we have included the 2 INCLUDE modules in proc0/... as well as in include0/... as follows:


 #1. ls -l proc0    <-- list proc0/ to see include1 & include2 (non-PROCs)
     ===========
 -rw-rw-r--. 1 mvstest apps  264 Apr  1 17:30 include1
 -rw-rw-r--. 1 mvstest apps  264 Apr  1 17:30 include2
 -rw-rw-r--. 1 mvstest apps  648 Apr 11  2015 pgl100.prc
 -rw-rw-r--. 1 mvstest apps 1215 Apr 11  2015 pgl200.prc
 -rw-rw-r--. 1 mvstest apps 1381 Jan 28  2016 ppy200.prc
 -rw-rw-r--. 1 mvstest apps 1377 Apr 11  2015 ppy210.prc
 -rw-rw-r--. 1 mvstest apps  567 Apr 11  2015 ppy300.prc

 #2. mkdir sf        <-- make the output directory (if not existing)
     ========

 #3. uvcopy "selectf1,fild1=proc0,fild2=include0,arg1u=_PROC:=0"
     ===========================================================
     - make 'cp' commands for files in proc0/... without word ' PROC' (count=0)
Note
  • the output script is written to sf/pattern_copy
  • since the pattern is '_PROC' the name will be sf/_PROC_copy
  • the 1st '_' represents th blank prior to 'PROC' & the 2nd is a separator

 #4. cat sf/_PROC_copy     <-- display the created script
     =================
      cp proc0/include1             include0
      cp proc0/include2             include0

 #5. ksh sf/_PROC_copy     <-- execute the script
     =================

 #6. ls -l include0         <-- list results in include0/...
     ==============
     -rw-rw-r--. 1 mvstest apps 264 Apr  1 15:37 include1
     -rw-rw-r--. 1 mvstest apps 264 Apr  1 15:38 include2

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

3D4. JCL/COBOL Conversion Summary for Micro Focus

Instruction Summary - COBOL/JCL conversion for Micro Focus

Here are SUMMARY instructions for conversion of COBOL & JCL for Micro Focus. For your 1st conversions, I suggest you follow the DETAILED instructions for COBOL on pages '3E1' - 3E4 & for JCL on pages '3F1' - 3F4. The DETAILED instructions include the console logs of demo conversions indicating the required responses to the prompts.

You should perform the COBOL conversions BEFORE the JCL conversions, because COBOL conversions create control files used by JCL conversions, to supply record-sizes for SORTs, etc in the JCL/scripts.

We will 1st convert the COBOL copybooks, followed by the COBOL programs. 'cnvMF51Acpy' will perform all steps of the copybook conversion & 'cnvMF51A' will perform all steps of the COBOL program conversion. Here is an illustration of the conversion steps from inital subdirs (cbl0 & cpy0) thru intermediate subdirs to the final results in cpys & cbls.

 cpy0 ---------> cpy1 ---------> cpy2 ----------> cpys
       cleanup         convert         copy(cp)
 cbl0-------->cbl1-------->cbl2------->cbls-------->cblx
      cleanup      convert       copy       compile

 #1. cnvMF51Acpy all <-- convert copybooks thru all steps, as illustrated above
     ============   - reply null (take defaults) or reply 'y' if y/n demanded

 #2. cnvMF51A all  <-- convert COBOL programs thru all steps, as illustrated above
     ===========    - reply null (take defaults) or reply 'y' if y/n demanded

JCL Conversion Summary for Micro Focus COBOL

Script 'jcl2ksh51A' performs all steps for conversion of all files in the directories of JCLs, PROCs,& Parms. Here is an illustration of the conversions. Initial subdirs of mainframe files are jcl0, proc0, parm0,& include0. The converted JCL/scripts are in 'jcls' which may read SYSIN files from 'parms'.

 proc0 -------> procs   parm0 -------> parms   include0 -------> includes
       cleanup                cleanup                   cleanup
 jcl0 -----> jcl1 ---------> jcl2 ---------> jcl3 ------> jcls
    cleanup    PROC expand    convert to ksh       copy

 #1. jcl2ksh51A all    <-- convert ALL JCL thru all steps, as illustrated below
     ==============      - reply null (take default) at all prompts
                         - or reply 'y' for prompts that demand a y/n response

 #2. cp jcl3/* jcls    <-- copy converted scripts to execution subdir
     ==============      - in $PATH defined in the profiles

 #3. Execute the demo JCLs - see pages '4F0' - 4F12

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

3D5. JCL/COBOL Conversion Summary for AIX COBOL

Instruction Summary - COBOL/JCL conversion for AIX COBOL

Here are SUMMARY instructions for conversion of COBOL & JCL for Micro Focus. For your 1st conversions, I suggest you follow the DETAILED instructions for COBOL on pages '3E1' - 3E4 & for JCL on pages '3F1' - 3F4. The DETAILED instructions include the console logs of demo conversions indicating the required responses to the prompts.

You should perform the COBOL conversions BEFORE the JCL conversions, because COBOL conversions create control files used by JCL conversions, to supply record-sizes for SORTs, etc in the JCL/scripts.

We will 1st convert the COBOL copybooks, followed by the COBOL programs. 'cnvAIXcpyA' will perform all steps of the copybook conversion & 'cnvAIXcblA' will perform all steps of the COBOL program conversion. Here is an illustration of the conversion steps from inital subdirs (cbl0 & cpy0) thru intermediate subdirs to the final results in cpys & cbls.

 cpy0 ---------> cpy1 ---------> cpy2 ----------> cpys
       cleanup         convert         copy(cp)
 cbl0-------->cbl1-------->cbl2------->cbls-------->cblx
      cleanup      convert       copy       compile

 #1. cnvAIXcpyA all   <-- convert copybooks for AIX COBOL
     ==============

 #2. cnvAIXcblA all   <-- convert COBOL programs for AIX COBOL
     ==============

JCL Conversion Summary for AIX COBOL

Script 'jcl2ksh53A' performs all steps for conversion of all files in the directories of JCLs, PROCs,& Parms. Here is an illustration of the conversions. Initial subdirs of mainframe files are jcl0, proc0, parm0,& include0. The converted JCL/scripts are in 'jcls' which may read SYSIN files from 'parms'. The intermediate subdirs (jcl1,jcl2,jcl3) may be dropped when conversion is complete & the systems are ready for production.

 proc0 -------> procs   parm0 -------> parms   include0 -------> includes
       cleanup                cleanup                   cleanup
 jcl0 -----> jcl1 ---------> jcl2 ---------> jcl3 ------> jcls
    cleanup    PROC expand    convert to ksh       copy

 #1. jcl2ksh53A all    <-- convert ALL JCL thru all steps
     ==============      - reply null (take default) at all prompts
                         - or reply 'y' for prompts that demand a y/n response

 #2. cp jcl3/* jcls    <-- copy converted scripts to execution subdir
     ==============      - in $PATH defined in the profiles

 #3. Execute the demo JCLs - see pages '4F0' - 4F12

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

3E1. COBOL Conversion for Micro Focus & AIX

COBOL Conversion - Detailed Instructions

You should perform the COBOL conversions BEFORE the JCL conversions, because COBOL conversions create control files used by JCL conversions, to supply record-sizes for SORTs, etc in the JCL/scripts.

We will 1st convert the COBOL copybooks, followed by the COBOL programs. 'cnvMF51Acpy' will perform all steps of the copybook conversion & 'cnvMF51A' will perform all steps of the COBOL program conversion. Here is an illustration of the conversion steps from inital subdirs (cbl0 & cpy0) thru intermediate subdirs to the final results in cpys & cbls.

 cpy0 ---------> cpy1 ---------> cpy2 ----------> cpys
       cleanup         convert         copy(cp)
 cbl0-------->cbl1-------->cbl2------->cbl3------->cbl4------->cbls-------->cblx
      cleanup      convert      sysin1     sysout1       copy       compile
                               |--------optional-------|

 #1. cnvMF51Acpy all <-- convert copybooks thru all steps, as illustrated above
     ============   - reply null (take defaults) or reply 'y' if y/n demanded

 #2. cnvMF51A all  <-- convert COBOL programs thru all steps, as illustrated above
     ===========    - reply null (take defaults) or reply 'y' if y/n demanded

If problems occur, you should use the 'step by step' method which is documented at MVSCOBOL.htm#1D1 thru 1D3, because you will be better able to detect & fix any problems that may occur. Problems should not occur with the demo set of COBOL programs provided, but are more likely when you begin converting your own COBOL programs & copybooks.

Alternative for AIX COBOL


 #1a. cnvAIXcpyA all <-- convert copybooks for AIX COBOL
      ===============

 #2a. cnvAIXcblA all  <-- convert COBOL programs for AIX COBOL
      ==============

concise operating instructions

The following pages include the console log displays & document the prompts and responses you should make. But after you become familiar with the operating instructions, you will probably prefer to use a more 'concise' set of operating instructions without so many console displays.


 If so please see JCLcnv2real.htm
 ==================================

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

3E2. Converting Mainframe COBOL to Micro Focus COBOL


 #1. cnvMF51Acpy all <-- convert COBOL 'copybook's thru all steps
     =============   - reply null to prompts not requiring a y/n response
                      or reply as shown by '===' underlines

console log from copybook conversion

 <@:mvstest1:/home/mvstest1/testlibs> cnvMF51Acpy all
                                      =============
 convert all COBOL copybooks from cpy0 --> cpy1 --> cpy2 --> cpys OK?
 cpy0 -------> cpy1 -------> cpy2 --------------> cpys
      cleanup       convert       copy(optional)
 copy unixwork1 & unixproc1 from /home/uvadm/mvstest/testlibs/cpy0 ?
 y
 Next step calls CLEANUP job with options defaulted for most sites
 - see cleanup options at: www.uvsoftware.ca/mvscobol.htm#4D1
   OR could enter 'uvcopy cleanup' on 2nd screen (then cancel)
 default options=q0i7c5e15g8j1k1l1n1s8t1 (may enter overridesor null)
 enter cleanup options (null defaults) -->
 uvcopyx - script calling uvcopy: cleanup, to process files from: cpy0 to: cpy1
 141210:204854:cleanup: EOF fili01 rds=16 size=1273: cpy0/custmas.cpy
 141210:204854:cleanup: EOF filo01 wrts=16 size=731: cpy1/custmas.cpy
 141210:204854:cleanup: EOF fili01 rds=17 size=1360: cpy0/saledtl.cpy
 141210:204854:cleanup: EOF filo01 wrts=17 size=690: cpy1/saledtl.cpy
 141210:204854:cleanup: EOF fili01 rds=19 size=1501: cpy0/sdline.cpy
 141210:204854:cleanup: EOF filo01 wrts=19 size=761: cpy1/sdline.cpy
 141210:204855:cleanup: EOF fili01 rds=7 size=553: cpy0/stline.cpy
 141210:204855:cleanup: EOF filo01 wrts=7 size=315: cpy1/stline.cpy
 141210:204855:cleanup: EOF fili01 rds=136 size=6942: cpy0/unixproc1.cpy
 141210:204855:cleanup: EOF filo01 wrts=136 size=6942: cpy1/unixproc1.cpy
 141210:204855:cleanup: EOF fili01 rds=68 size=3246: cpy0/unixwork1.cpy
 141210:204855:cleanup: EOF filo01 wrts=68 size=3246: cpy1/unixwork1.cpy
 6 files processed from cpy0 to cpy1 using uvcopy job cleanup
 Next screen will prompt for COBOL CONVERTER options to override defaults
 Enter override options here or on next screen which shows descriptions
 cnvMF5 - convert mainframe cobol to UNIX Microfocus externalfilenames
          - converts all programs from indir to outdir
 uop=q1a0c0d0j0k4l0m1p0s1t0u0w1x0y1 - option defaults
       a0             - process all programs in directory
       a1             - process 1 program, spcfd on arg1 on command line
       a2             - process program names solicited untilnull reply
         c1           - translate copy-book-names to lower case
         c2           - translate copy-book-names to UPPER case
         c4           - convert "copy ..." to "exec sql include ... end-exec"
         c0           - do not change (already done by cobsup)
           d0         - leave ACCEPT from DATE as is
           d1         - cnvt ACCEPT DATE to env-var SYSDATE (Hadley dflt)
             j0       - inhibit $JOBID insert
             j1       - insert $JOBID prior to display upon console msgs
               k0     - inhibit lookup cobfil55aI indexed file to test OLS
               k1     - set OLS if cobfil55aI recsize 80 (card files?)
               k2     - set OLS if cobfil55aI recsize 132/133(printer?)
               k4     - (dflt) set OLS if cobfil55aI L(46) from advancing
                 l0   - (dflt) do not insert ORG Line/Record Seqntl selects
                 l1   - insert OLS if matching cardfile keywords
                 l2   - insert OLS if matching printerfile keywords
                 l8   - force all sequential files to ORG Line Seqntl
                   m1 - module type = COBOL program
                   m2 - module type = COBOL copybook
                 p1   - insert missing periods in data-div & working-store
                 p2   - insert missing periods in procedure-division
               s1     - convert sql include filename to "filename.cpy"
             u1       - convert unprintable chars to hexadecimal
         w1           - gen move parm lth/data unixwork1 to LINKAGE section
       x1             - inhibit inserting EXTERNAL on SELECT stmnts
     y1               - clear cols 1-6 (default), also see cleanup optn s8
     y0               - retain cols 1-6 (do NOT clear)
 User OPtion (uop) defaults  = q1a0c0d0j0k4l0m1p0s1t0u0w1x0y1q1i3m2
 -->null to accept or enter/override -->
 141210:204856:cnvMF5: EOF fili01 rds=7 size=315: cpy1/stline.cpy
 141210:204856:cnvMF5: EOF filo02 wrts=7 size=315: cpy2/stline.cpy
 141210:204856:cnvMF5: EOF fili01 rds=16 size=731: cpy1/custmas.cpy
 141210:204856:cnvMF5: EOF filo02 wrts=16 size=731: cpy2/custmas.cpy
 141210:204856:cnvMF5: EOF fili01 rds=17 size=690: cpy1/saledtl.cpy
 141210:204856:cnvMF5: EOF filo02 wrts=17 size=690: cpy2/saledtl.cpy
 141210:204856:cnvMF5: EOF fili01 rds=68 size=3246: cpy1/unixwork1.cpy
 141210:204856:cnvMF5: EOF filo02 wrts=68 size=3246: cpy2/unixwork1.cpy
 141210:204856:cnvMF5: EOF fili01 rds=19 size=761: cpy1/sdline.cpy
 141210:204856:cnvMF5: EOF filo02 wrts=19 size=761: cpy2/sdline.cpy
 141210:204856:cnvMF5: EOF fili01 rds=136 size=6942: cpy1/unixproc1.cpy
 141210:204856:cnvMF5: EOF filo02 wrts=136 size=6934: cpy2/unixproc1.cpy
 141210:204856:cnvMF5: EOF fili03 rds=44 size=4075: ctl/cnvcob5.tbl
 141210:204856:cnvMF5: EOF fild01 rds=8 size=4096: cpy1
 141210:204856:cnvMF5: EOF fild02 size=4096: cpy2
 cnvMF51Acpy COBOL copybook conversions complete (results in cpy2 subdir)
 reply 'y' to copy/overwrite cpy2/* to cpys/... or 'n' to exit
 if many modified - use cnfMF51cpy to reconvert few new copybooks
 if few modified, save all cpys, convert,& restore few modified
 if no cpys/... needs to be saved, reply 'y' to overwrite all
 y
        6  copybooks copied to cpys ready for cobmaps & compiles
 - enter to convert copybooks to cobmaps (to assist JCL & DATA conversions)
 uvcopyx - script calling uvcopy: cobmap1, to process files from: cpys to: maps
 141210:204858:cobmap1: EOF fili01 rds=16 size=731: cpys/custmas.cpy
 141210:204858:cobmap1: EOF filo01 wrts=20 size=1324: maps/custmas
 141210:204858:cobmap1: EOF fili01 rds=17 size=690: cpys/saledtl.cpy
 141210:204858:cobmap1: EOF filo01 wrts=21 size=1470: maps/saledtl
 141210:204858:cobmap1: EOF fili01 rds=19 size=761: cpys/sdline.cpy
 141210:204858:cobmap1: EOF filo01 wrts=23 size=1604: maps/sdline
 141210:204858:cobmap1: EOF fili01 rds=7 size=315: cpys/stline.cpy
 141210:204858:cobmap1: EOF filo01 wrts=11 size=673: maps/stline
            move 100 to parm1-lth.
 ** procedure vs layout, bypassed, file: cpys/unixproc1
 141210:204858:cobmap1: EOF fili01 rds=68 size=3246: cpys/unixwork1.cpy
 141210:204858:cobmap1: EOF filo01 wrts=72 size=4335: maps/unixwork1
 6 files processed from cpys to maps using uvcopy job cobmap1
 rmzf ReMoved 1 Zero length Files of 6 files in directory maps

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

3E3. Converting Mainframe COBOL to Micro Focus COBOL


 #2. cnvMF51A all <-- convert COBOL 'program's thru all steps
     ============   - reply null to prompts not requiring a y/n response
                      or reply as shown by '===' underlines

console log from COBOL program conversion

 <@:mvstest1:/home/mvstest1/testlibs> cnvMF51A all
                                      ============
 convert all COBOL programs
 cbl0------->cbl1------->ctl-------->cbl2 ------->cbls--------->cblx
     cleanup   identify OLS   convert      copy ?      compile ?
 convert all programs: cbl0-->cbl1-->cbl2-->cbls-->cblx y/n ?
 y
 Next step calls CLEANUP job with options defaulted for most sites
 - see cleanup options at: www.uvsoftware.ca/cnvaids.htm#2D1
   OR enter 'uvcopy cleanup' on 2nd screen (then cancel)
 cleanup default options=q0i7c5e15g8j1k1l1n1s8t1 (may enter overrides or null)
 enter cleanup option overrides (null default) -->
 uvcopyx - script calling uvcopy: cleanup, to process files from: cbl0 to: cbl1
 141210:204920:cleanup: EOF fili01 rds=44 size=3476: cbl0/car100.cbl
 141210:204920:cleanup: EOF filo01 wrts=44 size=1764: cbl1/car100.cbl
 141210:204920:cleanup: EOF fili01 rds=56 size=4424: cbl0/car200.cbl
 141210:204920:cleanup: EOF filo01 wrts=56 size=2451: cbl1/car200.cbl
 141210:204920:cleanup: EOF fili01 rds=49 size=3871: cbl0/cgl100.cbl
 141210:204920:cleanup: EOF filo01 wrts=49 size=1895: cbl1/cgl100.cbl
 141210:204920:cleanup: EOF fili01 rds=59 size=2396: cbl0/cgl200.cbl
 141210:204920:cleanup: EOF filo01 wrts=59 size=2396: cbl1/cgl200.cbl
 4 files processed from cbl0 to cbl1 using uvcopy job cleanup
 generate ctl/cobfil55aI to determine ORG Line Seqntl y/n ?
 - then run cnvMF5 with option 'k4' to lookup ctl/cobfil55aI
   to Identify ORG LINE SEQNTL by cnvMF51 option 'k4'
   or select option 'l3' to ID OLS by keywords (k4 recommended)
   see: https://www.uvsoftware.ca/mvscobol.htm#6G2
 Note - later screen will prompt for override options
 - default options 'k4l0' to use ctl/cobfil55aI (recommended)
 - or use options  'k0l3' to use only keywords
 generate ctl/cobfil55aI to determine Line Seqntl files y/n ?
 y
 141210:204922:cobfil55: EOF fili02 rds=2 size=1470: maps/saledtl
 141210:204922:cobfil55: EOF fili02 rds=2 size=1324: maps/custmas
 141210:204922:cobfil55: EOF fili02 rds=2 size=1604: maps/sdline
 141210:204922:cobfil55: EOF fili01 rds=56 size=2451: cbl1/car200.cbl hits=2
 141210:204922:cobfil55: EOF fili01 rds=49 size=1895: cbl1/cgl100.cbl hits=1
 141210:204922:cobfil55: EOF fili01 rds=59 size=2396: cbl1/cgl200.cbl
 141210:204922:cobfil55: EOF fili02 rds=2 size=1324: maps/custmas
 141210:204922:cobfil55: EOF fili01 rds=44 size=1764: cbl1/car100.cbl hits=2
 *Total programs=4, files=10, hits=5
 141210:204922:cobfil55: EOF fild01 rds=6 size=4096: cbl1 hits=5
 141210:204922:cobfil55: EOF fild02 size=4096: maps
 141210:204922:cobfil55: EOF filo01 wrts=16 size=1292: ctl/cobfil55a
 141210:204922:cobfil55: EOF filo02 wrts=16 size=1292: ctl/cobfil55b
 141210:204922:uvsort: uvsort fili1=ctl/cobfil55a,filo1=ctl/cobfil55aI
 141210:204922:uvsort: EOF fili01 16 rds, 1292 size; ctl/cobfil55a
 141210:204922:uvsort: sort phase complete, used 64 megabytes, sort output begin
 141210:204922:uvsort: EOF filo01 10 wrts, 0 size; ctl/cobfil55aI
 141210:204922:uvsort: DISAM.dat: recs=10,rcsz=127,keys=1; ctl/cobfil55aI
 created ctl/cobfil55aI to Identify ORG Line Seqntl files
 141210:204922:uvsort: uvsort fili1=ctl/cobfil55b,filo1=ctl/cobfil55bI
 141210:204922:uvsort: EOF fili01 16 rds, 1292 size; ctl/cobfil55b
 141210:204922:uvsort: sort phase complete, used 64 megabytes, sort output begin
 141210:204922:uvsort: EOF filo01 10 wrts, 0 size; ctl/cobfil55bI
 141210:204922:uvsort: DISAM.dat: recs=10,rcsz=127,keys=1; ctl/cobfil55bI
 created ctl/cobfil55bI to supply record-sizes to JCL converter
 Next screen will prompt for COBOL CONVERTER options to override defaults
 - here are some options that some sites may want to change
 y1 (default) - clear cols 1-6 (cols 73-80 always cleared)
 y0 - retain cols 1-6 (do NOT clear)
 l_ - controls ORGANIZATION LINE SEQUENTIAL (vs RECORD SEQUENTIAL)
 l0 (default) - do NOT set OLS via keywords in card & printerfilenames
 l1 - set by keywords in filenames (card,parm,sysin,etc)
 l2 - set by keywords in filenames (printer,sys011,report,etc)
 l8 - force all sequential files ORGANIZATION LINE SEQUENTIAL
 k_ - also use ctl/cobfil55aI to set ORGANIZATION LINE SEQUENTIAL files
 k0 - do NOT use ctl/cobfil55aI to determine OLS
 k1 - set OLS if recsize 80 on Input files
 k2 - set OLS if recsize 132/133 on Output files
 k4 (default) - set OLS if matching cobfil55aI entry has 'L' in byte 46
 k4l0 - RECOMMENDED (most accurate), unless problems creatingcobfil55aI
 Enter override options here or next screen (null accept default k4l0)
 cnvMF5 - convert mainframe cobol to UNIX Microfocus externalfilenames
          - converts all programs from indir to outdir
 uop=q1a0c0d0j0k4l0m1p0s1t0u0w1x0y1 - option defaults
       a0             - process all programs in directory
       a1             - process 1 program, spcfd on arg1 on command line
       a2             - process program names solicited untilnull reply
         c1           - translate copy-book-names to lower case
         c2           - translate copy-book-names to UPPER case
         c4           - convert "copy ..." to "exec sql include ... end-exec"
         c0           - do not change (already done by cobsup)
           d0         - leave ACCEPT from DATE as is
           d1         - cnvt ACCEPT DATE to env-var SYSDATE (Hadley dflt)
             j0       - inhibit $JOBID insert
             j1       - insert $JOBID prior to display upon console msgs
               k0     - inhibit lookup cobfil55aI indexed file to test OLS
               k1     - set OLS if cobfil55aI recsize 80 (card files?)
               k2     - set OLS if cobfil55aI recsize 132/133(printer?)
               k4     - (dflt) set OLS if cobfil55aI L(46) from advancing
                 l0   - (dflt) do not insert ORG Line/Record Seqntl selects
                 l1   - insert OLS if matching cardfile keywords
                 l2   - insert OLS if matching printerfile keywords
                 l8   - force all sequential files to ORG Line Seqntl
                   m1 - module type = COBOL program
                   m2 - module type = COBOL copybook
                 p1   - insert missing periods in data-div & working-store
                 p2   - insert missing periods in procedure-division
               s1     - convert sql include filename to "filename.cpy"
             u1       - convert unprintable chars to hexadecimal
         w1           - gen move parm lth/data unixwork1 to LINKAGE section
       x1             - inhibit inserting EXTERNAL on SELECT stmnts
     y1               - clear cols 1-6 (default), also see cleanup optn s8
     y0               - retain cols 1-6 (do NOT clear)
 User OPtion (uop) defaults  = q1a0c0d0j0k4l0m1p0s1t0u0w1x0y1q1i3
 -->null to accept or enter/override -->
 option k_ needs cobfil55aI created by cnvMF5A script OK y/n ?
 y
 141210:204925:cnvMF5: EOF fili01 rds=56 size=2451: cbl1/car200.cbl
 141210:204925:cnvMF5: EOF filo02 wrts=65 size=2720: cbl2/car200.cbl
 141210:204925:cnvMF5: EOF fili01 rds=49 size=1895: cbl1/cgl100.cbl
 141210:204925:cnvMF5: EOF filo02 wrts=57 size=2123: cbl2/cgl100.cbl
 141210:204925:cnvMF5: EOF fili01 rds=59 size=2396: cbl1/cgl200.cbl
 141210:204925:cnvMF5: EOF filo02 wrts=68 size=2664: cbl2/cgl200.cbl
 141210:204925:cnvMF5: EOF fili01 rds=44 size=1764: cbl1/car100.cbl
 141210:204925:cnvMF5: EOF filo02 wrts=52 size=1995: cbl2/car100.cbl
 141210:204925:cnvMF5: EOF fili03 rds=44 size=4075: ctl/cnvcob5.tbl
 141210:204925:cnvMF5: EOF fili04 rds=9 size=1280: ctl/cobfil55aI
 141210:204925:cnvMF5: DISAM.dat: recs=10,rcsz=127,keys=1; ctl/cobfil55aI
 141210:204925:cnvMF5: EOF fild01 rds=6 size=4096: cbl1
 141210:204925:cnvMF5: EOF fild02 size=4096: cbl2
 cnvMF51A COBOL conversion complete (results in cbl2 subdir)
 - copy to cbls AND compile all programs n/y/g ?
 - n=no, y=compile to .ints(animation), g=compile to .gnts
 cp -f cbl2/* cbls   <-- OR you could copy manually like this
 =================
 mfcblA all          <-- AND compile all programs like this
 ==========              (or use mfcblAg for .gnts)
 copy to cbls & compile ? (n=No, y=compile .ints, g=compile .gnts)
 y
 remove old prgms from cblx & cblst OK y/n ?
 y
 mfcblA started 141210:2049
 start compile of: car100.cbl
 #Compile#=0001 Program=car100.cbl Lines=52
 start compile of: car200.cbl
 #Compile#=0002 Program=car200.cbl Lines=65
 start compile of: cgl100.cbl
 #Compile#=0003 Program=cgl100.cbl Lines=57
 start compile of: cgl200.cbl
 #Compile#=0004 Program=cgl200.cbl Lines=68
 *** 0 compiles failed, of 0004 total ***
 programs compiled from cbls to cblx
 copylibs=/home/mvstest1/testlibs/cpys:/opt/microfocus/mf/cpylib
 compile options file=/home/mvstest1/testlibs/ctl/cobdirectives
 mfcblA started 141210:2049, ended 141210:2049
 - run cblerrs1 & cblerrs2 table summarize error reasons y/n ?
 y
 ** 4 OK & 0 ERRs of 4 TOTAL = 100 % clean compile
 141210:204930:cblerrs1: EOF fild01 rds=14 size=4096: cblx
 141210:204930:cblerrs1: EOF filo01 wrts=1 size=50: errs/cblerrs1.rpt
 141210:204930:cblerrs2: sort phase complete, used 64 megabytes, sort output begin
 141210:204930:cblerrs2: EOF fili01 rds=1 size=50: errs/cblerrs1.rpt
 141210:204930:cblerrs2: EOF filo01 size=0: errs/cblerrs2.rpt
 141210:204930:cblerrs2: EOF filo02 size=0: errs/cblerrs2a.tbl
 141210:204930:cblerrs2: EOF filo03 size=0: errs/cblerrs2b.tbl
        ** reports & table summaries listed below **
 -rw-rw-r-- 1 mvstest1 apps 50 Dec 10 20:49 cblerrs1.rpt
 -rw-rw-r-- 1 mvstest1 apps  0 Dec 10 20:49 cblerrs2a.tbl
 -rw-rw-r-- 1 mvstest1 apps  0 Dec 10 20:49 cblerrs2b.tbl
 -rw-rw-r-- 1 mvstest1 apps  0 Dec 10 20:49 cblerrs2.rpt
 errs/cblerrs1.rpt  - unsorted, 5 lines per failing program (do not list)
 errs/cblerrs2a.tbl - table summary by major fail reason     <-- list 1st
 errs/cblerrs2b.tbl - summary detail (missing copybooks,etc) <-- list 2nd
 errs/cblerrs2.rpt  - sorted, prognames & fail reason <-- correction guide
 uvlp12 errs/cblerrs2a.tbl  #<-- sample command to list reports

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

3E4. Compiling Mainframe COBOL to Micro Focus COBOL

compiling the COBOL programs

Script 'mfcblA' is provided to compile all programs in the COBOL source subdir 'cbls' (using copybooks in 'cpys'), storing compiled executable programs in 'cblx'. Here is the commands & the console log from compiling the demo COBOL programs.


 #1. cp cbl2/* cbls  <-- copy all converted COBOL programs to COBOL source dir
     ==============    - initial convert/compile only
                       - don't do on reconvert if you need to save some cbls/...

 #2. mfcblA all    <-- compile all programs, input from subdir cbls, output to
     ==========        subdir cblx: .int, .idy, .err,& .cbl (copy for animation)
                     - If problems see MVSCOBOL.htm#1D4 for more information.
                     - see console log compiling demo programs on page '3E5'

compile 1 program at a time (Micro Focus)


 #3. mfcbl1 car100.cbl  <-- example
     =================

compile scripts for AIX COBOL

 aixcblA all            - compile ALL programs in directory (for AIX COBOL)
 aixcbl1 program.cbl    - compile 1 program at a time (for AIX COBOL)
 aixcblADB2 all         - compile ALL programs in directory for DB2
 aixcbl1DB2 program.cbl - compile 1 program at a time for AIX COBOL with DB2
 aixcblAsub all         - compile ALL (called) programs in directory
                        - add to archive for linking with calling programs
 aixcbl1sub program.cbl - compile 1 called programs
 aixcblAsubDB2 all         - compile ALL (called) programs in directory for DB2
                           - add to archive for linking with calling programs
 aixcbl1subDB2 program.cbl - compile 1 called programs for DB2

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

3E5. Compiling Mainframe COBOL to Micro Focus COBOL

console log from compiling COBOL programs

 <@uvsoft4:userxx:/home/userxx/testlibs> mfcblA all   <-- compile for Micro Focus
                                         ==========       (vs AIX, see prior page)
 remove old prgms from cblx & cblst OK y/n ?
 y
 ===
 mfcblA started 120508:1100
 start compile of: car100.cbl

#Compile#=0001 Program=car100.cbl Lines=52 start compile of: car200.cbl

#Compile#=0002 Program=car200.cbl Lines=65 start compile of: cgl100.cbl

#Compile#=0003 Program=cgl100.cbl Lines=57 start compile of: cgl200.cbl

 #Compile#=0004 Program=cgl200.cbl Lines=65
 *** 0 compiles failed, of 0004 total ***
 programs compiled from cbls to cblx
 copylibs=/home/mvstest/POC2testlibs/cpys
 compile options file=/home/mvstest/POC2testlibs/ctl/cobdirectives
 mfcblA started 120508:1100, ended 120508:1100
 run cblerrs1 & cblerrs2 table summarize error reasons y/n ?
 y
 =====
 ** 4 OK & 0 ERRs of 4 TOTAL = 100 % clean compile
 120508:110039:cblerrs1: EOF fild01 rds=14 size=4096: cblx
 120508:110039:cblerrs1: EOF filo01 wrts=1 size=50: errs/cblerrs1.rpt
 120508:110039:cblerrs2: sort phase complete, used 64 megabytes, sort output begin
 120508:110039:cblerrs2: EOF fili01 rds=1 size=50: errs/cblerrs1.rpt
 120508:110039:cblerrs2: EOF filo01 size=0: errs/cblerrs2.rpt
 120508:110039:cblerrs2: EOF filo02 size=0: errs/cblerrs2a.tbl
 120508:110039:cblerrs2: EOF filo03 size=0: errs/cblerrs2b.tbl

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

compile Error reports & table summaries

 total 4
 -rw-rw-r-- 1 mvstest apps 50 May  8 11:00 cblerrs1.rpt
 -rw-rw-r-- 1 mvstest apps  0 May  8 11:00 cblerrs2a.tbl
 -rw-rw-r-- 1 mvstest apps  0 May  8 11:00 cblerrs2b.tbl
 -rw-rw-r-- 1 mvstest apps  0 May  8 11:00 cblerrs2.rpt
 errs/cblerrs1.rpt  - unsorted, 5 lines per failing program (do not list)
 errs/cblerrs2a.tbl - table summary by major fail reason     <-- list 1st
 errs/cblerrs2b.tbl - summary detail (missing copybooks,etc) <-- list 2nd
 errs/cblerrs2.rpt  - sorted, prognames & fail reason <-- correction guide
 uvlp12 errs/cblerrs2a.tbl  #<-- sample command to list reports
 <@uvsoft4:userxx:/home/userxx/testlibs> l cblx  <-- list outputs
                                         ======
 -rw-rw-r-- 1 mvstest apps  1995 May  8 11:00 car100.cbl
 -rw-rw-r-- 1 mvstest apps 52224 May  8 11:00 car100.idy
 -rw-rw-r-- 1 mvstest apps  5120 May  8 11:00 car100.int
 -rw-rw-r-- 1 mvstest apps  2720 May  8 11:00 car200.cbl
 -rw-rw-r-- 1 mvstest apps 56064 May  8 11:00 car200.idy
 -rw-rw-r-- 1 mvstest apps  5376 May  8 11:00 car200.int
 -rw-rw-r-- 1 mvstest apps  2123 May  8 11:00 cgl100.cbl
 -rw-rw-r-- 1 mvstest apps 51200 May  8 11:00 cgl100.idy
 -rw-rw-r-- 1 mvstest apps  4864 May  8 11:00 cgl100.int
 -rw-rw-r-- 1 mvstest apps  2521 May  8 11:00 cgl200.cbl
 -rw-rw-r-- 1 mvstest apps 51968 May  8 11:00 cgl200.idy
 -rw-rw-r-- 1 mvstest apps  5120 May  8 11:00 cgl200.int

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

3F1. JCL Conversion for Micro Focus & AIX

JCL Conversion - Detailed Instructions

You should perform the COBOL conversions BEFORE the JCL conversions, because COBOL conversions create control files used by JCL conversions, to supply record-sizes for SORTs, etc in the JCL/scripts.

Script 'jcl2ksh51A' performs all steps for conversion of all files in the directories of JCLs, PROCs,& Parms. Here is an illustration of the conversions. Initial subdirs of mainframe files are jcl0, proc0, parm0,& include0. The converted JCL/scripts are in 'jcls' which may read SYSIN files from 'parms'. The intermediate subdirs (jcl1,jcl2,jcl3) may be dropped when conversion is complete & the systems are ready for production.

 proc0 -------> procs   parm0 -------> parms   include0 -------> includes
       cleanup                cleanup                   cleanup
 jcl0 -----> jcl1 ---------> jcl2 ---------> jcl3 ------> jcls
    cleanup    PROC expand    convert to ksh   copy 1 at a time
                                               when ready to test

Script 'jcl2ksh51A' does everything. See listing at 'JCLcnv2real.doc.4A1'.


 #1. jcl2ksh51A all    <-- convert ALL JCL thru all steps, as illustrated below
     ==============      - reply null (take default) at all prompts
                         - or reply 'y' for prompts that demand a y/n response
Note
  • see the console log listed on the next 5 pages
  • note the prompts & requesting replies
  • I have === underlined the prompt replies you should make for this demo

 #1a. jcl2ksh54A all    <-- Alternative for some JAVA sites
      ==============

 #1b. jcl2ksh53A all    <-- Alternative for AIX COBOL
      ==============

Use 'jcl2ksh53A' vs 'jcl2ksh51A' if the JCL being converted is intended to execute AIX COBOL vs Micro Focus COBOL. For AIX COBOL, we generate a call to the linked program vs the .int for Micro Focus. The GDG file handler is different for AIX, some file types require a TYPE- prefix on the exportfile.

JCL converter control file

See the JCL converter options control file listed at JCLcnv2real.htm#4J1. You may need to modify the control file options dpending on your site requirements. We will not worry about that here in Part 3 demos.

Note that the control file is 'jclunixop51' for Micro Focus COBOL, and it is 'jclunixop53' for AIX COBOL.

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

3F2. JCL/COBOL conversions using VU demo files

subdirs/files to convert JCLs/PROCs/Parms

      <@uvsoft4:userxx:/home/userxx> cdl
      <@uvsoft4:userxx:/home/userxx/testlibs> l
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cbl0  <-- COBOL input
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cbl1  <-- intermediates
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cbl2  <-- converted
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cbls  <-- copy to ongoing src lib
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cblst
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cblx  <-- compiled executables
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cpy0  <-- copybook input
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cpy1  <-- intermediate
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cpy2  <-- converted
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 cpys  <-- copybook src lib
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 ctl
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 errs
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:44 jcl0  <-- JCL input
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 jcl1  <-- intermediates
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 jcl2  <--
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 jcl3  <-- converted output
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 jcls  <-- copy here for execution
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 maps
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:45 parm0 <-- Parms input
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 parms <-- cleaned up here
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:45 include0 <-- INCLUDEs
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:45 includes <-- cleaned up here
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 pf
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:45 proc0 <-- PROCs input
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 procs <-- cleaned up here
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 qj0   <-- QuikJobs from parms
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 qj1   <-- converted to uvcopy
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 qjs   <-- copy here for execution
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 ezt0  <-- EasyTrieves from parms
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 ezt1  <-- converted to uvcopy
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 ezts  <-- copy here for execution
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 sf
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 tmp
      drwxrwxr-x 2 userxx apps 4096 Oct 17 09:28 xref
      <@uvsoft4:userxx:/home/userxx/testlibs> l jcl0
      -rw-rw-r-- 1 userxx apps  165 Oct 17 09:44 FTPPUT1.jcl
      -rw-rw-r-- 1 userxx apps  648 Oct 17 09:41 JAR100.jcl
      -rw-rw-r-- 1 userxx apps 1458 Oct 17 09:43 JAR200.jcl
      -rw-rw-r-- 1 userxx apps  243 Oct 17 09:43 JGL100.jcl
      -rw-rw-r-- 1 userxx apps  324 Oct 17 09:43 JGL200.jcl
      -rw-rw-r-- 1 userxx apps 1134 Oct 17 09:43 JGL300.jcl
      -rw-rw-r-- 1 userxx apps 1458 Oct 17 09:44 JGL320.jcl
      -rw-rw-r-- 1 userxx apps  577 Oct 17 09:44 MAILSMTP.jcl
      -rw-rw-r-- 1 userxx apps  345 Oct 17 09:44 QJTLIST.jcl
      <@uvsoft4:userxx:/home/userxx/testlibs> l proc0
      -rw-rw-r-- 1 userxx apps  648 Oct 17 09:45 PGL100.prc
      -rw-rw-r-- 1 userxx apps 1215 Oct 17 09:45 PGL200.prc
      <@uvsoft4:userxx:/home/userxx/testlibs> l parm0
      -rw-rw-r-- 1 userxx apps  81 Oct 17 09:45 PGL200S1
      -rw-rw-r-- 1 userxx apps 768 Oct 17 09:45 QJTLIST
      <@uvsoft4:userxx:/home/userxx/testlibs> l include0
      -rw-rw-r-- 1 userxx apps  81 Oct 17 09:45 include1
      -rw-rw-r-- 1 userxx apps  81 Oct 17 09:45 include2

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

3F3. JCL/COBOL conversions using VU demo files


 #1. jcl2ksh51A all    <-- convert ALL JCL thru all steps
     ==============      - reply null (take default) at all prompts
                         - or reply 'y' for prompts that demand a y/n response

 #1a. jcl2ksh53A all   <-- alternative script for AIX COBOL
      ==============
Note
  • reply to prompts as shown by '===' underlines thru out console log

console log from jcl2ksh51A

 <@uvsoft5:mvstest9:/home/mvstest9/testlibs> jcl2ksh51A all
                                             ==============
 $RUNLIBS/ctl/jclunixop51 - JCL converter options file must be present
 datafile info control files required (recsize, type, keys, gdgs)
 1. ctl/datacat52I - datafile info created from mainframe LISTCATs
    OR--> makeISF0 ctl/datacat52I 191 0,44 <-- create emty file
 2. ctl/add/...               <-- additional control files ofdatafile info
    $UV/ctl/add/dummy_readme   - use this if no additional files
 Run 'copymvsctls' ($UV/sf/IBM/copymvsctls) to create empty/dummy files
  - if you have not transferred LISTCAT reports & created additional files
  - see script $UV/sf/IBM/catdata50 to extract datafile info from LISTCATs
 Have you run 'copymvsctls' to create initial control files
 &/or created manually, may add LISTCAT files to ctl/cat0/...
  - proceed y/n ?
 y
 jcl2ksh51A to perform all steps of JCL conversion to Korn shell scripts
 jcl0------->jcl1---------->jcl2--------->jcl3--------->jcl4--------->jcls
     cleanup    Proc-Expand    convert ksh   convert java   copy1/test
 see www.uvsoftware.ca/jclcnv1demo.htm#3F1 for operating instructions
 can SKIP CLEANUP parms/procs/includes for RE-CONVERSIONS if no changes those dirs
 cleanup proc0-->procs, parm0-->parm1, & include0-->includes YES/n ?
 --> REPLY 'n' for RE-CONVERSIONS (usually)
 - do not need to reconvert procs,parms,includes unless you have changed them
 - do need to reconvert them if re-transferred from mainframeor changed
 - critical, so must reply 'YES' to cleanup procs/parms/includes
 cleanup proc0-->procs, parm0-->parm1, & include0-->includes YES/n ?
 --> REPLY 'n' for RE-CONVERSIONS (usually)
 - do not need to reconvert procs,parms,includes unless you have changed them
 - do need to reconvert them if re-transferred from mainframeor changed
 - critical, so must reply 'YES' to cleanup procs/parms/includes
 YES
 OK to remove all files (outputs) from procs, parm1,& includes - ? y/n
 y
 clear cols 73-80 of procs, parms, & includes y/n ?
 y
 uvcopyx - script calling uvcopy: cleanup, to process files from: proc0 to: procs
 180530:112634:cleanup: EOF fili01 rds=8 size=648: proc0/pgl100.prc
 180530:112634:cleanup: EOF filo01 wrts=8 size=396: procs/pgl100.prc
 180530:112634:cleanup: EOF fili01 rds=15 size=1215: proc0/pgl200.prc
 180530:112634:cleanup: EOF filo01 wrts=15 size=774: procs/pgl200.prc
 2 files processed from proc0 to procs using uvcopy job cleanup
 cleanup proc0-->procs complete, enter to cleanup include0-->includes
 uvcopyx - script calling uvcopy: cleanup, to process files from: include0 to: includes
 0 files processed from include0 to includes using uvcopy jobcleanup
 cleanup include0-->includes complete, enter to cleanup parm0-->parm1
 uvcopyx - script calling uvcopy: cleanup, to process files from: parm0 to: parm1
 180530:112636:cleanup: EOF fili01 rds=1 size=81: parm0/pgl200s1
 180530:112636:cleanup: EOF filo01 wrts=1 size=34: parm1/pgl200s1
 180530:112636:cleanup: EOF fili01 rds=27 size=768: parm0/qjtlist1
 180530:112636:cleanup: EOF filo01 wrts=27 size=768: parm1/qjtlist1
 2 files processed from parm0 to parm1 using uvcopy job cleanup
 - cleanup parm0-->parm1 complete
 Now run db2delimfix1 to possibly insert 'export to $SYSRTMP of del ...'
 - while copying parm1-->parms, which makes no changes by default
 Users who require inserting  'export to $SYSRTMP of del ...'
 - should copy this job from $UV/pf/IBM/... to $RUNLIBS/pf/sf/...
   & uncomment the code to insert the 'export to $SYSRTMP of del ...'
 - should also copy job to $RUNLIBS/sf/... because you would lose uncommented
   when a new version of Vancovuer Utilities (uvadm) installed
 enter to proceed (or cancel, uncomment code in job,& rerun)
 db2delimfix1 - insert "export to $SYSRTMP of del modified by coldel| nochardel"
          - when SELECT found while copying SYSIN/parms from parm1/ to parms/
 uop=q0e0 - default options
       e0 - insert export to ... inactive as the default
       e1 - activate insert ..., By changing uop=e0 to uop=e1below
            & copy $UV/pf/IBM/db2delimfix1 to $RUNLIBS/sf/...
            so you dont lose when new uvadm installed
 180530:112637:db2delimfix1: uvcopy ver=20180518 pf=/home/uvadm/pf/IBM/db2delimfix1
 uvcopy LNX H64 license=20180518_99V_930630 site=UV_Software
 User OPtion (uop) defaults  = q1e0
 -->null to accept or enter/override -->
 did you create empty/ outdir (or remove all files)
 did you create empty/ outdir (or remove all files)
 y
 180530:112642:db2delimfix1: EOF fili01 rds=1 size=34: parm1/pgl200s1
 180530:112642:db2delimfix1: EOF filo02 wrts=1 size=34: parms/pgl200s1
 180530:112642:db2delimfix1: EOF fili01 rds=27 size=768: parm1/qjtlist1
 180530:112642:db2delimfix1: EOF filo02 wrts=27 size=768: parms/qjtlist1
 180530:112642:db2delimfix1: EOF fili03 rds=2 size=18: tmp/inputfiles
 180530:112642:db2delimfix1: EOF fild01 size=4096: parm1
 180530:112642:db2delimfix1: EOF fild02 size=4096: parms
 now cleanup jcl0--->jcl1 & expand PROCs jcl1--->jcl2
 OK to remove all files from jcl1,jcl2,jcl3 ? y/n
 y
 uvcopyx - script calling uvcopy: cleanup, to process files from: jcl0 to: jcl1
 180530:112643:cleanup: EOF fili01 rds=9 size=165: jcl0/ftpput1.jcl
 180530:112643:cleanup: EOF filo01 wrts=9 size=165: jcl1/ftpput1.jcl
 180530:112643:cleanup: EOF fili01 rds=8 size=648: jcl0/jar100.jcl
 180530:112643:cleanup: EOF filo01 wrts=8 size=403: jcl1/jar100.jcl
 180530:112644:cleanup: EOF fili01 rds=12 size=972: jcl0/jar120.jcl
 180530:112644:cleanup: EOF filo01 wrts=12 size=536: jcl1/jar120.jcl
 180530:112644:cleanup: EOF fili01 rds=18 size=1458: jcl0/jar200.jcl
 180530:112644:cleanup: EOF filo01 wrts=18 size=812: jcl1/jar200.jcl
 180530:112644:cleanup: EOF fili01 rds=3 size=243: jcl0/jgl100.jcl
 180530:112644:cleanup: EOF filo01 wrts=3 size=149: jcl1/jgl100.jcl
 180530:112644:cleanup: EOF fili01 rds=4 size=324: jcl0/jgl200.jcl
 180530:112644:cleanup: EOF filo01 wrts=4 size=211: jcl1/jgl200.jcl
 180530:112644:cleanup: EOF fili01 rds=28 size=1242: jcl0/jgl230.jcl
 180530:112644:cleanup: EOF filo01 wrts=28 size=1242: jcl1/jgl230.jcl
 180530:112644:cleanup: EOF fili01 rds=17 size=1377: jcl0/jgl320.jcl
 180530:112644:cleanup: EOF filo01 wrts=17 size=712: jcl1/jgl320.jcl
 180530:112644:cleanup: EOF fili01 rds=15 size=577: jcl0/mailsmtp.jcl
 180530:112644:cleanup: EOF filo01 wrts=15 size=562: jcl1/mailsmtp.jcl
 180530:112644:cleanup: EOF fili01 rds=7 size=345: jcl0/qjtlist.jcl
 180530:112644:cleanup: EOF filo01 wrts=7 size=345: jcl1/qjtlist.jcl
 10 files processed from jcl0 to jcl1 using uvcopy job cleanup
 cleanup complete, enter to perform PROC expansion
 script to expand PROCs in MVS JCL
 OK to remove all files from outdir jcl2 y/n ?
 y
 jclproc51 jcl1/ftpput1.jcl
 jclproc51 jcl2/ftpput1.jcl   13 in,   12 out,    0 errs
 jclproc51 jcl1/jar100.jcl
 jclproc51 jcl2/jar100.jcl   13 in,   11 out,    0 errs
 jclproc51 jcl1/jar120.jcl
 jclproc51 jcl2/jar120.jcl   17 in,   15 out,    0 errs
 jclproc51 jcl1/jar200.jcl
 jclproc51 jcl2/jar200.jcl   25 in,   22 out,    0 errs
 jclproc51 jcl1/jgl100.jcl
 jclproc51 jcl2/jgl100.jcl   23 in,   17 out,    0 errs
 jclproc51 jcl1/jgl200.jcl
 jclproc51 jcl2/jgl200.jcl   31 in,   25 out,    0 errs
 jclproc51 jcl1/jgl230.jcl
 jclproc51 jcl2/jgl230.jcl   37 in,   32 out,    0 errs
 jclproc51 jcl1/jgl320.jcl
 jclproc51 jcl2/jgl320.jcl   26 in,   21 out,    0 errs
 jclproc51 jcl1/mailsmtp.jcl
 jclproc51 jcl2/mailsmtp.jcl   18 in,   17 out,    0 errs
 jclproc51 jcl1/qjtlist.jcl
 jclproc51 jcl2/qjtlist.jcl   12 in,   10 out,    0 errs
 10 MVS JCLs in jcl1 expanded, PROCs procs, INCLUDEs includes, output jcl2
 PROC expansion complete, enter to report any PROCs/INCLUDEs NOT found
 180530:112646:procNF: EOF fili01 size=0: errs/jclproc51.err
 180530:112646:procNF: EOF filo01 size=0: errs/procNF.rpt
 vi errs/procNF      <-- to view report of PROCs not
 uvlp12 errs/procNF  <-- to print report of PROCs not
 180530:112646:includeNF: EOF fili01 size=0: errs/jclproc51.err
 180530:112646:includeNF: EOF filo01 size=0: errs/includeNF.rpt
 vi errs/includeNF      <-- to view report of INCLUDEs n
 uvlp12 errs/includeNF  <-- to print report of INCLUDEs n
 PROC expansion complete, enter to continue
 create data conversion info file datactl53I y/n ?
 ----> reply 'y' if ctl/add/masterctl51 updated or new files in JCL
 ----> reply 'n' if re-converting with no ctlfile updates & no new files
 ----> (after JCL converter enhancements)
 y
 jcldata51A - create 'datactl53I' data file info for JCL converter
            - data file info may be supplied from 3 sources
 JCL + LISTCAT + ADDitional sources (combined into 1 Indexed file)
 datajcl52 + datacat52I + dataadd52I
          - combined to ctl/datactl53 & loaded Indexed file ctl/datactl53I
  1. this script runs jcldata51 & jcldata52 to create ctl/datajcl52
  2. optional catdata51,52,catcat51 to create ctl/datacat52I
     - see script $UV/sf/IBM/catdata50 extract datafile info from LISTCATs
     - or create empty file --> makeISF0 ctl/datacat52I 191 0,44
  3. ctl/dataadd52I will be created by combining all files inctl/add/...
     ctl/add/...              <-- additional control files ofdatafile info
     $UV/ctl/add/dummy_readme   - use this if no additional files
 Have you created the dependent files described above
 and have already run initial 'copymvsctls' to setup empty files y/n ?
 y
 180530:112650:jcldata51: EOF fili01 rds=34 size=1477: jcl2/jgl230.jcl
 180530:112650:jcldata51: EOF fili01 rds=17 size=638: jcl2/mailsmtp.jcl
 180530:112650:jcldata51: EOF fili01 rds=15 size=613: jcl2/jar120.jcl
 180530:112650:jcldata51: EOF fili01 rds=23 size=984: jcl2/jar200.jcl
 180530:112650:jcldata51: EOF fili01 rds=12 size=242: jcl2/ftpput1.jcl
 180530:112650:jcldata51: EOF fili01 rds=11 size=480: jcl2/jar100.jcl
 180530:112650:jcldata51: EOF fili01 rds=17 size=784: jcl2/jgl100.jcl
 180530:112650:jcldata51: EOF fili01 rds=26 size=1238: jcl2/jgl200.jcl
 180530:112650:jcldata51: EOF fili01 rds=22 size=931: jcl2/jgl320.jcl
 180530:112650:jcldata51: EOF fili01 rds=10 size=422: jcl2/qjtlist.jcl
 180530:112650:jcldata51: sort phase complete, used 64 megabytes, sort output begin
 180530:112650:jcldata51: EOF fild01 rds=12 size=4096: jcl2
 180530:112650:jcldata51: EOF filo02 wrts=10 size=950: ctl/datajcl51
 180530:112650:jcldata52: sort phase complete, used 64 megabytes, sort output begin
 180530:112650:jcldata52: EOF fili01 rds=10 size=950: ctl/datajcl51
 180530:112650:jcldata52: EOF filo02 wrts=10 size=1120: ctl/datajcl52
 datafilenames extracted from jcl2/... to make control file of recsize,etc
 enter to combine any ADDitional info in ctl/add/... & load Indexed file
 180530:112651:catcat51: EOF fili01 rds=15 size=855: ctl/add/masterctl51_PREFIX
 180530:112651:catcat51: EOF fili01 rds=51 size=3016: ctl/add/masterctl51_README
 180530:112651:catcat51: EOF fili01 rds=65 size=4254: ctl/add/masterctl51_INSTRUCTIONS
 180530:112651:catcat51: sort phase complete, used 64 megabytes, sort output begin
 180530:112651:catcat51: EOF fild01 rds=5 size=4096: ctl/add
 180530:112651:catcat51: EOF filo01 size=0: ctl/dataadd51
 180530:112651:loadctlI70: sort phase complete, used 64 megabytes, sort output begin
 180530:112651:loadctlI70: EOF fili01 size=0: ctl/dataadd51
 180530:112651:loadctlI70: EOF filo01 size=0: ctl/dataadd52I
 180530:112651:loadctlI70: DISAM.dat: recs=0,rcsz=191,keys=1;ctl/dataadd52I
 enter to combine info from JCL, LISTCAT,& ADDitional & load Indexed file
 - Indexed file ctl/datactl53I.dat/.idx used by JCL converter
 180530:112652:ctldata53: sort phase complete, used 64 megabytes, sort output begin
 180530:112652:ctldata53: EOF fili01 rds=10 size=1120: ctl/datajcl52
 180530:112652:ctldata53: EOF filr02 rds=10 size=0: ctl/datacat52I
 180530:112652:ctldata53: DISAM.dat: recs=0,rcsz=191,keys=1; ctl/datacat52I
 180530:112652:ctldata53: EOF filr03 rds=10 size=0: ctl/dataadd52I
 180530:112652:ctldata53: DISAM.dat: recs=0,rcsz=191,keys=1; ctl/dataadd52I
 180530:112652:ctldata53: EOF filo01 wrts=10 size=1180: ctl/datactl53
 180530:112652:loadctlI70: sort phase complete, used 64 megabytes, sort output begin
 180530:112652:loadctlI70: EOF fili01 rds=10 size=1180: ctl/datactl53
 180530:112652:loadctlI70: EOF filo01 wrts=10 size=0: ctl/datactl53I
 180530:112652:loadctlI70: DISAM.dat: recs=10,rcsz=191,keys=1; ctl/datactl53I
 180530:112652:ctldata54: EOF fili01 rds=10 size=1180: ctl/datactl53
 180530:112652:ctldata54: EOF fili02 rds=25 size=1207: ctl/datactl54symbols
 180530:112652:ctldata54: EOF filo01 wrts=10 size=1180: ctl/datactl54
 180530:112652:loadctlI70: sort phase complete, used 64 megabytes, sort output begin
 180530:112652:loadctlI70: EOF fili01 rds=10 size=1180: ctl/datactl54
 180530:112652:loadctlI70: EOF filo01 wrts=10 size=0: ctl/datactl54I
 180530:112652:loadctlI70: DISAM.dat: recs=10,rcsz=191,keys=1; ctl/datactl54I
 enter to convert JCL to ksh
 script to convert mainframe JCLs to UNIX scripts
 OK to remove all files from outdir jcl3 y/n ?
 y
 jclunix51 jcl2/ftpput1.jcl
 jclunix51 jcl3/ftpput1.ksh   12 in,   64 out,    0 errs
 jclunix51 jcl2/jar100.jcl
 jclunix51 jcl3/jar100.ksh   11 in,   49 out,    0 errs
 jclunix51 jcl2/jar120.jcl
 jclunix51 jcl3/jar120.ksh   15 in,   54 out,    0 errs
 jclunix51 jcl2/jar200.jcl
 jclunix51 jcl3/jar200.ksh   23 in,   84 out,    0 errs
 jclunix51 jcl2/jgl100.jcl
 jclunix51 jcl3/jgl100.ksh   17 in,   57 out,    0 errs
 jclunix51 jcl2/jgl200.jcl
 jclunix51 jcl3/jgl200.ksh   26 in,   90 out,    0 errs
 jclunix51 jcl2/jgl230.jcl
 jclunix51 jcl3/jgl230.ksh   34 in,  109 out,    0 errs
 jclunix51 jcl2/jgl320.jcl
 jclunix51 jcl3/jgl320.ksh   22 in,   87 out,    0 errs
 jclunix51 jcl2/mailsmtp.jcl
 jclunix51 jcl3/mailsmtp.ksh   17 in,   58 out,    0 errs
 jclunix51 jcl2/qjtlist.jcl
 jclunix51 jcl3/qjtlist.ksh   10 in,   49 out,    0 errs
 10 IBM MVS JCLs converted from jcl2 to UNIX KORN shell scripts in jcl3
 JCL to ksh complete, enter to report any control card members NOT found
 180530:112655:parmNF: EOF fili01 size=0: errs/jclunix51.err
 180530:112655:parmNF: EOF filo01 size=0: errs/parmNF.rpt
 vi errs/parmNF  <-- view members Not Found (or uvlp12 to p
 perform extra conversion for Automic scheduler jcl3 ---> jcl4 y/n ?
 perform extra conversion for Automic scheduler jcl3 ---> jcl4 y/n ?
 y
 180530:112657:jclautomic2: uvcopy ver=20180518 pf=/home/uvadm/pf/IBM/jclautomic2
 uvcopy LNX H64 license=20180518_99V_930630 site=UV_Software
 did you create empty/ outdir (or remove all files)
 y
 180530:112710:jclautomic2: EOF fili01 rds=64 size=2379: jcl3/ftpput1.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=65 size=2394: jcl4/ftpput1.ksh
 180530:112710:jclautomic2: EOF fili01 rds=49 size=2263: jcl3/jar100.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=50 size=2278: jcl4/jar100.ksh
 180530:112710:jclautomic2: EOF fili01 rds=54 size=2455: jcl3/jar120.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=55 size=2470: jcl4/jar120.ksh
 180530:112710:jclautomic2: EOF fili01 rds=84 size=3589: jcl3/jar200.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=86 size=3619: jcl4/jar200.ksh
 180530:112710:jclautomic2: EOF fili01 rds=57 size=2715: jcl3/jgl100.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=58 size=2730: jcl4/jgl100.ksh
 180530:112710:jclautomic2: EOF fili01 rds=90 size=4059: jcl3/jgl200.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=92 size=4089: jcl4/jgl200.ksh
 180530:112710:jclautomic2: EOF fili01 rds=109 size=4718: jcl3/jgl230.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=112 size=4763: jcl4/jgl230.ksh
 180530:112710:jclautomic2: EOF fili01 rds=87 size=3836: jcl3/jgl320.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=89 size=3866: jcl4/jgl320.ksh
 180530:112710:jclautomic2: EOF fili01 rds=58 size=2556: jcl3/mailsmtp.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=59 size=2571: jcl4/mailsmtp.ksh
 180530:112710:jclautomic2: EOF fili01 rds=49 size=2176: jcl3/qjtlist.ksh
 180530:112710:jclautomic2: EOF filo02 wrts=50 size=2191: jcl4/qjtlist.ksh
 180530:112710:jclautomic2: EOF fili03 rds=10 size=114: tmp/inputfiles
 180530:112710:jclautomic2: EOF fild01 size=4096: jcl3
 180530:112710:jclautomic2: EOF fild02 size=4096: jcl4
 uvlp12 errs/procNF.rpt     <-- print summary report of PROCsNot Found
 uvlp12 errs/includeNF.rpt  <-- print summary report INCLUDEsNot Found
 uvlp12 errs/parmNF.rpt     <-- print summary report of PARMsNot Found
 all JCLs converted from jcl0 --> jcl1 --> jcl2 --> jcl3 (Notto jcls)
 copy scripts from jcl3 to jcls (in PATH) 1 by 1 as you test/debug
 End JCL conversion - create GDG control file
 Extract GDG files from JCL/scripts & Load $GDGCTL/gdgctl51I
 $GDGCTL=/home/mvstest9/testdata/ctl
 $GDGCTL defined in profile as $RUNDATA/ctl or $APPSADM/ctl
 - generations default to 7, later update gdgctl51 & reload gdgctl51I
 - OR extract from LISTCAT (see /home/uvadm/pf/datacat51)
 uop=c0f2g7       - option defaults
     c0           - do NOT insert file count at byte 70
     c1           - DO insert file count at byte 70
       f1         - select normal files (non GDG)
       f2         - select exportgen files
       f3         - select both normal & exportgen files
       f3         - select both normal & exportgen files
         g7       - default number of generations (gdg=007)
  - ctl/datactl53 may have gdg=... override on GDG filenames
  - ctl/datactl53 should be initially copied to ctl/add/masterctl51
  - modify "gdg=007" as desired in ctl/add/masterctl51 & reconvert
 180530:112710:jclgdgctl51: uvcopy ver=20180518 pf=/home/uvadm/pf/IBM/jclgdgctl51
 uvcopy LNX H64 license=20180518_99V_930630 site=UV_Software
 User OPtion (uop) defaults  = q1c0f2g7
 -->null to accept or enter/override -->
 180530:112711:jclgdgctl51: EOF fili01 rds=87 size=3836: jcl3/jgl320.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=109 size=4718: jcl3/jgl230.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=54 size=2455: jcl3/jar120.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=90 size=4059: jcl3/jgl200.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=49 size=2263: jcl3/jar100.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=58 size=2556: jcl3/mailsmtp.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=84 size=3589: jcl3/jar200.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=64 size=2379: jcl3/ftpput1.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=57 size=2715: jcl3/jgl100.ksh
 180530:112711:jclgdgctl51: EOF fili01 rds=49 size=2176: jcl3/qjtlist.ksh
 180530:112711:jclgdgctl51: sort phase complete, used 64 megabytes, sort output begin
 180530:112711:jclgdgctl51: EOF fild01 rds=12 size=4096: jcl3
 180530:112711:jclgdgctl51: EOF filo02 wrts=3 size=207: ctl/gdgctl51
 run following to load GDG control file in $RUNDATA/ctl
 ---> cp $RUNLIBS/ctl/gdgctl51 $RUNDATA/ctl/  <-- copy to RUNDATA
 ---> uvcopy gdgload51                <-- load gdgctl51I.dat/.idx
 answer 'y' below to overwrite/reload any existing $GDGCTL/gdgctl51I ?
 answer 'n' below if you edited gdgctl51 with desired generations & reloaded gdgctl51I
 - will save any existing $GDGCTL/gdgctl51 file with date/time stamp
 overwrite/reload any existing $GDGCTL/gdgctl51I y/n ?
 y
 load gdgctl text file to Indexed file, shifting keywords over for maxkey
 180530:112714:gdgload51: uvcopy ver=20180518 pf=/home/uvadm/pf/IBM/gdgload51
 uvcopy LNX H64 license=20180518_99V_930630 site=UV_Software
 180530:112714:gdgload51: sort phase complete, used 64 megabytes, sort output begin
 180530:112714:gdgload51: EOF fili01 rds=3 size=207: /home/mvstest9/testdata/ctl/gdgctl51
 180530:112714:gdgload51: EOF fili02 rds=25 size=1207: ctl/datactl54symbols
 180530:112714:gdgload51: EOF filo01 wrts=3 size=0: /home/mvstest9/testdata/ctl/gdgctl51I
 180530:112714:gdgload51: DISAM.dat: recs=3,rcsz=2047,keys=1;/home/mvstest9/testdata/ctl/gdgctl51I
 Recommend running folllowing scripts before testing
 testdatainit            #<-- init various testdata subdirs &reload gdgctl51I
 xrefall cbls jcl1 jcl3  #<-- recommend running JCL & COBOL cross-references
 runjclstats  jcl2 jcl3  #<-- create statistics table summarycounts in stats/...
 runsysinrpts jcl3 rpts  #<-- create various reports for DFSORT complex functions,etc
 <@uvsoft5:mvstest9:/home/mvstest9/testlibs> exit
 exit
 Script done on Wed 30 May 2018 11:27:21 AM PDT
 <@:mvstest1:/home/mvstest1/testlibs> cp jcl3/* jcls
                                      ===========
Note
  • console logs (as above) can be captured into a date/time stamped file
    by uncommenting 9 '##' lines at end of profile
  • see console logging doc at ADMjobs.htm#Part_6
  • 'console logging' captures operator replies
  • 'job logging' (using joblog script) does NOT capture operator replies

concise operating instructions

The following pages include the console log displays & document the prompts and responses you should make. But after you become familiar with the operating instructions, you will probably prefer to use a more 'concise' set of operating instrucitons without so many console displays.


 If so please see JCLcnv2real.htm
 ==================================

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

3F4. JCL conversions using VU demo files

converting 1 at a time vs All (above)

Use script 'jcl2ksh51' for 1 at a time vs 'jcl2ksh51A' for All in directory.


 jcl2ksh51 jcl0/jar100.jcl  <-- example, convert jar100.jcl
 =========================      from jcl0 --> jcl2 --> jcl2 --> jcl3
 jcl0 -----> jcl1 ---------> jcl2 ---------> jcl3 ------> jcls
    cleanup    PROC expand    convert to ksh   copy 1 at a time to test

You must 1st use 'jcl2ksh51A' to convert All because it also converts the PROCs and PARMs. Use 'jcl2ksh51' for later additions from the mainframe.

Alternative for AIX COBOL


 jcl2ksh53 jcl0/jar100.jcl  <-- example, convert jar100.jcl
 =========================      from jcl0 --> jcl2 --> jcl2 --> jcl3

converting All JCL without Procs & Parms


 jclxx51 jcl2 jcl3     <-- convert all jcl2/* --> jcl3/... (Micro Focus)
 =================

 jclxx53 jcl2 jcl3     <-- convert all jcl2/* --> jcl3/... (AIX)
 =================

You might use jclxx51/jclxx53 to reconvert JCL to scripts when you do not need to to repeat the JCL cleanup & proc expand jcl0 --> jcl1 --> jcl2 Use if you modify the JCL converter control file OR if UV Software has enhanced the JCL converter to fix problems you have reported.

re-expanding PROCs


 jclpx51 jcl2 jcl3    <-- expand PROCs in all jcl1/* --> jcl2/...
 =================

You might use jclpx51 to re-expand the PROCs in all jcl1/* --> jcl2/... Use if you modify the jclprocop51 options in the JCL converter control file ($RUNLIBS/ctl/jclunixop51) OR if UV Software has enhanced the PROC expansion utility to fix problems you have reported.

Note that there is no separate script/program for AIX proc expansion as required for JCL conversion.

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

Part_4 Execute converted JCL/scripts

Part 4 - Contents


4A1. Pre-requisites required to execute converted JCL/scripts

4B1. Directories required (testlibs & testdata)

4B2. testlibs subdirs reqquired for converting JCL/COBOL
- see listings in Part_2

4B3. testdata subdirs & data files to execute JCL/scripts & COBOL programs
- some data files listed in 4D1

4D1. Data-Files provided for Test/Demos
ar.customer.master & ar.sales.items
gl.account.master_000001 & gl.account.trans_000001

4E1. Job-Logging & Console-Logging

4E2. Execute jar100.ksh with job-logging
- writes log to joblog/jar100.log

4F0. Execute all demo JCL/scripts

4F1. jar100.log - 1 step COBOL

4F2. jar120.log - 1 step COBOL

4F3. jar200.log - SORT + COBOL

4F4. jgl100.log - GDG files with COBOL

4F5. jgl200.log - GDG files + SORT + COBOL

4F6. jgl300.log - IEBGENER + IDCAMS + COND

4F7. jgl320.log - IEBGENER + IDCAMS + IF/THEN/ELSE

4F8. ftpput1.log - FTP (to same machine)

4F9. mailsmtp.log - IEBGENER/SMTP to appsadm

4F10. qjtlist.log - QuikJob to uvcopy

4F11. eztlist.log - EasyTrieve to uvcopy

4F12. icetool3.log - EasyTrieve to uvcopy

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

4A1. Pre-requisites Required to Execute JCL/scripts

Mandatory Pre-requisites

These are links to other parts of the documentation that you may need to refer to if you have problems running the test/demos.

If you are converting your own JCL/COBOL (vs test/demos), see JCLcnv2real.htm for more co mplete & comprehensive conversion operating instructions.


3D1. Setup superdirs testlibs/testdata in your homedir/... (or separate user)
Created subdirs with scripts mvslibsdirs/mvslibsdata,& copied control files
with script copymvsctls.

3D2. Copied test/demo JCL, COBOL,& DATA files from $UV/mvstest/testlibs,testdata
to your homedir/testlibs,testdata with script 'CopyMvsDemoFiles'

3E1. Converted COBOL copybooks with cnvMF51Acpy & COBOL programs with cnvMF51A

3E4. Compiled COBOL programs with mfcblA

3F1. Converted JCLs jcl0/* --> jcl1 --> jcl2 --> jcl3 using script jcl2ksh51A
(or jcl2ksh53A for AIX COBOL).
Note
  • jcl2ksh51A also creates the GDG control file $GDGCTL/gdgctl51I.dat/.idx
    (GDGCTL defained in common_profile as $RUNDATA/ctl or $APPSADM/ctl)
  • by calling 'uvcopy jclgdgctl51' to extract GDG filenames from JCL
    and load the control file with 'uvcopy gdgload51'
Note
  • If jcl2ksh51A failed to create the GDG control file, you can create
    separately (from the JCL conversion) as shown on page '5G1'

5G1. Create the GDG control file with jclgdgctl51 & gdgload51

Optional Tasks


6B1. Converted Quikjob 'qjtlist1' to run 'qjtlist.ksh'

6C1. Converted Easytrieve 'eztlist1' to run 'eztlist.ksh'

JCLcnv3aids.htm#1A1 - run cross-references with script 'xrefall'

 JCLcnv3aids.htm#1L1 - run mvsfiles reports to show essential input files
       required for each JCL/script (reports in xmvs/jobname/ subdir)
       OR for all JCLs combined (reports in xmvsA/...)

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

4B1. Pre-requisites Required to Execute JCL/scripts

essential LIBRARY subdirs for executions

 /home/userxx          <-- setup testlibs in your homedir
 :-----testlibs        <-- $RUNLIBS libraries for JCL & COBOL conversions
 :     :--*--cblx      <-- compiled COBOL programs
 :     :--*--ctl       <-- control files (jclunixop51,datactl53I,cobfilesI,etc)
 :     :--*--parms     <-- SYSIN modules (control cards)
 :     :--*--jcl2      <-- JCLs with PROCs expanded (prior to conversion)
 :     :--*--jcl3      <-- JCL/scripts (Korn shells converted from JCLs)
 :     :-----jcl4      <-- JCL/scripts encoded with I/O,recsize,Packed/Binary
 :     :                   (optional, can convert to jcl3 & copy to jcls)
                         - following subdirs yet to be populated
 :     :-----jcls        - JCL/scripts must be copied here for EXECUTION
 :     :                   (in the PATH defined in common_profile)
 :     :                 - copy 1 at a time when ready to debug each JCL/script
 :     :-----xmvs        - generate reports of essential input data files
 :     :-----xref        - cross-references

essential DATA subdirs for executions

 /home/userxx              <-- setup testdata in your homedir
 :-----testdata            <-- $RUNDATA data dirs for JCL/script executions
 :     :-----ctl           <-- control files
 :     :-----data1           - datafiles
 :     :-----joblog          - programmer debug log files
 :     :-----jobtmp          - temp files for new GDGs (restored at normal EOJ),
 :     :-----                  interstep files,& SYSIN instream data
 :     :-----sysout          - SYSOUT printer files
 :     :-----tmp             - tmp subdir for uvsort & misc use
Note
  • The above shows only essential directories for JCL/script executions
  • page '4B2' below reviews the subdirs & some files used in conversions
  • page '4B3' below shows the data subdirs & data files required
    for JCL/script executions

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

4B2. Demo JCL/COBOL files to Execute converted JCL/scripts

JCL/COBOL test/demo Libraries

Here are the sub-directories & demo files used for JCL/COBOL conversions. We show names of JCL/COBOL demo files only for: cbl0,cpy0,jcl0,parm0,proc0,include0. Part_3 has already converted to output subdirs: cbls,cpys,jcls,parms,procs. Part_2 has already listed the JCL/scripts. You can see some of the COBOL programs listed in https://uvsoftware.ca/MVSCOBOL.htm#Part_2

 /home/uvadm/mvstest/mvstest1/testlibs1  <-- test/demo libraries supplied
 /home/userxx                            <-- can copy to your homedir
 :-----testlibs
 :     :--UV--cbl0        - COBOL programs ('*' means files present)
 :     :      :----car100.cbl,car200.cbl,cgl100.cbl,cgl200.cbl
 :     :------cbl1        - cleaned up, cols 1-6 & 73-80 cleared, etc
 :     :------cbl2        - cnvMF5 converts mainframe COBOL to MicroFocus COBOL
 :     :------cbls        - copy here (standard source library) before compiling
 :     :------cblst       - cobol source listings from compiles
 :     :------cblx        - compiled COBOL programs (.int's)
 :     :--UV--cpy0        - for COBOL copybooks
 :     :      :----custmas.cpy,saledtl.cpy,sdline.cpy,stline.cpy,unixproc1.cpy,unixwork1.cpy
 :     :------cpy1        - cleaned up, cols 1-6 & 73-80 cleared, etc
 :     :------cpy2        - cnvMF5 converts mainframe COBOL to MicroFocus COBOL
 :     :------cpys        - copy here (standard copybook library)
 :     :--UV--ctl         - control files for JCL/COBOL conversions
 :     :      :----add    - subdir for created control files
 :     :      :----cnvcob5.tbl,cobdirectives,extfh.cfg,jclunixop51
 :     :------errs        - JCL converter writes ERROR reports here
 :     :--UV--jcl0        - test/demo JCLs supplied
 :     :      :----jar100.jcl,jar200.jcl,jgl100.jcl,jgl200.jcl,jgl230.jcl,jgl320.jcl
 :     :------jcl1        - intermediate conversion 73-80 cleared
 :     :------jcl2        - PROCs expanded from procs
 :     :------jcl3        - JCLs converted to Korn shell scripts
 :     :------jcls        - copy here manually 1 by 1 during test/debug
 :     :--UV--parm0       - control cards & includes (SORT FIELDS, etc)
 :     :      :----pgl200s1,qjtlist1
 :     :------parms       - control cards with 73-80 cleared
 :     :--UV--proc0       - test/demo PROCs supplied
 :     :      :----pgl100.prc,pgl200.prc
 :     :--UV--include0    - test/demo PROCs supplied
 :     :      :----include1,include2
 :     :------procs       - will be merged with jcl1, output to jcl2
 :     :------qj0         - QuikJobs selected from parms
 :     :------qj1,qj2,qjs
 :     :------ezt0        - Easytrieves selected from parms
 :     :------ezt1,ezt2,ezts
 :     :------tmp         - tmp subdir used by uvsort & various conversions
 :     :------xref        - cross-references (see XREFjobs.htm)

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

4B3. DATA files to Execute converted JCL/scripts

data subdirs for test/demo executions

Here are the sub-dirs & demo data files used to test the JCL/COBOL conversions. We will list a few of the data files on the following pages.

 /home/uvadm/mvstest/mvstest1/testdata1  <-- test/demo demo data files supplied
 /home/userxx                            <-- can copy to your homedir
 :-----testdata                    <-- data dirs (defined as $RUNDATA in JCL/scripts)
 :     :--UV--ctl                    - control files
 :     :      :-----jclunixop51    <-- JCL converter options
 :     :      :-----gdgctl51       <-- GDG control file (created from GDG files in JCL)
 :     :      :-----gdgctl51I.dat    - loaded to Indexed file for executions
 :     :      :-----gdgctl51I.idx
 :     :--UV--data1       - datafiles supplied for test/demos
 :     :      :-----ar.customer.master
 :     :      :-----ar.customer.master.indexed.dat
 :     :      :-----ar.customer.master.indexed.idx
 :     :      :-----ar.customer.master.updates
 :     :      :-----ar.customer.nameadrs.list100
 :     :      :-----ar.sales.items
 :     :      :-----gl.account.acntlist_000001
 :     :      :-----gl.account.master_000001
 :     :      :-----gl.account.master_000002
 :     :      :-----gl.account.tran1
 :     :      :-----gl.account.trans_000001
 :     :      :-----gl.account.trans_000002
 :     :------jobctl      - used for job restart at specified step#
 :     :------joblog      - programmer debug log files
 :     :------jobmsgs     - status msgs from JCL/scripts
 :     :------jobtimes    - job/step times date stamped history files
 :     :------jobtmp      - temporary files for SYSIN instream data
 :     :------sysout      - SYSOUT printer files
 :     :------tmp         - tmp subdir for uvsort & misc use

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

4D1. DATA files to Execute converted JCL/scripts

ar.customer.master - customer master & sales history

Fixed length 256 byte records, no terminating linefeeds - 32 records containing 24 packed decimal fields for thisyear & lastyear (mainframe COBOL type file). Record layout below is one relative, Vancouver Utilities require zero relative.

record layout

           001-006 - customer#
           009-009 - delete flag (D)
           011-035 - customer name
           036-060 - address
           061-076 - city
           078-079 - province
           081-090 - postal code
           091-102 - phone#
           103-120 - contact name
           121-180 - this year sales 12 x 5 byte packed fields
           181-240 - last year sales 12 x 5 byte packed fields
           241-256 - unused (no LineFeed at end record)

ar.customer.master - 1st record displayed by uvhd


 uvhd ar.customer.master r256s2  - execute uvhd to display dat1/custmas1
 ==============================  - option 'r' defines record-size (r256)
                                 - option 's2' space between 3 line hex groups
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
                      10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
         3333332222454545444244545524542222233332445442544422222222224444
         130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
      64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ..4V|...
         4442222222222442535343222233323332333324455525544442222201357000
         9DF00000000002306931810000250D754D55310C12290725E38000000246C000
     128 .........W0....`........)X}..f3.....\.................4V}.......
         0000000005300016000000002570063100095000000000000000013570000000
         0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0000C00
     192 .E|...V}.......................f.....<........f.C 19950531
         0470005700000000880000000018000680001300000000694233333333222222
         35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
Note
  • 24 * 5 byte packed fields start at byte 120
  • vertical hex converted to horizontal hex would be x'001234567C'
  • packed positive signs are x'_C' & negative signs are x'_D'
  • see negative packed field in byte 195-199 x'000004567D'

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

4D2. Test/Demo Data-Files for converted JCL/scripts

ar.sales.items - customer sales detail

          1         2         3         4         5         6
 1234567890123456789012345678901234567890123456789012345678901234
 CUST#    SLM  DATE   INV#     PROD#     QTY   PRICE    AMOUNT
 130140    21 990802 IN111001  HAM001  000020 0000101 000002020
 130140    21 000802 IN111001  SCR012  000021 0001001 000021021
 130140    21 010802 IN111001  CHR001  000022 0010001 000220022
 139923    35 980802 IN111002  TAB013  000023 0000201 000004623
 139923    35 990807 IN111002  TAB013  000024 0002001 000048024
 150825    44 010804 IN1122    HAM001  000025 0020001 000500025
 150825    44 020804 IN1122    HAX129  000026 0000301 000007826
 201120    44 030807 CR5234    WHIP75  000027 0003001 000081027
 223240    65 010816 CR955     HAM001  000028 0030001 000840028
 223240    65 020816 IN441     BBQ001  000029 0000101 000002929
 308685    21 020812 IN6605    SAW051  00001p 0000101 00000101p
 308685    21 030812 IN6605    WHIP75  00001q 0001001 00001101q
 308685    21 040812 CR8835    TAB013  00001r 0010001 00012001r
 315512    44 040805 IN2251    HAM001  00001s 0000201 00000261s
 315512    44 050805 IN2251    SAW051  00001t 0002001 00002801t
 315512    44 060805 IN2255    WHIP75  00001u 0020001 00030001u
 400002    85 990812 CR245     HAX129  00001v 0000101 00000161v
 406082    35 010815 IN33001   BBQ001  00001w 0001001 00001701w
 406082    35 020815 IN33001   TAB013  00001x 0010001 00018001x
 406082    65 030816 IN441     HAM001  00001y 0000101 00000191y
Note
  • QTY & AMOUNT fields are unpacked numeric with zoned signs
  • ASCII negative signed fields have x'7_' in units zones
  • which display as lower case letters p-y for digits 0-9
  • vs EBCDIC negative zoned signs },J-R for digits 0,1-9
  • EBCDIC positive zoned signs are {,A-I for digits 0,1-9
    (no equivalent ASCII positive zoned signs, just digits 0-9)

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

4D3. Test/Demo Data-Files for converted JCL/scripts

gl.account.master_000001 - GL master

data1/gl.account.master_ is a GDG file with packed fields, so must use 'uvhd':


 uvhd data1/gl.account.master_000001 r128 <-- display 128 byte records in hex
 ========================================   - 1st 3 records shown below
                      10        20        30        40        50        60
 r#        1 0123456789012345678901234567890123456789012345678901234567890123
           0  11100       11100Royal Bank Lynn Valley        ....b.20090131
             2333332222222333335676624666247662566667222222220010683333333322
             0111000000000111002F91C021EB0C9EE061CC590000000000972C2009013100
          64
             2222222222222222222222222222222222222222222222222222222222222222
             0000000000000000000000000000000000000000000000000000000000000000
                      10        20        30        40        50        60
 r#        2 0123456789012345678901234567890123456789012345678901234567890123
         128  11200       11200VISA settlement               .....\20090131
             2333332222222333335454276776666672222222222222220000853333333322
             011200000000011200693103544C5D5E400000000000000000197C2009013100
          64
             2222222222222222222222222222222222222222222222222222222222222222
             0000000000000000000000000000000000000000000000000000000000000000
                      10        20        30        40        50        60
 r#        3 0123456789012345678901234567890123456789012345678901234567890123
         256  11500       11500Investments RBMF              ..4.1.20090131
             2333332222222333334676776667725444222222222222220039313333333322
             0115000000000115009E6534D5E43022D60000000000000001421C2009013100
          64
             2222222222222222222222222222222222222222222222222222222222222222
             0000000000000000000000000000000000000000000000000000000000000000

gl.account.trans_000001 - GL transactions

 00011100T Bank Fee                      000000100} 1234BJ      040428
 00011100T EMJ Sony Tape Drive           000012314J 1234BC000871040428
 00011100T Telephone                     000000559Q 1234BC000882040428
 00011100T FEDEX                         000000109J 1234BC000870040428
 00011100T VISA payment                  000040000} 1234BC000884040428
 00011100T Staples office supplies       000001227N 1234BC000874040428
 00011100T Datex office rent             000003210} 1234BC000885040428
 00011200T VISA payment                  0000400000 1234BC000884040428
 00011200T Dollar rent a car             000014177O 1234VS      040428
 00033700T EMJ Sony Tape Drive           0000008056 1234BC000871040428
 00033700T Telephone                     0000000344 1234BC000882040428
 00033700T FEDEX                         0000001091 1234BC000870040428
 00033700T Staples office supplies       0000000754 1234BC000874040428
 00033700T Datex office rent             0000002100 1234BC000885040428
 00061500T EMJ Sony Tape Drive           0000115085 1234BC000871040428
 00062200T Staples office supplies       0000011521 1234BC000874040428
 00063300T Dollar rent a car             0000141776 1234VS      040428
 00074100T Bank Fee                      0000001000 1234BJ      040428
 00075100T Datex office rent             0000030000 1234BC000885040428
 00075300T Telephone                     0000005254 1234BC000882040428

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

4E1. JCL/COBOL executions using VU demo files

Job-Logging & Console-Logging

Console-Logging captures the entire login session from login to logout (vs the 'joblog' script which captures the log only for 1 job at a time).

'console-logging' is better for batch shifts where an operator is manually running the JCL/scripts, 'better' because it captures the entire login session, including any commands between jobs and any responses to prompts.

'job-logging' is better for programmers who are running 1 job at a time and may want to review the log for jobs that roll off the screen. See 3 joblog scripts reviewed on the next page.

Console Logging

  1. Console-Logging will capture the entire login session from login to logout (vs the 'joblog' script which captures the log only for 1 job at a time).

  2. Console-logging captures ALL screen I/O including any reponses to prompts, and any unix commands the operator might do between running jobs.

  3. Console-logging requires subdirs matching your login name ($LOGNAME) to be setup in $APPSADM/log1,log2,log3.

  4. The log is collected in $APPSADM/log1/$LOGNAME and processed to $APPSADM/log2/$LOGNAME (to remove screen control characters), either by a nightly scheduled cron job, or by logging off & back on.

  5. If operators need to see the console log, they need to logoff & back on They can then use the 'logview' script to see the recent logs.

  6. To activate console-logging you must uncomment the 9 '##' lines near the end of your .profile.

  7. You must also have copied the supplied $APPSADM/env/kshrc to your .kshrc (or $APPSADM/env/bashrc to .bashrc if you use the bash shell vs Korn shell) .kshrc/.bashrc set up the PS1 prompt expected by the logfix processing.

  8. .kshrc/.bashrc also contain the same aliases & umask as the common_profile. These would otherwise be lost by the 'script' command (at end of profile) because 'script' invokes another level of the shell.

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

4E2. JCL/COBOL executions using VU demo files

Job-Logging

Three versions of the joblog script are provided:

joblog
  • intended for programmer test/debug
  • does NOT date/time stamp joblog/filename
  • prompts for logfile disposition (vi, uvlp12, date/time stamp, etc)
joblog1
  • date/time stamps joblog/filename_date_time
  • does NOT prompt for logfile disposition
  • could use for production if running jobs serially
    either manually or by a scheduler that submits jobs serially
joblog2
  • date/time stamps joblog/filename_date_time
  • waits for any existing same-name job to complete
    before starting a new job of same-name
  • recommended for production by multiple operators
    that may run the same job at the same time.

joblog sample


 joblog jar100.ksh     <-- run jar100.ksh using 'joblog' to capture log
 =================         into $RUNDATA/joblog/jar100.log

 vi joblog/jar100.log  <-- review joblog (good for long jobs)
 ====================

 uvlp12 joblog/jar100.log  <-- can print to document problems
 ========================      for resolution by reponsible programmer
 160215:144454:jar100: Begin Job=jar100
 160215:144454:jar100: /home/mvstest1/testlibs1/jcls/jar100.ksh
 160215:144454:jar100: Arguments: jar100.ksh
 160215:144454:jar100: ProcessID=20971
 160215:144454:jar100: RUNDATE=20160215
 160215:144454:jar100: RUNLIBS=/home/mvstest1/testlibs1
 160215:144454:jar100: RUNDATA=/home/mvstest1/testdata1
 160215:144454:jar100: JTMP=jobtmp/jar100
 160215:144454:jar100: SYOT=sysout/JAR100
 160215:144454:jar100: LOGNAME=mvstest1 TESTPROD=T000
 160215:144454:jar100: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144454:jar100: ******** Begin Step S0010 car100 (#1) ********
 160215:144454:jar100: file: CUSTMAS=data1/ar.customer.master fsize=8K
 160215:144454:jar100: file: NALIST=data1/ar.customer.nameadrs.list100 fsize=4K
 160215:144454:jar100: file: SYSOUT=sysout/JAR100/jar100_S0010_SYSOUT_160215_144454 fsize=0K
 160215:144454:jar100: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/car100
 160215:144454:jar100: SCC = 0
 160215:144454:JAR100: StepTimes: S0010 car100 Begun=14:44:54 End=14:44:54 Elapsed=00:00:00
 160215:144454:JAR100: Job Times: Begun=14:44:54 NormalEnd=14:44:54 Elapsed=00:00:00
 160215:144454:jar100: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

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

4E3. JCL/COBOL executions using VU demo files

run jar100.ksh with joblog & investigate report


 joblog jar100.ksh   <-- run jar100.ksh using 'joblog'
 =================     - captures log into $RUNDATA/joblog/jar100.log (see above)
                       - creates report in $RUNDATA/data1/... (see below)

 vi data1/ar.customer.nameadrs.list100
 =====================================

CAR100: CUSTOMER NAME & ADDRESS LIST 141210

 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANAIMO          BC V9S1H1
 132588    GEECOE GENERATOR SERVICESUNIT 170 - 2851 SIMPSON  RICHMOND         BC V6X2R2
 139923    JOHNSTONE BOILER & TANKS 1250 EAST PENDER STREET  VANCOUVER        BC V5L1W1
 142175    LILLY ELECTRIC (1973) LTD16809 - 24TH AVENUE      SURREY           BC V4B5E7
 145264  D MAGRATH SUPPLIES LTD.    1939 KIRSCHNER ROAD      KELOWNA          BC V1Y4N7
 147615  X O'CONNER R.V. CENTRE     44430 YALE ROAD WEST     CHILLIWACK       BC V2P6J1
 149304    POINT GREY GOLF & COUNTRY3350 S.W. MARINE DRIVE   VANCOUVER        BC V6N3Y9
 150825    RIGGERS INDUSTRIAL       960 - 6TH AVENUE         HOPE             BC
 152355    SHAW, JOHN               477 CARIBOO CRES.        PORT COQUITLAM   BC V3M1X1
 154688    TAURUS RESOURCES         1110 - 625 HOWE STREET   VANCOUVER        BC V6C2T6
 157352  D WHYTE, W.                1150 LODGE ROAD          NORTH VANCOUVER  BC V7R1W8
 173320  X ZENITH TRANSPORT         2381 ROGERS AVE          COQUITLAM        BC V3K5Y2
 201120    ALLTYPE RENTAL LTD.      BOX 1819                 DRAYTON VALLEY   AL T0E0M0
 204700    CASE POWER EQUIPMENT     12611-100 ST             GRANDE PRAIRIE   AL T8V4H2
 208060    E&L TRUCKING             LAND & CATTLE LTD        WARBURG          AB T0C2T0
 211140  D FORD NEW HOLLAND         BOX 1, 440 ELLIS ROAD    WINTERBURN       AB T0E2N0
 223240  X NICHOLSON CHEVROLET LTD. 7215 ARGYLL ROAD         EDMONTON         AL T6C4J2
 224700    OTTO MOBILES WESTERN LTD.8441 CORONET ROAD        EDMONTON         AL T6E4N7
 231550    SPARROW ELECTRIC CO. LTD.BOX 88                   NISKU            AL T0C2G0
 234300    TERRITORIAL REWIND       BPX 1648                 YELLOWKNIFE      NW X1A2P2
 237286    WEBER, TOM               BOX 5503                 FORT MCMURRAY    AL T9H3G5
 301120  D ALBERTA GAS CHEMICALS LTD3RD. FLOOR, 11456 JASPER EDMONTON         AL T5K0M1
 306959  X 356582 ALBERTA LTD.      DEVITT NURSERY           CALGARY          AL T2T5N1
 308685    FOOTHILLS ELECTRIC       3932 - 3A ST. N.W.       CALGARY          AL T2E6R4
 313720    MONITREX ENGINEERING LTD 7-2280-39 AVE, N.E.      CALGARY          AL T2E6P7
 315512    PARTS PLUS               BOX 510 MAIN ST          THREE HILLS      AB T0M2A0
 318833    TOP NOTCH CONSTRUCTION   BOX 308, STN J           CALGARY          AL T2A4X6
 400002    ACKLANDS LTD             945 -2ND AVE             PRINCE GEORGE    BC V2L3A7
 401210    COAST RANGE CONSTRUCTION 1103-207 W. HASTINGS ST  VANCOUVER        BC V6B1H7
 402875    HULL, DON & SONS LTD.    BOX 1297                 PRINCE GEORGE    BC V2L4V3
 403887  D MILNER, LARRY            BOX 28 RAU ROAD R.R.8    QUESNEL          BC V2J5E6
 406082    PRECAM RENTALS LTD:      10116-94TH AVE           FORT ST. JOHN    BC V1G5G6

Test/Debug Tips

See 'Part_5' for several useful testing/debugging tips. Especially note '5D1' using script 'testdatainit' to clear old temporary files before you run a test, so you can check your outputs in joblog, jobtmp, sysout, etc without the clutter of prior tests.

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

4F0. JCL/COBOL executions using VU demo files

Executing All Test/Demo JCL/scripts

We have already executed the 1st (jar100) of our demo JCL/scripts on page '4D2' to demo job logging - captures the log into subdir joblog/______.log We will now execute all the demo JCL/scripts but with minimal output shown (usually just the joblog, perhaps with a few notes).

If you wish you could execute them all as follows. We are using joblogging so you can later review all the joblogs & investigate/rerun any failures.

Login userxx --> /home/userxx (or whatever Login desired)


 cdd --> $HOME/testdata
 ======================
      - best to be in testdata/ to easily inspect datafiles in subdir data1/...

4F1. joblog jar100.ksh
=================
4F2. joblog jar120.ksh
=================
4F3. joblog jar200.ksh
=================
4F4. joblog jgl100.ksh
=================
4F5. joblog jgl200.ksh
=================
4F6. joblog jgl230.ksh
=================
4F7. joblog jgl320.ksh
=================
4F8. joblog ftpput1.ksh
==================
4F9. joblog mailsmtp.ksh
===================
4F10. joblog qjtlist.ksh
==================
4F11. joblog eztlist.ksh
==================
4F12. joblog icetool3.ksh
===================

 vi joblog/*  <-- review all joblogs, listings start on next page --->
 ===========

 investigate/rerun any failures you get at your site
 ===================================================
Note
  • see all demo JCL/scripts listed on pages '2A1' thru '2L1'

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

4F1. JCL/COBOL executions using VU demo files


 #1. joblog jar100.ksh
     =================

jar100.log - 1 step COBOL

 160215:144454:jar100: Begin Job=jar100
 160215:144454:jar100: /home/mvstest1/testlibs1/jcls/jar100.ksh
 160215:144454:jar100: Arguments: jar100.ksh
 160215:144454:jar100: ProcessID=20971
 160215:144454:jar100: RUNDATE=20160215
 160215:144454:jar100: RUNLIBS=/home/mvstest1/testlibs1
 160215:144454:jar100: RUNDATA=/home/mvstest1/testdata1
 160215:144454:jar100: JTMP=jobtmp/jar100
 160215:144454:jar100: SYOT=sysout/JAR100
 160215:144454:jar100: LOGNAME=mvstest1 TESTPROD=T000
 160215:144454:jar100: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144454:jar100: ******** Begin Step S0010 car100 (#1) ********
 160215:144454:jar100: file: CUSTMAS=data1/ar.customer.master fsize=8K
 160215:144454:jar100: file: NALIST=data1/ar.customer.nameadrs.list100 fsize=4K
 160215:144454:jar100: file: SYSOUT=sysout/JAR100/jar100_S0010_SYSOUT_160215_144454 fsize=0K
 160215:144454:jar100: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/car100
 160215:144454:jar100: SCC = 0
 160215:144454:JAR100: StepTimes: S0010 car100 Begun=14:44:54 End=14:44:54 Elapsed=00:00:00
 160215:144454:JAR100: Job Times: Begun=14:44:54 NormalEnd=14:44:54 Elapsed=00:00:00
 160215:144454:jar100: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

Notes re 'jar100.ksh'

  1. See original mainframe JCL at '2A1' & converted script at '2A2'. See listing of original mainframe COBOL program at MVSCOBOL.htm#2D1. See listing of converted program for Micro Focus COBOL at MVSCOBOL.htm#2D2.

  2. You can investigate the input file with 'uvhd' as follows. Can not use 'vi' because of packed fields & no LineFeeds See uvhd display of 1st record (of 32) on page '4C1'.


    uvhd data1/ar.customer.master r256
    ==================================
  1. You can inspect the printer output report with 'vi' as follows:


    vi data1/ar.customer.master.list100
    ===================================

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

4F2. JCL/COBOL executions using VU demo files


 #1. joblog jar120.ksh  - test date input from PARM vs SYSIN
     =================

jar120.log - 1 step COBOL

 160815:154242:jar120: Begin Job=jar120
 160815:154242:jar120: /home/mvstest1/testlibs1/jcls/jar120.ksh
 160815:154242:jar120: Arguments: jar120.ksh
 160815:154242:jar120: ProcessID=16648
 160815:154242:jar120: RUNDATE=20160815
 160815:154242:jar120: RUNLIBS=/home/mvstest1/testlibs1
 160815:154242:jar120: RUNDATA=/home/mvstest1/testdata1
 160815:154242:jar120: JTMP=jobtmp/jar120
 160815:154242:jar120: SYOT=sysout/JAR120
 160815:154242:jar120: LOGNAME=mvstest1 TESTPROD=T000
 160815:154242:jar120: HOSTNAME=uvsoft5.uvsoftware.ca
 160815:154242:jar120: ******** Begin Step S0010 car120 (#1) ********
 160815:154242:jar120: file: CUSTMAS=data1/ar.customer.master fsize=8K
 160815:154242:jar120: file: NALIST=data1/ar.customer.nameadrs.list120 fsize=4K
 160815:154242:jar120: file: SYSOUT=sysout/JAR120/jar120_S0010_SYSOUT_160815_154242 fsize=0K
 160815:154242:jar120: file: SYSIN=jobtmp/jar120/S0010_car120_SYSIN fsize=0K
 160815:154242:jar120: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/car120
 160815:154242:jar120: SCC = 0
 160815:154242:JAR120: StepTimes: S0010 car120 Begun=15:42:42 End=15:42:42 Elapsed=00:00:00
 160815:154242:JAR120: Job Times: Begun=15:42:42 NormalEnd=15:42:42 Elapsed=00:00:00
 160815:154242:jar120: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

Notes re 'jar120.ksh'

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

4F3. JCL/COBOL executions using VU demo files


 #2. joblog jar200.ksh
     =================

jar200.log - SORT + COBOL


 joblog jar200.ksh
 =================
 151102:142852:jar200: Begin Job=jar200
 151102:142852:jar200: /home/mvstest/testlibs/jcls/jar200.ksh
 151102:142852:jar200: Arguments: jar200.ksh
 151102:142852:jar200: ProcessID=23318
 151102:142852:jar200: RUNDATE=20151102
 151102:142852:jar200: RUNLIBS=/home/mvstest/testlibs
 151102:142852:jar200: RUNDATA=/home/mvstest/testdata
 151102:142852:jar200: JTMP=jobtmp/jar200
 151102:142852:jar200: SYOT=sysout/JAR200
 151102:142852:jar200: LOGNAME=mvstest TESTPROD=T000
 151102:142852:jar200: HOSTNAME=uvsoft5.uvsoftware.ca
 151102:142852:JAR200: StepTimes: S0000  Begun=14:27:53 End=14:28:52 Elapsed=00:00:59
 151102:142852:jar200: ******** Begin Step S0010 sort (#1) ********
 151102:142852:jar200: file: SORTIN=data1/ar.sales.items fsize=4K
 151102:142852:jar200: file: SORTOUT=jobtmp/jar200/t_tempsls fsize=0K
 151102:142852:jar200: file: SYSIN=jobtmp/jar200/S0010_sort_SYSIN fsize=0K
 151102:142852:jar200: Executing--> uvsort "fili1=data1/ar.sales.items,typ=RSF,rcs=64,filo1=...
 151102:142852:JAR200: uvsort fili1=data1/ar.sales.items,filo1=jobtmp/jar200/t_tempsls
 151102:142852:JAR200: EOF fili01 20 rds, 1280 size; data1/ar.sales.items
 151102:142852:JAR200: sort phase complete, used 512 megabytes, sort output begin
 151102:142852:JAR200: EOF filo01 16 wrts, 1024 size; jobtmp/jar200/t_tempsls
 151102:142852:JAR200: StepTimes: S0010 sort Begun=14:28:52 End=14:28:52 Elapsed=00:00:00
 151102:142852:jar200: ******** Begin Step S0020 car200 (#2) ********
 151102:142852:jar200: file: SALEDTL=jobtmp/jar200/t_tempsls fsize=4K
 151102:142852:jar200: file: CUSTMAS=data1/ar.customer.master.indexed fsize=12K
 151102:142852:jar200: file: SALELST=data1/ar.sales.list fsize=4K
 151102:142852:jar200: Executing--> cobrun -F /home/mvstest/testlibs/cblx/car200
 I/O error : file 'CUSTMAS'
 error code: 3/9 (ANS85), pc=21E, call=1, seg=0
 139     Record length or key data inconsistency
 SCC = 255
 151102:142852:jar200: ERR: step#S0020 car200 abterm 255
 151102:142852:JAR200: StepTimes: S0020 car200 Begun=14:28:52 End=14:28:52 Elapsed=00:00:00
 151102:142852:JAR200: Job Times: Begun=14:28:52 ***AbEnd=14:28:52 Elapsed=00:00:00
 \033[7m151102:142852:jar200: JobEnd=AbTerm, JCC=255,Steps=2/S0020\033[0m

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

Notes re jar200.ksh - I/O error 139

  1. This error caused by CUSTMAS file 'data1/ar.customer.master.indexed' having been loaded with incorrect record-size.

  2. script to load Indexed file from sequential file as follows:

      #!/bin/ksh
      # loadcm255.ksh - script to load ar.customer.master.indexed file
      #               - stored at $UV/sf/adm/... or mvstest/testdata/...
      # - vs alternative uvcopy loadcm255 at $UV/pf/IBM/... or testdata/pf/...
      uvcp "fili1=?data1/ar.customer.master,rcs=256,typ=RSF\
           ,filo1=?data1/ar.customer.master.indexed,rcs=255,typ=IDXf1,isk1=0(6)"
  1. problem was I had 'rcs=256' for the output file, which should have been 255 to agree with the COBOL program (see at $UV/mvstest/testlibs/cbls/car200.cbl)

  2. After correction & rerun, the error goes away & you can examine the files as follows

    Notes jar200.ksh - after error corrected

  3. See original mainframe JCL at '2C1' & converted script at '2C2'

  4. Step1 SORT/uvsort sorts ar.sales.items by product code. Step2 COBOL lists sales.items adding customer name by looking up Indexed file ar.customer.master.indexed via customer#.

  5. Note that sorted sales file (DSN=&&TEMPSLS on mainframe) has been converted to jobtmp/JAR200/__tempsls in the unix script. Investigate as follows:


    uvhd jobtmp/JAR200/__tempsls r64
    ================================

 4. vi data1/ar.sales.list   <-- inspect output report
    ======================

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

4F4. JCL/COBOL executions using VU demo files


 #3. joblog jgl100.ksh
     =================

jgl100.log - GDG files with COBOL


 joblog jgl100.ksh
 =================
 160215:144537:jgl100: Begin Job=jgl100
 160215:144537:jgl100: /home/mvstest1/testlibs1/jcls/jgl100.ksh
 160215:144537:jgl100: Arguments: jgl100.ksh
 160215:144537:jgl100: ProcessID=21148
 160215:144537:jgl100: RUNDATE=20160215
 160215:144537:jgl100: RUNLIBS=/home/mvstest1/testlibs1
 160215:144537:jgl100: RUNDATA=/home/mvstest1/testdata1
 160215:144537:jgl100: JTMP=jobtmp/jgl100
 160215:144537:jgl100: SYOT=sysout/JGL100
 160215:144537:jgl100: LOGNAME=mvstest1 TESTPROD=T000
 160215:144537:jgl100: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144537:jgl100: ******** Begin Step S0010 cgl100 (#1) ********
 160215:144537:jgl100: gen0 ACCTMAS=data1/gl.account.master_000003 insize=16K
 160215:144537:jgl100: gen+1 ACTLIST=/home/mvstest1/testdata1/data1/gl.account.acntlist_ gens=7
 160215:144537:jgl100: file: SYSOUT=sysout/JGL100/jgl100_S0010_SYSOUT_160215_144537 fsize=0K
 160215:144537:jgl100: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/cgl100
 160215:144538:jgl100: SCC = 0
 160215:144538:jgl100: moving /home/mvstest1/testdata1/jobtmp/jgl100/GDG/files back to intended directories
 /home/mvstest1/testdata1/data1/gl.account.acntlist_000001
 160215:144538:JGL100: StepTimes: S0010 cgl100 Begun=14:45:37 End=14:45:38 Elapsed=00:00:01
 160215:144538:JGL100: Job Times: Begun=14:45:37 NormalEnd=14:45:38 Elapsed=00:00:01
 160215:144538:jgl100: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

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

Notes re 'jgl100.ksh'

  1. See original mainframe JCL at '2D1' & converted script at '2D2'

  2. See input file listings on page '4C3', using uvhd for gl.account.masster which has packed fields (gl.account.trans is all unpacked characters).

  3. Inspect the output report as follows:


      vi data1/gl.account.acntlist_000001
      ===================================
  1. This job demonstrates GDG files - input GDG's converted to exportgen0 & output GDG files converted to exportgen1 (Korn shell functions).

  2. The 2 GDG files are defined in jgl100.ksh on page '2D2' as follows:


      exportgen0 0 ACCTMAS data1/gl.account.master_
      =============================================
      exportgen1 +1 ACTLIST $JGDG/data1/gl.account.acntlist_
      ======================================================
  1. Note the trailing '_' underscore identifies a GDG file. 'exportgen0' determines the current input generation (000001 in this case) 'exportgen1' determines the next output generation (also 000001 here)

  2. Rerun the job & observe that the output generation will be _000002.

  3. New GDGs are written to jobtmp/... & restored to data1/... at successful EOJ, On rerun, you are given choice to ignore GDGs in jobtmp, OR restart at a step# to use any GDGs created up to restart step#.

  4. See example of job failure & restart on page '5H1' - 5H3.

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

4F5. JCL/COBOL executions using VU demo files


 #4. joblog jgl200.ksh
     =================

jgl200.log - GDG files + SORT + COBOL


 joblog jgl200.ksh
 =================
 160215:144543:jgl200: Begin Job=jgl200
 160215:144543:jgl200: /home/mvstest1/testlibs1/jcls/jgl200.ksh
 160215:144543:jgl200: Arguments: jgl200.ksh
 160215:144543:jgl200: ProcessID=21253
 160215:144543:jgl200: RUNDATE=20160215
 160215:144543:jgl200: RUNLIBS=/home/mvstest1/testlibs1
 160215:144543:jgl200: RUNDATA=/home/mvstest1/testdata1
 160215:144543:jgl200: JTMP=jobtmp/jgl200
 160215:144543:jgl200: SYOT=sysout/JGL200
 160215:144543:jgl200: LOGNAME=mvstest1 TESTPROD=T000
 160215:144543:jgl200: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144543:jgl200: ******** Begin Step S0010 sort (#1) ********
 160215:144543:jgl200: file: SORTIN=data1/gl.account.tran1 fsize=4K
 160215:144543:jgl200: gen+1 SORTOUT=/home/mvstest1/testdata1/data1/gl.account.trans_ gens=7
 160215:144543:jgl200: file: SYSIN=/home/mvstest1/testlibs1/parms/pgl200s1 fsize=4K
 160215:144543:jgl200: Executing--> uvsort "fili1=data1/gl.account.tran1,typ=RSF,rcs=80,filo1=...
 160215:144543:JGL200: uvsort fili1=data1/gl.account.tran1,filo1=jobtmp/jgl200/GDG/@home@mvstest1@testdata1@data1@gl.account.tra
 160215:144543:JGL200: EOF fili01 20 rds, 1600 size; data1/gl.account.tran1
 160215:144543:JGL200: sort phase complete, used 512 megabytes, sort output begin
 160215:144543:JGL200: EOF filo01 20 wrts, 1600 size; jobtmp/jgl200/GDG/@home@mvstest1@testdata1@data1@gl.account.trans_000004
 160215:144543:jgl200: SCC = 0
 160215:144543:JGL200: StepTimes: S0010 sort Begun=14:45:43 End=14:45:43 Elapsed=00:00:00
 160215:144543:jgl200: ******** Begin Step S0020 cgl200 (#2) ********
 160215:144543:jgl200: gen+1 GLTRANS=/home/mvstest1/testdata1/data1/gl.account.trans_ gens=7
 160215:144543:jgl200: gen0 GLMSOLD=data1/gl.account.master_000003 insize=16K
 160215:144543:jgl200: gen+1 GLMSNEW=/home/mvstest1/testdata1/data1/gl.account.master_ gens=7
 160215:144543:jgl200: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/cgl200
 160215:144543:jgl200: SCC = 0
 160215:144543:jgl200: moving /home/mvstest1/testdata1/jobtmp/jgl200/GDG/files back to intended directories
 /home/mvstest1/testdata1/data1/gl.account.master_000004
 /home/mvstest1/testdata1/data1/gl.account.trans_000004
 160215:144543:JGL200: StepTimes: S0020 cgl200 Begun=14:45:43 End=14:45:43 Elapsed=00:00:00
 160215:144543:JGL200: Job Times: Begun=14:45:43 NormalEnd=14:45:43 Elapsed=00:00:00
 160215:144543:jgl200: JobEnd=Normal, JCC=0, StepsExecuted=2, LastStep=S0020

Notes re 'jgl200.ksh'

  1. See original mainframe JCL at '2E1' & converted script at '2E2'

  2. Can you reconcile the GDG exportgen0/exportgen1 functions in the listing on page '2E2' to the GDG _generations you see in this console log.

  3. Also see '5K1' data file comparison of before & after updated files, using 'uvcmpFA1' required to compare data files without LineFeeds and with packed fields present.

  4. Note that we can not use 'diff' to compare files with packed/binary fields &/or without the LineFeeds required by diff.

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

4F6. JCL/COBOL executions using VU demo files


 #5. joblog jgl230.ksh        <-- SORT + 2 COBOL programs **
     =================

 joblog jgl230.ksh
 =================
 160215:144557:jgl230: Begin Job=jgl230
 160215:144557:jgl230: /home/mvstest1/testlibs1/jcls/jgl230.ksh
 160215:144557:jgl230: Arguments: jgl230.ksh
 160215:144557:jgl230: ProcessID=21387
 160215:144557:jgl230: RUNDATE=20160215
 160215:144557:jgl230: RUNLIBS=/home/mvstest1/testlibs1
 160215:144557:jgl230: RUNDATA=/home/mvstest1/testdata1
 160215:144557:jgl230: JTMP=jobtmp/jgl230
 160215:144557:jgl230: SYOT=sysout/JGL230
 160215:144557:jgl230: LOGNAME=mvstest1 TESTPROD=T000
 160215:144557:jgl230: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144557:jgl230: ******** Begin Step S0010 sort (#1) ********
 160215:144557:jgl230: file: SORTIN=data1/gl.account.tran1 fsize=4K
 160215:144557:jgl230: gen+1 SORTOUT=/home/mvstest1/testdata1/data1/gl.account.trans_ gens=7
 160215:144557:jgl230: file: SYSIN=jobtmp/jgl230/S0010_sort_SYSIN fsize=0K
 160215:144557:jgl230: Executing--> uvsort "fili1=data1/gl.account.tran1,typ=RSF,rcs=80,filo1=...
 160215:144557:JGL230: uvsort fili1=data1/gl.account.tran1,filo1=jobtmp/jgl230/GDG/@home@mvstest1@testdata1@data1@gl.account.tra
 160215:144557:JGL230: EOF fili01 20 rds, 1600 size; data1/gl.account.tran1
 160215:144557:JGL230: sort phase complete, used 512 megabytes, sort output begin
 160215:144557:JGL230: EOF filo01 0 wrts, 0 size; jobtmp/jgl230/GDG/@home@mvstest1@testdata1@data1@gl.account.trans_000005
 160215:144557:jgl230: SCC = 0
 160215:144557:JGL230: StepTimes: S0010 sort Begun=14:45:57 End=14:45:57 Elapsed=00:00:00
 160215:144557:jgl230: ******** Begin Step S0020 cgl200 (#2) ********
 160215:144557:jgl230: gen+1 GLTRANS=/home/mvstest1/testdata1/data1/gl.account.trans_ gens=7
 160215:144557:jgl230: gen0 GLMSOLD=data1/gl.account.master_000004 insize=16K
 160215:144557:jgl230: gen+1 GLMSNEW=/home/mvstest1/testdata1/data1/gl.account.master_ gens=7
 160215:144557:jgl230: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/cgl200
 160215:144557:jgl230: SCC = 0
 160215:144557:JGL230: StepTimes: S0020 cgl200 Begun=14:45:57 End=14:45:57 Elapsed=00:00:00
 160215:144557:jgl230: ******** Begin Step S0030 cgl100 (#3) ********
 160215:144557:jgl230: gen0 ACCTMAS=data1/gl.account.master_000004 insize=16K
 160215:144557:jgl230: gen+1 ACTLIST=/home/mvstest1/testdata1/data1/gl.account.acntlist_ gens=7
 160215:144557:jgl230: file: SYSOUT=sysout/JGL230/jgl230_S0030_SYSOUT_160215_144557 fsize=0K
 160215:144557:jgl230: Executing--> cobrun -F /home/mvstest1/testlibs1/cblx/cgl100
 160215:144557:jgl230: SCC = 0
 160215:144557:jgl230: moving /home/mvstest1/testdata1/jobtmp/jgl230/GDG/files back to intended directories
 /home/mvstest1/testdata1/data1/gl.account.acntlist_000002
 /home/mvstest1/testdata1/data1/gl.account.master_000005
 /home/mvstest1/testdata1/data1/gl.account.trans_000005
 160215:144557:JGL230: StepTimes: S0030 cgl100 Begun=14:45:57 End=14:45:57 Elapsed=00:00:00
 160215:144557:JGL230: Job Times: Begun=14:45:57 NormalEnd=14:45:57 Elapsed=00:00:00
 160215:144557:jgl230: JobEnd=Normal, JCC=0, StepsExecuted=3, LastStep=S0030

Notes re 'jgl230.ksh'

  1. See original mainframe JCL at '2F1' & converted script at '2F2'

  2. This job is used to illustrate mvsfiles51/mvsfiles5A scripts which are very useful when test/debugging to determine the essential input files required to execute the JCL/scripts. See mvsfiles51 demo JCLcnv3aids.htm#1L1.

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

4F7. JCL/COBOL executions using VU demo files


 #6. joblog jgl320.ksh
     =================

jgl320.log - IEBGENER + IDCAMS + IF/THEN/ELSE


 joblog jgl320.ksh
 =================
 160215:144604:jgl320: Begin Job=jgl320
 160215:144604:jgl320: /home/mvstest1/testlibs1/jcls/jgl320.ksh
 160215:144604:jgl320: Arguments: jgl320.ksh
 160215:144604:jgl320: ProcessID=21574
 160215:144604:jgl320: RUNDATE=20160215
 160215:144604:jgl320: RUNLIBS=/home/mvstest1/testlibs1
 160215:144604:jgl320: RUNDATA=/home/mvstest1/testdata1
 160215:144604:jgl320: JTMP=jobtmp/jgl320
 160215:144604:jgl320: SYOT=sysout/JGL320
 160215:144604:jgl320: LOGNAME=mvstest1 TESTPROD=T000
 160215:144604:jgl320: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144604:jgl320: ******** Begin Step S0010 iebgener (#1) ********
 160215:144604:jgl320: gen0 SYSUT1=data1/gl.account.master_000005 insize=16K
 160215:144604:jgl320: file: SYSUT2=jobtmp/jgl320/t_tempglm fsize=0K
 160215:144604:jgl320: Executing--> uvcp "fili1=data1/gl.account.master_000005,typ=RSF,rcs=128,filo1=jobtmp/jgl320/t_tempglm...
 160215:144604:JGL320: uvcp fili1=data1/gl.account.master_000005,filo1=jobtmp/jgl320/t_tempglm
 160215:144604:JGL320: EOF fili01 109 rds, 13952 size; data1/gl.account.master_000005
 160215:144604:JGL320: EOF filo01 109 wrts, 13952 size; jobtmp/jgl320/t_tempglm
 160215:144604:jgl320: SCC = 0
 160215:144604:JGL320: StepTimes: S0010 iebgener Begun=14:46:04 End=14:46:04 Elapsed=00:00:00
 160215:144604:jgl320: ******** Begin Step S0020 idcams (#2) ********
 160215:144604:jgl320: file: TEMPGLM=jobtmp/jgl320/t_tempglm fsize=16K
 160215:144604:jgl320: gen+1 ACNTMAS=/home/mvstest1/testdata1/data1/gl.account.master_ gens=7
 160215:144604:jgl320: file: SYSIN=jobtmp/jgl320/S0020_idcams_SYSIN fsize=0K
 160215:144604:jgl320: Executing--> uvcp "fili1=jobtmp/jgl320/t_tempglm,typ=RSF,rcs=128,filo1=...
 160215:144604:JGL320: uvcp fili1=jobtmp/jgl320/t_tempglm,filo1=jobtmp/jgl320/GDG/@home@mvstest1@testdata1@data1@gl.account.mast
 160215:144604:JGL320: EOF fili01 109 rds, 13952 size; jobtmp/jgl320/t_tempglm
 160215:144604:JGL320: EOF filo01 109 wrts, 13952 size; jobtmp/jgl320/GDG/@home@mvstest1@testdata1@data1@gl.account.master_00000
 160215:144604:jgl320: SCC = 0
 160215:144604:jgl320: moving /home/mvstest1/testdata1/jobtmp/jgl320/GDG/files back to intended directories
 /home/mvstest1/testdata1/data1/gl.account.master_000006
 160215:144604:JGL320: StepTimes: S0020 idcams Begun=14:46:04 End=14:46:04 Elapsed=00:00:00
 160215:144604:JGL320: Job Times: Begun=14:46:04 NormalEnd=14:46:04 Elapsed=00:00:00
 160215:144604:jgl320: JobEnd=Normal, JCC=0, StepsExecuted=2, LastStep=S0020

Notes re 'jgl320.ksh'

  1. See original mainframe JCL at '2G1' & converted script at '2G2'

  2. This job demonstrates 'COND' & 'IF/THEN/FI'. If you cause a failure in step 1, you would observe that step 2 would be skipped.

  3. An easy way to cause step 1 to fail would be to change the input filename (might change 'ar.customer.master_' to 'ar.customer.masterXXX_').

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

4F8. JCL/COBOL executions using VU demo files


 #7. joblog ftpput1.ksh
     ==================

ftpput1.log - FTP 2011 OK

111018:162507:FTPPUT1: Begin Job=FTPPUT1 111018:162507:FTPPUT1: /home/userxx/testlibs/jcls/ftpput1.ksh 111018:162507:FTPPUT1: Arguments: 111018:162507:FTPPUT1: TESTPROD=T000 111018:162507:FTPPUT1: RUNLIBS=/home/userxx/testlibs 111018:162507:FTPPUT1: RUNDATA=/home/userxx/testdata 111018:162507:FTPPUT1: JTMP=jobtmp/FTPPUT1 SYOT=sysout/FTPPUT1 111018:162507:FTPPUT1: RUNDATE=20111018 111018:162507:FTPPUT1: ******** Begin Step S0010 ftp (#1) ******** 111018:162507:FTPPUT1: file: INPUT1=jobtmp/FTPPUT1/S0010_ftp_INPUT1 fsize= 111018:162507:FTPPUT1: gen0 FTPPUT01=data1/gl.account.trans_000002 insize=4.0K 111018:162507:FTPPUT1: file: FTPTMP2=jobtmp/FTPPUT1/S0010_ftp_FTPTMP2 fsize= 111018:162507:FTPPUT1: Executing--> ftp -i -n -u -v <jobtmp/FTPPUT1/S0010_ftp_FTPTMP2 Connected to 127.0.0.1. 220 (vsFTPd 2.0.5) 331 Please specify the password. 230 Login successful. 250 Directory successfully changed. 200 Switching to Binary mode. local: data1/gl.account.trans_000002 remote: data1/gl.account.trans_000002 550 Permission denied. Passive mode refused. Turning off passive mode. 200 PORT command successful. Consider using PASV. 150 Ok to send data. 226 File receive OK. 1600 bytes sent in 8.5e-05 seconds (1.8e+04 Kbytes/s) 221 Goodbye. 111018:162508:FTPPUT1: Job Times: Begun=16:25:07 End=16:25:08 Elapsed=00:00:01 111018:162508:FTPPUT1: EOF filr01 rds=3 size=6144: /home/userxx/testdata/ctl/gdgctl51I 111018:162508:FTPPUT1: JobEnd=Normal, StepsExecuted=1, LastStep=S0010

Notes re 'ftpput1.ksh'

  1. See original mainframe JCL at '2H1' & converted script at '2H2'

  2. This job FTP's from the current user 'userxx' (or yourself) to userid 'mvstest' at IP# 127.0.0.1, which is the localhost (same mchine). Setp userid mvstest if not existing or change the script to a valid userid/password on your machine.

  3. The login/home directory of mvstest must have directory 'testdata' which must have subdir 'data1' because the FTP script does a 'cd testdata' & the filename sent is 'data1/gl.account.trans_000002'.

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

4F8a. JCL/COBOL executions using VU demo files

ftpput1.log - FTP 2016 Fails ?

 160215:151211:ftpput1: Begin Job=ftpput1
 160215:151211:ftpput1: /home/mvstest1/testlibs1/jcls/ftpput1.ksh
 160215:151211:ftpput1: Arguments: ftpput1.ksh
 160215:151211:ftpput1: ProcessID=24389
 160215:151211:ftpput1: RUNDATE=20160215
 160215:151211:ftpput1: RUNLIBS=/home/mvstest1/testlibs1
 160215:151211:ftpput1: RUNDATA=/home/mvstest1/testdata1
 160215:151211:ftpput1: JTMP=jobtmp/ftpput1
 160215:151211:ftpput1: SYOT=sysout/FTPPUT1
 160215:151211:ftpput1: LOGNAME=mvstest1 TESTPROD=T000
 160215:151211:ftpput1: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:151211:FTPPUT1: StepTimes: S0000  Begun=14:58:48 End=15:12:11 Elapsed=00:13:23
 160215:151211:ftpput1: ******** Begin Step S0010 ftp (#1) ********
 160215:151211:ftpput1: file: INPUT1=jobtmp/ftpput1/S0010_ftp_INPUT1 fsize=0K
 160215:151211:ftpput1: gen0 FTPPUT01=data1/gl.account.trans_000005 insize=0K
 160215:151211:ftpput1: file: FTPTMP2=jobtmp/ftpput1/S0010_ftp_FTPTMP2 fsize=0K
 160215:151211:ftpput1: Executing--> ftp -inv <jobtmp/ftpput1/S0010_ftp_FTPTMP2
 ftp: connect: Connection refused
 Not connected.
 Not connected.
 Not connected.
 Not connected.
 160215:151211:ftpput1: SCC = 0
 160215:151211:FTPPUT1: StepTimes: S0010 ftp Begun=15:12:11 End=15:12:11 Elapsed=00:00:00
 160215:151211:FTPPUT1: Job Times: Begun=15:12:11 NormalEnd=15:12:11 Elapsed=00:00:00
 160215:151211:ftpput1: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

Notes

  1. The FTP test worked with Red Hat 6.0 in 2011, but now fails with Red Hat 7.1 in 2016. Have not taken the time toi figure this out yet ???

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

4F9. JCL/COBOL executions using VU demo files


 #8. joblog mailsmtp.ksh
     ===================

mailsmtp.log - IEBGENER/SMTP to appsadm


 joblog mailsmtp.ksh
 ===================
 160215:144638:mailsmtp: Begin Job=mailsmtp
 160215:144638:mailsmtp: /home/mvstest1/testlibs1/jcls/mailsmtp.ksh
 160215:144638:mailsmtp: Arguments: mailsmtp.ksh
 160215:144638:mailsmtp: ProcessID=21723
 160215:144638:mailsmtp: RUNDATE=20160215
 160215:144638:mailsmtp: RUNLIBS=/home/mvstest1/testlibs1
 160215:144638:mailsmtp: RUNDATA=/home/mvstest1/testdata1
 160215:144638:mailsmtp: JTMP=jobtmp/mailsmtp
 160215:144638:mailsmtp: SYOT=sysout/MAILSMTP
 160215:144638:mailsmtp: LOGNAME=mvstest1 TESTPROD=T000
 160215:144638:mailsmtp: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144638:mailsmtp: ******** Begin Step S0010 iebgener (#1) ********
 160215:144638:mailsmtp: file: SYSUT2=sysout/MAILSMTP/mailsmtp_S0010_SYSUT2_160215_144638 fsize=0K
 160215:144638:mailsmtp: file: SYSUT1=jobtmp/mailsmtp/S0010_iebgener_SYSUT1 fsize=0K
 160215:144638:mailsmtp: Executing--> sendmail -t <jobtmp/mailsmtp/S0010_iebgener_SYSUT1
 160215:144638:mailsmtp: SCC = 0
 160215:144638:MAILSMTP: StepTimes: S0010 iebgener Begun=14:46:38 End=14:46:38 Elapsed=00:00:00
 160215:144638:MAILSMTP: Job Times: Begun=14:46:38 NormalEnd=14:46:38 Elapsed=00:00:00
 160215:144638:mailsmtp: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

Notes re 'mailsmtp.ksh'

  1. See original mainframe JCL at '2I1' & converted script at '2I2'

  2. This job demos sending mail via IEBGENER SYSOUT=(B,SMTP) which is converted to unix 'sendmail'.

  3. After running this job, read the mail by switching to another terminal, logging in as appsadm, execute the 'mail' program,& make a null entry to read any mail.

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

4F10. JCL/COBOL executions using VU demo files


 #9. joblog qjtlist.ksh
     ==================

qjtlist.log - QuikJob to uvcopy

 160215:145310:qjtlist: Begin Job=qjtlist
 160215:145310:qjtlist: /home/mvstest1/testlibs1/jcls/qjtlist.ksh
 160215:145310:qjtlist: Arguments: qjtlist.ksh
 160215:145310:qjtlist: ProcessID=22499
 160215:145310:qjtlist: RUNDATE=20160215
 160215:145310:qjtlist: RUNLIBS=/home/mvstest1/testlibs1
 160215:145310:qjtlist: RUNDATA=/home/mvstest1/testdata1
 160215:145310:qjtlist: JTMP=jobtmp/qjtlist
 160215:145310:qjtlist: SYOT=sysout/QJTLIST
 160215:145310:qjtlist: LOGNAME=mvstest1 TESTPROD=T000
 160215:145310:qjtlist: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:145310:QJTLIST: StepTimes: S0000  Begun=14:46:56 End=14:53:10 Elapsed=00:06:14
 160215:145310:qjtlist: ******** Begin Step S0010 quikjob (#1) ********
 160215:145310:qjtlist: file: SYSUT1=data1/ar.customer.master fsize=8K
 160215:145310:qjtlist: file: SYSUT2=data1/ar.custmas.tellist fsize=0K
 160215:145310:qjtlist: file: SYSIN=/home/mvstest1/testlibs1/qj/qjtlist1 fsize=0K
 160215:145310:qjtlist: Executing--> uvcopy /home/mvstest1/testlibs1/qjs/qjtlist1
 160215:145310:QJTLIST: uvcopy ver=20160119 pf=/home/mvstest1/testlibs1/qjs/qjtlist1
 uvcopy LNX H64 license=20160119_99V_930630 site=UV_Software
 160215:145310:QJTLIST: EOF fili01 rds=32 size=8192: data1/ar.customer.master
 160215:145310:QJTLIST: EOF fild07 size=33: /home/mvstest1/testlibs1/qjs
 160215:145310:QJTLIST: EOF filo01 wrts=34 size=1811: data1/ar.custmas.tellist
 160215:145310:qjtlist: SCC = 0
 160215:145310:QJTLIST: StepTimes: S0010 quikjob Begun=14:53:10 End=14:53:10 Elapsed=00:00:00
 160215:145310:QJTLIST: Job Times: Begun=14:53:10 NormalEnd=14:53:10 Elapsed=00:00:00
 160215:145310:qjtlist: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010
  1. See original mainframe JCL at '2J1' & converted script at '2J2'

  2. Inspect output report as follows:


      vi data1/ar.custmas.tellist
      ===========================
      - 1st few lines shown below

qjtlist sample output

  qjtlist1   customer master telephone list  20111026
  cust#   company-name               telephone     contact-name
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 130140  EVERGREEN MOTORS LTD.      250-754-5531   LARRY WRENCH
 132588  GEECOE GENERATOR SERVICES  604-278-4488   HARRY LIGHT
 139923  JOHNSTONE BOILER & TANKS   604-320-1845   GEORGE BROWN
             - - - 29 lines omitted - - -
Note
  • see the original QuikJob code on page '6B2'
  • see the converted eqivalent uvcopy code on page '6B3'

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

4F11. JCL/COBOL executions using VU demo files


 #10. joblog eztlist.ksh
      ==================

eztlist.log - EasyTrieve to uvcopy

 160215:145354:eztlist: Begin Job=eztlist
 160215:145354:eztlist: /home/mvstest1/testlibs1/jcls/eztlist.ksh
 160215:145354:eztlist: Arguments: eztlist.ksh
 160215:145354:eztlist: ProcessID=22601
 160215:145354:eztlist: RUNDATE=20160215
 160215:145354:eztlist: RUNLIBS=/home/mvstest1/testlibs1
 160215:145354:eztlist: RUNDATA=/home/mvstest1/testdata1
 160215:145354:eztlist: JTMP=jobtmp/eztlist
 160215:145354:eztlist: SYOT=sysout/EZTLIST
 160215:145354:eztlist: LOGNAME=mvstest1 TESTPROD=T000
 160215:145354:eztlist: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:145354:EZTLIST: StepTimes: S0000  Begun=14:53:23 End=14:53:54 Elapsed=00:00:31
 160215:145354:eztlist: ******** Begin Step S0010 eztpa00 (#1) ********
 160215:145354:eztlist: file: CUSTMAS=data1/ar.customer.master fsize=8K
 160215:145354:eztlist: file: EZTLIST=data1/ar.customer.eztlist fsize=4K
 160215:145354:eztlist: file: SYSIN=/home/mvstest1/testlibs1/ezt/eztlist1 fsize=0K
 160215:145354:eztlist: Executing--> uvcopy /home/mvstest1/testlibs1/ezts/eztlist1
 160215:145354:EZTLIST: uvcopy ver=20160119 pf=/home/mvstest1/testlibs1/ezts/eztlist1
 uvcopy LNX H64 license=20160119_99V_930630 site=UV_Software
 data1/ar.customer.master = default fili01 - null accept or reenter ?
 data1/ar.customer.eztlist = default filo02 - null accept or reenter ?
  TOTAL RECORDS 00032
 160215:145356:EZTLIST: EOF fili01 rds=32 size=8192: data1/ar.customer.master
 160215:145356:EZTLIST: EOF filo02 wrts=32 size=1693: data1/ar.customer.eztlist
 160215:145356:eztlist: SCC = 0
 160215:145356:EZTLIST: StepTimes: S0010 eztpa00 Begun=14:53:54 End=14:53:56 Elapsed=00:00:02
 160215:145356:EZTLIST: Job Times: Begun=14:53:54 NormalEnd=14:53:56 Elapsed=00:00:02
 160215:145356:eztlist: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010
  1. See original mainframe JCL at '2K1' & converted script at '2K2'

  2. Inspect output report as follows:


      vi data1/ar.custmas.eztlist
      ==========================
      - 1st few lines shown below

eztlist sample output

 130140  EVERGREEN MOTORS LTD.      250-754-5531   LARRY WRENCH
 132588  GEECOE GENERATOR SERVICES  604-278-4488   HARRY LIGHT
 139923  JOHNSTONE BOILER & TANKS   604-320-1845  GEORGE BROWN
             - - - 29 lines omitted - - -
Note
  • see the original EasyTrieve code on page '6C2'
  • see the converted eqivalent uvcopy code on page '6C3'

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

4F12. JCL/COBOL executions using VU demo files


 #11. joblog icetool3.ksh   <-- execute ICETOOL demo & capture log
      ===================

icetool3.log - ICETOOL demo SORT/INCLUDE/OUTREC

 160215:144724:icetool3: Begin Job=icetool3
 160215:144724:icetool3: /home/mvstest1/testlibs1/jcls/icetool3.ksh
 160215:144724:icetool3: Arguments: icetool3.ksh
 160215:144724:icetool3: ProcessID=21886
 160215:144724:icetool3: RUNDATE=20160215
 160215:144724:icetool3: RUNLIBS=/home/mvstest1/testlibs1
 160215:144724:icetool3: RUNDATA=/home/mvstest1/testdata1
 160215:144724:icetool3: JTMP=jobtmp/icetool3
 160215:144724:icetool3: SYOT=sysout/ICETOOL3
 160215:144724:icetool3: LOGNAME=mvstest1 TESTPROD=T000
 160215:144724:icetool3: HOSTNAME=uvsoft5.uvsoftware.ca
 160215:144724:icetool3: ******** Begin Step S0010 icetool (#1) ********
 160215:144724:icetool3: file: IN1=data1/ar.sales.items fsize=4K
 160215:144724:icetool3: file: OUT1=data1/ar.sales.items3 fsize=0K
 160215:144724:icetool3: file: TOOLIN=jobtmp/icetool3/S0010_icetool_TOOLIN fsize=0K
 160215:144724:icetool3: file: OUTRCNTL=jobtmp/icetool3/S0010_icetool_OUTRCNTL fsize=0K
 160215:144724:icetool3: Executing--> uvsort "fili1=data1/ar.sales.items,typ=RSF,rcs=64,filo1=data1/ar.sales.items3,typ...
 160215:144724:ICETOOL3: uvsort fili1=data1/ar.sales.items,filo1=data1/ar.sales.items3
 160215:144724:ICETOOL3: EOF fili01 20 rds, 1280 size; data1/ar.sales.items
 160215:144724:ICETOOL3: sort phase complete, used 512 megabytes, sort output begin
 160215:144724:ICETOOL3: EOF filo01 4 wrts, 184 size; data1/ar.sales.items3
 160215:144724:icetool3: SCC = 0
 160215:144724:ICETOOL3: StepTimes: S0010 icetool Begun=14:47:24 End=14:47:24 Elapsed=00:00:00
 160215:144724:ICETOOL3: Job Times: Begun=14:47:24 NormalEnd=14:47:24 Elapsed=00:00:00
 160215:144724:icetool3: JobEnd=Normal, JCC=0, StepsExecuted=1, LastStep=S0010

input file - 1st few records

          1         2         3         4         5         6
 1234567890123456789012345678901234567890123456789012345678901234
 CUST#    SLM  DATE   INV#     PROD#     QTY   PRICE    AMOUNT
 130140    21 990802 IN111001  HAM001  000020 0000101 000002020
 130140    21 000802 IN111001  SCR012  000021 0001001 000021021
 130140    21 010802 IN111001  CHR001  000022 0010001 000220022
  ----- 17 records omitted, see all 20 records at '4C2' -----

output file

 CUSTOMER=150825_PRODUCT=HAX129_SALES=000156026
 CUSTOMER=400002_PRODUCT=HAX129_SALES=00009601v
 CUSTOMER=308685_PRODUCT=SAW051_SALES=00000001p
 CUSTOMER=315512_PRODUCT=SAW051_SALES=00005601t

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

Part_5 Test/Debug Tips & Techniques

Part 5 - Contents


5A1. Introduction/Overview

5B1. Test Environment, RUNLIBS & RUNDATA superdirs defined in your profile
- allows different programmers to have their own set of Libraries & Data
- best to have common set of Libraries, but different Data dirs
- aliases cdl/cdd allow you to switch easily between Libs/Data dirs

5B2. JCL converted to scripts in Part_3 & executed in Part_4
- this Part_5 presents Tips & Techniques for testing & debugging

5B3. Scripts to Reconvert all JCL or one JCL at a time for Linux or AIX
5B4. Reasons for re-converting JCL

5B5. Run the Cross-Reference reports
- a big help resolving problems during testing/debugging
 Samples of most useful crossrefs
 xkshparm1, xkshparm2, xkshprog1, xkshprog2, xcobcopy1, xcobcopy2,

5B6. samples parms cross-refs
5B7. sample program cross-refs
sample copybook ross-refs
5B8. cobfiles report datafile I/O recsizes/copybooks

5C1. Use these tips for the Demo JCL/scripts or for your own JCL/scripts
See DATA file conversions in https://uvsoftware.ca/datacnv1.htm
to convert your data files & FTP data from Mainframe to Unix/Linux

5C2. Converting Your files - brief review of DATAcnv1.htm.
 Datafile Conversion Directories Required
 FTP data from Mainframe to Unix/Linux
Re-Naming files as required

5D1. run 'testdatainit' before JCL/scripts
- to clear output files & make it easier to see outputs of current test
- use 'joblog' to capture the log from your JCL/script
- subdirs cleared by testdatainit

5E1. Test/Debug for difficult JCL/scripts
- save all data1/* in datasave/ & load data1/ with files for difficult job
5F2.  Iterations of test/investigate/modify as required
- Animator/Debugger for Micro Focus COBOL
5F3.  Check results of test/debug, investigate output files (use uvhd if packed)
Print-outs using 'uvlp' scripts assist test/debug

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

Part 5 - Contents continued


5G1. Re-Creating the GDG control file - when new JCLs added with new GDG files
- alternate location for gdgctl51I in $APPSADSM/ctl vs default $RUNDATA/ctl

5G2. Editing the GDG control file with no of generations desired (vs default 7)
- modifying text file version & reloading Indexed file used by functions
  in JCL/scripts

5H1. GDG files & step Restart
- VU JCL conversions write new GDGs into a jobtmp subdir & restore to
  the data subdir only if JobEnd=Normal. This allows you to rerun scripts
  without worrying about any new GDGs created in the failing run.
- If there are steps prior to the failing step with updates in place,
  you can use "step Restart" at the failed step to prevent double updates.
5H2.  RERUN after failure without restart
5H3.  RERUN after failure WITH RESTART

5I1. jobstop & job restart
- activate stop at begin each step to examine files from 2nd screen

5J1. Activating 'console-logging' vs 'job-logging' for 1 JCL/script debug
- use console logging for long seesions running multiple jobs
- captures any operator inputs (job-logging does not)

5K1. uvcmp___ - file comparison for files with packed/binary &/or no LineFeeds
- unix 'diff' does not work for these types of files
- UV Software provides the 'uvcmp' utilities
- uvcopy jobs uvcmp1,2,3 & several scripts uvcmpFA1,uvcmpFE1,etc
  to make the uvcopy jobs easier to run.
- uvcmp prints mismatched record pairs in vertical hexadecimal
  flagging differences with '*'s, see sample report comparing
  2 generations of gl.account.master_000001 & _000002

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

5A1. JCL/script Test/Debug Tips

Test/Debug Overview

Here are some tips that will help you to test/debug your JCL/scripts & COBOL programs in applications migrated from the mainframe.

Most jobs can be debugged by comparing the output files & sysout reports to the mainframe files & reports. Here are some tips for the more difficult cases. We assume that your profile has RUNDATA=$HOME/testdata (debugging in homedir), so you do not affect other programmers working. Your might also have your own set of libraries (RUNLIBS=$HOME/testlibs), OR RUNLIBS might point to a common set of libraries (JCL/scripts, COBOL programs, parms, quikjobs, etc).

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

5B1. JCL/script Test/Debug Tips

Test Environment

For initial testing & self-education, you might setup testlibs, testdata,& cnvdata in your homedir. Assuming your login is userxx, here is the directory showing only the most essential subdirs. See all subdirs at '3B2' - 3B4.

 /home/userxx         <--- your homedir
 :-----testlibs        <-- $RUNLIBS - LIBRARIEs for JCL & COBOL
 :     :-----cbls        - COBOL program source
 :     :-----cblx        - compiled COBOL programs
 :     :-----jcls        - JCL/scripts (Korn shells converted from JCLs)
 :     :
 :-----testdata        <-- $RUNDATA - DATA directories & subdirs
 :     :-----data1       - datafiles
 :     :-----joblog      - programmer debug log files
 :     :-----jobtmp      - temp files for new GDGs, SYSINs, etc
 :     :-----sysout      - SYSOUT printer files (from COBOL DISPLAYs)
 :     :
 :-----cnvdata         <-- $CNVDATA - data CONVERSION superdir
 :     :-----d1ebc       - EBCDIC files from mainframe for conversion
 :     :-----d2asc       - files converted to ASCII
 :     :-----cpys        - COBOL copybooks
 :     :-----maps        - cobmaps (record layouts) generated from copybooks
 :     :-----pfx1        - uvcopy jobs convert EBCDIC to ASCII (gen from cobmaps)

Note that RUNLIBS, RUNDATA,& CNVDATA are defined in your stub_profile, before calling the common_profile (in /home/appsadm/env). See profiles listed on pages '1C1' & '1C2'. The supplied stub_profile defines these variables as follows (for initial testing, will change for production).

      export RUNLIBS=$HOME/testlibs
      export RUNDATA=$HOME/testdata
      export CNVDATA=$HOME/cnvdata

This means that each programmer would have their own set of libraries & data, which is OK for early testing, especially if only 1 programmer on the project. For multi programmer teams, you would probably want to redefine RUNLIBS to point to a common set of libraries (not in homedirs), but you might well leave RUNDATA in $HOME/testdata, so programmers would not conflict each other.

#2. use 'cdl/cdd' easy change to testlibs/testdata

Aliases cdl/cdd/cdc are supplied (in the common_profile), to make it easy for you to quickly switch to testlibs/testdata/cnvdata as desired.

      alias cdl='cd $RUNLIBS'
      alias cdd='cd $RUNDATA'
      alias cdc='cd $CNVDATA'

These are even more useful after you change testlibs/testdata/cnvdata to common locations for the programmer team members - might have longer paths and you would not have to remember where.

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

5B2. JCL/script Test/Debug Tips

JCL & COBOL already converted

We assume you have already converted all COBOL & JCL as documented on pages '3E1' & '3F1' using super scripts that convert all copybooks & COBOL programs, and all JCLs with PROCs & PARMs.


 cnvMF51Acpy all    <-- convert copybooks thru all steps
 =============      - cpy0 --> cpy1 --> cpy2 --> cpys
 cnvMF51A all     <-- convert COBOL programs thru all steps
 ============       - cbl0 --> cbl1 --> cbl2 --> cbls --> cblx

 jcl2ksh51A all   <-- convert ALL JCL thru all steps
 ==============       jcl0 --> jcl1 --> jcl2 --> jcl3

--- OR for AIX, the conversion scripts would be:


 cnvAIXcpyA all  <-- convert copybooks for AIX COBOL
 ===============
 cnvAIXcblA all   <-- convert COBOL programs for AIX COBOL
 ==============

 jcl2ksh53A all   <-- convert JCL for AIX COBOL
 ==============

The converted JCL/scripts are now in jcl3/..., but need to be copied to jcls/... for execution since only jcls is in $PATH (defined in the common_profile).


 cp jcl3/* jcls   <-- copy All scripts to execution subdir jcls/...
 ==============     - we will do this for our test/demos
                    - BUT do NOT copy ALL for your "real conversion"

 cp jcl3/jobnamex.ksh jcls  <-- copy 1 script at a time before test/debug
 =========================    - recommended for your "real conversion"

You should NOT copy all jcl3/* jcls/ for your "real conversion" project. For your real conversion project, you should copy 1 script at a time when you ready to start test/debug on each script. This is an easy way to keep track of your progress (jcls/... are debugged, jcl3/... not yet)

Another reason NOT to copy all jcl3/* jcls/ when JCL/scripts re-converted:

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

5B3. Enhancing & Customizing Conversions

re-converting all JCL

 jcl0 ------> jcl1 ---------> jcl2 -----------> jcl3 ------> jcls
     cleanup     PROC expand    convert to ksh   copy 1 at a time for test/debug

 jcl2ksh51A all   <-- script to convert ALL JCL thru all steps
 ==============         jcl0 --> jcl1 --> jcl2 --> jcl3

You only need to rerun the 'jcl2 --> jcl3' step, using 'jclxx51' when the only changes are enhancements to JCL converter or changing options & control files.


 jclxx51 jcl2 jcl3  <-- script to reconvert jcl2/* --> jcl3/...
 =================

convert 1 JCL at a time

To convert 1 JCL at a time, use the 'jcl2ksh51' script (vs 'jcl2ksh51A').


 jcl2ksh51 jcl0/jobxx.jcl  <-- convert 1 JCL from jcl0->jcl1->jcl2->jcl3->jcls
 ========================

'jcl2ksh51' converts thru all stages to jcl3/... & prompts for copy to jcls/... It prompts before overwriting jcls/... in case you need to save any extensive editing you have already done on some steps of the JCL/script.

JCL conversions for AIX

JCL conversion scripts for AIX are coded with '53' vs '51' for Micro Focus.

converting All JCL for AIX


 jcl2ksh53A all   <-- script to convert ALL JCL thru all steps
 ==============         jcl0 --> jcl1 --> jcl2 --> jcl3

 jclxx53 jcl2 jcl3  <-- script to convert just the JCL jcl2/* --> jcl3/...
 =================    - omitting cleanups & proc expansion prior to JCL convert
                      - save time when only changes are enhancements to JCL
                        converter or changing options & control files

convert 1 JCL at a time for AIX


 jcl2ksh53 jcl0/jobxx.jcl  <-- convert 1 JCL from jcl0->jcl1->jcl2->jcl3->jcls
 ========================

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

5B4. Enhancing & Customizing Conversions

reasons for re-converting JCL

  1. You have transferred additional JCL to jcl0/... If only 1 or a few you can use 'jcl2ksh51' (vs jcl2ksh51A), but if more than a few, might be faster to use jcl2ksh51A.

  2. You have transferred additional PROCs or PARMs which were reported misisng on your prior conversion. Be sure to use jcl2ksh51A (not jcl2ksh51).

  3. The JCL converter has been enhanced (by UV Software), probably because you have reported a problem which is solved in the new version. This can save a lot of manual corrections if the problem is fixed in the early stages of test/debug - when you have only tested a few of your JCLs in jcls/... & the vast majority are yet to be debugged. This works well if you follow our recommendation to copy 1 at a time from jcl3/... (where auto-conversion stops) to jcls/... which is in $PATH.

  4. You have changed the JCL converter options. See example at JCLcnv3aids.htm#3G1 modifying option 'f0' to 'f1' to change default file type from 'typ=RSF' to 'typ=LST' for all uvsort/uvcp files.

  5. You have updated the DATA control files (file types, record sizes). See example at JCLcnv2real.htm#Part_2 copy/update ctl/add/datactl53b changing desired files from 'typ=RSF' to 'typ=LSTt'

  6. You have obtained the LISTCAT reports from the mainframe & converted to control file ctl/datacat52I.dat/.idx for lookup by ctldata53 in jcldata51A. See JCLcnv2real.htm#2C1.

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

5B5. Enhancing & Customizing Conversions

run the Cross-Reference reports

It is a good idea to run the cross-references now, because they can help to resolve various problems you may encounter during testing/debugging.


 xrefall cbls jcl3 ksh   <-- create all cross-ref reports
 =====================     - in subdir xref/...

 cobfiles5A cbls cpys maps <-- creates xref/cobfiles report
 =========================

Here are some of the most useful cross-references:

xkshparm1
  • list all SYSIN/PARM modules in each JCL/ksh/script
xkshparm2
  • shows all JCL/ksh/scripts referencing each SYSIN/PARM
xkshprog1
  • list all programs executed in each JCL/ksh/script
xkshprog2
  • shows all JCL/ksh/scripts executing each program
xcobcopy1
  • list all 'copy'books used in each program
xcobcopy2
  • shows all programs using each 'copy'book
xcobcall1
  • list all 'called'programs used in each program
xcobcall2
  • shows all programs calling each 'called'program
cobfil51
  • COBOL Files Report
  • information extracted from all COBOL programs in directory
  • filenames, Input/Output, Org, Access, record size, copybook
  • programmers should have a copy before starting test/debug

We will show short samples of these on the following pages See more & longer samples in JCLcnv3aids.htm#Part_1.

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

5B6. Enhancing & Customizing Conversions

samples parms cross-refs

 #xkshparm1 ** list all SYSIN/PARMs referenced in each ksh SCRIPT **
 #Keyword=parms  Exclude=~~ Include=exportfile Skip=~~ page#  1
 #Directory=/home/mvstest/testlibs/jcl3
 #=======================================================2016/02/11_08:02:34
 iebcopy1.ksh     products
 jgl200.ksh       pgl200s1
 jgl910.ksh       pgl200s1
 jpy200.ksh      *ppy200s1
 jpy300.ksh      *ppy200s1
 jpy910.ksh       ppy200s2
 #xkshparm2 ** crossref to show all ksh SCRIPTS referencing each PARM **
 #Keyword=parms  Exclude=~~ Include=exportfile Skip=~~ page#  1
 #Directory=/home/mvstest/testlibs/jcl3
 #======================================================2017/03/31_09:20:38
  pgl200s1_2       jgl200.ksh      jgl910.ksh
 *ppy200s1_2       jpy200.ksh      jpy300.ksh
  ppy200s2         jpy910.ksh
  products         iebcopy1.ksh
Note
  • the '*' indicaates a missing module (not found in the parms/... subdir)

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

5B7. Enhancing & Customizing Conversions

sample program cross-refs

 #xkshprog1 ** list all PROGRAMs executed in each ksh SCRIPT **
 #Keyword=progid:program  Exclude=~~ Include=~~ Skip=  page#  1
 #Directory=/home/mvstest1/testlibs1/jcl3
 #=======================================================2016/02/15_12:38:24
 jgl100.ksh         cgl100
 jgl200.ksh_2       cgl200          sort
 jgl230.ksh_3       cgl100          cgl200          sort
 jgl320.ksh_2       idcams          iebgener
 #xkshprog2 ** crossref to show all ksh SCRIPTS executing each PROGRAM **
 #Keyword=progid:program  Exclude=~~ Include=~~ Skip=  page#  1
 #Directory=/home/mvstest1/testlibs1/jcl3
 #======================================================2016/02/15_12:38:24
  cgl100_2         jgl100.ksh      jgl230.ksh
  cgl200_2         jgl200.ksh      jgl230.ksh
  idcams           jgl320.ksh
  iebgener_2       jgl320.ksh
  sort_3           jar200.ksh      jgl200.ksh      jgl230.ksh

sample copybook ross-refs

 #xcobcopy1 ** list all COPYBOOKS in each PROGRAM **
 #Keyword=copy:include  Exclude=unix Include=.cpy Skip=  page#  1
 #Directory=/home/mvstest1/testlibs1/cbls
 #=======================================================2016/02/15_12:38:24
 car100.cbl       custmas.cpy
 car200.cbl_4     custmas.cpy     saledtl.cpy     sdline.cpy      stline.cpy
 #xcobcopy2 ** crossref all PROGRAMS using each COPYBOOK **
 #Keyword=copy:include  Exclude=unix Include=.cpy Skip=  page#  1
 #Directory=/home/mvstest1/testlibs1/cbls
 #======================================================2016/02/15_12:38:24
  custmas.cpy_2    car100.cbl      car200.cbl
  saledtl.cpy      car200.cbl
  sdline.cpy       car200.cbl
  stline.cpy       car200.cbl

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

5B8. Enhancing & Customizing Conversions

cobfiles report datafile I/O recsizes/copybooks

 cobfil51  ** COBOL Files Report ** Dir=cbls  2016/03/16_17:19:43
 progname.cbl DDname       OAM   open recsz pb   copybook.cpy  FDname Key   lines
 ================================================================================
 car100.cbl   custmas      SS_   I___   256 p    custmas.cpy   custmas
 car100.cbl   nalist       L__   O___   120                    nalist
                                                                              48
 car200.cbl   saledtl      SS_   I___    64      saledtl.cpy   saledtl
 car200.cbl   custmas      IR_   I___   255 p    custmas255.cpycustmas
 car200.cbl          key->                                        cm-cust
 car200.cbl   salelst      L__   O___   120      sdline.cpy    salelst
                                                                              60
 cgl100.cbl   acctmas      SS_   I___   128 p                  acctmas
 cgl100.cbl   actlist      L__   O___   120                    actlist
                                                                              53
 cgl200.cbl   glmsold      SS_   I___   128 p                  glmsold
 cgl200.cbl   glmsnew      SS_   O___   128 p                  glmsnew
 cgl200.cbl   gltrans      SS_   I___    80                    gltrans
                                                                              64
 Total programs = 4, total files = 10

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

5C1. JCL/script Test/Debug Tips & Techniques

Demo conversions or Your file conversions ?

For documentation, we are using testfiles supplied with Vancouver Utilities, but for your conversion, you will need to FTP files from the mainframe & convert as illustrated with the demo files in this documentation.

DATA file conversion vs JCL/COBOL conversion

 This JCLcnv1demo.doc documents conversions only for JCL & COBOL files.
 For data file conversions see https://uvsoftware.ca/datacnv1.htm
 - especially following parts:

https://uvsoftware.ca/datacnv1.htm#Part_3

https://uvsoftware.ca/datacnv1.htm#Part_6

FTP data from Mainframe to Unix/Linux

If you had no packed/binary fields you could FTP in TEXT MODE which automatically translates to ASCII, but the CR/LF makes records 2 bytes longer, & you either have to remove to match COBOL programs, or modify program SELECTs to 'ORGANIZATION LINE SEQUENTIAL' which allows for the CR/LF & also allows you to use unix system utilities (vi,more,lp,cat,etc) that required LineFeeds.

But most mainframes have a lot of files with packed/binary fields & it is probably best to FTP all files in BINARY MODE & use the VU conversion methods, which generate data conversion jobs automatically from the COBOL copybooks, to preserve the packed/binary fields (same for unix COBOLs as mainframe COBOLs). Note that unpacked signed fields require zoned sign conversion. Mainframe units byte positives are coded '{ABCDEFGHI' & negatives '}JKLMNOPQR'. Unix COBOL positives are coded just '0123456789' & negatives 'pqrstuvwxy'. The VU methods allow for this & an alternate version could be used with FTP text/ASCII files.

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

5C2. JCL/script Test/Debug Tips & Techniques

Converting Your files vs VU demo files ?

As explained above, we are using VU test/demo files for documentation, but for your conversion, you will need to FTP files from the mainframe & convert as documented in https://uvsoftware.ca/datacnv1.htm#Part_6. Here (on pages 5C2-5C4) is a brief overview of DATA file conversion, but you must use the detailed procedures in DATAcnv1.htm.

Datafile Conversion Directories Required

 /home/userxx       <-- your homedir
 :-----cnvdata1     <-- cnvdata superdir for DATA conversion
 :     :
 :     :-----cpys   <-- copybooks <--- copy from $UV/mvstest/cnvdata1/cpys/*
 :     :-----ctl      - control files
 :     :-----d0ebc  <-- EBCDIC data files <-- copy $UV/mvstest/cnvdata1/d0ebc/*
 :     :-----d1ebc    - EBCDIC data files renamed to VU conventions
 :     :-----d2asc    - ASCII data files (converted by uvcopy uvdata51)
 :     :-----d3ebc    - convert back to EBCDIC by uvdata31
 :     :-----d4pipe   - pipe delimited to load DB tables (by genpipe1)
 :     :-----maps     - copybooks with record layouts on right side
 :     :-----pfx1     - uvcopy jobs to convert EBCDIC to ASCII (gen by uvdata51)
 :     :-----pfx2     - with data filenames inserted (vs copybook names)
 :     :-----pfx3     - copied here for modify/execute
 :     :-----pfp1     - uvcopy jobs to create pipe delimited (gen by genpipe1)
 :     :-----pfp2     - pipe delim jobs with datafilenames inserted
 :     :-----pfp3     - copy here before editing for multi-record-type files
 :     :-----sqlTC1   - scripts to Create database tables (gen from copybooks)
 :     :-----sqlTL1   - scripts to Load database tables (gen from copybooks)
 :     :-----tmp      - temp files (keep working directory clean)

Generating ALL jobs to convert ALL datafiles EBCDIC to ASCII

 cpys-------->maps---------->pfx1-------------->pfx2----------->pfx3--------->
     cobmap1       uvdata51         uvdata52          copy/edit       execute
             convert copybooks  change copybooknames
               to uvcopy jobs     to datafilenames

Converting ALL data files EBCDIC to ASCII

               Variable-> fixed  BCDIC->ASCII          copy/rename
 MAINFRAME -----> d0ebc ------> d1ebc ----------> d2asc ---------> $RUNDATA/data1
    FTP/BINARY   ASCII to d2asc  pfx1/uvcopy jobs       cp/renameL
                 rename GDG files

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

5C3. JCL/script Test/Debug Tips & Techniques

Here (pages 5C1-5C4) is a brief overview of how you would FTP & convert YOUR datafiles (vs demo files). You must use detailed procedures in DATAcnv1.htm.

FTP data from Mainframe - operating on Unix/Linux


 #1. Login --> your homedir
 #2. cdc   --> $HOME/$CNVDATA
 #3. cd d0ebc   <-- change into the data subdir

 #4. ftp xxx.xxx.xxx.xxx   <-- FTP to mainframe IP#
     ===================
 #4a. userid--> .....      <-- enter userid
 #4b. passwd--> .....      <-- enter password
 #4c. ascii                <-- translate EBCDIC to ASCII & insert CR/LF
      ---OR---                 (ascii is usually the default)
 #4c. binary               <-- ensure binary transfer
 #4d. quote site RDW       <-- required if any variable length files
 #4e. cd ...               <-- change to data files directory ??
 #4f. get 'XXX.XXX.XXX'    <-- get desired data files
 #4g. get '...etc....'       - 'single quotes' may be required

 #5. Might need to change permissions on files FTP'd from mainframe

 #5a. chmod 664 *          <-- files should be 664
      ===========

FTP data to Unix/Linux - via JCL on Mainframe

 //* JCL to FTP Variable-Length with RDW to Unix/Linux
 //ACHP01B   EXEC PGM=FTP,PARM='(TRAN TRTAUGE1'
 //OUTPUT    DD  SYSOUT=*
 //SYSPRINT  DD  SYSOUT=*
 //INPUT     DD  *
 30.252.99.11 21 (exit
 userid password
 cd /p2/cnv1/cnvdata/d0ebc/
 pwd
 type i
 LOCSITE RDW
 PUT 'AAAAA.BBBBB.CCC.DDDDD.X' AAAAA.BBBBB.CCC.DDDDD
 QUIT
 /*

See more detail at https://uvsoftware.ca/datacnv2.htm#5C1 - 5C6.

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

5C4. JCL/script Test/Debug Tips & Techniques

Re-Naming files as required

On some systems FTP'd files may be enclosed in single quotes, may be UPPER case, may have embedded blanks or '$' signs. ON unix we need to remove single quotes, remove any embedded blanks or '$' signs, & lower case is strongly recommended.


 #6. mv  \'XXX.XXX.XXX\'  xxx.xxx.xxx   <-- the hard way
     ================================     - see #7. the easy way

Imagine how awkward manual renaming via 'mv' commands would be if you have hundreds of files to be renamed. Vancouver Utilities has many 'rename' scripts to make mass changes to filenames easy.


 #7a. renameQQ data1  <-- easy way to remove Quotes from All files in subdir
      ==============
 #7b. renameL data1   <-- easy way to translate names to Lower case
      =============
 #7c. renameBU data1  <-- easy way to convert Blanks to '_' Underscores
      ==============
 #7d. renameDU data1  <-- easy way to convert '$' signs to '_' Underscores
      ==============

VU JCL/script filename standards

Renaming GDG files

After converting GDG files, you must rename them using the VU GDG file naming conventions - appending '_000001' for the 1st generation. For example:


 #8. cp $CNVDATA/d2asc/AR.CUSTOMER.MASTER(0) $RUNDATA/data1/ar.customer.master_000001
     ================================================================================
     - the HARD way of renaming mainframe GDG files to VU GDG standards

 #8a. renameGDG d1ebc  <-- script to rename all files in directory for VU GDGs
      ===============      (the EASY way)

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

5D1. JCL/script Test/Debug Tips

run 'testdatainit' before JCL/scripts

When you are testing, it is a good idea to run 'testdatainit', before you run the JCL/script being debugged. 'testdatainit' clears several subdirs, which makes it much easier to inspect the results.

Here are the testdata subdirs flagged with '0' to indicate subdirs that are cleared with testdatainit & '*' to indicate subdirs with your data files thet you would not want to clear.

 /home/userxx        <--- userid for testing OR your homedir
 :-----testdata          - data files superdir
 :     :--*--data1       - data files
 :     :--*--datasave    - backup, allow clear data1/.. to files for 1 job debug
 :     :--*--dataMF      - datafiles from MainFrame for comparison
 :     :--*--ctl         - GDG control file
 :     :--0--jobctl      - jobstop control files to debug JCL/script
 :     :--0--joblog      - programmer debug log files
 :     :--0--jobmsgs     - status msgs from JCL/scripts (step begin/end)
 :     :--0--jobtimes    - job/step times date stamped history files
 :     :--0--jobtmp      - temporary files for SYSIN data & GDG temp files
 :     :     :----JOBXX - jobtmp subdir created by jobset51 (script line 10)
 :     :     :    :-----GDG
 :     :     :    :     :-----data1 - new GDG files restored to data1/... at EOJ
 :     :--0--sysout      - SYSOUT printer files
 :     :     :----yymmdd - date stamped subdir for print files
 :     :     :    :-----JOBXX_S0010_SYSPRINT  - named by job+step+DDname
 :     :--0--tmp         - tmp subdir for uvsort & misc use
 :     :--0--tape1       - tape files become GDG files on disc

data file debug strategies

dataMF/...
  • datafiles from MainFrame for comparison
datasave/...
  • backup all data1/... files here before debug difficult job
  • then remove all data1/* & copyback only files for the debug job
data1/...
  • could init to only files required for difficult debug jobs

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

5D2. JCL/script Test/Debug Tips

using 'testdatainit' & 'joblog'

1st run 'testdatainit' to clear output subdirs & make it easy to check results. Then run your JCL/script using 'joblog' which captures the log into the 'jblog' subdir for review if measages roll off he screen. Here is an example:


 #1. Login userxx --> $HOME (/home/userxx)
     ============

 #2. cdd --> $HOME/testdata
     ======================

 #3. testdatainit         <-- clear subdirs of prior run data
     ============           - also prompts to reload the GDG control file

 #4. joblog jobxx.ksh     <-- use joblog to run script to be tested
     ================       - saves console messages in joblog/...

The subdirs cleared are: jobctl, joblog, jobmsgs, jobtmp, sysout,& tmp. We will discuss in order of importance:

  1. jobtmp/ - jobset51 sets up a subdir within jobtmp jobtmp/JOBNAME/ - named using the JCL/script name in caps. jobtmp/JOBNAME/... - for temp files such as SYSIN data from instream jobtmp/JOBNAME/GDG/... - for new GDGs not restored to data1/ due to AbTerm

Note
  • new generations of GDG files are created in jobtmp/JOBNAME/GDG/...
    and restored to data1/... at Normal job end.
  • allows you to simply rerun an AbTerm job without worrying about GDGs
  • but you will get a prompt on rerun asking to restore or clear
  • running testdatainit will avoid this prompt, which is probably not
    relevant when testing, but would be important in produciton.
  1. sysout/ - jobset51 sets up a subdir within sysout sysout/JOBNAME/ - named using the JCL/script name in caps. sysout/JOBNAME/... - for output files created by COBOL program DISPLAYs sysout/JOBNAME/JOBNAME_STEP#_SYSOUT_yymmdd_HHMMSS sysout/JOBXX/JOBXX <-- example

Note
  • you can appreciate that runing 'testdatainit' before the JCL/script
    being debugged will make it much easier to inspect the files created
    from your job (vs output files from many previous jobs being debugged)
    llr sysout   <-- will show only new files from your latest run
                   - because testdatainit has cleared outputs of prior runs

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

5D3. JCL/script Test/Debug Tips

subdirs cleared by testdatainit

  1. joblog/ - captures console messages from your JCL/script - already didscussed in Tip #3 above

  2. jobctl/ - control file for setting start & stop steps in multi-step jobs - coded on the command line following JCL/script name, for rexample:


               jobxx.ksh start=S0030 stop=S0030
               ================================
               - would run only step 3
               - omit the stop=... to run all remaining steps
               - would use to restart production jobs after failing step
  1. jobmsgs/ - captures only the most important console messages such as job start/end, step start/end,& error messages - not vital for testing since you see the console msgs & logs but more important for production job monitoring

  2. jobtimes/ - captures start/end/elapsed times for the job & each step. - not important for test/debug with ssmall files.

  3. tmp/ - used by uvsort for merge files on large sorts - we recommend you use the tmp/ subdir for any temporary files you might create while editing (cutting & pasting, etc).

Note
  • keep the working directory clean (subdirs only, no files)
  • files created by your JCL/scripts should be in subdirs (data,jobtmp,etc)
  • any files created in testdata/... by your jobs being tested indicate
    an error in the JCL/script file definitions (exportfile, exportgen0/1)
  • you will see the logical name (vs the physical filename) lost if
    the exportfile/exportgen command is misisng or incorrect
  • keeping testdata/ clean of files (intended subdirs only) means that
    any invalid files created by JCL/script dsiconnects will standout
    (like a sore thumb)

check new GDG files


 #7. llr jobtmp     <-- list all filenames in jobtmp/ such as GDG files
     ==========

 #8. l jobtmp/JOBXX/GDG/data1/  <-- list any GDG files left in jobtmp
     ========================
     - JobEnd=Normal moves new GDG files back to data1/... subdir
     - JobEnd=AbTerm leaves new GDG files in jobtmp/JOBXX/GDG/data1/...
       so you can fix problem & rerun without removing new GDGs from data1/...

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

5E1. JCL/script Test/Debug Tips

test/debug for DIFFICULT jobs

We assume that you have been test/debugging many jobs & then find a difficult job that requires these exceptional procedures. The data1/... subdir could have hundreds of files from prior tests; we can save them to datasave/..., clear all data1/* & copyback only the files required for the difficult job being debugged.


 #1. Login userxx --> /home/userxx  (or whatever Login desired)

 #2. cdd --> $HOME/testdata
     ======================

 #3. mkdir datajobxx            <-- mkdir for files required in jobxx
     ===============                (problem job to be debugged)

 #3a. cp data1/fileA datajobxx/  <-- select files required for jobxx
      =========================
 #3b. cp data1/fileB datajobxx/          ... etc ...
      =========================

 #4. mkdir datasave            <-- make backup subdir for existing datafiles
     ==============                (if not already existing)

 #5. cp data1/* datasave        <-- backup all existing data1/* files
     ===================
  1. Test/Debug ---> see detailed steps on next page --->

  2. Restore all datafiles after test/debug difficult job


 #7a. cp datasave/* data1
      ===================

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

5E2. JCL/script Test/Debug Tips

test/debug ITERATION for problem job

This assumes that you have completed the preparations suggested on the previous pages, especially the backup of data1/* files to datasave/..., clear all data1/*, & copyback only the files required for the difficult job being debugged. You could now repeat the following steps for each cycle of test/debug that might be required for a difficult job.


 #1. cdd --> ensure we are in $RUNDATA

 #2. rm -f data1/*         <-- remove all files from data1/...
     =============

 #3. cp datajobxx/* data1  <-- store data1/ files for jobxx only
     ====================

 #4. testdatainit          <-- clear files from all temporary subdirs
     ============              (jobctl,joblog,jobmsgs,jobtmp,sysout,tmp,wrk)

activate ANIMATION (if desired)


 #5. export ANIM="+A"      <-- activate Micro Focus COBOL animator (debugger)
     ================

 #6. joblog jobxx.ksh      <-- test/debug jobxx
     ================

 #7. reply to animation prompts
     ==========================

The Micro Focus Animator is a marvelous debugging tool for COBOL programs. It stops at 1st instruciton & displays a menu of comamnds. Here are a few:

      --> s   <-- Step (execute current high-lighted statement)
                - for Perform: go into paragraph or section
      --> ps  <-- Perform Statement
                - do not animate paragraph/section (appears to step over it)
      --> qc  <-- Query the fieldname under the Cursor
                - move cursor (with arrow keys) to the desired fieldname
      --> lc  <-- Locate definition of fieldname under the Cursor
      --> g   <-- Go, steps continuously (but slowly) thru instructions
      --> 9   <-- (while Go is progressing), enter digit 2-9 to speed up
      --> z   <-- Zoom thru remainder of program (without animating)
      --> Esc <-- Escape to exit program
      --> y   <-- requires 'y' response to actually exit

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

5E3. JCL/script Test/Debug Tips

check results


 #8. vi joblog/jobxx.log    <-- view the joblog
     ===================

 #9a. vi data1/...          <-- check data files with 'vi'
      ============            - IF LineFeeds present (no Packed fields)

 #9b. uvhd data1/...        <-- use 'uvhd' if no LF's
      ==============          - &/or if Packed/Binary fields present

 #10a. llr jobtmp               <-- list jobtmp files created
       ==========                 - intermediate files & new GDG's
                                    (new GDGs NOT restored to data1/ if Abterm)

 #10b. vi jobtmp/JOBXX/GDG/...  <-- investigate GDG files
       =======================

 #11a. llr sysout               <-- list sysout files created
       ==========                 - from COBOL 'DISPLAY's

 #11b. vi sysout/JOBXX/...      <-- investigate sysout files as desired
       ===================

 #11c. uvlp18 sysout/JOBXX/...  <-- print sysout files as desired
       =======================    - uvlp18 prints 18 cpi (132 cols on 8" wide)

 #11d. uvlp14L sysout/JOBXX/...   - use uvlp12L (Landscape) 14cpi 150 cols 11"
       ========================

modify JCL/scripts & COBOL programs


 #12. cdl --> $RUNLIBS      <-- switch to $RUNLIBS

 #13a. vi jcls/jobxx.ksh    <-- modify the JCL/script if required
       =================

 #14a. vi cbls/cblxx.ksh    <-- modify COBOL programs if required
       =================

 #14b. mfcbl1 cblxx.cbl     <-- recompile the COBOL program
       ================
 -------------> repeat steps 1 - 14 as required <---------------

 #15. cp datasave/* data1   <-- restore all data1/* files when jobxx debugged
      ===================

 #16. export ANIM=""        <-- de-activate Micro Focus COBOL animator
      ==============

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

5E4. JCL/script Test/Debug Tips

Print-outs to help debug difficult jobs

Hard-copy listings can help you debug difficult jobs & document the problems for other team members. Vancouver Utilities provides several scripts (based on the uvlist utility documented at uvlist.htm. These scripts are great for JCL/script & program listings since the page headings capture vital information (filename, date, userid, page#, line# of 1st line on page,etc). Here are a few of the most useful scripts:

uvlp12
  • print portrait at 12 chars/inch
uvlp12D
  • print portrait & Duplex (for longer listings such as COBOL programs)
uvlp14
  • portrait at 14 cpi
uvlp14L
  • print Landscape at 14 cpi
etc

printing that may assist debug


 #1. uvlp14 joblog/jobxx.log  <-- print the joblog for better study
     =======================    - see 'uvlp' scripts in uvlist.htm

 #2. lslp data1     <-- print data1/... to study with jobxx.log
     ==========       - 'lslp' script does ls -l to tmp/ & uvlp12 tmp file

 #3. llr sysout     <-- display printer filenames in sysout/yyyymmdd/...
      ==========

 #4. uvlp14 sysout/yyyymmdd/JOBXX_S0010_DDname
     =========================================
     - print sysout files

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

5G1. JCL/script Test/Debug Tips

Re-Creating the gdgctl file

If you have not yet edited gdgctl51 & reloaded gdgctl51I, then you could re-create gdgctl51 from all JCL by running 'uvcopy jclgdgctl51' separately from script 'jcl2ksh51A'. You might do this if you had added a few JCLs via jcl2ksh51 (vs jcl2ksh51A).


 #1. Login userxx --> /home/userxx
 #2. cdl --> /home/userxx/testlibs (alias cdl='cd $RUNLIBS')

 #3. uvcopy jclgdgctl51,fild1=jcl3,filo1=ctl/gdgctl51
     ================================================
     - extract all GDG file-names from converted JCL/scripts
NOTE
  • the control file must be copied to the $GDGCTL directory
  • GDGCTL defined in profile, either $RUNDATA or $APPSADM:
  • GDGCTL=$RUNDATA - for programmers with separate set of testdata
  • GDGCTL=$APPSADM - final testing/production common set of data

 #4. cp ctl/gdgctl51 $GDGCTL/ctl/    <-- copy to GDG control directory
     ============================      - GDGCTL $RUNDATA or $APPSADM

 #5. uvcopy gdgload51,fili1=$GDGCTL/gdgctl51,filo1=$GDGCTL/gdgctl51I
     ===============================================================
 #5a. uvcopy gdgload51  <-- same but easier (files default as shown above)
      ================

re-converting JCL

If you reconvert all JCL (using script 'jcl2ksh51A'), you will NOT overwrite the GDG control file & lose any manual edits to modify the number of generations, because the script tests for existing $GDGCTL/gdgctl51 & will not overwrite.

If you only needed to convert a few additional JCL's you could use script 'jcl2ksh51' which converts 1 at a time & does not recreate the GDG control file. You could then edit the existing gdgctl51 adding any new GDG files & reload the Indexed file by rerunning 'uvcopy gdgload51'.

Alternate location for GDG control file

The location of the GDG control file is determined by the common_profile (stored at /home/appsadm/env/common_profile & called by .profile or .bash_profile). Here are lines 61-62 of $APPSADM/env/common_profile.

 export GDGCTL=$RUNDATA/ctl       #<-- default location
 # export GDGCTL=$APPSADM/ctl     #<-- could change to this ?

If you have multiple RUNDATA directories you might want to activate 'export GDGCTL=$APPSADM/ctl' & #comment out 'export GDGCTL=$RUNDATA/ctl' so you would have only 1 GDG control file vs multiple.

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

5G2. JCL/COBOL executions using VU demo files

Editing the GDG control file

The GDG control file is 1st created as part of the 'jcl2ksh51A' script that converts all JCL to Korn shell scripts (see log on page '3F1'+). All GDG filenames (identified by suffixes (0),(+1),etc) are extracted from all JCL, sorted dropping duplicates,& loaded into an Indexed file for lookup when the JCL/scripts are executed - to determine latest & next generation,& also to determine how many generations to maintain. These lookups & determinations are performed by functions 'exportgen0' & 'exportgen1'.

Here is the GDG file created from the demo JCL/scripts listed in Part_2. This is the text file that can be edited to modify the number of generations before loading into the Indexed file 'gdgctl51I' (that is looked up by the exportgen0/exportgen1 functions in the JCL/scripts).

$RUNDATA/ctl/gdgctl51

 gl.account.acntlist_                    gdg=07
 gl.account.master_                      gdg=07
 gl.account.trans2_                      gdg=07
 gl.account.trans_                       gdg=07

modifying generations to maintain

As shown above the number of generations defaults to 7, You ca edit the file to set the generations as desired for each file. Note that the location of the GDG control file defaults to $RUNDATA/ctl/gdgctl51 but is configurable via "export GDGCTL=..." (discussed later).


 #1. Login userxx --> /home/userxx

 #2. cdd --> /home/userxx/testdata (alias='cd $RUNDATA)
     ===

 #3. vi ctl/gdgctl51   <-- edit to modify no of generations
     ===============

 #4. uvcopy gdgload51
     ================
     - reload Indexed file for use by exportgen1, exportgen0,& jobend51

I/O files are defaulted within the 'gdgload51' uvcopy job as follows:


 #4a. uvcopy gdgload51,fili1=$GDGCTL/gdgctl51,filo1=$GDGCTL/gdgctl51I
      ===============================================================

Since the common_profile defines "export GDGCTL=$RUNDATA/ctl", the result is:


 #4b. uvcopy gdgload51,fili1=$RUNDATA/ctl/gdgctl51,filo1=$RUNDATA/ctl/gdgctl51I
      =========================================================================

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

5H1. JCL/script Test/Debug Tips

GDG files & step Restart

The VU JCL conversion writes new GDGs into $RUNDATA/jobtmp/$JOBID2/GDG/data1/... and restores the new GDGs to $RUNDATA/data1/... at S9000 JobEnd=Normal. If any step fails, the job ends at S9900 JobEnd=AbTerm & any new GDG files in jobtmp/... are not restored to data1/...

The logic above means that you can simply rerun JCL/scripts with GDG files and not worry about any new GDGs created in the failing run. However you do need to know if there are any non-GDG files that are updated in place (vs updated by copying to a newfile). If there are updates in place prior to the failing step, then you can use "step Restart" to prevent double updates. This assumes it was not the failing step doing an update in place, in which case you would need to restore that file from a backup made before the job started.

We will demo new GDG file creation & step restart using JCL/script 'jgl200.ksh' (listed on page '2E1' & see normal joblog on page '4F5'). Step1 sorts a transaction file to a GDG file which updates a master file (also GDG) on the step2 COBOL program. We can cause 'AbTerm' by moving the COBOL executable from $RUNLIBS/cblx to tmp/... & return after failed run to demo recovery.


 #1. Login userxx --> /home/userxx  (or whatever Login desired)

 #2. cdl --> $HOME/testlibs (alias cdl='cd $HOME/testlibs)

 #3. mv cblx/cgl200.int tmp   <-- move step2 program out to tmp/...
     ======================     - to cause failure on step2

 #4. cdd --> $HOME/testdata

 #5. l data1    <-- list existing files in $RUNDATA/testdata/data1
     =======       - will show only files for jgl200.ksh
                   - only 1 generation of each file existing
 -rw-rw-r-- 1 userxx apps 13952 Oct 18 15:11 gl.account.master_000001
 -rw-rw-r-- 1 userxx apps  1600 Oct 18 15:11 gl.account.trans_000001

 #6. joblog jgl200.ksh     <-- execute the job (step2 will fail)
     =================       - joblog listed below (just step2 & AbTerm msgs)
 ******** Begin Step S0020 cgl200 (#2) ********
 gen+1 GLTRANS=jobtmp/JGL200/GDG/data1/gl.account.trans_000002 gens=07
 gen0 GLMSOLD=data1/gl.account.master_000001 insize=4.0K
 gen+1 GLMSNEW=jobtmp/JGL200/GDG/data1/gl.account.master_000002 gens=07
 Executing--> cobrun -F /home/userxx/testlibs/cblx/cgl200
 Load error : file '/home/userxx/testlibs/cblx/cgl200'
 error code: 173, pc=0, call=1, seg=0
 173     Called program file not found in drive/directory
 ERR: step#S0020 cgl200 abterm 255
 JobEnd=AbTerm, JCC=255,StepsX/L=2/S0020
 GDG files NOT moved from jobtmp/subdirs to /home/userxx/testdata/subdirs

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

5H2. JCL/script Test/Debug Tips

RERUN after failure WITHOUT RESTART


 #7. cdl  --> $HOME/testlibs

 #8. mv tmp/cgl200.int cblx   <-- move step2 program back to execution library
     ======================

 #9. cdd --> $HOME/testdata

 #10. joblog jgl200.ksh   <-- re-execute the job, will get messages
      =================       about GDG files in jobtmp from prior failure
 WARN: files in jobtmp/GDG subdirs (from prior AbTerm ERR?)
 ---- files in jobtmp/JGL200/GDG/*/* listed below:
 jobtmp/JGL200/GDG/data1/gl.account.trans_000002
 If NO restart by step#, GDG files in jobtmp/... will be cleared
    - allows rerun from begin job with no worry about GDGs
 If RESTARTing by step#, example--> jobname.ksh start=S0050
    - GDG files in jobtmp/... will NOT be cleared
    - will be available to steps after restart step#
    - will be restored to data1/... subdir at JobEnd=Normal
 -->   <-- null entry to continue
         - - - lines removed to JobEnd=Normal - - -
 JobEnd=Normal, StepsExecuted=1, LastStep=S0020

 #11. l data1    <-- list existing files in $RUNDATA/testdata/data1
      =======       - will show only files for jgl200.ksh
                    - now 2 generations each
 -rw-rw-r-- 1 userxx apps 13952 Oct 18 15:11 gl.account.master_000001
 -rw-rw-r-- 1 userxx apps 13952 Nov 26 12:15 gl.account.master_000002
 -rw-rw-r-- 1 userxx apps  1600 Oct 18 15:11 gl.account.trans_000001
 -rw-rw-r-- 1 userxx apps  1600 Nov 26 12:15 gl.account.trans_000002

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

5H3. JCL/script Test/Debug Tips

RERUN after failure WITH RESTART


 #10. joblog jgl200.ksh start=S0020  <-- re-execute job, with RESTART at step2
      ==================***********
      - will get same msgs re GDG files
      - BUT, notice the 'WARN: **START**' msg now appears
 WARN: files in jobtmp/GDG subdirs (from prior AbTerm ERR?)
 ---- files in jobtmp/JGL200/GDG/*/* listed below:
 jobtmp/JGL200/GDG/data1/gl.account.trans_000002
 If NO restart by step#, GDG files in jobtmp/... will be cleared
    - allows rerun from begin job with no worry about GDGs
 If RESTARTing by step#, example--> jobname.ksh start=S0050
    - GDG files in jobtmp/... will NOT be cleared
    - will be available to steps after restart step#
    - will be restored to data1/... subdir at JobEnd=Normal
 -->   <-- null entry to continue
 WARN: **START** at start=S0020
         - - - lines removed to JobEnd=Normal - - -
 JobEnd=Normal, StepsExecuted=1, LastStep=S0020

 #11. l data1     <-- list existing files in $RUNDATA/testdata/data1
      =======       - will show only files for jgl200.ksh
                    - still 2 generations each
 -rw-rw-r-- 1 userxx apps 13952 Oct 18 15:11 gl.account.master_000001
 -rw-rw-r-- 1 userxx apps 13952 Nov 26 12:15 gl.account.master_000002
 -rw-rw-r-- 1 userxx apps  1600 Oct 18 15:11 gl.account.trans_000001
 -rw-rw-r-- 1 userxx apps  1600 Nov 26 12:15 gl.account.trans_000002

note re rerun with or without restart

  1. Results of the 2 reruns (without restart on page '5H2' & with restart on this page '5H3') are the SAME.

  2. Without restart, GDG files from prior run (in jobtmp/...) are cleared, step#1 is rerun recreating the trans file, to update master file on step#2.

  3. With restart, GDG files from prior run are NOT cleared, step#1 is skipped but trans file from prior run is used to update master file on step#2.

  4. So results same in this case, but you would need to use restart if steps prior to failing step have updated any files in place (vs copy to new output file).

See complete documentation re GDG files at JCLcnv4gdg.htm.

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

5I1. JCL/script Test/Debug Tips

jobstop - pause at each step

The JCL converter inserts a call to function 'stepctl51' st the begining of each step. This function normally does nothing, but can be activated by 'jobstop' to stop at the begining of each step (or a specified step) & wait for the operator to enter 'go' or 'clear'.


 stepctl51  # test oprtr jobstop/jobclear
 #========  # inserted at begining of each step by JCL converter option 'b2'

Pausing at the begining of each step allows you to investigate the files in data1/... & jobtmp/JOBXX/GDG/data1/... that might be deleted at the end of the step. Also see JCLcnv3aids.htm#8B1 which suggested you might use the JCL converter option to #comment out 'rm's (converted from original 'DELETE's) & then later uncomment with mass change scripts.

execute job with jobstop activated


 #1. Login --> /home/userxx
 #2. cdd --> $HOME/testdata

---> instructions omitted here (see page '5H2')


 #6a. jobstop jobxx.ksh   <-- activate stop at begin each step
      =================     - stores control record in jobctl/jobxx.ctl

 #6b. joblog jobxx.ksh    <-- execute the job
      ================      - will get following display at begin each step
   --> jobxx.ksh paused by job control file: jobctl/jobxx.ctl
       - job control record: jobxx.ksh S0000 111125_124512
       - waiting until reply 'go' or 'clear'

 #7. Login on a 2nd screen --> $HOME
 #8. cdd --> $HOME/testdata

 #9a. l data1     <-- investigate data files on screen#2
      =======       - while jobxx paused on screen#1

 #9b. l jobtmp/JOBXX/GDG/data1/  <-- investigate GDG files in jobtmp
      =========================

option to specify stop step

The 'jobstop' script may also specify the 1st step# to stop (art end of step)


 #6a. jobstop jobxx.ksh stop=S0030 <-- store jobctl file with stop step#
      ============================

 #6b. joblog jobxx.ksh    <-- execute the job
      ================       - will stop at end of step S0030
                               & subsequent steps if you reply 'cont'inue

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

5I2. JCL/script Test/Debug Tips

job restart & job stop

As of Feb 2012, the 'job restart' facility has been enhanced to include the 'job stop' facility. This means you no longer have to precede your job execute (with or without joblog) by the 'jobstop' script to store the jobctl/file. You can restart a job at a specified step# & stop it at the END of a step#, Here are some examples:


 #1. jgl310.ksh         <-- runs all 6 steps of this demo job
     ==========

 #1a. joblog jgl310.ksh  <-- same with joblogging
      =================    - will omit 'joblog' from following examples
                           - BUT you should use joblog for test/debug

 #2. jgl310.ksh start=S0030  <-- rerun job starting at step 3
     ======================    - will run to end of job with no stops

 #3. jgl310.ksh start=S0030 stop=S0040
     =================================
     - rerun job starting at step 3 & stopping at END of step 4
     - displays following choices:
 120210:155447:JGL310: jgl310.ksh paused by job control file: jobctl/jgl310.ctl
 120210:155447:JGL310: - job control record: jgl310.ksh S0030 120210_155447
 120210:155447:JGL310: - waiting for reply: cont(inue), clear, endok, endab

cont - continue (execute) to next step, stop again,& reprompt as above clear - clear the jobctl/jgl310.ctl file, will execute to end job with no stops endok - goto Normal end of job, will restore any new GDG's endab - goto AbNormal end of job, will NOT restore any new GDG's

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

5J1. JCL/script Test/Debug Tips

Activating Console-Logging

If desired you could activate console-logging & rerun the demo jobs.

Console-Logging will capture the entire login session from login to logout vs the 'joblog' script intended for programmer test/debug to capture the log for 1 job at a time.

Note that console-logging captures all screen I/O including any reponses to prompts & commands the operator might do between running jobs.

See complete details of console logging at ADMjobs.htm#Part_6 but here is the short version of activating. ADMjobs.htm#6D1 describes the subdirs required in /home/appsadm where logs are collected. We will assume that you are 'userxx'.


 #1. login --> your homedir

 #2a. mkdir $APPSADM/log1/userxx  <-- subdir current log being created
 #2b. mkdir $APPSADM/log2/userxx  <-- subdir current months processed logs
 #2c. mkdir $APPSADM/log3/userxx  <-- subdir last months logs

 #3. vi .profile     <-- edit your profile
     ===========
 #3a. uncomment the 9 '##' lines near the end of your profile
      - see profile listing on page '1C1'
 #3b. :wq

 #4. Logout & Log back in to start console logging

 #5. Run some jobs (jar100.ksh for example)
 #5a. cdd          - change to $RUNDATA directory
 #5b. l            - list subdirs in $RUNDATA
 #5c. jar100.ksh   - run 1st job (COBOL program car100.cbl)
 #5d. l data1      - list data subdir

 #6. Logout/Login to process the log
     - copies from $APPSADM/log1/userxx/date_time to $APPSADM/log2/userxx/.
       removing screen control codes that would make log unreadable

 #7. logview    <-- script lists your available log filenames
     =======      - prompts for file# to view (#1 is latest)
 #7a. --> 1 <-- enter '1' to see latest log
 #7b. --> 0 <-- enter '0' to quit

 #8. l $APPSADM/log2/userxx/    <-- can list your log files directly
     =======================        vs logview script

 #8a. vi $APPSADM/log2/userxx/yymmdd_HHMMSS <-- inspect latest log file
      =====================================

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

5J2. JCL/script Test/Debug Tips

sample console log

'job-logging' is good for test/debug (captures log for 1 job at a time), but 'console-logging' is better for production, because it captures everything, inputs as well as outputs, what commands the operator did between jobs. Here is a sample - I have numbered the operator's commands on right side:


 #1. cdd        <-- change to $RUNDATA
 #2. l          <-- list files in $RUNDATA
 #3. l data1    <-- list files in data1/ (before running job)
 #4. jar100.ksh <-- run JCL/script
 #5. l data1    <-- list files after running job
 <@uvsoft4:userxx:/home/userxx> cdd                             <-- #1.
 <@uvsoft4:userxx:/home/userxx/testdata> l                      <-- #2.
 drwxrwxr-x 2 userxx apps 4096 Oct 17 10:49 ctl
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:48 data1   <-- data files subdir
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:27 joblog
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:27 jobmsgs
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:27 jobtmp
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:27 sysout
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:27 tmp
 drwxrwxr-x 2 userxx apps 4096 Oct 17 09:27 wrk
 <@uvsoft4:userxx:/home/userxx/testdata> l data1                <-- #3.
 -rw-rw-r-- 1 userxx apps  8192 Oct 17 09:48 ar.customer.master
 -rw-rw-r-- 1 userxx apps  1280 Oct 17 09:48 ar.sales.items
 -rw-rw-r-- 1 userxx apps 13952 Oct 17 09:48 gl.account.master_000001
 -rw-rw-r-- 1 userxx apps  1600 Oct 17 09:48 gl.account.trans_000001
 <@uvsoft4:userxx:/home/userxx/testdata> jar100.ksh             <-- #4.
                                         ==========
 111017:105233:JAR100: Begin Job=JAR100
 111017:105233:JAR100: /home/userxx/testlibs/jcls/jar100.ksh
 111017:105233:JAR100: RUNLIBS=/home/userxx/testlibs
 111017:105233:JAR100: RUNDATA=/home/userxx/testdata
 111017:105233:JAR100: JTMP=jobtmp/JAR100 SYOT=sysout/JAR100
 111017:105233:JAR100: RUNDATE=20111017
 111017:105233:JAR100: ******** Begin Step S0010 car100 (#1) ********
 111017:105233:JAR100: file: CUSTMAS=data1/ar.customer.master fsize=8.0K
 111017:105233:JAR100: file: NALIST=data1/ar.customer.nameadrs.list100 fsize=
 111017:105233:JAR100: file: SYSOUT=sysout/JAR100/S0010_SYSOUT fsize=
 111017:105233:JAR100: Executing--> cobrun -F /home/userxx/testlibs/cblx/car100
 111017:105233:JAR100: Job Times: Begun=10:52:33 End=10:52:33Elapsed=00:00:00
 111017:105233:JAR100: EOF filr01 rds=3 size=6144: /home/userxx/testdata/ctl/gdgctl51I
 111017:105233:JAR100: JobEnd=Normal, StepsExecuted=1, LastStep=S0010
 <@uvsoft4:userxx:/home/userxx/testdata> l data1                <-- #5.
 -rw-rw-r-- 1 userxx apps  8192 Oct 17 09:48 ar.customer.master
 -rw-rw-r-- 1 userxx apps  2858 Oct 17 10:52 ar.customer.nameadrs.list100
 -rw-rw-r-- 1 userxx apps  1280 Oct 17 09:48 ar.sales.items
 -rw-rw-r-- 1 userxx apps 13952 Oct 17 09:48 gl.account.master_000001
 -rw-rw-r-- 1 userxx apps  1600 Oct 17 09:48 gl.account.trans_000001

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

5K1. JCL/script Test/Debug Tips

uvcmp... data file comparison

'diff' is a marvelous utility, but does not work for files without lineFeeds & with packed/binary fields present. For these files UV Software provides the 'uvcmp' utilities - uvcopy jobs uvcmp1,2,3 & several scripts uvcmpFA1, uvcmpFE1, etc to make the uvcopy jobs easier to run.

Here is an example you can run using JCL/script 'jgl200' (listed on page '2E1' & executed on page '4F5'). jgl200 updates the account.master file with a transaction file while copying to a new output file. Since the account.master file is a GDG file, it is easy to compare the old & new master files without having to save the input file.


 #1. Login mvstest1 --> /home/mvstest1
 #1. or Login yourself (userxx) --> your homedir (/home/userxx)

 #2. cdd --> $HOME/testdata (alias cdd='cd $HOME/testdata)

 #3. joblog jgl200.ksh     <-- execute account.master update
     =================       - see joblog listed on page '4F5'

 #4. l data1        <-- list data1/... subdir after execution
     =======
      -rw-rw-r-- 1 userxx apps 13952 Oct 18 15:11 gl.account.master_000001
      -rw-rw-r-- 1 userxx apps 13952 Dec 13 11:31 gl.account.master_000002
      -rw-rw-r-- 1 userxx apps  1600 Oct 18 15:11 gl.account.tran1
      -rw-rw-r-- 1 userxx apps  1600 Oct 18 15:11 gl.account.trans_000001

 #5. mkdir rptcmp    <-- make subdir for comparison report
     ============        (if not already present)

 #6. uvcmpFA1 data1/gl.account.master_000001 data1/gl.account.master_000002 r128
     ===========================================================================
     - compare the before & after update files, 'r128' specifies the record-size
     - may omit option 'r' on the command line & specify when prompted
     - writes difference report to rptcmp/gl.account.master_000001
       (ie - named same as 1st file compared)

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

5K2. Mainframe Conversion Test/Debug Aids

demo uvcmpFA1 - file compare


 #7. vi rptcmp/gl.account.master_000001   <-- inspect difference report
     ==================================     - 1st 2 record pairs listed below:
 uvcmp1 - compare 2 files, print mismatched records, '*' flag diffs
 2011/12/13_11:32:34 uop=q1p30r256s6t500000u3x2y0q1r128
 recsize  reccount   file-size  typ Report=rptcmp/gl.account.master_000001
 1:  128       109      13,952  RSF  File1=data1/gl.account.master_000001
 2:  128       109      13,952  RSF  File2=data1/gl.account.master_000002
                       1         2         3         4         5         6
 f#record#byte# 0123456789012345678901234567890123456789012345678901234567890123
 ===============================================================================
 1       1    0  11100       11100Royal Bank Lynn Valley        ....b.20090131
                2333332222222333335676624666247662566667222222220010683333333322
                0111000000000111002F91C021EB0C9EE061CC590000000000972C2009013100
                                                                        ******
 2       1       11100       11100Royal Bank Lynn Valley        ....b.20111213
                2333332222222333335676624666247662566667222222220010683333333322
                0111000000000111002F91C021EB0C9EE061CC590000000000972C2011121300
                                                                        ******
                           - - - 5 record pairs omitted - - -
 ==================== EOF or StopPrint/StopRead count reached  ==============
 F1Count=109, F2Count=109, StopPrint=6, StopRead=500000
 F1Reads=109, MisMatches=109, MisMatsPrinted=6, Recsize=128

Notes re file compare

  1. 'uvcmpFA1' compares 2 ASCII files. See 'uvcmpFE1' to compare EBCDIC files. These assume record pairs & do not allow for inserted or deleted records. See uvcmpFAI2 & uvcmpFEI2 to allow for inserted & deleted records. See complete 'uvcmp' documentation at CMPjobs.htm.

  2. Mismatched record pairs are shown in vertical hexadecimal & differences highlight with '*'s. As you can see from the EOF statistics/counts all 109 records mismatch because the run date is inserted in all records.

  3. The StopPrint option default is 6, but I have removed the other 5 pairs to save space.

  4. The record size is 128, but only the 1st 64 bytes are shown because there was no difference in the last 64 byte segment. This feature dramatically reduces the size of difference reports when you have large records.

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

Part_6 3rd party software conversions

Part 6 - Contents


6A1. Directories for 3rd party Conversions

6B1. QuikJob - Computer Associates mainframe utility
- sample conversion to uvcopy utility

6C1. Easytrieve - Computer Associates mainframe utility
- sample conversion to uvcopy utility

6D1. Teradata - converting mainframe Teradata to unix/linux

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

6A1. 3rd party software conversions

Directories for 3rd party Conversions

 /home/userxx          <--- your homedir (or other filesystem)
 :-----testlibs
 :     :------cbl0        - mainframe COBOL programs
 :     :------cbl1/2      - intermediate conversion subdirs
 :     :------cbls        - COBOL programs converted for unix/linux
 :     :------cpy0        - COBOL copybooks
 :     :------cpys        - copybooks converted for unix/linux
 :     :------ctl         - conversion control files
 :     :------jcl0        - JCLs
 :     :------jcl1/2/3    - intermediate conversion subdirs
 :     :------jcls        - JCLs converted to scripts
 :     :------proc0       - PROCs
 :     :------procs       - procs cleaned up (73-80 cleared)
 :     :------parm0       - PARMs SYSIN control cards
 :     :------parms       - parms cleaned up (73-80 cleared)
 :     :------includes    - includes cleaned up (73-80 cleared)
 :     :------
 :     : NOTE - several subdirs omitted above
 :     :      - to focus on subdirs below for conversions of
 :     :      - Quikjob, Easytrieve,& Teradata
 :     :------
 :     :------qj0         - QuikJobs selected from parms
 :     :------qj1         - QuikJobs cleanup (73-80 cleared, lower cased)
 :     :------qj2         - QuikJobs converted to uvcopy
 :     :------qjs         - copied to execution subdir (protect reconvert)
 :     :------
 :     :------ezt0        - EasyTrieves selected from parms
 :     :------ezt1        - EasyTrieves cleanup (73-80 cleared, lower cased)
 :     :------ezt2        - Easytrieves converted to uvcopy
 :     :------ezts        - copy to Execution subdir (protect recconvert)
 :     :------
 :     :------tdsql0      - Teradata SQL scripts (create/load tables,etc)
 :     :------tdsql1      - cleaned up, lower cased, some conversions required
 :     :------tdsqls      - JCL/scripts will input from tdsqls

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

6B1. 3rd party software conversions

select QuikJobs from parms & convert to uvcopy

QuikJobs will be in the parms/... library. We will use utility 'qjselect1' to select them into a separate library qj0/... for conversion to uvcopy in qjs/...


 #1. Login userxx --> /home/userxx  (or whatever Login desired)

 #2. cdl --> $HOME/testlibs (alias cdl='cd $HOME/testlibs)

 #3. mkdir qj0 qj1 qj2 qjs   <-- make subdirs (if not existing)
     =====================

 #4. uvcopy qjselect1,fild1=parms,fild2=qj0
     ======================================
     - select quikjobs from parms to separate subdir qj0

 #4a. uvcopy qjselect1  <-- same as above, files default as shown
      ================

 #5. uvcopyx cleanup qj0 qj1 uop=q0i7g8n5t1
     ======================================
     - clear 73-80, lowercase, rename as 1st node lower (to match JCL)

 #6. uvcopyx quikjob2 qj1 qj2 uop=q0i7
     =================================
     - convert QuikJob code to uvcopy code

 #7. cp qj2/* qjs
     ============
     - copy to execution subdir (only qjs/... is in the uvcopy search path)
     - Only on initial conversion of all quikjobs
     - make any manual changes in qjs/... (not qj2)
     - protects edited jobs from mass reconverts
     - can copy any new/changed jobs selectively after mass reconvert

 #8. vi qjs/xxxxx   <-- may require some manual edits during test/debug ?
     ============

See sample QuikJob source listings below (mainframe & converted equivlaent).

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

6B2. QuikJob conversion to Vancouver Utilities

sample QuikJob program

 * QJTLIST1 - QUIKJOB TO PRINT CUSTOMER MASTER TELEPHONE LIST
 *          - TO DEMO QUIKJOB CONVERSION, OCT 2011, OWEN TOWNSEND
 *
 FILE INF  DTF=MIRAM,BKSZ=2560,RCSZ=256,KEYS=NO,LFD=SYSUT1
 EQU  CM-NUMBER    INF1-6
 EQU  CM-NAME      INF11-35
 EQU  CM-PHONE     INF91-102
 EQU  CM-CONTACT   INF103-120
 *
    HDR 1A  $JOBNAM$  CUSTOMER MASTER TELEPHONE LIST  $IPLDAT$
    HDR 2A  CUST#   COMPANY-NAME               TELEPHONE     CONTACT-NAME
 *
 EQU  TL-NUMBER       PRT1-6
 EQU  TL-NAME         PRT9-33
 EQU  TL-PHONE        PRT36-47
 EQU  TL-CONTACT      PRT50-68
 *
 1000 GET INF ATEND 9999
      MOVE CM-NUMBER   TO TL-NUMBER
      MOVE CM-NAME     TO TL-NAME
      MOVE CM-PHONE    TO TL-PHONE
      MOVE CM-CONTACT  TO TL-CONTACT
      PRINT
      GO TO 1000
 *
 9999 GOTO  EOJ
      END

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

6B3. QuikJob conversion to Vancouver Utilities

quikjob converted to uvcopy code

 #qjs/qjtlist1 - quikjob2 (ver:20111103) convert to uvcopy on: 20111105
 was=i8000q48000s8000t100000
 fili1=${SYSUT1},rcs=0256,typ=RSF
 filo1=${SYSPRINT},rcs=0256,typ=LSTt
 #* qjtlist1 - quikjob to print customer master telephone list
 #*          - to demo quikjob conversion, oct 2011, owen townsend
 #*
 lodc1=qq0(48)
 $cm-number                     =a0(6)     #equ cm-number inf1-6
 $cm-name                       =a10(25)   #equ cm-name inf11-35
 $cm-phone                      =a90(12)   #equ cm-phone inf91-102
 $cm-contact                    =a102(18)  #equ cm-contact inf103-120
 #*
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #*
 lodv3c1=hh0(200)
  $jobname   customer master telephone list  $date
  cust#   company-name               telephone     contact-name
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 lodc1=qq0(48)
 $tl-number                     =p0(6)     #equ tl-number prt1-6
 $tl-name                       =p8(25)    #equ tl-name prt9-33
 $tl-phone                      =p35(12)   #equ tl-phone prt36-47
 $tl-contact                    =p49(19)   #equ tl-contact prt50-68
 #*
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 @run
        opn    all                    open files
        clr    t0(100000),'~'         clear table to all tildes
        wtb    filo1,h0(200),h0(200)  dump headings to outfile
 #
 tag1000 get    fili1,a0                   # 1000 get inf atend 9999
         skp>   tag9999
         mvc    $tl-number,$cm-number      # move cm-number to tl-number
         mvc    $tl-name,$cm-name          # move cm-name to tl-name
         mvc    $tl-phone,$cm-phone        # move cm-phone to tl-phone
         mvc    $tl-contact,$cm-contact    # move cm-contact to tl-contact
         putb   filo1,p0                   # print
         skp    tag1000                    # goto 1000
 #*
 tag9999 skp    tageoj                     # 9999 goto eoj
 tageoj cls    all
        eoj

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

6B4. QuikJob conversion to Vancouver Utilities

Executing JCL/script calling quikjob/uvcopy

We have already executed the JCL/script calling this quikjob/uvcopy at '4F10':


 #9. qjtlist.ksh   <-- execute JCL/script calling quikjob/uvcopy
     ===========

The JCL/script was listed on page '2J1' & note the uvcopy call to the converted code module 'qjtlist1' (on line 26) as follows:


 #3---------------------
 uvcopy $QJS/qjtlist1     #<-- converted quickjobs executed by uvcopy
 #4---------------------

 export QJS=$RUNLIBS/qjs  #<-- 'QJS' defined in profile or jobset51
 =======================

'QJS' can be defined in the profile or in 'jobset51' (setup function called on line 10 of all converted JCL/scripts).

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

6C1. 3rd party software conversions

select EasyTrieve from parms & convert to uvcopy

EasyTrieves will be in the parms/... library. We will use utility 'ezselect1' to select them into a separate library ezt0/... for conversion to uvcopy in ezts/...


 #1. Login userxx --> /home/userxx (or whatever login desired)

 #2. cdl --> $HOME/testlibs (alias cdl='cd $HOME/testlibs)

 #3. mkdir ezt0 ezt1 ezt2 ezts   <-- make subdirs (if not existing)
     =========================

 #4. uvcopy ezselect1,fild1=parms,fild2=ezt0
     ======================================
     - select easytrieve jobs from parms to separate subdir ezt0

 #5. uvcopyx cleanup ezt0 ezt1 uop=q0i7g8n5t1
     ======================================
     - clear 73-80, lowercase, rename as 1st node lower (to match JCL)

 #6. uvcopyx ez2uvcopy ezt1 ezt2 uop=q0i7
     ====================================
     - convert all easytrieves to ezt2/...

 #7. cp ezt2/* ezts/
     ===============
     - copy to execution subdir (only ezts/... is in the uvcopy search path)
     - Only on initial conversion of all quikjobs
     - make any manual changes in ezts/... not ezt2/
     - protects edited jobs from mass reconverts
     - can copy any new/changed jobs selectively after mass reconvert

 #8. vi ezts/xxxxx   <-- may require some manual edits during test/debug ?
     =============

See sample EasyTrieve source listings below (mainframe & converted equivlaent).

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

6C2. Easytrieve conversion to Vancouver Utilities

sample EasyTrieve program

 * EZTLIST1 - CREATE CUSTOMER TELEPHONE LIST
 *          - cust#, name, tel#, contact
 * - demo EasyTrieve conversion to uvcopy
 * - by Owen Townsend, UV Software, Oct2011, updt Mar2015
 FILE CUSTMAS SYS004 F(256)
 CUS-REC           1   256   A
 CUS-NO            1     6   N
 CUS-NAME         11    25   A
 CUS-ADRS         36    25   A
 CUS-CITY         61    17   A
 CUS-PROV         78    02   A
 CUS-POSTAL       81    10   A
 CUS-TEL          91    12   A
 CUS-CONTACT     103    18   A
 *
 FILE EZTLIST SYSLST F(80)
 TEL-REC           1    80   A
 TEL-CUSNO         1     6   N
 TEL-NAME          9    25   A
 TEL-NUM          36    12   A
 TEL-CONTACT      50    68   A
 REC-COUNT         W     5   N
 *
 JOB INPUT CUSTMAS FINISH CUSTEOF
 MOVE SPACES   TO TEL-REC
 MOVE CUS-NO   TO TEL-CUSNO
 MOVE CUS-NAME TO TEL-NAME
 MOVE CUS-TEL  TO TEL-NUM
 MOVE CUS-CONTACT  TO TEL-CONTACT
 ADD 1 TO REC-COUNT
 PUT EZTLIST
 GO TO JOB
 *
 CUSTEOF. PROC
 DISPLAY 'TOTAL RECORDS' REC-COUNT
 END-PROC

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

6C3. Easytrieve conversion to Vancouver Utilities

EasyTrieve converted to uvcopy code

 # eztlist1 - uvcopy job converted from EasyTrieve by Vancouver Utilities
 #         - ez2uvcopy run on 2015/03/26_18:29:34 at UV_Software
 # See documentation at www.uvsoftware.ca/eztrvetc.htm
 # - or www.uvsoftware.ca/jclcnv1demo.htm#Part_6
 #
 was=a8192b8192c8192d8192e8192f8192g8192h8192q24000s8192  #<-- set area memories
 #* eztlist1 - create customer telephone list
 #* - cust#, name, tel#, contact
 #* - demo easytrieve conversion to uvcopy
 #* - by owen townsend, uv software, oct2011, updt mar2015
 #file custmas sys004 f(256)
 fili1=?${CUSTMAS},rcs=00256,typ=RSF
 #*
 #file eztlist syslst f(80)
 filo2=?${EZTLIST},rcs=00080,typ=LSTt
 #*
 lodc1=q0(48)
 $custmas                         =a0(256c)
 $cus-rec                         =a0(256c)
 $cus-no                          =a0(6z)
 $cus-name                        =a10(25c)
 $cus-adrs                        =a35(25c)
 $cus-city                        =a60(17c)
 $cus-prov                        =a77(2c)
 $cus-postal                      =a80(10c)
 $cus-tel                         =a90(12c)
 $cus-contact                     =a102(18c)
 $eztlist                         =b0(80c)
 $tel-rec                         =b0(80c)
 $tel-cusno                       =b0(6z)
 $tel-name                        =b8(25c)
 $tel-num                         =b35(12c)
 $tel-contact                     =b49(68c)
 $rec-count                       =s0(5z)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

 @run
         opn    all
 #job input custmas finish custeof
 job010  get    fili1,a0            get next record
         skp<=  2
         bal    custeof
         skp    job900
         add    $ca1,1              count records in file
 #
         clr    $tel-rec,' '
         mvf    $tel-cusno,$cus-no
         mvf    $tel-name,$cus-name
         mvf    $tel-num,$cus-tel
         mvf    $tel-contact,$cus-contact
         add    $rec-count,1
         put    filo2,b0
         skp    job010
 #*
 #*EJect
 custeof nop
         msgv1 ' TOTAL RECORDS $rec-count '
         ret=
 nofin   ret=                       dummy subrtn if no FINISH on job
 job900  cls    all                 end all files
         eoj

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

6C4. Easytrieve conversion to Vancouver Utilities

Executing JCL/script calling EasyTrieve/uvcopy

We have already executed JCL/script calling this EasyTrieve/uvcopy at '4F11':


 #10. eztlist.ksh   <-- execute JCL/script calling EasyTrieve/uvcopy
      ===========

The JCL/script was listed on page '2K1' & here are the most vital lines of the script - defining the files & calling uvcopy to execute eztlist:

 exportfile  CUSTMAS data1/ar.customer.master
 exportfile  EZTLIST data1/ar.customer.eztlist
 exportfile  SYSIN $RUNLIBS/ezt/eztlist1
 #3----------------------------------------------------------------------
 uvcopy $EZTS/eztlist1
 #4----------------------------------------------------------------------

Note that EZTS defines the location of the converted easytrieve programs. It is defined on line 90 of $APPSADM/env/common_profile_uv as follows:


 export EZTS=$RUNLIBS/ezts
 =========================

The Easytrieve script eztlist.ksh was originally executed on page '4F11' but we will repeat this on the next page.

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

6C5. Easytrieve conversion to Vancouver Utilities

execute Easytrieve demo script/program


 #1. Login userxx --> /home/userxx
 #2. cdl --> $HOME/testlibs
 #3. vi ezts/eztlist         <-- inspect easytrieve program (if desired)
 #4. vi jcls/eztlist.ksh     <-- inspect JCL/script (if desired)

 #5. cdd --> $HOME/testdata  <-- change to $RUNDATA to make it easier
                               - to inspect datafile I/O & joblog

 #6. joblog eztlist.ksh      <-- EXECUTE easytrive demo script/program
     ==================

 #7. vi joblog/eztlist.log   <-- inspect the joblog
     =====================
 111028:102328:EZTLIST: Begin Job=EZTLIST
 111028:102328:EZTLIST: /home/mvstest/testlibs/jcls/eztlist.ksh
 111028:102328:EZTLIST: Arguments:
 111028:102328:EZTLIST: TESTPROD=
 111028:102328:EZTLIST: RUNLIBS=/home/mvstest/testlibs
 111028:102328:EZTLIST: RUNDATA=/home/mvstest/testdata
 111028:102328:EZTLIST: JTMP=jobtmp/EZTLIST SYOT=sysout/EZTLIST
 111028:102328:EZTLIST: RUNDATE=20111028
 111028:102328:EZTLIST: ******** Begin Step S0010 eztpa00 (#1) ********
 111028:102328:EZTLIST: file: CUSTMAS=data1/ar.customer.master fsize=12K
 111028:102328:EZTLIST: file: EZTLIST=data1/ar.customer.eztlist fsize=4.0K
 111028:102328:EZTLIST: file: SYSIN=/home/mvstest/testlibs/parms/eztlist1 fsize=4.0K
 111028:102328:EZTLIST: Executing--> uvcopy /home/mvstest/testlibs/ezts/eztlist1
 111028:102328:EZTLIST: uvcopy ver=20110802 pf=/home/mvstest/testlibs/ezts/eztlist1
 uvcopy DISAM ext=.dat LNX L64  license=110802_99V_930630 site=UV_Software
 data1/ar.customer.master = default fili01 - null accept or reenter ?
 data1/ar.customer.eztlist = default filo02 - null accept or reenter ?
   TOTAL_RECORDS  00032
 111028:102330:EZTLIST: EOF fili01 rds=32 size=8192: data1/ar.customer.master
 111028:102330:EZTLIST: EOF filo02 wrts=32 size=2560: data1/ar.customer.eztlist
 111028:102330:EZTLIST: Job Times: Begun=10:23:28 End=10:23:30 Elapsed=00:00:02
 111028:102330:EZTLIST: EOF filr01 rds=5 size=10240: /home/mvstest/testdata/ctl/gdgctl51I
 111028:102330:EZTLIST: JobEnd=Normal, StepsExecuted=1, LastStep=S0010

 #8. vi data1/ar.custmas.eztlist  <-- inspect the output report
     ===========================    - 1st few lines shown below

eztlist sample output

 130140  EVERGREEN MOTORS LTD.      250-754-5531   LARRY WRENCH
 132588  GEECOE GENERATOR SERVICES  604-278-4488   HARRY LIGHT
 139923  JOHNSTONE BOILER & TANKS   604-320-1845   GEORGE BROWN
             - - - 29 lines omitted - - -

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

6C6. Easytrieve conversion to Vancouver Utilities

possible manual changes after auto-conversion

After automatic conversion by 'ez2uvcopy', many jobs will execute with no manual changes, but some may require changes. Here are the possible changes we are aware of & some of these may be automated in future.

  1. insert record-size on fili1=...,etc if FB(...) not coded on FILE stmtns

  1. change default file 'typ=RSF' ('FB'in mainframe Easytrieve) if required

  1. change Packed fields to unpacked if used for DISPLAY msgs

  2. 'SORT' statements are #commented out

  1. 'REPORT' writer not converted automatically

  1. Some statements not fully converted, but easy to fix manually, for example:

      IF FIELDA EQ 'A', 'B', 'C'   <-- easytrieve
      cmc $fielda,'A'              <-- auto conversion to uvcopy
      tst $fields,'ABC'            <-- manual correction
  1. Most programs have 'GO TO JOB' at end of the input file coding

  1. MACRO's require manual change, often used for record definitions

      %custmas            <-- easytrieve macro (record def from library)
      lod=qq0(48),custmas <-- uvcopy equivalent (library def fild7=...)
  1. Some special symbols may not be recognized, for example:

      IF EOF FILEA        <-- easytrieve
      cmc a0(4),'EOF~'    <-- uvcopy equivalent

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

6D1. 3rd party software conversions

TeraData Conversion

Some sites may have Databases such as TeraData & the SQL parameters (load tables, unload tables, etc) were maintained in separate libraries on the mainframe & will also be on unix/linux.

TeraData uses 3 programs (BTQMAIN/bteq, FASTLOAD,& MLOAD). FASTLOAD parms needed a modification for DDNAME=INFILE. The unix version of FASTLOAD required any 'DECIMAL' fields to be converted to 'varchar' with length = digits+decimals+2 A uvcopy job 'TDFLcnv1' was written to handle this.

cleanup tdsql0 --> tdsql1 --> tdsqls


 #1. mkdir tdsql0 tdsql1 tdsqls tdsql1FL tdsqlsFL
     ============================================
     - make subdirs required for TeraData parms conversions

 #2. copy mainframe TeraData SQLs into tdsql0/...

 #3. uvcopyx cleanup tdsql0 tdsql1 uop=q0i7g8n5t1
     ============================================
     - g8 clears 73-80, n5 renames as 1st .node in lower case
       & t1 translates contents to lower case except in quotes

 #4. uvcopyx TDcnv2 tdsql1 tdsqls uop=q0i7
     =====================================
     - convert all TD parms .goto/.label with numeric prefix
     - will then select FASTLOAD parms, modify,& overwrite in tdsqls/...

 #5. uvcopy scand1,fild1=tdsqls,fild2=tdsql1FL,arg1=ddname=,uop=q0w1
     ===============================================================
     - select FASTLOAD parms to separate subdir tdsql1FL/...
       via pattern 'ddname=' known to be unique to FASTLOAD parms

 #6. uvcopyx TDFLcnv1 tdsql1FL tdsqlsFL uop=q0i7
     ===========================================
     - special conversion for FASTLOAD parms
     - convert DECIMAL(9,2) to varchar(13), etc

 #7. cp tdsqlsFL/* tdsqls
     ====================
     - copy converted FASTLOAD parms to subdir used by JCL/scripts

In addition to converting DECIMAL to varchar, the FASTLOAD parms require another change, which cannot be performed ONCE at conversion time, but must be performed dynamically when the JCL/scripts are executed.

The unix version of FASTLOAD does not expand 'ddname=INFILE' to the actual datafilename & the JCL converter has been modified to handle this. Must be handled dynamically at run time (vs conversion time) because the INFILE could be a GDG file.

A uvcopy job 'ddnamex1' was written to handle this. It is called before each fastload in the converted JCL/scripts. See listing below with example embedded as #comments.

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

6D2. 3rd party software conversions

ddnamex1 - copy fastload parms inserting datafilename

 # ddnamex1 - copy fastload parms inserting datafilename
 #          - by Owen Townsend, UV Software, Jan20/2012
 #
 # Mainframe fastload retrieved the definition of INFILE from the JCL
 # but unix version does not.
 # Expansion of ddname=... must be done when JCL/script executed
 # - because INFILE could be a GDG file, example as follows:
 #
 # ddname=INFILE;   <-- somewehere in fastload SYSIN module
 # ==============
 # FILE=data1/datafile.for.fastload_000001                  #<-- NOTE
 # =======================================
 # - mainframe 'INFILE' changed to 'FILE' for unix version of TeraData
 # - GDG file expansion might be as shown above
 #
 #              ** sample JCL/script - fastload & ddnamex1 **
 #
 # #1=================== begin step#S0060 FASTLOAD ======================
 # exportgen0 0 INFILE data1/datafile.for.fastload_            #<-- NOTE
 # exportfile SYSIN $RUNLIBS/tdsqls/flparms                   #<-- NOTE
 # cp $SYSIN $JTMP/fastloadsysin                              #<-- NOTE
 # uvcopy ddnamex1,fili1=$JTMP/fastloadsysin,filo1=$SYSIN     #<-- NOTE
 # fastload <$SYSIN                                           #<-- NOTE
 # #4----------------------------------------------------------------------
 #
 #        ** test ddnamex1 without running JCL/script **
 #
 # 1. export INFILE=data1/datafile.for.fastload_000001
 #    ================================================
 # 2. uvcopy ddnamex1,fili1=tdsqls/flparms,filo1=tmp/flparms
 #    ========================================================
 # 3. vi tmp/flparms   <-- verify change (as shown above)
 #

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

 fili1=input,rcs=256,typ=LST
 filo1=output,rcs=256,typ=LSTt
 @run
        opn    all
 #
 # begin loop to get/process/put until EOF
 man20  get    fili1,a0                 get next line
        skp>   man90
        trlq3  a0(80)                   translate to lower
        mvc    b0(80),a0                move inarea a to outarea b
 #
 # scan for ddname= & expand symbol, else go output as is
 #Feb03 - add case insensetive option 'i' (scni)
 man30  scni   b0(80),'ddname='         scan for ddname= ID
        skp!   man40
 man32  mvn    $rb,$rx                  save ptr to 1st byte symbol (INFILE,etc)
        mvum   c0(20),bb7,'; '          isolate symbol (INFILE,etc)
        mvn    $rc,$rx                  save length of symbol
        tru    c0(20)                   UPPER case for env-var's
        env    d0(80),c0($rc20)         get value of symbol from environment
        mvc    bb0(5),'FILE='           change ddname= to FILE= for unix
        mvc    bb5(80),d0               store value after ddname=
        cat    b0(80),';'               append ';' required by fastload
 #
 # common output
 man40  put    filo1,b0(80)             write to outfile
        skp    man20                    return to get next record
 #
 # EOF - close files & end job
 man90  cls    all
        eoj

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

Visitor Counters for ThisYear and LastYear