| Part_0 | - Introduction & Overview |
| - make new users aware of utilties available | |
| - short examples of utilities with references to complete doc elsewhere |
| Part_1 | - General Purpose aids & scripts, using Unix/Linux utilities |
| - profiles, stub_profile & common_profile make administration easier | |
| - scripts to rename all files in directory saves multi hours & keystrokes | |
| - renameL to lower case, renameU to UPPer case, | |
| - renameX change extension, rename+X add ext, rename-X remove ext | |
| - directory & file listing scripts & storage used scripts | |
| - 'dtree' diagrams directory trees, great for documentation | |
| - ll? scripts to list files with various sort options | |
| (llm,lla,llc,llt,lltr,lls,llsr,lln,lld,llr,llra) | |
| - script 'cf' to Count Files in a directory | |
| - script 'cl' to Count Lines in a file (cf & cl response is number only) | |
| - script 'cfl' to Count Files & Lines in a directory (creates report) | |
| - statdir1 report subdir/file counts & total KB on all levels of superdir | |
| - longest1 - find longest line in a text file | |
| - rmold1 script to remove files older than specified no of days | |
| recursive, descends directory tree searching for old files | |
| - lsold1 - list files older than a specified number of days | |
| - lsnew1 - list files newer than a specified number of days | |
| - findowner - find files for a specified owner | |
| - findgrpnw - find files with No Group Write permissions | |
| - findgrpnwfix - find No Group Write perms & FIX | |
| - diff & alldiff (text file comparisons) | |
| - dos2unix/unix2dos utilities to insert/remove Carriage Returns | |
| - backup scripts scheduled by cron | |
| - dd Unix/Linux Data utility, use when you need more than 'cp' | |
| - other Unix/Linux aids documented in ADMjobs.htm#Part_7 | |
| (chmod_custom1 to ensure permissions OK for nightly batch runs) | |
| - other Unix/Linux aids documented in ADMjobs.htm#Part_8 | |
| (FTP,SSH,PUTTY,SAMBA,who,w,df,du,wall,write,mail) | |
| - scripts to process all files in a directory | |
| (allcp,allmv,allrm,allgrep,alldiff,allcmp,allchmod,allcancel,etc) | |
| - use when number of files > max allowed by Unix/Linux (8192) | |
| - editmfp1 - edit Multi-Files containing a specified Pattern |
| Part_2 | - General Purpose scripts calling Vancouver Utility programs |
| uvlp__ - list text files at various cpi & lpi (uvlp12,uvlp14,etc) | |
| uvlp13LD - 132 cols x 66 lines Landscape & Duplex (on 8 1/2 x 11) | |
| spreadA - list all filenames in directories 4-up | |
| cleanup - for COBOL & JCL, clear 73-80, convert CR/LF to LF, etc | |
| verifytext - scan text files for non-printable characters | |
| verifylib1 - verify module types (cbp,cpy,jcl,asm) in a library & | |
| create script to move unwanted types to separate library | |
| mksfcp1 - make script to copy files from a list of filenames | |
| xref2cp1 - generate copy script from a cross-reference report | |
| - powerful technique useful for mainframe conversion POC's | |
| - select subset of JCLs & all required cbls,cpys,parms,procs |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| Part_3 | - Cross-References (for COBOL & JCL) |
| xcobcopy1 - list all 'copy'books used in each program | |
| xcobcopy2 - shows all programs using each 'copy'book | |
| xcobcall1 - list all 'call'ed programs in each program | |
| xcobcall2 - shows all programs 'call'ing each program | |
| xcobfile2 - crossref all PROGRAMS using each external-file | |
| xcobsql1 - list all SQL Includes in any 1 PROGRAM | |
| xcobsql2 - crossref all PROGRAMS using any 1 SQL Include | |
| xkshfile1 - list all datafiles in each JCL/ksh/script | |
| xkshfile2 - shows all JCL/ksh/scripts using each data-file | |
| xkshprog1 - list all programs executed in each JCL/ksh/script | |
| xkshprog2 - shows all JCL/ksh/scripts executing each program | |
| xkshproc1 - list all PROCs executed in each JCL/ksh/script | |
| xkshproc2 - shows all JCL/ksh/scripts executing each PROC | |
| xkshparm1 - list all SYSIN/PARM modules in each JCL/ksh/script | |
| xkshparm2 - shows all JCL/ksh/scripts referencing each SYSIN/PARM | |
| xrefall - script to run all cross-ref reports |
| Part_4 | - Table Summaries & Statistics (JCL, logins, record-sizes, etc) |
| statallmvs1 - table summaries of MVS COBOL, JCL,& Korn shell scripts | |
| statallvse1 - table summaries of VSE COBOL, JCL,& Korn shell scripts | |
| statmvsjcl1 - table summarize programs & top-nodes in all MVS JCLs | |
| statvsejcl1 - table summarize programs & top-nodes in all VSE JCLs | |
| statksh1 - table summarize programs & top-nodes in all JCL/scripts | |
| statlogin1 - create table summary of user logins by month & userid. | |
| table2 - general purpose table summary by any argument & 2 acums | |
| table3d - table summary via 'key-word', preceding a 'target-word'. | |
| tblext1 - table summary counts of file extensions in a subdir | |
| - can use on cblx/*.err to calc compile failure percentage | |
| tblext2 - table summary counts extensions in all subdirs of superdir | |
| recsizes1 - create summary table of record-sizes in a text file |
| Part_5 | - COBOL Aids |
| - See COBOL cross-references in Part_3 | |
| - statcbl1 table summarize COBOL copybooks & called programs | |
| (counts copybooks & called program found in all programs) | |
| - cobfil51 COBOL files report I/O info for all files in all programs | |
| - converting copybooks into record layouts (cobmaps) | |
| - Micro Focus COBOL Animation (debugging) | |
| - Micro Focus Error messages (File status & Runtime errmsgs) | |
| - Micro Focus 'rebuild' utility. | |
| - acucobolx1 extract data records from AcuCOBOL Indexed files |
| Part_6 | - JCL/script Test/Debug aids |
| - mvsfiles5A: script to trace data files in MVS JCL | |
| - extracts all data files from jcl2 (JCL procs expanded) | |
| - identify origin step# & destination step#s for each file | |
| - jobflow51: creates jobflow reports (datafile I/O step by step) | |
| - joblog1: capture joblogs (console log for 1 job at a time) | |
| - providing separate sets of testdata for different programmers | |
| - scanjcl1: scan multi-line JCL statements for pattern & qualifier | |
| - lockdemo1: file locking, queue jobs to run serially | |
| - lockdemo2: file locking, reject 2nd attempts until 1st completes | |
| - lockwait1 - wait until file not in use |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| Part_8 | - Over 500 Pre-Programmed jobs, here are a few of the most useful |
tabfix1 - converts tabs to a desired number of blanks (4 default).
tabfix2 - inserts blanks so next field at multiple of option t (default t4)
tabfix3 - inserts blanks to place next field depending on tab rack
tolower - translate to lower case with options to inhibit translate within
single &/or double quotes, clear cols 1-6 &/or 73-80 (for COBOL).
toascii - translate EBCDIC files to ASCII with options to specify I/O
filenames, file types, record-sizes,& record translate areas
scand2 - scan all files in directory for patterns & qualifiers
- very useful to identify files that match multiple criteria
- grep is great when you only need to scan for 1 pattern
- scand2 scans for a primary pattern qualified by 1 or 2 patterns
on same line & qualified by 1 or 2 patterns anywhere in the file.
scan3d - scan all files in a directory & select records to a report file
that lie between any 2 specified patterns (start/stop) &
qualified by 3rd pattern that must be or must not be present
acum1 - accumulate any 1 field in any datafile
- hash total to prove file validity after conversions
or to get a 2nd opinion when COBOL reports look suspicious
cmrpt1 - customer master sales report for test file dat1/custmas1
(used to demo both acum1 above & selectf1 below)
selectf1 - select records depending on field value <=> 2 spcfd values.
- prompts for field displacement,length,type,number,& values.
scan5d - job to scan all files in a directory, searching for exceptions.
- specify exception conditons in a control file of patterns
& minimum/maximum counts. Example to find COBOL programs with
more than 1 'PROCEDURE DIVISION' or with any (> 0) 'EXEC SQL's
splitjclproc1 - split subdir of mixed JCLs & PROCs to separate subdirs
- used to separate emailed zip files of mixed JCLs & PROCs
- JCL conversion requires JCLs & PROCs in separate subdirs
- demos uvcopy ability to read directories & process files
splitcblcpy - split subdir of mixed COBOL programs & copybooks to
separate subdirs (required for COBOL conversions&compiles)
| Part_9 | - Aids & Tips for users new to Unix/Linux |
| - 'vi' essentials tutorial | |
| - good housekeeping recommendations | |
| - working directories, sub-directories & files |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
This document is intended to make you aware of the many conversion, testing, & debugging aids supplied by the Vancouver Utilities. I believe you will find many of these aids essential to the success of your conversion project.
These aids were originally in several documents (MVSJCL,MVSCOBOL,MVSDATA,etc). In January 2008, this separate document (CNVaids) was created to avoid the duplications in the original documents, which now have links to this document.
Many of these aids are illustrated using supplied test/demo files & you can run many of these once you have installed the Vancouver Utilities. These 'practice sessions' will help you when you start working on your own conversions of JCL, COBOL,& DATA files.
The intention here is to give you a short (1 or 2 page) introduction to the various utilities available, and then give you a link to the complete documentation which could be in various other books.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 1A1. | Profiles - profiles & related files provided in /home/uvadm/env/... |
| - setup user appsadm & copy to /home/appsadm/env/... | |
| 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 | |
| common_profile - called by stub_profile | |
| - defines search PATHs to libraries & data based on $RUNLIBS & $RUNDATA |
| 1B1. | aliases - 'aliases make life easier |
| - alias rm,mv,cp to confirm remove or overwrite y/n | |
| - cdd & cdl to switch easily between RUNDATA & RUNLIBS |
| 1C1. | renameX - scripts to rename all files in a directory |
| - renameL to lower case, renameU to UPPer case, | |
| - renameX change extension, rename+X add ext, rename-X remove ext | |
| - save a lot of keystrokes working with many & long filenames |
| 1D1. | dtree - draw directory tree from any specified starting directory |
| - see demo & try it yourself |
| 1E1. | ll? - scripts to files in a directory with various options |
| - llm, lla, llc, llt, lltr, lls, llsr, lln, lld, llr, llra | |
| - following 3 scripts listed with a demo showing output results | |
| 1E2. | llt - list files sorted by creation date/time (newest files 1st) |
| 1E3. | llc - list files with line counts (assumes text files) |
| 1E4. | llr - list files Recursively, descending a directory tree |
| listing directories & all files within each directory |
| 1F1. | cf - Count Files in a directory |
| 1F2. | cfx - same as cf, with optional selection by .extension |
| 1F3. | cfd - Count Files in 1 or more directories (if '*' wildcards) |
| - must enclose wildcard patterns in single quotes | |
| - very useful script, see examples for mainframe conversions | |
| 1F4. | cfdx - Count Files in 1 or more directories, with optional .extension |
| 1F5. | tblext1 - table summary counts by file extensions (.cbl .cpy .jcl .asm) |
| 1F6. | cl - Count Lines in a file, real simple companion to 'cf' |
| 1F7. | cfl - Count Files & Lines in a directory (create report vs just number) |
| 1F8. | statdir1 - report file counts & KB used in any directory & all subdirs |
| - uses 'find' to report all levels in the directory tree | |
| 1F9. | longest1 - find longest line in a text file |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 1G1. | lsold1 - list files older than a specified number of days |
| lsold2 - list files created/modified within 2 specified days old |
| 1G2. | lsnew1 - list files newer than a specified number of days |
| lsnew2 - list files created/modified within 2 specified days |
| 1G3. | rmold1 - remove files older than the sspecified number of days |
| - recursive, descends directory tree searching for all old files | |
| - can 1st list,move,or copy old files with lsold1,rmold1,mvold1 | |
| - alrternates rmold2,rmold3 to prompt before removal |
| Note |
|
| rmold2 |
|
| rmold3 |
|
| lsold1p |
|
| lsnew1p |
|
| lsold2p |
|
| cpold1 |
|
| mvold1 |
|
| cpnew1p |
|
| 1H1. | findowner - find files for a specified owner |
| 1I1. | findgrpnw - find files with No Group Write permissions |
| - no group write permissions could cause scripts to fail | |
| when a group of programmers are working on a common project |
| 1I2. | findgrpnwfix - find No Group Write perms & FIX |
| 1M1. | diff - unix/linux utility to compare 2 text files |
| - marvelous utility, shows changes, inserts & deletes |
| 1M2. | alldiff - script using 'diff' to compare all files in 2 directories |
| - great for confirming results of mass changes to directories | |
| of JCL/scripts or COBOL source programs | |
| - this script is supplied in /home/uvadm/sf/util/alldiff2 | |
| - it employs the marvelous unix/linux system 'diff' utility, | |
| repeating it for each pair of files found in the 2 directories. |
| 1N1. | grep - powerful unix/linux tool frequently used to search for patterns |
| in files. For example finding all 'EXEC' program names in JCL. |
| 1O1. | dos2unix - convert DOS/Windows files to Unix/Linux files (remove 'CR's) |
| 1O2. | unix2dos - convert Unix/Linux files to DOS/Windows files (insert 'CR's) |
| 1P1. | Vancouver Utility backup scripts scheduled by cron |
| 1Q1. | dd - Unix/Linux Data utility, very fast, use when you do not need the |
| power of 'uvcopy' but need more than 'cp'. |
| 1Q2. | dd example |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 1R1. | other Unix/Linux aids documented in ADMjobs.htm#Part_7. |
| (chmod_custom1 to ensure permissions OK for nightly batch runs) | |
| Here in CNVaids.doc, we will simply list them with a brief description. |
| 1R2. | other Unix/Linux aids documented in ADMjobs.htm#Part_8. |
| (FTP,SSH,PUTTY,SAMBA,who,w,df,du,wall,write,mail) | |
| Here in CNVaids.doc, we will simply list them with a brief description. |
| 1S1. | scripts to process all files in a directory |
| - use when number of files > max allowed by Unix/Linux (8192) | |
| (allcp,allmv,allrm,allgrep,alldiff,allcmp,allchmod,allcancel,etc) |
| 1T1. | editmfp1 - edit Multi-Files containing a specified Pattern |
| - similar to grep pattern & pipe to vi (no Quit option) | |
| - but editmfp1 gives you an option to Quit every 5th file |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
/home/uvadm/env <--- profiles provided here :-----stub_profile - copy/rename to .profile (ksh) or .bash_profile (bash) : - defines RUNLIBS/RUNDATA for programmers & operators :-----common_profile - common profile (called by stub_profile) : defines PATH's etc using $RUNLIBS/$RUNDATA :-----root_profile - profile for root, copy to /root/.bash_profile (RedHat) : to access Vancouver Utility scripts & uvcopy jobs : /home/appsadm/env <--- setup user 'appsadm' & copy from /home/uvadm/env/* :-----stub_profile - customize & copy to homedirs .profile or .bash_profile :-----common_profile - 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/...
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.
See more explanations at: http://www.uvsoftware.ca/admjobs.htm#1B2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here are the 'alias' commands extracted from the recommended profile which is listed at ADMjobs.htm#1C2.
# alias UNIX commands to prompt for overwrite (highly recommended) # - use \rm, \mv, \cp, when you have many files & know what you are doing # - '\' tells UNIX to ignore the alias & use native UNIX command alias rm='rm -i' # confirm removes alias mv='mv -i' # confirm renames alias cp='cp -i' # confirm copy overwrites alias l='ls -l' # saves a lot of keystrokes alias cdd='cd $RUNDATA' # quick access to data dir alias cdl='cd $RUNLIBS' # quick access to libs (same as cd) alias cdc='cd $CNVDATA' # quick access to data conversion superdir
The 1st 3 (rm='rm -i',etc) are recommended for unix/linux beginners & experts since it is so easy to wipe out files unintentionally. When you do have multiple files to remove (using the '*' wildcard), you can disable the prompt by preceding the command with a backslash or using option '-f'.
These are a great convenience for Your programmers & operators, because the recommended directory design has libraries & data in different filesystems & the paths can be long & awkward if you had to key them often.
export RUNLIBS=/p1/testlibs #<-- defs in .profile or .bash_profile
export RUNDATA=/p1/testdata
export CNVDATA=/p1/cnvdata
--- OR ---
export RUNLIBS=/p2/prodlibs
export RUNDATA=/p2/proddata
export CNVDATA=/p1/cnvdata
alias cdd='cd $RUNDATA' #<-- defs in common_profile alias cdl='cd $RUNLIBS' alias cdc='cd $CNVDATA'
With the above aliases in your profile, you can switch between your libraries & data with 3 character commands:
cdd <-- change to your data files superdir === cdl <-- change to your library files superdir === cdc <-- change to your data conversion superdir ===
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The RUNLIBS & RUNDATA above are examples for your testing & production & must be modified depending on your directory design. You will need to modify to reflect wherever you set up testing & production directories (in different file systems with possibly long awkward pathnames).
UV Software has provided test/demo files in /home/uvadm/mvstest/... and instructed you to setup user 'mvstest' & copy the demo files over there for your testing. Your profile could then define RUNLIBS & RUNDATA as follows:
export RUNLIBS=/home/mvstest/testlibs <-- could define like this export RUNDATA=/home/mvstest/testdata
export RUNLIBS=$HOME/testlibs <-- better like this export RUNDATA=$HOME/testdata - would not matter what userid
cdd <-- change to mvstest data files directory ===
cdl <-- change to mvstest library files directory ===
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
There are many 'rename' scripts (in /home/uvadm/sf/util/...) that we have found useful in mainframe conversions. These scripts can save you a lot of manual keying. It can be very awkward renaming many long filenames.
Here are just a few of the 27 scripts available:
| renameL |
|
| renameU |
|
| renameX |
|
| rename-X |
|
| rename+X |
|
To illustrate rename scripts, assume we have just transferred mainframe COBOL programs (UPPER case filenames) to unix/linux (subdir jcl0/...), & we wish to rename them from UPPER case to lower case & add extension '.jcl'.
#1. l jcl0 <-- list files before rename
====== (UPPER case, No extension)
-rw-rw-r-- 1 mvstest users 648 Jan 10 07:18 JAR100 -rw-rw-r-- 1 mvstest users 891 Jan 10 07:18 JAR120 -rw-rw-r-- 1 mvstest users 1053 Jan 10 07:18 JAR130 -rw-rw-r-- 1 mvstest users 1053 Jan 10 07:18 JAR140 -rw-rw-r-- 1 mvstest users 1053 Jan 10 07:18 JAR150
#2. renameL jcl0 <-- rename to Lower case
============
#3. rename+X jcl0 .jcl <-- add extension '.jcl'
==================
#4. l jcl0 <-- list files AFTER renaming
====== (lower case with .jcl extension)
-rw-rw-r-- 1 mvstest users 648 Jan 10 07:22 jar100.jcl -rw-rw-r-- 1 mvstest users 891 Jan 10 07:22 jar120.jcl -rw-rw-r-- 1 mvstest users 1053 Jan 10 07:22 jar130.jcl -rw-rw-r-- 1 mvstest users 1053 Jan 10 07:22 jar140.jcl -rw-rw-r-- 1 mvstest users 1053 Jan 10 07:22 jar150.jcl
You can see more 'rename' scripts listed at scripts1.htm and all are available at /home/uvadm/sf/util/...
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is a convenient script to draw directory trees. UV Software uses it for documentation & it is illustrated here in case you can wish to use it.
dtree /home/mvstest <-- try this (output illustrated below) ===================
/home/mvstest :-----cnvdata :-----testdata : :-----ap : :-----ar : :-----gl : :-----jobctl : :-----joblog : :-----jobtmp : :-----rpts : :-----sf : :-----sysout : :-----tmp : :-----wrk
:-----testlibs : :-----4up : :-----cbl0 : :-----cbl1 : :-----cbl2 : :-----cbls : :-----cblst : :-----cblx : :-----cpy0 : :-----cpy1 : :-----cpy2 : :-----cpys : :-----Csub : :-----ctl : :-----errs : :-----jcl0 : :-----jcl1 : :-----jcl2 : :-----jcl3 : :-----jcls : :-----joblog : :-----maps : :-----parm0 : :-----parms : :-----pf : :-----proc0 : :-----procs : :-----sf : :-----sfun : :-----tmp : :-----xref
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| llm |
|
| lla |
|
| llt |
|
| lltr |
|
| lls |
|
| llsr |
|
| lln |
|
| llr |
|
| llra |
|
| lld |
|
| llc |
|
See many of these scripts listed in scripts.htm. In this CNVaids.doc we will list only 1 or 2 and give examples of the outputs.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# llt - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# llt - list directory long in date sequence with Newest first
# - pipe to more (show 1 screen & wait for null entry)
#
#usage with '*' wildcard patterns
# llt dir/abc* <-- does not work (will match only 1st occurrence)
# llt 'dir/abc*' <-- does work (enclose patterns in single quotes)
#
echo "llt - list directory in date sequence with Newest files 1ST"
if (($# > 1));then
echo "usage: llt directory"
echo " ============="
echo "example: llt 'jcls/map*'"
echo " ==============="
echo "- enclose any *wildcard patterns in single quotes"
exit 1; fi
#
if [[ -z "$1" ]] ; then d="."; else d=$1; fi
ls -lt $d | more
#================
exit 0
#1. Login uvadm --> /home/uvadm
#2. llt env <-- list files in subdir env/...
======= - sorted by creation date/time (newest 1st)
llt - list directory in date sequence with Newest files 1ST -rw-r--r-- 1 uvadm apps 11018 May 9 12:04 common_profile -rw-rw-r-- 1 uvadm apps 5889 Mar 10 2011 stub_profile drwxrwxr-x 2 uvadm apps 4096 Mar 10 2011 old_profiles -rw-r--r-- 1 uvadm apps 1948 Feb 4 2011 bashrc -rw-r--r-- 1 uvadm apps 1950 Feb 4 2011 kshrc -rw-r--r-- 1 uvadm apps 2831 Feb 4 2011 root_profile -rw-r--r-- 1 uvadm apps 1828 Feb 4 2011 smb.conf -rw-r--r-- 1 uvadm apps 3301 Feb 4 2011 utilities_profile
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# llc - list all filenames in directory with line counts
# - assuming text files with line counts
# - lists with -l (list long) & pipe to more
echo "llc - list all filenames in directory with line counts"
if [[ -z "$1" ]] ; then d="."; else d=$1; fi
if [[ ! -d $d ]]; then
echo "usage: llc directory [n]"
echo " ============="
echo "- arg1 may be omitted to assume current directory"
echo "- else arg1 must be a directory"
echo "- arg2 may be 'n' to inhibit pipe to more & prompt to continue"
exit 1; fi
typeset -R8 cnti=00000000
typeset -R8 cntt=00000000
integer files=0
integer page=0
for df in $d/*
{ if [[ -f $df ]]; then
lsl=$(ls -l $df)
cntx=$(wc -l $df)
cnti=${cntx%% $df} # drop right hand filename
echo "$cnti $lsl"
((files+=1))
((cntt+=cnti))
((page+=1)) # incrmnt line count for page
if ((page>23)) && [[ "$2" != n* ]]; then
echo "-- enter to continue"; read reply
if [[ "$reply" == q* ]]; then exit 1; fi
page=0
fi
else
echo " --- bypass directory: $df"
fi
}
echo "$cntt total lines in $files files in subdir $d"
exit 0
llc env <-- list files in uvadm/env/... with line counts =======
llc - list all filenames in directory with line counts
38 -rw-r--r-- 1 uvadm apps 1948 Feb 4 2011 env/bashrc
193 -rw-r--r-- 1 uvadm apps 11018 May 9 12:04 env/common_profile
38 -rw-r--r-- 1 uvadm apps 1950 Feb 4 2011 env/kshrc
--- bypass directory: env/old_profiles
49 -rw-r--r-- 1 uvadm apps 2831 Feb 4 2011 env/root_profile
118 -rw-rw-r-- 1 uvadm apps 5889 Mar 10 2011 env/stub_profile
56 -rw-r--r-- 1 uvadm apps 3301 Feb 4 2011 env/utilities_profile
1767 total lines in 17 files in subdir env
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'llr' is convenient to examine multi-level directories. For example the 'sf' (Script Files) in uvadm contains 3 subdirs. llr will list the 4 top level directories 1st & then all files in each of the subdirs.
The following example will list only the 1st 2 files in each subdir (since there are over 700 scripts in the 4 subdirs).
#1. Login uvadm --> /home/uvadm
#2. llt sf
======
llr - list directory with long & Recursive options & pipe to more sf: drwxrwxr-x 2 uvadm apps 4096 Oct 4 09:07 adm drwxrwxr-x 2 uvadm apps 4096 Sep 1 11:50 demo drwxrwxr-x 2 uvadm apps 4096 Oct 11 12:02 IBM drwxrwxr-x 2 uvadm apps 12288 Oct 13 14:00 util
sf/adm:
total 532
-rwxrwxr-x 1 uvadm apps 1797 Mar 14 2011 aliases
-rwxrwxr-x 1 uvadm apps 1448 Mar 14 2011 backupBN1
--- omit all except 1st & last 2 ---
-rwxrwxr-x 1 uvadm apps 799 Mar 14 2011 wipeold5
-rwxrwxr-x 1 uvadm apps 404 Mar 14 2011 wmi
sf/demo:
total 292
-rwxrwxr-x 1 uvadm apps 463 Mar 14 2011 alarm1
-rwxrwxr-x 1 uvadm apps 836 Mar 14 2011 ccmysql
--- omit all except 1st & last 2 ---
-rwxrwxr-x 1 uvadm apps 1168 Mar 14 2011 wipetmp9
-rwxrwxr-x 1 uvadm apps 460 Sep 1 11:50 zipVUdemofiles
sf/IBM:
total 780
-rwxrwxr-x 1 uvadm apps 1700 Mar 14 2011 aliasMC
-rwxrwxr-x 1 uvadm apps 748 Mar 14 2011 cblerrlst1
--- omit all except 1st & last 2 ---
-rwxrwxr-x 1 uvadm apps 1983 Mar 14 2011 xref2cpA
-rwxrwxr-x 1 uvadm apps 734 Mar 14 2011 zipsql1
sf/util:
total 1420
-rwxrwxr-x 1 uvadm apps 1929 May 14 15:42 acum1
-rwxrwxr-x 1 uvadm apps 900 Mar 14 2011 allcancel
--- omit all except 1st & last 2 ---
-rwxrwxr-x 1 uvadm apps 2621 Mar 14 2011 xvseprog2
-rwxrwxr-x 1 uvadm apps 2294 Mar 14 2011 xvsesli1
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# cf - Vancouver Utility script stored at /home/uvadm/sf/util/
# cf - Count Files in directory
# - by Owen Townsend, UV Software, April 12/2012
# related scripts documented at www.uvsoftware.ca/cnvaids.htm#1F2
# cfx - count files with spcfd extension, cfd - count files in multi dirs
#
if [[ ! -d "$1" ]]; then
echo "usage: cf directory"
echo " ============"
exit 9; fi
#
ls $1 | wc -l
#============
exit 0
#1. login uvadm --> /home/uvadm
#2. cf sf/util <-- easy way to Count Files
==========
367 files in dir #1 sf/util
#2a. ls sf/util | wc -l <-- same as above, but more keystrokes
==================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# cfx - Vancouver Utility script stored at /home/uvadm/sf/util/
# cfx - Count Files in directory
# - by Owen Townsend, UV Software, April 12/2012
# related scripts documented at www.uvsoftware.ca/cnvaids.htm#1F2
# cfd - count files in multi dirs, cfdx - count files in multi dirs & exts
#
d="$1"; x="$2";
if [[ -d "$d" && -n "$x" ]]; then :
else echo "usage: cfx directory .extension"
echo " ======================="
echo "- arg1 must be directory, arg2 must be .ext"
echo "example: cfx cblx .err"
echo " ============="
echo "- count .err files in subdir cblx/..."
exit 9; fi
#
n=$(ls $d/*$x | wc -l)
#=====================
echo "$n files with ext $x in directory $d"
exit 0
#0. login uvadm --> /home/uvadm
#1. cfx dochtml .doc
==================
6 files, with ext .doc, in dir #1 dochtml
#2. cfx dochtml .htm
==================
69 files, with ext .htm, in dir #1 dochtml
#3. cfx dochtml .jpg
==================
7 files, with ext .jpg, in dir #1 dochtml
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# cfd - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# cfd - Count Files in multiple directories (in quotes if wildcards)
# - by Owen Townsend, UV Software, April 12/2012
# related scripts documented at www.uvsoftware.ca/cnvaids.htm#1F2
# cf - count files in 1 dir, cfdx - count files in multi dirs & exts
d="$1";
if [ -z "$d" ]; then
echo "usage: cfd directory"
echo " ============="
echo " - arg1 must be specified, may use wildcards"
echo "example: cfd 'jcl*'"
echo " =========="
echo "- count files in all subdirs matching jcl/*"
echo "- must enclose in quotes if wildcards present"
exit 1; fi
#
integer dn=0
integer tf=0
for d1 in $d
do if [[ -d $d1 ]]; then
d1f=$(ls $d1 | wc -l)
((dn+=1))
echo "$d1f files in dir #$dn $d1"
((tf+=d1f))
fi
done
if ((tf>d1f)); then
echo "Totals: $tf files in $dn directories"
fi
exit 0
This is handy for mainframe conversions, mainframe components have been transferred to unix/linux & stored in subdirs cbl0,cpy0,jcl0,parm0,proc0 so we can count files in all subdirs ending in '0' using '*0' (must enclose patterns with *wildcard in single quotes)
#1. cd mmvstest/testlibs <-- superdir with multi subdirs mainframe components
#2. cfd '*0' <-- count files in all subdirs ending with '0'
========
18 files in dir #1 cbl0
10 files in dir #2 cpy0
66 files in dir #3 jcl0
8 files in dir #4 parm0
4 files in dir #5 proc0
Totals: 108 files in 5 directories
#1. cfdx '*doc*' .doc
=================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'tblext1' is fully documented at '4F1', but briefly mentioned here because it is related to the 'cfx' & 'cfdx' scripts that count files by extensions.
If you have FTP'd mixed mainframe modules into a unix directory, you might want to know the breakdown by module type.
uvcopy tblext1,fild1=ftpdir <-- count all files in ftpdir by .extension =========================== - will write table summary to tmp/ftpddir
tblext1 2006/04/16_20:58:01 table summary of extensions/counts in directory
tbl#001 pg#001 -argument- -acum#1- %
line# count % file extension count
1 37 13 .CBL 37 13
2 8 2 .CPY 8 2
3 212 75 .CTL 212 75
4 21 7 .JCL 21 7
5 1 0 .zip 1 0
279*100 *TOTAL* 279 *100
# cl - Count Lines in directory
if [[ ! -f "$1" ]]; then
echo "usage: cl file"
echo " ======="
exit 9; fi
wc -l $1
#=======
'cl' is a really simple script, but an obvious companion to 'cf'
#1. cl doc/CNVaids.doc <-- Count Lines in "this documentation"
==================
--> 8,389 <-- result
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# cfl - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# cfl - Count Files & Lines in a directory (option to print via uvlp12)
# - option to count only files matching suffix supplied by arg#2
d="$1"; p="$2"; db=$(basename $d); tmpf=tmp/$db.cfl
if [ -d "$d" ]; then :
else echo "usage: cfl directory [suffix]"
echo " ======================"
echo "- arg1=directory, arg2=prefix file select (optional)"
exit 1; fi
echo "cfl Count Files & Lines in subdir: $d (with optional prefix=$p )" >$tmpf
integer fs=0 fsp=0 lnt=0 ln2=0;
for df in $d/*
do
((fs+=1))
f=${df##*/}
if [[ "$p" == "" || "$f" == "$p"* ]]; then
((fsp+=1))
ln1=$(wc -l $df); ln2=${ln1% *}; ln3=${ln2##* };
fdus=$(\du -s -h $df | tr '\t' ' '); fdu=${fdus%% *};
printf "#%03d" $fsp >>$tmpf
if [[ -d $df ]]; then printf "/ " >>$tmpf; else printf " " >>$tmpf; fi
printf "%8s " $fdu >>$tmpf
printf "%8d " $ln3 >>$tmpf
printf "$df \n" >>$tmpf
((lnt+=ln3)) # accum total lines
fi
done
echo "Totals: $fs files & $lnt lines in subdir: $d" >>$tmpf
if [ -n "$p" ]; then echo "$fsp files with prefix=$p (null=all)" >>$tmpf; fi
more $tmpf
echo "enter 'p' to print"; read reply
if [[ "$reply" == "p" ]]; then uvlp12 $tmpf; fi
exit 0
cfl /home/uvadm/env <-- example, count files & Lines in env/ (profiles) =================== - output shown below:
cfl Count Files & Lines in subdir: env (with optional prefix= ) #001 4.0K 36 env/bashrc #003 16K 272 env/common_profile #004 4.0K 36 env/kshrc #005/ 100K 0 env/other_profiles #006 4.0K 49 env/root_profile #007 4.0K 57 env/smb.conf #008 8.0K 147 env/stub_profile #009 4.0K 50 env/stub_profile_appsadm #010 4.0K 36 env/stub_profile_appsadm_cronlogdemo #011 4.0K 54 env/utilities_profile Totals: 11 files & 870 lines in subdir: env
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
This script should be very useful to any unix/linux site:
Here is the report I created for all /home/... dirs on my machine:
statdir1 /home <-- call script, arg1 is directory to be examined ==============
stats/home.rpt - FileCounts & DiscUsage for SubDirs in ParentDir: /home
#1 Files=0000063 SubDirs=0049 TotKB=0004308 - /home/appsadm
#2 Files=0000126 SubDirs=0022 TotKB=0001180 - /home/aquitec
#3 Files=0000266 SubDirs=0057 TotKB=0018216 - /home/berks
#4 Files=0000036 SubDirs=0037 TotKB=0000372 - /home/callatay
- - - - - etc - - - - -
#82 Files=0003280 SubDirs=0252 TotKB=0060484 - /home/uvadm
#83 Files=0003995 SubDirs=0297 TotKB=0070032 - /home/uvext
#84 Files=0000015 SubDirs=0006 TotKB=0000100 - /home/uvtest1
#85 Files=0000407 SubDirs=0079 TotKB=0003168 - /home/vsetest
Total Dirs=85, Files=33711, SubDirs=3646, KB=1550852, for ParentDir=/home
You can rerun for homedirs using a lot of storage, for example:
statdir1 /home/uvadm <-- rerun for selected homedirs ====================
'statdir1' is a very powerful & interesting script. You can see it listed at http://www.uvsoftware.ca/admjobs.htm#7G2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# longest1 - find longest line in a file
#
echo "longest1 - find longest line in a file"
file="$1";
if [[ ! -f "$file" ]]; then
echo "usage: longest1 filename"
echo " ================="
echo " - arg1 must be a file"
echo " "
echo "example: longest1 sf/util/longest1"
echo " ========================="
exit 1; fi
#
integer lines=0; # init line counter
integer longest=0; # init longest line char count
longestline=""; # init longest line data
exec 3< $file # open file for reading
while read -u3 line # read next filename
do ((lines+=1))
l1c=${#line}
l1cn=${l1c%% *}
if ((l1cn > longest)); then
longest=l1cn; longestline=$line; fi
done
exec 3<&- # close file of filenames
echo "longest line: $longest characters in $file, contents:"
echo "$longestline"
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
These scripts are recursive, they process an entire directory tree, descending all levels, looking for files older/newer than a specified no of days.
| 1G1. | lsold1 - list files older than a specified number of days |
| lsold2 - list files created/modified within 2 specified days old |
| 1G2. | lsnew1 - list files newer than a specified number of days |
| lsnew2 - list files created/modified within 2 specified days |
| 1G3. | rmold1 - remove files older than the sspecified number of days |
| - recursive, descends directory tree searching for all old files | |
| - can 1st list,move,or copy old files with lsold1,rmold1,mvold1 | |
| - alrternates rmold2,rmold3 to prompt before removal |
| Note |
|
| Note |
|
| rmold2 |
|
| rmold3 |
|
| lsold1p |
|
| lsnew1p |
|
| lsold2p |
|
| cpold1 |
|
| mvold1 |
|
| cpnew1p |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# lsold1 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# lsold1 - list files older than a specified number of days
#
if [[ -d "$1" && -n "$2" ]]; then :
else echo "usage: lsold1 directory days"
echo " ====================="
echo "example: lsold1 /u2/apps/data 30"
echo " ======================="
echo "- list files in directory tree older than 30 days"
echo " "
echo "example2: lsold1 . 30 (use '.' if in directory)"
echo " ==========="
echo "- Also see 'lsold1p' that allows a filename matching pattern"
exit 1; fi
days="+$2"
#
find $1 -mtime $days -type f -exec ls -l {} \;
#=============================================
# - list files older than a specified number of days
exit 0
#!/bin/ksh
# lsold2 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# lsold2 - list files modified/created between 2 days
#
if [[ -d "$1" && -n "$2" && -n "$3" ]]; then :
else echo "usage: lsold2 directory days1 days2"
echo " ============================"
echo "example: lsold2 /u2/apps/data 30 60"
echo " =========================="
echo "- list files in directory older than 30 days & newer than 60 days"
echo " "
echo "example2: lsold2 . 30 60 "
echo " ================"
echo "- list files in current dir 30 to 60 days old"
echo "Note - also see 'lsold2p' allows filename matching pattern"
exit 1; fi
#
from=+$2; to=-$3
#
find $1 -mtime $from -mtime $to -exec ls -l {} \;
#================================================
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# lsnew1 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# lsnew1 - list files newer than or modified within specified number of days
#
if [[ -d "$1" && -n "$2" ]]; then :
else echo "usage: lsnew1 directory days"
echo " ====================="
echo "example: lsnew1 /u2/apps/data 30"
echo " ======================="
echo "- list files in directory tree modified in last 30 days"
echo " "
echo "example2: lsnew1 . 30 (use '.' if in directory)"
echo " ==========="
echo "- Also see 'lsnew1p' that allows a filename matching pattern"
exit 1; fi
days="-$2"
#
find $1 -mtime $days -type f -exec ls -l {} \;
#=============================================
# - list files newer than or modified within specified number of days
exit 0
#!/bin/ksh
# lsnew2 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# lsnew2 - list files in a subdir newer than ctl/lsnew2.ctl
# - first create a control file with current time
# - then lsnew2 lists files in a subdir newer than the control file
#
if [[ ! -d "$1" ]]; then
echo "prep: touch ctl/lsnew2.ctl <-- set current time on control file"
echo " ===================="
echo "prep: touch -d 10:00:00 ctl/lsnew2.ctl <-- set desired time"
echo " ================================ 10AM for example"
echo "usage: lsnew2 directory <-- list files newer than ctl file"
echo " ================"
echo "example: lsnew2 data"
echo " ==========="
echo " - list files in data subdir newer than ctl/lsnew2.ctl"
exit 1; fi
#
find $1 -newer ctl/lsnew2.ctl -type f -exec ls -l {} \;
#======================================================
# - list files in arg1 subdir newer than control file ctl/lsnew2.ctl
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# rmold1 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# rmold1 - remove files from a specified directory (& all subdirs),
# that are older(+) than a specified number of days
# - option to prompt y/n for each file to be removed
#
# 3 variations of this script as follows:
#*rmold1 (this) - remove old files, option to prompt for each file to be removed
# rmold2 - lists all old files, then prompts for each old file to be removed
# rmold3 - lists all old files, then prompts once to remove all old files
#
# Also see:
# lsold1 - list files older than specified number of days
# - might run this script before 'rmold1' (removes files)
# to prove files to be removed are as intended
# mvold1 - might run this script instead of 'rmold1' (removes files)
# so you could recover files from the move to dir if required
#
if [[ -d "$1" && "$2" == +* && ("$3" == "-i" || "$3" == "-f") ]]; then :
else echo "usage: rmold1 directory +days option"
echo " ============================="
echo "example rmold1 history +730 -i"
echo " ======================"
echo " - remove files over 2 yrs old, prompting for confirmation"
echo " - arg1 must be a directory"
echo " - arg2 must start with + (older than)"
echo " - arg3 must be '-i' for confirmation, '-f' for none"
exit 1; fi
#
find $1 -mtime $2 -exec rm $3 {} \;
#==================================
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# findowner - find files owned by specified user
#
if [[ -d "$1" && -n "$2" ]]; then :
else echo "usage: findowner directory username"
echo " ============================"
echo "example: findowner /u2/apps/data root"
echo " ============================"
echo " - list files owned by root (& change manually to appsadm ?)"
echo " - arg1 must be a directory, arg2 must be a useraccountname"
echo " "
echo "example2: findowner . root"
echo " ================"
echo " - use '.' if you are above the subdirs to be searched"
exit 1; fi
#
find $1 -user $2 -print
#======================
# - find all files owned by spcfd user & list (for manual change?)
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| Note |
|
#!/bin/ksh
# findgrpnw - find files without group write permission
#
if [[ ! -d "$1" ]]; then
echo "usage: findgrpnw directory"
echo " ==================="
echo "example: findgrpnw /u2/apps/data"
echo " ======================="
echo " - list files without group write permission"
echo " - arg1 must be a directory, will serach all files beneath"
echo " "
echo "example2: findgrpnw . "
echo " ============"
echo " - use '.' if you are above the subdirs to be searched"
exit 1; fi
#
find $1 ! -perm /g+w -exec ls -l {} \;
#=====================================
# - find all files without group write permission (for manual change?)
exit 0
#!/bin/ksh
# findgrpnwfix - find files without group write permission & add group write
#
if [[ ! -d "$1" ]]; then
echo "usage: findgrpnwfix directory"
echo " ======================"
echo "example: findgrpnwfix /u2/apps/data"
echo " =========================="
echo " - find files without group write permission & fix"
echo " - arg1 must be a directory, will serach all files beneath"
echo " "
echo "example2: findgrpnwfix . "
echo " ==============="
echo " - use '.' if you are above the subdirs to be searched"
exit 1; fi
#
find $1 ! -perm /g+w -exec chmod g+w {} \;
#=========================================
# - find all files without group write permission & add group write perm
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The Unix/Linux 'diff' utility is fantastic whenever you want to see the difference between any 2 programs, copybooks, jcls. It is useful to see the differences between the BEFORE & AFTER of some conversion process such as the COBOL conversion (see example shown below).
We will illustrate the 'diff' for a COBOL program 'Before' & 'After' conversion. The COBOL converter reads input from subdir 'cbl1' & writes output to 'cbl2'. You cannot 'diff' between original mainframe program in 'cbl0' & 'cbl2' since cbl0 is still UPPER case & may have data in cols 1-6 &/or 73-80 which is removed by the 'cleanup' job.
diff -b cbl1/car100.cbl cbl2/car100.cbl =======================================
8,10c8,10 < select custmas assign custmas < organization sequential access mode sequential. < select nalist assign nalist --- > uvM select custmas assign external custmas > uvM organization record sequential access mode sequential. > uvM select nalist assign external nalist 25a26 > uvJ 01 jobid pic x(8). 28a30,31 > uvJ display "JOBID" upon environment-name > uvJ accept jobid from environment-value. 34c37 < stop run. --- > uvM stop run returning 0.
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'alldiff' script makes the 'diff' command even more powerful. The 'alldiff' script is supplied with the Vancouver Utilities (uvadm/sf/util/alldiff) to repeat the Unix/Linux 'diff' utility on each pair of files in 2 directories.
This is great whenever you are making mass changes to directories - save a copy of the original, make the mass changes,& run alldiff to confirm them.
The COBOL conversion is a good example. After the 1st conversion you will probably fine tune the conversion search/replace table & possibly the conversion tool itself (cnvMF4/cnvMF5). Before you reconvert, save the original output subdir so you can run 'alldiff' after the reconversion.
Simply change the name of the current output directory & remake a new output directory. For example (using MVS conversion job cnvMF5)
#1a. vi ctl/cnvcob5.tbl - modify the search/replace table #1b. vi pf/cnvMF5 - modify the conversion tool
#2. mv cbls cbls.old - change name of outdir (contains old versions)
#3. mkdir cbls - make a new directory to receive new output
#4. uvcopy cnvMF5 ... - reconvert COBOL programs with modified
table &/or cnvMF5 conversion job
#5. alldiff cbls.old cbls |more - run alldiff to see differences
===========================
#5a. alldiff cbls.old cbls >tmp/cbls.dif OR redirect diffs to tmp file
==================================
#5b. alldiff2 cbls.old cbls OR use 'alldiff2' (saves dif file automatically)
======================
#5b. vi tmp/cbls.dif inspect tmp dif file
#5c. uvlp12 tmp/cpys.dif OR print tmp dif file
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'grep' is a powerful unix/linux tool that programmers frequently use to search for patterns in files. For example if you wanted to find all the 'EXEC' program names used in the JCL, you might use the following command:
grep ' EXEC ' jcl1/* >tmp/grepx ===============================
jcl1/jar100.jcl:3://STEP010 EXEC PGM=CAR100 jcl1/jar110.jcl:9://STEP010 EXEC PGM=CAR100 jcl1/jar120.jcl:3://STEP010 EXEC PGM=CAR120,PARM=2002 jcl1/jar130.jcl:5://STEP010 EXEC PGM=CAR120,PARM=2003 jcl1/jar140.jcl:5://STEP020 EXEC PGM=CAR120,PARM=2004 jcl1/jar150.jcl:5://STEP010 EXEC PGM=CAR150 jcl1/jar155.jcl:4://STEP020 EXEC PGM=CAR150 jcl1/jar200.jcl:12://STEP020 EXEC PGM=CAR100,COND=(4,LT,STEP010),PARM=2003 jcl1/jar200.jcl:20://*STEP030 EXEC PGM=SORT,REGION=2048K jcl1/jgl300.jcl:5://STEP010 EXEC PGM=IEBGENER jcl1/jgl300.jcl:9://STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010) jcl1/jgl320.jcl:6://STEP010 EXEC PGM=IEBGENER jcl1/jgl320.jcl:11://STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010) jcl1/jgl330.jcl:4://STEP010 EXEC PGM=IEBGENER jcl1/jgl330.jcl:10://STEP020 EXEC PGM=IDCAMS,COND=(8,LT,STEP010)
If our objective is to get a concise list of programs used in all JCL - grep for 'EXEC' does a poor job, because of varying step# & PARMs
Please see 'grepsum1' on page '2F1', which will sort the 'grep' search results & drop duplicates depending on options that allow you to specify the sort field by column range or by word occurrence numbers.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| dos2unix |
|
| unix2dos |
|
dos2unix -n ftp/dosfile tmp/unixfile ====================================
unix2dos -n tmp/unixfile ftp/dosfile ====================================
| Note |
|
| Note |
|
| Note |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
See details & examples at http://www.uvsoftware.ca/admjobs.htm#Part_4
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'dd' utility is very fast and should be used when you do not need the extensive data manipulation provided by 'uvcopy', but need more than provided by 'cp'. We will illustrate a few of the basic 'dd' commands here (see the man page for others).
| if=InputFile |
|
| of=OutputFile |
|
| bs=BlockSize |
|
| count=blocks |
|
| skip=blocks |
|
| conv=ascii |
|
Assume we have a very large file (ar/customer.master with record-size 256), and we wish to create a smaller test file (tmp/custmas1 with 10,000 records).
dd if=ar/customer.master of=tmp/custmas1 bs=25600 count=100 ===========================================================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
dd if=ar/sales.items of=tmp/sales1 conv=ascii =============================================
We provide a script 'dd2ascii' to copy/translate all files from 1 subdir to a 2nd subdir (which is checked by the script to ensure initially empty).
For example, assume subdir jcl0/ has 500 mainframe JCLs in EBCDIC:
#1. mv jcl0 jcl0E <-- rename subdir
=============
#2. mkdir jcl0 <-- remake new empty subdir
==========
#3. dd2ascii jcl0E jcl0 <-- copy/translate all JCLs from jcl0E to jcl0
===================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
There are several other Unix/Linux aids documented in ADMjobs.htm#Part_7 and ADMjob.htm#Part_8. Here in CNVaids.doc, we will simply list them with a brief description.
ADMjobs.htm#7B1 - chmod1 script to fix permissions on all subdirs & files
within a super directory.
- might use to ensure nightly batch jobs do not fail due
to bad files created by FTP or programmers using root
and forgetting to fix perms for batch jobs.
ADMjobs.htm#7B1 - chmod_custom1 suggested script to run under 'root' cron
prior to nightly batch run by 'appsadm' cron
- too dangerous to run batch jobs under root
ADMjobs.htm#8D1 FTP - transfer files between my computers, sample session
ADMjobs.htm#8E1 SSH - Secure SHell (telnet replace) login to remote computer
ADMjobs.htm#8F1 PUTTY - SSH Terminal Emulator for Windows (free download from www.chiark.greenend.org.uk)
ADMjobs.htm#8G1 SAMBA - Linux file-server for Windows, sample config file
ADMjobs.htm#8J1 show info about other users (who,w,finger,last,lastlog)
ADMjobs.htm#8J2 Sample outputs from: who, w,& finger
ADMjobs.htm#8L1 System info commands (df, du, free, uname)
ADMjobs.htm#8M1 Killing hung-up jobs (ps & kill demo)
ADMjobs.htm#8N1 Messaging (wall, write, mail)
ADMjobs.htm#8O1 TOP - Unix/Linux system performance analysis tool
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Unix/Linux systems have a limit (usually 8,192) on the number of files that may be processed by various utiltiies (cp,mv,rm,grep,cmp,chmod,etc).
Vancouver Utilities provide scripts to allow unlimited number of files for various commands. You can see all of them by 'ls /home/sf/*/all*', but here are some of the most useful & the listing for 1 of them.
| allcp |
|
| allmv |
|
| allrm |
|
| allgrep |
|
| allchmod |
|
| alldiff |
|
| allcmp |
|
#!/bin/ksh
# allcp - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# allcp - script to copy all files from 1 directory to a 2nd directory
# - use if no of files greater than allowed by UNIX shell (8192)
# (when you get errmsg "arg list too long")
# - also provides audit trail with file-counts
#
if [ -d "$1" -a -d $2 ]; then :
else echo "usage: allcp dir1 dir2"
echo " ==============="
echo " - arg1 & arg2 must be directories"
exit 1; fi
x=0;
for i in $1/*
do
f=${i##*/}
let x=x+1
echo "copy file# $x - $1/$f "
cp -i $1/$f $2/$f
done
echo "total $x files copied from $1 to $2"
exit
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'editmfp1' grep's all files in a directory and executes 'vi' for any files that contain a specified pattern. For example following will vi any uvcopy jobs in pf/util/... that contain 'acum'.
editmfp1 pf/util acum <-- vi files in pf/util/... containing 'acum'
===================== - enter ':q' to quit current file & proceed to next
- may enter 'Q' every 5th file to Quit
grep -l acum pf/util/* | vi <-- usual method of grep'ing & vi'ing ============================ - option -l outputs filename only
'grep' & pipe to 'vi' has a problem - if there are dozens of matches, you cannot quit until you get to the end of the filename list, or kill your session from another login screen. 'editmfp1' prompts you every 5th file to Quit or continue.
#!/bin/ksh
# editmfp1 - edit Multi-files containing a specified Pattern
# - by Owen Townsend, UV Software, feb03/2013
#
echo "editmfp1 - edit Multi-files containing a specified Pattern"
d="$1"; p="$2";
if [[ -d "$d" && -n "$p" ]]; then :
else echo "usage: editmfp1 directory pattern"
echo " =========================="
echo "examfple: editmfp1 in1fix 'E#'"
echo " ===================="
echo "- arg1 must be a directory, arg2 must be specified"
echo "Enter :q for next file (not :n)"
echo "- prompt every 5th file to allow quit before all files edited"
exit 99; fi
integer tf=0 ef=0 ef1=0;
#
for df in $d/*
{ ((tf++)) # count Total Files
grep -q $p $df # grep -q no output, set status 0 if pattern found
if [[ $? -eq 0 ]];
then vi $df # edit files with match to pattern
((ef++)); ef1=$((ef%5))
if [[ $ef1 == 0 ]]; then
print "\nenter null to edit file# $ef OR 'Q' to Quit\n"
read reply
if [[ "$reply" == "Q" ]]; then exit 9; fi
fi
fi
}
echo "End editmfp1 - $ef files selected of $tf total files in directory"
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 2A1. | uvlp__ - 'uvlp' scripts to list files at various chars per inch |
| - 'uvlp12' is most popular (12 chars/inch, 60 lines/page) | |
| - uvlp12D prints Duplex at 12 cpi, uvlp12L prints Landscape | |
| - all the 'uvlp' scripts call the 'uvlist' utility C program | |
| which provides page headings with filename, date last modified, | |
| date listed, userID, line#,& page#. | |
| - No more wondering where a listing came from & when it was made. | |
| - see uvlist.htm for more about 'uvlist', the 'uvlp' scripts & | |
| the many options (cpi,lpi,spacing,portrait,landscape,etc) |
| 2A2. | uvlp13LD - script to list mainframe reports on PCL5 laser printers |
| - 132 columns x 66 lines on 8 1/2 x 11 Landscape (13 cpi, 9 lpi) |
| 2B1. | listall2 - very useful for printing all contents of a directory which |
| contains many small files. | |
| - does not page break between files, just leaves a space. | |
| - ideal for 'parms' subdir of control cards (SORT FIELDS, etc). |
| 2C1. | spreadA - list all filenames in a directory 4-up. Convenient for listing |
| the hundreds of JCLs,scripts,& COBOL programs in the conversion. |
| 2D1. | cleanup - source code maintenance utility (for JCL, COBOL, etc). |
| - many options to translate, clear columns, gang constants, etc | |
| - see demo for COBOL with options explained |
| 2E1. | verifytext - scan all files in a subdir & report unprintable characters |
| - verify COBOL programs, copybooks,& JCL have no bad data |
| 2F1. | grepsum1 - a uvcopy utility job that will sort the grep results, dropping |
| duplicates, to get the desired unique list of EXEC programs. |
| 2G1. | scan/replace - Vancouver Utility scan/replace jobs can be more effective |
| than grep/sed because you can have qualifiers present/absent | |
| - they create an audit trail to guide subsequent edits |
| 2H1. | verifylib1 - verify module types in a library & automatically create a |
| script to move unexpected types out to a separate library. | |
| - very useful for mainframe conversions |
| 2I1. | mksfcp1 - make script to copy files from a list of filenames |
| - could create list with editor of via ls subdir >tmp/script |
| 2J1. | xref2cp1 - generate script (to copy files) from a cross-reference report |
| - powerful technique useful for mainframe conversion POC's | |
| to select subset of JCLs & all required cbls,cpys,parms,procs | |
| - saves many hours of research & much more accurate |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'uvlp' scripts (uvlp12, uvlp14, uvlp12D, uvlp12L, etc) all call the 'uvlist' text file list utility to provide page headings with filename, date last modified, date listed, userID, line#,& page#.
It is vital to Identify the various listings you make & when you made them. There are few things more frustrating than picking up some important listing & not knowing what the source filename is & when it was created.
You don't use uvlist directly but rather via 1 of the many scripts provided that specify the desired options & pipe the output to the desired printer. The printer is identified by an environmental variable in your profile
export UVLPDEST="-dlp0" <-- modify profile with your printer -d destination =======================
We will illustrate 'uvlp12' which lists at 12 cpi & leaves margins for three hole punched paper.
When testing & debugging your JCL, you might want to list out the original MVS JCL (from jcl2) & the corresponding script (from jcl3). For example:
uvlp12 jcl2/jar200.jcl <-- list JCL with PROCs expanded ======================
uvlp12 jcl3/jar200.ksh <-- list Korn shell script (converted JCL) ======================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
You might want to list all JCL & all scripts. It might save you time in the long run. The listings give you a place to plan your changes, write your changes,& track your progress.
I suggest you use 3 hole punched paper & mount the listings in 3 ring binders. The 'uvlpd12' script will list all files in any directory leaving enough margin for the 3 hole punches.
I suggest we only need to list jcl2 (JCL with PROCs expanded) & jcl3 (converted Korn shell scripts). Don't list jcl3 (converted scripts) until you have tested a few jobs, in case improvements & re conversions are required. Of course you can try this now using the supplied test/demo JCLs which are very few.
uvlpd12 jcl2 - list all original mainframe JCL (PROCs expanded) ============
uvlpd12 jcl3 - list all scripts (converted from JCL) ============
'uvlpd1p' will list the 1st page only of all files in a directory, or of all files matching a specified suffix. This is useful after COBOL compiles, which leave .err reports in subdir cblx/...err. The .err reports could be long, but we usually only need to correct the 1st error & the rest go away.
mfcblA all cbls cblx cpys <-- compile all cbls/... to cblx/... ========================= - leaving any .err reports in cblx/prgmxx.err
uvlpd1p cblx .err <-- print 1st page of all files in cblx/ with '.err' suffix =================
See many more 'uvlp__' scripts in uvlist.htm.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# uvlp13LD - print Landscape DUPLEX at 13 cpi horizontal & 9 lpi vertical
# (135 chars wide & 66 lines down on 8 1/2 x 11 Landscape)
# - for mainframe reports migrated to Unix/Linux systems
# - pg hdngs with: filename, mod-date, today-date, page#s
# - for HP laserjet PCL5 printers & compatibles
# - by Owen Townsend - UV Software Inc - Jan 2001
#
#usage: uvlp13LD filename [group1] [group2] <-- may override default options
# ===================================
#
# - 1 of several: uvlp12,uvlp14,uvlp16,uvlp12L,uvlp14L,uvlp12D,uvlp14LD,etc
# - these scripts invokes uvlist & pipe to the spooler
# - see uvlist.doc for many group1(file) & group2(laser printer) options
# - these scripts convert group2 options into HP PCL5 escape sequences
# - scriptnames reflect commonly used uvlist options, for example:
# grp1: p66 = 66 lines per page
# h = could add option 'h' to inhibit uvlist page headings
# (if reports already have page headings)
# grp2: a2 - letter size paper
# d1 = duplex
# c13 = 13 cpi = 135 chars across on 11 inch wide
# v5.2 = vertical spacing 5.2/48" (9 lines/inch)
# o1 = Landscape orientation (see o3 below for holes other side)
# j-200 = front long edge margin offset - neg right, pos left *excetion*
# k-200 = back long edge margin offset - neg right, pos left *exception*
# m050 = front short edge margin offset - neg up, pos down
# n-100 = back short edge margin offset - neg down, pos up *exception*
#
# .profile should specify environmental variables for 'lp', for example:
# export UVLPDEST="-dlp0" #<-- destination 'lp0' ("-dLPT1" for SFU)
# export UVLPDEST="" #<-- null to use lpadmin default
# export UVLPOPTN="-onobanner" #<-- 'nobanner' option for lp
# export UVLPOPTN="" #<-- null disable for Windows SFU
if [ ! -f "$1" ]; then echo "ERROR - $1 is not a file"; exit 1; fi
#
uvlist $1 p66$2 a2o1d1p80j-200k-200m050n-100c13v=5.2,$3 | lp $UVLPOPTN $UVLPDEST
#===============================================================================
uvln=$(basename $0)
linesf=$(wc -l $1); lines=${linesf% *}
echo "$uvln printing $1 on $UVLPDEST, lines=$lines"
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'listall2' is very useful for printing all contents of a directory which contains many small files, because it does not page break between files (just leaves a space). 'listall2' is ideal for listing the 'parms' subdir which contains control cards (SORT FIELDS, etc).
listall2 parms - list all files in directory (space only between files) ==============
file# 1 - parms/ikjdemo1 DSN SYSTEM(DB2P) RUN PROGRAM(IKJPROG1) PLAN(IKJPROG1) LIB('MEPP.WXS91.LOADLIB') END
file# 2 - parms/pap100s1 SORT FIELDS=(78,2,CH,A,61,15,CH,A,11,25,CH,A)
file# 3 - parms/pgl200s1 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
file# 4 - parms/ppy200s2 SORT FIELDS=(1,19,CH,A,75,6,CH,A)
See 'listall2' at /home/uvadm/sf/util/listall2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
To create 4-up module name listings, use the 'spreadA' UV script:
#1. mkdir 4up - make output dir if not already existing
=========
#2. spreadA cbls - create 4-up listing of all COBOL programs
============ - prompts for report disposition
spread1 - convert a file of 1 item/line to multi items/line
uop = q1a0b0c14s1n5 - option defaults
a0 - input offset columns to item
b0 - output offset columns to 1st item
c14 - columns per item
s1 - spaces between items
n5 - number of items per line
User OPtion (uop) defaults = q1a0b0c14s1n5
null to accept or re-specify (1 or more) -->
End of Job, Output has been written to: 4up/cbls
enter command: vi,cat,more,lp,uvlp12,etc (or null) --> uvlp12 <-- enter cmd
$jobname: 4up/cobs options=q1a0b0c14s1n5 date=2004/04/05_14:46:04 =========================================================================== ars010.cbl ars020.cbl ars030.cbl ars040.cbl dms001.cbl dms002.cbl dms010.cbl dms020.cbl dms030.cbl dms031.cbl dms040.cbl dms041.cbl dms110.cbl dms200.cbl dms210.cbl dms211.cbl dms212.cbl dms213.cbl dms214.cbl dms250.cbl dms260.cbl dms310.cbl dms311.cbl dms312.cbl dms313.cbl dms314.cbl pas100.bat pas100.cbl pas110.cbl 00029 total items in 4up/cobs
#3. uvlp12 4up/cbls - OR print report from 4up subdir
=============== if print command not entered at prompt above
See 'spreadA' script listed at script.htm#28A or /home/uvadm/sf/util/spreadA. 'spreadA' script calls uvcopy job 'spread1' from /home/uvadm/pf/util/spread1.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
If you are begining a mainframe conversion, I strongly suggest you run the 4-up reports for all files transferred from the mainframe. These will be a big help in controlling your conversion project. You might use the 4-up reports in conjunction with the cross-reference reports in Part_3.
#0. mkdir 4up - make output dir if not already existing
=========
#1. spreadA cbl0 - create 4-up listing of all COBOL program names
============ (transferred from mainframe, not yet converted)
#2. spreadA cpy0 - create 4-up listing of all CopyBook names
============
#3. spreadA jcl0 - create 4-up listing of all JCL names
============
#4. spreadA proc0 - create 4-up listing of all PROC names
=============
#5. spreadA parm0 - create 4-up listing of all SYSIN/PARM modules
=============
| Note |
|
#6. uvlpd12 4up <-- print all reports in subdir 4up/...
===========
| Note |
|
#1a. spreadA cbls - create 4-up listing of all COBOL program names
============ (after conversion)
#2a. spreadA cpys - create 4-up listing of all CopyBook names
============
#3a. spreadA jcls - create 4-up listing of all JCL/script names
============ (Korn shell scripts)
#4a. spreadA procs - create 4-up listing of all PROCs
============= - N/A, 1 time expansion into JCL/scripts during conversion
#5a. spreadA parms - create 4-up listing of all SYSIN/PARM modules
============= - some modules may be inserted into JCL during conversion
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'cleanup' is a uvcopy job to copy source code (COBOL,JCL,etc) with many options (translate, clear columns, gang constants, modify copbooknames, etc). The options list is displayed when 'uvcopy cleanup' is run (as shown below).
uvcopy cleanup <-- minimum entry, will prompt for options & filenames ==============
uop=q1a0b0c0d0e0f0g0j0k0n0p0r0s0t0v4w0x0y0z0 - dflt options (copy no chg)
q0 - inhibit option prompt (uop=q0?? on cmd line)
b1 - drop all blank lines
b2 - drop lines blank in cols 2-128 (ignore col 1)
b4 - convert blank lines to * col 7 (for COBOL)
c1 - translate COBOL copy BOOKNAMES to lower case
c2 - translate COBOL copy booknames to UPPER case
d1 - convert double quotes to singles
d2 - convert single quotes to doubles
e1 - enclose COBOL copy `booknames` in single quotes
e2 - enclose COBOL copy "booknames" in double quotes
e4 - append copybook names with ".cpy" (in programs)
f1 - insert #!/bin/ksh & drop any existing (ID on #!/)
f2 - insert // JOB jobname (jobname from filename)
g1 - sequence number columns 73-80 incrementing by 1
g2 - sequence number columns 73-80 incrementing by 10
g4 - gang program name in 73-80 (any .ext removed)
g8 - clear columns 73-128 to blanks
j1 - translate call subrtn names to lower case
j2 - translate call subrtn NAMES to UPPER case
k1 - enclose call subrtn names in single quotes
k2 - enclose call subrtn names in double quotes
l1 - COBOL inhibit changes to lines with "*" col 7
l2 - Assembler inhibit mods to lines with "*" col 1
l4 - script inhibit changes to lines with "#" col 1
n1 - translate output filename to lowercase
n2 - translate output filename to UPPERcase
n4 - remove any existing extension on output filename
p1 - convert " picture " to " pic "
r1 - remove any : colons from columns 1-71
s1 - sequence# in columns 1-6 incrementing by 1
s2 - sequence# in columns 1-6 incrementing by 10
s4 - copy to cols 1-6 from cols 73-78
s8 - clear columns 1-6 to blanks
t1 - translate text to lower (except in quotes)
t2 - translate text to UPPER
v4 - cnvrt tabs to blanks (v2 = 2 blanks, etc)
w1 - drop lines with " PAGE " anywhere in 80-128
w2 - drop lines with "MEMBER NAME" anywhere in 1-80
x# - shift left #columns (x6 shifts 7-128 to 1-122)
y# - shift right #columns (y6 shifts 1-122 to 7-128)
z1 - concatenate assembler continued lines NB col 72
z2 - squeeze asmblr *cmt lines to 1 blank btwn words
User OPtion (uop) defaults = q1v4
null to accept or re-specify (1 or more) -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy cleanup <-- minimum entry, will prompt for filenames & options ==============
uvcopy cleanup,fili1=cbl0/CAR200.cbl,filo1=cbl1/car200.cbl,uop=c5e15g8j1k1l1n1s8t1 ==============================================================================
Or we can enter filenames & options on the command line as above, Or we could enter just the filenames,& be prompted for options as below:
User OPtion (uop) defaults = q1a0b0c0d0e0f0g0j0k0n0p0r0s0t0v1w0x0 null to accept or re-specify (1 or more) --> c5e15g8j1k1l1n1s8t1 <--- NOTE
000010 IDENTIFICATION DIVISION. CAR200 000020 PROGRAM-ID. CAR200. CAR200 000030 ENVIRONMENT DIVISION. CAR200 000040 INPUT-OUTPUT SECTION. CAR200 000050 FILE-CONTROL. CAR200 000060 SELECT SALEDTL ASSIGN SALEDTL CAR200 000070 ORGANIZATION SEQUENTIAL ACCESS MODE SEQUENTIAL. CAR200 000080 DATA DIVISION. CAR200 000090 FILE SECTION. CAR200 000100 FD SALEDTL RECORD CONTAINS 64 CHARACTERS. CAR200 000110 01 SALEREC. COPY SALEDTL. CAR200
identification division.
program-id. car200.
environment division.
input-output section.
file-control.
select saledtl assign saledtl
organization sequential access mode sequential.
data division.
file section.
fd saledtl record contains 64 characters.
01 salerec. copy "saledtl.cpy".
Note the effect above of the options entered: ---> c1g8s8t1e3 (here are explanations from the previous page)
c1 - translate COBOL copy BOOKNAMES to lower case
e1 - enclose COBOL copy "booknames" in double quotes
e2 - append copybook names with ".cpy" (in programs)
g8 - clear columns 73-128 to blanks
s8 - clear columns 1-6 to blanks
t1 - translate text to lower (except in quotes)
Note that options are 'binary', hence we enter 'e3' to select both e1 & e2. The input COPY SALEDTL (no quotes) is changed to "saledtl.cpy" (in double quotes & extension .cpy added). Also translated to lower case due to option 'c1'.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'verifytext' is a uvcopy job that will scan all files in a directory, searching for unprintable characters that should not be in text files, such as COBOL programs, copybooks,& JCL.
If any binary data found, it will be reported as shown below, in vertical hexadecimal, similar to the 'uvhd' utility (documented on page '2D1').
| verifytext |
|
line# - binary data in file: cbl0/HPH2937B.CBL
1 2 3 4 5 6 7
123456789012345678901234567890123456789012345678901234567890123456789012
00211 J90614 VALUE '!....L........TRAY1J '.
43333322222225445422200014BF00000055453422222222222222222222222222222222
A90614000000061C550710000CF600000342191A007E0000000000000000000000000000
00215 J90614 VALUE '.*I...COVTOPLINE1lllllllllllllllllllllllllllllllllll
4333332222222544542202401F4455454444366666666666666666666666666666666666
A90614000000061C55070A90AB3F64F0C9E51CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
EOF: binary data in 1 of 8 total files in cbl0
uvcopy verifytext,fild1=cbl0[,filo1=tmp/cbl0_vfy.txt] <-- example ===================================================== - read all files in subdir 'cbl0' & create output report file - in 'tmp' subdir, named same as input subdir + '_vfy.txt'
uvcopy verifytext,fild1=cbl0 <-- only need to specify the input directory ============================ - output file defaults as shown above
uvlp12 tmp/cbl0_vfy.txt <-- print report =======================
See 'verifytext' at /home/uvadm/pf/IBM/verifytext
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Page '1N1' gave an example of using 'grep' to create a list of all EXEC programs used in the JCL directory. The results were NOT very good if our objective was to create a concise list of unique program names.
'grepsum1' is a uvcopy utility job that will sort the grep results, dropping duplicates, to get the desired unique list of EXEC programs.
1. grep EXEC jcl1/* >tmp/grepx
===========================
2a. uvcopy grepsum1,fili1=tmp/grepx,filo1=tmp/grepx1
================================================
uop=a0b80c0d0e0f2j1 - option defaults
a0 - dsplcmnt to begin sort/sum key
b80 - length of sort key
c0 - begin sort key word#
d0 - end sort key word# (disabled if d0)
d1 - end sort key word#1 (overrides a/b dsplcmnt/lth)
d1 - end sort key word#1 (overrides a/b dsplcmnt/lth)
e1 - consider "," comma same as blank for word delimiter
f1 - number of :colons in grep filenames prior to text
f2 - scan past 2 :s for text (use if -n option on grep)
j1 - drop comments in JCL "//*" in cols 1-3
j2 - drop comments in COBOL "*" in col 7
User OPtion (uop) defaults = q1a0b80c0d0e0f2j1
null to accept or re-specify (1 or more) -----> <-- default options
060326:085105:grepsum1: EOF fili01 rds=15 size=817: tmp2/grepx 060326:085105:grepsum1: EOF filo01 wrts=10 size=351: tmp2/grepx3
jcl1/jar100.jcl:3:(2) //STEP010 EXEC PGM=CAR100 jcl1/jar120.jcl:3:(1) //STEP010 EXEC PGM=CAR120,PARM=2002 jcl1/jar130.jcl:5:(1) //STEP010 EXEC PGM=CAR120,PARM=2003 jcl1/jar150.jcl:5:(1) //STEP010 EXEC PGM=CAR150 jcl1/jgl300.jcl:5:(3) //STEP010 EXEC PGM=IEBGENER jcl1/jar200.jcl:12:(1) //STEP020 EXEC PGM=CAR100,COND=(4,LT,STEP010),PARM=2003 jcl1/jar140.jcl:5:(1) //STEP020 EXEC PGM=CAR120,PARM=2004 jcl1/jar155.jcl:4:(1) //STEP020 EXEC PGM=CAR150 jcl1/jgl300.jcl:9:(2) //STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010) jcl1/jgl330.jcl:10:(1) //STEP020 EXEC PGM=IDCAMS,COND=(8,LT,STEP010)
The default options 'a0b80' set the sort/compare field to the entire record - displacement 0 & length 80 - duplicates are removed only if they have the same STEP# & PARMs Also note that option 'j1' (default) has dropped the //* comment: jcl1/jar200.jcl:20:(1) //*STEP030 EXEC PGM=SORT
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will now use the 'word count' options to improve our results. On the grepsum1 command below, we specify options 'c0d3e1' which specifies the sort field as starting at word 0 (begin line) & ending after word 3.
Option 'e1' means that ',' commas are considered same as blanks for delimiting words, so the 1st 3 words will be STEP#, EXEC,& PGM=... Note the word#s are zero relative.
2b. uvcopy grepsum1,fili1=tmp/grepx,filo1=tmp/grepx2,uop=c0d3e1
===========================================================
jcl1/jar100.jcl:3:(2) //STEP010 EXEC PGM=CAR100 jcl1/jar120.jcl:3:(2) //STEP010 EXEC PGM=CAR120,PARM=2002 jcl1/jar150.jcl:5:(1) //STEP010 EXEC PGM=CAR150 jcl1/jgl300.jcl:5:(3) //STEP010 EXEC PGM=IEBGENER jcl1/jar200.jcl:12:(1) //STEP020 EXEC PGM=CAR100,COND=(4,LT,STEP010),PARM=2003 jcl1/jar140.jcl:5:(1) //STEP020 EXEC PGM=CAR120,PARM=2004 jcl1/jar155.jcl:4:(1) //STEP020 EXEC PGM=CAR150 jcl1/jgl300.jcl:9:(3) //STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010)
Some duplicates have been removed by sorting/comparing on 1st 3 words, but we still have duplicates caused by differing STEP#s (1st word)
Our next test will specify options 'c2d3' which means start compare after word#2 & end after word#3, which selects only the PGM=..., since option 'e1' considers the ',' to end word3 as well as a blank.
2c. uvcopy grepsum1,fili1=tmp/grepx,filo1=tmp/grepx2,uop=c2d3e1
===========================================================
jcl1/jar100.jcl:3:(2) //STEP010 EXEC PGM=CAR100 jcl1/jar200.jcl:12:(1) //STEP020 EXEC PGM=CAR100,COND=(4,LT,STEP010),PARM=2003 jcl1/jar120.jcl:3:(3) //STEP010 EXEC PGM=CAR120,PARM=2002 jcl1/jar150.jcl:5:(2) //STEP010 EXEC PGM=CAR150 jcl1/jgl300.jcl:9:(3) //STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010) jcl1/jgl300.jcl:5:(3) //STEP010 EXEC PGM=IEBGENER
We now have the desired concise list of unique programs EXECuted in all our JCLs. You will see only the 1st occurrence of filename, STEP# and PARM data (if any).
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Vancouver Utilities provides several general purpose 'scan/replace' utilities that can be more effective than 'grep' & 'sed' in complex situations because:
Suppose we wanted to scan a directory of mainframe JCL for all 'EXEC's with CONDition codes. Here are a few lines (of thousands):
//JOBA JOB .......... most lines not shown .......... //STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010)
//JOBB JOB .......... most lines not shown .......... //STEP050 EXEC PGM=CGL100,COND=(4,LT),REGION=1024K,PARM=$PARM1
uvcopy scan1d,fild1=jcl0,arg1=EXEC,arg2=PGM,arg3=COND,uop=p2 ============================================================ - could enter all info on the command line as above
uvcopy scan1d,fild1=jcl0,uop=p2 =============================== - OR you will be prompted for info not on the command line - see next page for console display prompts & entries
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy scan1d,fild1=jcl0,uop=p2 ===============================
uop=q1a1b99999c0d256e0p1 - option defaults
a1 - begin scan at line #1 (default) of input file
a0 - causes prompt for search pattern to BEGIN scan
b99999 - end scan at line #99999 (dflt) of input file
b0 - causes prompt for search pattern to END scan
c0 - begin scan at col #1 (zero rel) of input lines
d256 - length of scan area default 256 bytes
e1 - inhibit errmsgs when LF not found within rcsz
p1 - 1 present qual(31-60) & 1 absent qual(61-80)
p2 - 2 present quals(31-60+61-80) & NO absent quals
p4 - 2 absent quals(31-60+61-80) & NO present quals
User OPtion (uop) defaults = q1a1b99999c0d256e0p1
null to accept or re-specify (1 or more) --> p2 <-- enter p2 2 present Quals
enter search pattern (max 64) --------------> EXEC <-- enter search pattern
enter 1st qualifier --------------> PGM <-- enter 1st qual
enter 2nd qualifier --------------> COND <-- entire 2nd qual
enter options: i,p,q1/q2/q3,n,or null ----->
080109:205346:scan1d: EOF filo01 wrts=47 size=2172: tmp/jcl0_EXEC hits=14
EOJ, Output File written to: tmp/jcl0_EXEC
enter command: vi,cat,more,lp,uvlp12,null -->
Job: scan1d Dir: jcl0 Search: EXEC Qual1: PGM Qual2: COND SearchBgn: SearchEnd: MatchOps: UserOps: q1a1b99999c0d256e0p1p2 ====================================================== 2008/01/09_20:53:46 00005 //STEP020 EXEC PGM=CGL200,COND=(4,LT,STEP010),PARM=&YEAREND 00010 1 hits @EOF: jcl0/JGL220.jcl
00011 //STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010) 00018 1 hits @EOF: jcl0/JGL320.jcl
00012 //STEP020 EXEC PGM=CAR200,COND=(4,LT,STEP010),PARM=2006 00017 1 hits @EOF: jcl0/JAR200.jcl
00006 //STEP020 EXEC PGM=IDCAMS,COND=(4,LT,STEP010) 00011 1 hits @EOF: jcl0/JPY402.jcl
====================================================== 2008/01/09_20:53:46 EOD: 00014 hits in 0014 files of 0046 total (00576 lines)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'verifylib1' is a utility job to verify module types in a library & automatically create a script of 'mv's to move unexpected types out to a separate library.
| Example |
|
1. uvcopy verifylib1,fild1=cpy0,fild2=tmp1,filo3=sf/cpy0_mv,filo4=sf/cpy0_more,arg1=cpy
====================================================================================
- create script to move non .cpy files to tmp1/...
- arg1 identifies expected type (must be 1 of cpy, cbl, jcl, asm)
- also creates 2nd script with 'more's to easily inspect files to be moved
2. vi sf/cpy0_more <-- inspect files selected for mv
=============== - you only see filenames, execute 3 to see contents
more cpy0/aaaaaa.cpy
more cpy0/bbbbbb.cpy
more cpy0/cccccc.cpy
3. ksh sf/cpy0_more <-- execute the _more script
================
4. vi sf/cpy0_mv <-- inspect created mv script
=============
mv cpy0/aaaaaa.cpy tmp1/aaaaaa.cbl
mv cpy0/bbbbbb.cpy tmp1/bbbbbb.jcl
mv cpy0/cccccc.cpy tmp1/cccccc.asm
5. ksh sf/cpy0_mv <-- EXECUTE the _mv script
============== - moves non matching type modules to tmp1/...
See generated scripts on the next page -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
sf/cpy0_mv - move out mismatched file types 2012/05/18 12:05:40
mv cpy0/A2110201.CPY tmp1/A2110201.cbl
mv cpy0/A21GEM3.CPY tmp1/A21GEM3.asm
mv cpy0/A7304017.CPY tmp1/A7304017.jcl
mv cpy0/ACCOPCT.CPY tmp1/ACCOPCT.other
mv cpy0/ACMD.CPY tmp1/ACMD.jcl
mv cpy0/AMSBS040.CPY tmp1/AMSBS040.cbl
- - - many lines removed - - -
mv cpy0/XTRANTWA.CPY tmp1/XTRANTWA.jcl
EOF: 7774 files, 41 cbl, 4458 cpy, 1194 cpy(non pic)
53 jcl, 3 asm, 1739 other
sf/cpy0_more - inspect mismatched file types 2012/05/18 12:05:40
more cpy0/A2110201.CPY <-- actually .cbl (see above)
more cpy0/A21GEM3.CPY <-- actually .asm
more cpy0/A7304017.CPY <-- actually .jcl
more cpy0/ACCOPCT.CPY <-- actually .other
more cpy0/ACMD.CPY etc (see above)
more cpy0/ACRWRK.CPY
more cpy0/AMSBS040.CPY
-- many lines removed --
more cpy0/XTRANTWA.CPY
EOF: 7774 files, 41 cbl, 4458 cpy, 1194 cpy(non pic)
53 jcl, 3 asm, 1739 other
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
This is a very useful script for mainframe conversions. Assume we have transferred all available components from the mainframe to unix directories ALLtestlibs/jcl0,proc0,parm0,cbl0,cpy0.
Before trying to debug the thousands of JCLs & COBOLs, we would like to convert & test/debug a smaller set (POC). We wish to select a small set of JCL and select all required components (COBOLs,copybooks,parms,procs) to separate superdir & subdirs POC2testlibs/jcl0,proc0,parm0,cbl0,cpy0.
mksfcp1 will help us select the JCLs & xref2cp1 (see '2J1') will help us select the other required components from the cross-references. Here is the example from MVSJCLtest.htm#8C2.
#1. Login mvstest --> /home/mvstest (or yourself --> homedir) #2. cdl <-- change to $RUNLIBS (POC2testlibs)
#3. vi ctl/poc2jcl <-- edit list of filenames to be copied
===============
JAR100.JCL <-- sample list of filenames
JAR200.JCL
JGL100.JCL
JGL200.JCL
| Note |
|
#4. uvcopy 'mksfcp1,fili1=ctl/poc2jcl,filo1=sf/selpoc2jcl3
,arg1=$ATL/jcl3,arg2=jcl3,arg3=.ksh,arg4=.ksh,uop=t1u1'
===============================================================
- enclose command in single quotes so $ATL expanded later at run time
- sample output script sf/mksfcp1 listed below:
# sf/selpoc2jcl3 - script to copy files from $ATL/jcl3 to jcl3
# - using filenames from: ctl/poc2jcl
# - created by mksfcp1 at: UV_Software on: 2012/05/14
cp $ATL/jcl3/jar100.ksh jcl3
cp $ATL/jcl3/jar200.ksh jcl3
cp $ATL/jcl3/jgl100.ksh jcl3
cp $ATL/jcl3/jgl200.ksh jcl3
#5. ksh sf/selpoc2jcl3 <-- execute script created above
==================
#5a. l jcl3 <-- check files copied as expected
=======
-rwxrwxr-x 1 mvstest apps 2056 May 14 20:28 jar100.ksh
-rwxrwxr-x 1 mvstest apps 3314 May 14 20:28 jar200.ksh
-rwxrwxr-x 1 mvstest apps 2442 May 14 20:28 jgl100.ksh
-rwxrwxr-x 1 mvstest apps 3827 May 14 20:28 jgl200.ksh
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
This is a very powerful technique useful for mainframe conversion POC's to select subset of JCLs & all required cbls,cpys,parms,procs. This script can save many hours of research & is much more accurate.
On page '2I1' above we used mksfcp1 to create s script to copy our desired set of JCLs to subdir POCtestlibs/jcl2/... We can now run the JCL/COBOL crossref (see page '3E2') for input to 'xref2cp1' to create the script to copy the COBOL programs referenced by our set of POC JCLs.
#1. Login mvstest --> /home/mvstest (or yourself --> your homedir) #2. cdl <-- change to $RUNLIBS (POC2testlibs)
#3. xkshprog2 jcl3 <-- run cross-ref COBOL programs & calling JCLs
============== - using jcl2 (vs jcl0 on later re-run)
xkshprog2 ** crossref to show all ksh SCRIPTS executing each PROGRAM ** Keyword=progid:program Exclude=~~ Include=~~ Skip= page# 1 Directory=/home/mvstest/POC2testlibs/jcl3 Options=q1a16b16c4e0d0g0h1j0l1p0s2w1a16b16c4d8j4l1 =======================================================2012/05/15_10:48:03 car100 jar100.ksh car200 jar200.ksh cgl100 jgl100.ksh cgl200 jgl200.ksh sort_2 jar200.ksh jgl200.ksh **TotalWords: 5, TotalFiles=6, TotalRefs: 6
#4. uvcopy 'xref2cp1,fili1=xref/xkshprog2,filo1=sf/selpoc2cbls
,arg1=$ATL/cbls,arg2=cbls,arg3=.cbl,arg4=.cbl,uop=t1u1'
===============================================================
- converts COBOL/JCL cross-ref into script to copy COBOL programs
from ALLtestlibs/cbls/... to POC2testlibs/cbls/...
# sf/selpoc2cbls - script to copy files from $ATL/cbls to cbls # - created from xref/xkshprog2 by xref2cp1 at: UV_Software on: 2012/05/15 cp $ATL/cbls/car100.cbl cbls cp $ATL/cbls/car200.cbl cbls cp $ATL/cbls/cgl100.cbl cbls cp $ATL/cbls/cgl200.cbl cbls cp $ATL/cbls/sort.cbl cbls
#5. ksh sf/selpoc2cbls <-- execute script to select desired cbls programs
==================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 3A1. | Cross-References for COBOL programs/copybooks & JCL/scripts |
| summary of all cross-refs available |
| 3B1. | Operating Instructions to generate ALL Cross-Ref reports |
| xrefall - script leaves all reports in subdir xref/... |
| 3B2. | Operating Instructions to generate any 1 Cross-Ref report |
| xcobcopy2 - sample Op. Instrns. for COBOL copybooks |
| 3C1. | xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM |
| 3C1. | xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK |
| 3C2. | xcobcall1 - list of all CALLED-PROGRAMs in each PROGRAM |
| 3C2. | xcobcall2 - crossref all PROGRAMS calling any 1 CALLED-PROGRAM |
| 3C3. | xcobfile2 - crossref all PROGRAMS using each external-file |
| 3C4. | xcobsql1 - list all SQL Includes in any 1 PROGRAM |
| 3C4. | xcobsql2 - crossref all PROGRAMS using any 1 SQL Include |
| 3D1. | xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT |
| 3D2. | xkshfile2 - crossref show all ksh SCRIPTs using any 1 DATAFILE |
| 3E1. | xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT |
| 3E2. | xkshprog2 - crossref show all ksh SCRIPTS executing any 1 PROGRAM |
| 3F1. | xkshproc1 - list all PROCs executed in each JCL/ksh/script |
| 3F2. | xkshproc2 - shows all JCL/ksh/scripts executing each PROC |
| 3G1. | xkshparm1 - list all SYSIN/PARM modules in each JCL/ksh/script |
| 3G2. | xkshparm2 - shows all JCL/ksh/scripts referencing each SYSIN/PARM |
| 5C1. | cobfil51 - COBOL Files Report (related report in Part 5) |
| (not exactly a cross-reference, but a very useful report) | |
| - information extracted from all COBOL programs in directory | |
| - filenames, Input/Output, Org, Access, record size, copybook | |
| - all programmers should have a copy before starting test/debug |
| 6A1. | mvsfiles5A - script to trace data files in MVS JCL |
| (not exactly a cross-reference, but a very useful report) | |
| - extracts all data files from subdir jcl2 (JCL procs expanded) | |
| - identify originating step# & destination step#s for each file |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
These cross-reference reports will be invaluable during testing & debugging. Before you start test/debug, run these reports & house in 3-ring binders (with indexed tabs) for instant accessibility when needed.
| xcobcall1 |
|
| xcobcall2 |
|
| xcobcopy1 |
|
| xcobcopy2 |
|
| xcobfile2 |
|
| xcobsql1 |
|
| xcobsql2 |
|
| xkshfile1 |
|
| xkshfile2 |
|
| xkshprog1 |
|
| xkshprog2 |
|
| xkshproc1 |
|
| xkshproc2 |
|
| xkshparm1 |
|
| xkshparm2 |
|
| xmvsfile1 |
|
| xmvsfile2 |
|
| xmvsprog1 |
|
| xmvsprog2 |
|
| xmvsproc1 |
|
| xmvsproc2 |
|
| xvsefile1 |
|
| xvsefile2 |
|
| xvseprog1 |
|
| xvseprog2 |
|
The 4 'xksh' reports provide the same info as the 4 'xmvs' or 4 'xvse' reports.
The 'xksh' reports are generated from the 'jcl3' directory of converted scripts, whereas the 'xmvs' & 'xvse' reports are generated from the 'jcl2' directory of JCLs before conversion. The 'xksh' reports will be more relevant after test/debug since they can then be run using the 'jcls' directory of tested & debugged scripts.
See XREFjobs.htm for more detailed descriptions of these cross-references including listings of some of the scripts (xrefall, xcobcopy2, etc).
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The easiest way to run the cross-references is to run script 'xrefall' which generates all 'xcob' & all 'xksh' COBOL & JCL/script cross-references.
#1. xrefall cbls jcl3 ksh <-- crossref COBOL & ksh scripts
=====================
#1a. xrefall cbls jcl2 mvs <-- alternative for unconverted MVS JCL
=====================
#1b. xrefall cbls jcl2 vse <-- alternative for unconverted VSE JCL
=====================
#2. uvlpd12 xref <-- print all files in the directory
============
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will use 'xcobcopy2' (COBOL copybook crossref) to illustrate the Op. Instrns. for 1 cross-ref report at a time (vs ALL shown above).
xcobcopy2 directory options <-- command format ===========================
xcobcopy2 cbls [a16b16c4e1] <-- cross-ref copybooks for prgms in cbls/... =========================== - option defaults shown (described below)
uop=q1a16b12c5e0d0j0l0s2w1 - option defaults
a16 - column to align references
b12 - columns for fixed word horizontal spacing
b30 - max cols, indicates variable (blank between)
c5 - count max words per line (c5*b12=60+a16 = 76)
e1 - bypass "*" col 7 & blank ". " (COBOL)
e2 - target word must be enclosed in "quotes"
d1 - cnvrt "/" to " " (directory/filename)
d2 - cnvrt "_" to " " (printer class codes)
d4 - cnvrt "." to " " (drop extensions)
d8 - cnvrt "()" to " " (drop parens)
j1 - MVS JCL (bypasses //* cmts)
j2 - VSE JCL (bypasses * or /* cmts)
j4 - Korn shell scripts (bypasses # col1)
l1 - translate to lower case (keywords lower)
s2 - space2 (space1 in multiline groups)
w1 - target-word offset, to word after key-word
User OPtion (uop) defaults = q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1
null to accept or re-specify (1 or more) -->
080405:105049:xref2: sort phase complete, used 64 megabytes, sort output begin
080405:105049:xref2: EOF fili01 rds=38 size=1963: tmp/grep1
080405:105049:xref2: EOF filo01 wrts=16 size=526: tmp/xcobcopy2a
chkcopy2 - *flag missing copybooks on COBOL cross-reference report
080405:105049:chkcopy2: EOF fili01 rds=16 size=526: tmp/xcobcopy2a
080405:105049:chkcopy2: EOF fili02 rds=6 size=74: tmp/cpys2
080405:105049:chkcopy2: EOF filo01 wrts=16 size=536: xref/xcobcopy2
report generated = xref/xcobcopy2
- use uvlp12,uvlp14,uvlp16 to laser print at 12,14,16 cpi
enter command (vi,cat,more,uvlp12,uvlp14,uvlp16,etc) ----> more <--
xcobcopy2 ** crossref all PROGRAMS using each COPYBOOK ** Keyword=copy:include Exclude=unix Include=.cpy page# 1 Directory=/home/mvstest/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1 =======================================================2008/04/05_10:50:49
custmas.cpy car100.cbl car120.cbl car130.cbl car140.cbl ____________6 car150.cbl car200.cbl
*paymas.cpy cpy100.cbl
saledtl.cpy_2 car150.cbl car200.cbl
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
These sample reports are based on the supplied test/demo JCL & COBOL programs. We will illustrate: xcobcopy1/2, xcobcall1/2, xcobfile2, xcobsql1/2, xkshfile1/2, xkshprog1/2.
xcobcopy1 cbls <-- run separately (or xrefall, create all rpts in xref/...) ==============
xcobcopy1 ** list all COPYBOOKS in each PROGRAM ** Keyword=copy:include Exclude=unix Include=.cpy page# 1 Directory=/home/mvstest/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1q0i7 =======================================================2008/04/05_11:46:21
car100.cbl custmas.cpy
car120.cbl custmas.cpy
car130.cbl custmas.cpy
car140.cbl custmas.cpy
car150.cbl_2 custmas.cpy saledtl.cpy
car200.cbl_4 custmas.cpy saledtl.cpy sdline.cpy stline.cpy
cpy100.cbl paymas.cpy
xcobcopy2 cbls <-- run separately (or xrefall, create all rpts in xref/...) ==============
xcobcopy2 ** crossref all PROGRAMS using each COPYBOOK ** Keyword=copy:include Exclude=unix Include=.cpy page# 1 Directory=/home/mvstest/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1q0i7 =======================================================2008/04/05_11:46:21
custmas.cpy car100.cbl car120.cbl car130.cbl car140.cbl ____________6 car150.cbl car200.cbl
*paymas.cpy cpy100.cbl
saledtl.cpy_2 car150.cbl car200.cbl
sdline.cpy car200.cbl
stline.cpy car200.cbl
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xcobcall1 cbls <-- run separately (or xrefall, create all rpts in xref/...) ==============
Keyword=call Exclude= Include= page# 1 Directory=/home/mvstest/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1q0i7 =======================================================2005/03/17_15:15:51
car130.cbl getparm
car140.cbl getparm
xcobcall2 cbls <-- run separately (or xrefall, create all rpts in xref/...) ==============
Keyword=call Exclude= Include= page# 1 Directory=/home/mvstest/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1q0i7 =======================================================2005/03/17_15:15:51
*getparm_2 car130.cbl car140.cbl
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xcobfile2 cbls <-- run separately (or xrefall, create all rpts in xref/...) ==============
xcobfile2 ** crossref all PROGRAMS using each external-file ** Keyword=external Exclude= Include= page# 1 Directory=/home/mvstest/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1l1 =======================================================2007/06/10_19:19:39
acctmas cgl100.cbl
actlist cgl100.cbl
custmas car100.cbl car120.cbl car130.cbl car140.cbl ________7 car150.cbl car200.cbl testunix1.cbl
custmas1 car101.cbl
glmsnew cgl200.cbl
glmsold cgl200.cbl
gltrans cgl200.cbl
nalist car100.cbl car101.cbl car120.cbl car130.cbl _______7 car140.cbl car150.cbl cpy100.cbl
paymas cpy100.cbl
saledtl car200.cbl
salelst car200.cbl
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xcobsql1 cbls <-- run separately (or xrefall, create all rpts in xref/...) =============
xcobsql1 ** list all SQL-INCLUDES in each PROGRAM ** Keyword=sql include Exclude=~~ Include=~~ page# 1 Directory=/home5/efunds2/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1l1w2 =======================================================2008/04/05_15:50:52
avf00800.cbl_4 sqlca.cpy tdbns04.cpy tdbns05.cpy tdbrf14.cpy
avf01000.cbl_2 sqlca.cpy tdbdw19.cpy
avf01300.cbl_2 sqlca.cpy tdbrf14.cpy
avf01400.cbl_2 sqlca.cpy tdbrf14.cpy
avf50000.cbl_2 sqlca.cpy tdbrf01.cpy
avf50200.cbl_4 sqlca.cpy tdbrf01.cpy tdbrf06.cpy tdlrf01.cpy
avf50300.cbl_2 sqlca.cpy tdbrf01.cpy
xcobsql2 cbls <-- run separately (or xrefall, create all rpts in xref/...) =============
xcobsql2 ** crossref all PROGRAMS using each SQL-INCLUDE ** Keyword=sql include Exclude=~~ Include=~~ page# 1 Directory=/home5/efunds2/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e1l1w2 =======================================================2008/04/05_15:51:05
actbp.cpy_4 dbasrb26.cbl dbasrb27.cbl dbasrb31.cbl dbasrb32.cbl
actbpsum.cpy_2 dbasrb26.cbl dbasrb27.cbl
actgbp.cpy_4 dbasrb26.cbl dbasrb27.cbl dbasrb31.cbl dbasrb32.cbl
actsmd.cpy_3 dbasrb30.cbl dbasrb31.cbl dbasrb32.cbl
actsum.cpy_2 dbasrb26.cbl dbasrb27.cbl
bpsmd.cpy_3 dbasrb30.cbl dbasrb31.cbl dbasrb32.cbl
cpy077.cpy dba00300.cbl nas20500.cbl nas21200.cbl nas21300.cbl __________ nas23500.cbl nas24700.cbl nas24800.cbl nas24900.cbl ___________9 pdw20300.cbl
cpy078.cpy pdw20300.cbl
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xkshfile1 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshfile1 ** list all DATAFILES used in any 1 ksh SCRIPT ** Keyword=exportfile:exportgen Exclude=autoload Include= page# 1 Directory=/home/mvstest/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b50c1j4w2q0i7 =======================================================2005/03/08_09:05:02
ikjeft01.ksh $DW/mxplib/ikjdemo1
jar100.ksh ar/customer.master ___________2 ar/customer.namelist
jar200.ksh $DW/${JOBID}_tempsls_2
__________ ar/customer.master.indexed
__________ ar/sales.items
___________5 ar/sales.list
jgl100.ksh gl/account.acntlist_ ___________2 gl/account.master_
jgl200.ksh $DW/${JOBID}_tempglt_2
__________ gl/account.master__2
__________ gl/account.trans
___________6 gl/ctlcdlib/pgl200s1
jgl300.ksh $DW/${JOBID}_tempglm_2
___________4 gl/account.master__2
jgl320.ksh $DW/${JOBID}_tempglm_2
___________4 gl/account.master__2
jgl400.ksh $DW/${JOBID}_tempglm_2
___________4 gl/account.master__2
jgl420.ksh $DW/${JOBID}_tempglm_2
___________4 gl/account.master__2
jgl500.ksh gl/account.acntlist_ ___________2 gl/account.export
jpy200.ksh $DW/${JOBID}_temptc_2
__________ py/ctlcdlib/ppy200s1
__________ py/payroll.master_
__________ py/time.cards
___________6 py/timecard.edit_
splitsl1.ksh ar/sales.items ____________ work/sales.group1 _____________3 work/sales.group2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xkshfile2 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshfile2 ** crossref to show all ksh SCRIPTs using any 1 DATAFILE ** Keyword=exportfile:exportgen Exclude=autoload Include= page# 1 Directory=/home/mvstest/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a40b16c3j4w2q0i7 =======================================================2005/03/08_09:05:03
$DW/${JOBID}_tempglm jgl300.ksh_2 jgl320.ksh_2 jgl400.ksh_2
_____________________8 jgl420.ksh_2
$DW/${JOBID}_tempglt_2 jgl200.ksh_2
$DW/${JOBID}_tempsls_2 jar200.ksh_2
$DW/${JOBID}_temptc_2 jpy200.ksh_2
$DW/mxplib/ikjdemo1 ikjeft01.ksh
ar/customer.master jar100.ksh
ar/customer.master.indexed jar200.ksh
ar/customer.namelist jar100.ksh
ar/sales.items_2 jar200.ksh splitsl1.ksh
ar/sales.list jar200.ksh
gl/account.acntlist__2 jgl100.ksh jgl500.ksh
gl/account.export jgl500.ksh
gl/account.master_ jgl100.ksh jgl200.ksh_2 jgl300.ksh_2 ___________________11 jgl320.ksh_2 jgl400.ksh_2 jgl420.ksh_2
gl/account.trans jgl200.ksh
gl/ctlcdlib/pgl200s1 jgl200.ksh
py/ctlcdlib/ppy200s1 jpy200.ksh
py/payroll.master_ jpy200.ksh
py/time.cards jpy200.ksh
py/timecard.edit_ jpy200.ksh
work/sales.group1 splitsl1.ksh
work/sales.group2 splitsl1.ksh
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xkshprog1 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshprog1 ** list all PROGRAMs executed in any 1 ksh SCRIPT ** Keyword=PROGID Exclude= Include= page# 1 Directory=/home/mvstest/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4j4q0i7 =======================================================2005/03/08_09:05:03
ikjeft01.ksh ikjeft01
jar100.ksh car100
jar200.ksh_2 car200 sort
jar300.ksh car300
jgl100.ksh cgl100
jgl200.ksh_2 cgl200 sort
jgl300.ksh_2 idcams iebgener
jgl320.ksh_2 idcams iebgener
jgl360.ksh idcams
jgl400.ksh_2 cobol1 cobol2
jgl420.ksh_2 cobol1 cobol2
jgl500.ksh iefbr14
jpy200.ksh_2 cpy200 sort
splitsl1.ksh sort
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xkshprog2 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshprog2 ** crossref to show all ksh SCRIPTS executing any 1 PROGRAM ** Keyword=PROGID Exclude= Include= page# 1 Directory=/home/mvstest/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4j4q0i7 =======================================================2005/03/08_09:05:03
car100 jar100.ksh
car200 jar200.ksh
car300 jar300.ksh
cgl100 jgl100.ksh
cgl200 jgl200.ksh
cobol1_2 jgl400.ksh jgl420.ksh
cobol2_2 jgl400.ksh jgl420.ksh
cpy200 jpy200.ksh
*idcams_3 jgl300.ksh jgl320.ksh jgl360.ksh
*iebgener_2 jgl300.ksh jgl320.ksh
*iefbr14 jgl500.ksh
*ikjeft01 ikjeft01.ksh
*sort_4 jar200.ksh jgl200.ksh jpy200.ksh splitsl1.ksh
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xkshproc1 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshproc1 ** crossref all MVS JOBnames for each EXEC PROCname ** Keyword=EXEC Exclude=PGM Include=call page# 1 Directory=/home/mvstest/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4w1q0i7 =======================================================2009/05/08_15:57:05
jgl100.ksh PGL100
jgl200.ksh PGL200
jpy200.ksh_3 PPY200 PPY299 PPY300
xkshproc2 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshproc2 ** crossref all MVS JOBnames for each EXEC PROCname ** Keyword=EXEC Exclude=PGM Include=call page# 1 Directory=/home/mvstest/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4w1q0i7 =======================================================2009/05/08_15:57:05
PGL100 jgl100.ksh
PGL200 jgl200.ksh
PPY200 jpy200.ksh
*PPY299 jpy200.ksh
PPY300 jpy200.ksh
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
xkshparm1 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshparm1 ** crossref to show all ksh SCRIPTS referencing each PARM ** Keyword=parms Exclude=~~ Include=exportfile page# 1 Directory=/home/mvstest/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4d1j4l1w1q0i7 =======================================================2009/05/08_15:57:05
iebcopy.ksh products
ikjeft01.ksh ikjdemo1
jgl200.ksh pgl200s1
jgl910.ksh pgl200s1
jpy200.ksh ppy200s1
jpy910.ksh pgl200s1
xkshparm2 jcl3 <-- run separately (or xrefall, create all rpts in xref/...) ==============
xkshparm2 ** crossref to show all ksh SCRIPTS referencing each PARM ** Keyword=parms Exclude=~~ Include=exportfile page# 1 Directory=/home/mvstest/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4d1j4l1w1q0i7 =======================================================2009/05/08_15:57:05
ikjdemo1 ikjeft01.ksh
pgl200s1_3 jgl200.ksh jgl910.ksh jpy910.ksh
*ppy200s1 jpy200.ksh
products iebcopy.ksh
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 4A1. | statallmvs1 - table summaries of COBOL, MVS JCL,& Korn shell scripts |
| statallvse1 - table summaries of COBOL, VSE JCL,& Korn shell scripts | |
| - Korn shell scripts running multiple uvcopy jobs (below) |
| 4B1. | statmvsjcl1 - table summarize (gather statistics from) mainframe MVS JCL |
| - count references in all JCL in directory for each: | |
| program, PROC, top-node, SYSIN/parm module,& DSN/filename |
| 4B1. | statvsejcl1 - similar report for VSE vs MVS (reports not shown) |
| 4B2. | statksh1 - table summarize (get stats for) converted Korn shell scripts |
| - count references in all Korn shell scripts for each: | |
| program, top-node, exportfile/gen, parm module,& filename | |
| - similar info as statmvsjcl1, but from converted scripts (vs JCL) |
| 4B3. | statcbl1 - table summarize (gather statistics) for COBOL programs |
| - count refs to each copybook, called program,& file ORG type |
| 4C1. | statlogin1 - should appeal to Unix/Linux system administrators. |
| - reads system file /var/log/messages and creates table summary | |
| report of user logins by month & userid. |
| 4D1. | table2 - general purpose table summary by any desired argument |
| - for any file of fixed length records | |
| - specify table arguments & acum fields by displacement & length | |
| - see sample table summary of sales qty & amount by product# |
| 4D2. | table3d - allows you to specify a 'key-word', preceding a 'target-word'. |
| - job searches all lines of all files in the directory | |
| - report shows 1 line for each target-word with counts & '%'s |
| 4E1. | recsizes1 - create summary table of record-sizes in a text file |
| - demo uvcopy to table analyze any item with very little code |
| 4F1. | tblext1 - create table summary counts of file extensions in a subdir |
| (.cbl, .cpy, .jcl, .ctl, etc) | |
| - can use on cblx/*.err to calc compile failure percentage | |
| (.cbl, .idy, .int, .err) |
| 4F2. | tblext2 - table summary of extensions in all subdirs of a superdir |
| - prior job (tblext1) reads filenames from only 1 directory |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Script 'statallmvs1' runs several uvcopy jobs to create table summaries by analyzing all files in jcl2 (MVS JCL), jcl3 (converted JCL/scripts), & cbls (converted COBOL). 'statallvse1' is the same,but for VSE JCL.
| 4B1. | uvcopy statmvsjcl1 - table summarize (statistics) from mainframe JCL |
| - count refs to each program, PROC, & top-node used in all JCLs |
| 4B2. | uvcopy statksh1 - table summarize (stats) for converted Korn shell scripts |
| - count refs to each program, PROC, & top-node used in Ksh scripts |
| 4B3. | uvcopy statcbl1 - table summarize (gather statistics) for COBOL programs |
| - count refs to each copybook, called program,& file ORG type |
| Note |
|
#1. cdl <-- change to libraries superdir (/home/mvstest/testlibs for demo)
=== - or your Libraries
#2. mkdir stats <-- make subdir to receive report (if not existing)
===========
#3. statallmvs1 all <-- script to run uvcopy jobs statcbl1,statmvsjcl2,statksh1
===============
#3a. statallvse1 all <-- same, but for VSE JCL
===============
#4a. vi stats/jcl2_pgms <-- see sample reports on page '4B1' #4b. vi stats/jcl2_procs #4c. vi stats/jcl2_topnodes #4d. vi stats/jcl2_parms - (module) names from DSNs #4e. vi stats/jcl2_filenames - full DSN names (may be very long)
#5a. vi stats/jcl3_pgms <-- see sample report on page '4B2' #5b. vi stats/jcl3_topnodes #5c. vi stats/jcl3_exportfiles #5d. vi stats/jcl2_parms - (module) names from DSNs #5e. vi stats/jcl2_filenames - full DSN names (may be very long)
#6a. vi stats/cbls_calledpgms <-- see sample reports on page '4B3' #6b. vi stats/cbls_copybooks #6c. vi stats/cbls_ORGtypes
The following sample reports were run for the supplied set of test/demo JCL & COBOL programs in /home/uvadm/mvstest/testlibs/...
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy statmvsjcl1 <-- create stats of: JCL programs, procs,& Top-Nodes ==================
statmvsjcl1 2009/05/01_11:15:22 Summary table of EXEC PGMs in jcl2 jcl2/jobtest2.jcl
tbl#001 pg#001 -argument-
line# count % EXEC PGM
1 25 36 ALLCOBOL(3+digits)
2 4 5 FTP
3 13 18 IDCAMS
4 1 1 IEBCOPY
5 10 14 IEBGENER
6 5 7 IEFBR14
7 1 1 IKJEFT01
8 2 2 ISRSUPC
9 1 1 MAILTOLN
10 7 10 SORT
69*100 *TOTAL*
statmvsjcl1 2009/05/01_11:15:22 Summary table of EXEC PROCs in jcl2 jcl2/jobtest2.jcl
tbl#002 pg#001 -argument-
line# count % EXEC PROC
1 1 25 PGL100
2 1 25 PGL200
3 1 25 PPY200
4 1 25 PPY300
4*100 *TOTAL*
statmvsjcl1 2009/05/01_11:15:22 Summary table of DSN Top-Nodes in jcl2 jcl2/jobtest2.jcl
tbl#003 pg#001 -argument-
line# count % Top-Node
1 29 18 &&(ALLTempFiles)
2 35 22 AR
3 65 41 GL
4 14 8 PY
5 7 4 PYTEST
6 2 1 RPTS
7 3 1 WRK
8 1 0 WRK(IKJDEMO1)
156*100 *TOTAL*
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
statmvsjcl1 2009/07/13_19:57:42 Summary table of DSN (parms) in jcl2 jcl2/jobtest2.jcl
tbl#004 pg#001 -argument-
line# count % (parm-name)
1 1 16 IKJDEMO1
2 3 50 PGL200S1
3 1 16 PPY200S1
4 1 16 PRODUCTS
6*100 *TOTAL*
| Note |
|
statmvsjcl1 2009/07/13_19:57:42 Summary table of DSN filenames in jcl2 jcl2/jobtest2.jcl
tbl#005 pg#001 -argument-
line# count % DSN/filename
1 16 9 &&TEMPGLM
5 2 1 &&TEMPTC
6 1 0 AR.ACCOUNT.MASTER
7 11 6 AR.CUSTOMER.MASTER
8 2 1 AR.CUSTOMER.MASTER.INDEXED
9 2 1 AR.CUSTOMER.NAMEADRS.LIST100
14 1 0 AR.PARMLIB(PRODUCTS)
15 2 1 AR.SALES$TRAN#WEEK
16 4 2 AR.SALES.ITEMS
19 2 1 AR.SALES.LIST
20 1 0 AR.SALES.PRODUCTS
21 1 0 AR.TRAN&MONTH.SALES
22 1 0 GL.ACCOUNT.ACNTLIST
23 1 0 GL.ACCOUNT.ACNTLIST(+1)
24 1 0 GL.ACCOUNT.EXPORT
25 1 0 GL.ACCOUNT.MASTER
26 16 9 GL.ACCOUNT.MASTER(+1)
27 1 0 GL.ACCOUNT.MASTER(+2)
28 1 0 GL.ACCOUNT.MASTER(+3)
29 1 0 GL.ACCOUNT.MASTER(-1)
30 1 0 GL.ACCOUNT.MASTER(-2)
33 22 13 GL.ACCOUNT.MASTER(0)
34 4 2 GL.ACCOUNT.TRAN1
35 1 0 GL.ACCOUNT.TRANS
36 5 3 GL.ACCOUNT.TRANS(+1)
39 6 3 GL.ACCOUNT.TRANS(0)
41 3 1 GL.PARMS(PGL200S1)
42 1 0 PY.PARMS(PPY200S1)
43 4 2 PY.PAYROLL.MASTER
44 1 0 PY.PAYROLL.MASTER2
46 1 0 PY.TIME.&DAY
47 1 0 PY.TIME.&DAY.&MONTH.&YEAR
56 2 1 RPTS.CUSTOMER.NAMES
57 1 0 WRK(IKJDEMO1)
60 1 0 WRK.SALES.GROUP2
161*100 *TOTAL*
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy statksh1 <-- create stats of: Korn shell Programs, PROCs,& Top-Nodes ===============
statksh1 2009/05/01_11:14:42 Summary table of PROGIDs in jcl3 jcl3/ikjeft01.ksh
tbl#001 pg#001 -argument-
line# count % PROGID
1 26 37 ALLCOBOL(3+digits)
2 4 5 ftp
3 13 18 idcams
4 1 1 iebcopy
5 10 14 iebgener
6 5 7 iefbr14
7 2 2 isrsupc
8 1 1 mailtoln
9 7 10 sort
69*100 *TOTAL*
statksh1 2009/05/01_11:14:42 Summary topnode/subdirs in jcl3 jcl3/ikjeft01.ksh
tbl#003 pg#001 -argument-
line# count % topnode/
1 4 1 $INPUT1
2 28 13 $JGDG/
3 34 16 $JTMP/
4 1 0 $PARMFILE
5 6 2 $RUNLIBS/
6 12 5 $SYOT/
7 27 12 $SYSIN
8 34 16 ar/
9 41 19 gl/
10 9 4 misc/
11 11 5 py/
12 2 0 rpts/
209*100 *TOTAL*
statksh1 2009/05/01_11:14:42 Summary exportfile/exportgen subdirs in jcl3 jcl3/ikjeft01.ksh
tbl#002 pg#001 -argument-
line# count % exportfile/gen subdir/
- - - exportfiles omitted, exportgen... shown - - -
12 27 12 exportgen0 gl/
13 1 0 exportgen0 py/
14 26 12 exportgen1 $JGDG/
15 1 0 exportgen2 $JGDG/
16 1 0 exportgen3 $JGDG/
17 3 1 exportgenall gl/
18 1 0 exportgenall py/
19 2 0 exportgenp gl/
209*100 *TOTAL*
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy statcbl1 <-- create stats: COBOL copybooks, called-programs,& ORG types ===============
statcbl1 2009/05/01_11:15:02 Summary of copybooks in cbls cbls/cgl100.cbl
tbl#001 pg#001 -argument-
line# count % copybook
1 6 17 custmas.cpy
2 1 2 paymas.cpy
3 2 5 saledtl.cpy
4 1 2 sdline.cpy
5 1 2 stline.cpy
6 12 34 unixproc1.cpy
7 12 34 unixwork1.cpy
35*100 *TOTAL*
statcbl1 2009/05/01_11:15:02 Summary of called programs in cbls cbls/cgl100.cbl
tbl#002 pg#001 -argument-
line# count % called program
1 2 100 getparm
2*100 *TOTAL*
statcbl1 2009/05/01_11:15:02 Summary of ORGANIZATION types in cbls cbls/cgl100.cbl
tbl#003 pg#001 -argument-
line# count % organization
1 2 8 indexed
2 9 39 line sequential
3 12 52 record sequential
23*100 *TOTAL*
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'statlogin1' should appeal to Unix/Linux system administrators. It reads a system file (/var/log/messages) and creates a table summary report of user logins by month & userid. Here are a few lines of the input file, followed by a sample report.
Oct 23 06:11:51 uvsoft3 login[16341]: session opened for user laval4 by LOGIN(uid=0) Oct 23 06:11:51 uvsoft3 -- laval4[16341]: LOGIN ON tty5 BY laval4 Oct 23 06:13:08 uvsoft3 ftpd[16342]: FTP LOGIN FROM 192.168.0.2, uvsoft2.uvsoft.ca (laval4) Oct 23 07:15:00 uvsoft3 login[16341]: session closed for user laval4 Oct 23 07:15:23 uvsoft3 login[16516]: authentication failure; logname=LOGIN uid=0 euid=0 tty=tty5 ruser= rhost= user=mvstest Oct 23 07:15:33 uvsoft3 login[16516]: session opened for user mvstest by LOGIN(uid=0) Oct 23 07:15:33 uvsoft3 -- mvstest[16516]: LOGIN ON tty5 BY mvstest Oct 23 21:00:42 uvsoft3 shutdown: shutting down for system halt
statlogin1 2007/11/26_21:24:24 logins by month & userid
tbl#001 pg#001 -argument-
line# count % mth login
1 13 5 Nov efunds2
2 13 5 Nov laval4
3 23 10 Nov mvstest
4 27 12 Nov root
5 26 11 Nov uvadm
6 26 11 Nov uvbak
7 8 3 Oct efunds2
8 7 3 Oct laval4
9 10 4 Oct mvstest
10 11 4 Oct root
222*100 *TOTAL*
This uvcopy job scans for 'session opened', then scans for ' user ', extracts the following word (userid),& uses the userid & month as the table argument
See 'statlogin1' job listed at http://www.uvsoftware.ca/tablejobs.htm#J1. To scan for desired data & build table above requires only 21 lines of code. The job is 87 lines total because we include 66 lines of comments for operating instructions & a samples of input & output.
Using this job as an example, you should be able to write other jobs to table summarize other items that interest you from this file or other system files.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# statlogin1 - table summary of user logins by month & userid
# - based on /var/log/messages
# - by Owen Townsend, UV Software, Nov 26/2007
#
# uvcopy statlogin1,fili1=/var/log/messages,filo1=stats/login.rpt1
# ================================================================
# uvcopy statlogin1 <-- same & easier (files default as shown above)
# =================
#
rop=r1 # option to prompt for report disposition at EOJ
fili1=/var/log/messages,typ=LST,rcs=256
filo1=stats/login.rpt1,typ=LSTt,rcs=128
@run
opn all
#
# begin loop to get & process messages lines until EOF
man20 get fili1,a0 get next line of messages
skp> man90 (cc set > at EOF)
sqzc1 a0(256),' ' ensure only 1 blank between words
#
# scan for 'session opened' & 'user' login
# table user logins by month & by month+day
scn a0(100),' session opened '
skp! man20
scn a0(100),' user '
skp! man20
clr b0(500),' ' clear workarea
mvu b0(25),ax6,' ' store user login until ending blank
mvc b100(3),a0 store mth (1st 3 bytes)
mvc b104(25),b0 follow with userid
tblt1f4 b100(32),'mth login'
skp man20 return to get next line
#
# EOF - dump tables, close files, prompt for report view (rop=r1), end job
man90 tbpt1 filo1,'logins by month & userid'
cls all
eoj
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'table2' solicits the filename & options which define displacement & length of the table argument,& 1 or 2 fields to be accumulated. table2 then reads through the file & displays or prints the accumulated totals sorted & summarized to one line per unique key field value. You might use this to verify suspicious totals from COBOL programs.
1 2 3 4 5 6
0123456789012345678901234567890123456789012345678901234567890123
cust# slsm# date invoice# product# qty price amount
130140 21 940802 IN111001 HAM001 00020+ 0000001 00000020+
130140 21 940802 IN111001 SCR012 00021+ 0001001 00021021+
139923 35 950802 IN111002 CHR001 00022+ 0002001 00044022+
| cd testdata |
|
uvcopy table2,fili1=ar/sales1,uop=a30b6c38d6e53f9g3r64,filo1=tmp/sales1.tbl
===========================================================================
uvcopy table2 <-- Try this Now
============= - You only need to enter/remember this much
- you will be prompted for filename & options
- filenames default as shown above (for this demo)
uop--> a30b6c38d6e53f9g3r64 <-- ENTER options for demo
==================== - can enter just 'a30b6r64' for counts by product#
ar/sales1 = default fili01 accept/reenter--> <-- enter null to accept dflt
table2 2003/04/26_20:15:34 Sales Summary by Product#
tbl#001 pg#001 -argument- -acum#1- % -acum#2- %
line# count % product quantity
1 2 10 BBQ001 12 12 1,420.12 31
2 1 5 CHR001 22 22 440.22 9
3 5 25 HAM001 41 41 1,390.41 30
4 2 10 HAX129 10 10 600.10 13
5 2 10 SAW051 24- 24- 560.24- 12-
6 1 5 SCR012 21 21 210.21 4
7 4 20 TAB013 17 17 29.83-
8 3 15 WHIP75 1 1 1,030.01 22
20*100 *TOTAL* 100 *100 4,501.00 *100
Please see the rerun on the next page to better illustrate the options ---->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy table2,fili1=ar/sales1,uop=a10b2c38d6e53f9g3r64,filo1=tmp/sales1.tbl =========================================================================== - May specify all filenames & options on the command line (as above)
uvcopy table2 - minimum entry, will be prompted for file & options
============= - will be prompted for options
- output filename same as input, in tmp subdir with .tbl ext
uop=a0b0c0d0e0f0g1p0r0 - option defaults
uop=a0 - argument displacement (0 rel)
uop= b0 - argument length
uop= note - may omit options c,d,e,f,p for record counts only
uop= c0 - acum#1 displacement (0 rel)
uop= d0 - acum#1 length
uop= e0 - acum#2 displacement (0 rel)
uop= f0 - acum#2 length
uop= g1 - edit all acums as qty (commas, no decimal)
uop= g2 - edit all acums as $ (commas & decimal point)
uop= g3 - edit acum#1 qty, acums#2-#6 $amounts
uop= g__ - table formats g1-g12 see uvcopy.doc tbf f1-f12
uop= p0 - acum-fields unpacked, "p1" packed, "p2" binary
uop= r8192 - input record size (max 8192)
uop= note - if file type LST specify r > largest possible
uop=a30b6c38d6e53f9g3r64 <-- ENTER this for demo with sales1 file
====================
product#;quantity;amount <-- ENTER this for demo Field Headings
========================
Summary of Qty & Amt by Product# <-- ENTER this for demo Report Heading
================================
<-- ENTER null at filename prompt to accept demo input
Notes re: input File TYPE prompts
RSF (default) <-- Record Seqntl Fixed (recsize option r must be correct)
LST <-- Line Seqntl Terminated (specify r > largest possible)
Option defaults = q1a0b0c0d0e0f0g1p0r0
null accept or re-specify (1 or more) --> a30b6c38d6e53f9g3r64 <--ENTER for demo
====================
ar/sales1 = default fili01 accept/reenter --> <-- ENTER null to accept dflt
RSF = typ default accept or enter new typ --> <-- ENTER null to accept dflt
enter table hdr fieldnames separated by semicolons
--> argument;acum1;acum2 --> product#;quantity;$amount <-- ENTER fieldnames
=========================
enter Report Heading (optional)
--> Sales Summary by Product# <-- ENTER Report Heading
=========================
enter to command to view/print report --> more <-- to display report
====
<-- See the sample report listed on the previous page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'table3d' is a more useful than 'table2' for JCL/script & COBOL conversions because it is designed to process entire directories of files (vs 'table2' which processes only fixed length data files & only 1 at a time).
'table3d' allows you to specify a 'key-word', preceding a 'target-word'. The job searches all lines of all files in the directory & the report shows one line for each target-word with the counts & percentages of the total line. Some examples of possible reports might be:
Note that the 'cross-reference' reports XREFjobs.htm provide for the 1st 2 above, so we use #3 as our example. High Level Qualifier refers to the top-node in DSN filenames which becomes the sub-directory in the converted scripts. A few samples of 'DSN's from our test files might be:
//CUSTMAS DD DSN=AR.CUSTOMER.MASTER.INDEXED,DISP=SHR
//SORTIN DD DSN=GL.ACCOUNT.TRANS,DISP=SHR
//SORTOUT DD DSN=&&TEMPSLS,DISP=(NEW,PASS),...
uvcopy table3d,fild1=jcl0,arg1=DSN,arg2=.,arg4=.= =================================================
Job: table3d Dir: jcl0 Keyword(s): DSN
Qual1: . Qual2: Blanked: =. Userops: q1c0f0l0k0m0p1w1
table3d 2007/09/08_16:11:24 Counts by Targetword following specified Keyword
tbl#001 pg#001 -argument-
line# count % target-word
1 27 28 AR
2 1 1 ARTEST
3 1 1 FTP
4 52 54 GL
5 1 1 GLTEST
6 1 1 MXP
7 4 4 PY
8 4 4 PYTEST
9 2 2 RPTS
93*100 *TOTAL*
Do you see how you can run table3d to summarize other components of JCL or COBOL by choosing appropriate keywords, targetwords,& options. See more explanations at: TABLEjobs.htm#E1.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'recsizes1' is a uvcopy utility job that will read any text file & create a summary table of all different record-sizes found in the file - based on LineFeed terminators x'0A' (or CR+LF x'0D0A').
The uvcopy job may be found at /home/uvadm/pf/util/recsizes1 & is listed below. Note the operating instructions & sample report as #comments within the listing. You can run the job using the supplied test file /home/uvadm/dat1/customers.
# recsizes1 - create summary table of record-sizes in a text file
# - by Owen Townsend, June 6, 2007
#
# uvcopy recsizes1,fili1=dat1/customers,filo1=tmp/custrecsizes
# ============================================================
#
# ** sample report **
#
# recsizes1 2007/06/07_13:54:02 summary of record-sizes in: dat1/customers
# tbl#001 pg#001 -argument-
# line# count % record-size
# 1 1 3 0079
# 2 10 31 0086
# 3 2 6 0098
# 4 19 59 0102
# 32*100 *TOTAL*
#
rop=r1x2 # option r1=display outfile at EOJ, x2=more (default command)
was=a8192 # increase area 'a' to allow recsizes up to 8192 bytes
fili1=?infile,rcs=8192,typ=LST
filo1=?recsizesummary,rcs=128,typ=LSTt
@run
opn all
# begin loop to get records & table record-size, until EOF
# - 'get' instrn stores binary recsize in rgstr 'z' ($rz)
# - use 'mvn' to convert binary $rz to 4 numerics for table argument
man20 get fili1,a0(8192) get next record
skp> man80
mvn c0(4),$rz store recsize in digits
tblt1 c0(4),'record-size' build table of record-sizes
skp man20 return to get next record
# EOF - dump table to outfile, close files & end job
man80 tbpt1v1 filo1,'summary of record-sizes in: $fili1'
cls all
eoj
This job illustrates the powerful 'tbl' instruction of uvcopy. 'tbl' builds a table in memory based on a specified argument. It creates a new table entry on the 1st occurrence of any given argument & increments a counter on subsequent occurrences. Optionally you can specify up to 6 accumulators. At EOF, you use the 'tbp' instruction to dump the table to a file for printing.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy job 'tblext1' will create table summary counts of file extensions in a directory (.CBL .CPY .JCL .PROC .CTL .zip etc).
tblext1 2006/04/16_20:58:01 table summary of extensions/counts in directory
tbl#001 pg#001 -argument- -acum#1- %
line# count % file extension count
1 37 13 .CBL 37 13
2 8 2 .CPY 8 2
3 212 75 .CTL 212 75
4 21 7 .JCL 21 7
5 1 0 .zip 1 0
279*100 *TOTAL* 279 *100
Assume we have just FTP'd a mixture of mainframe files to subdir 'ftp' on our unix system & we wish to know counts by file extension.
uvcopy tblext1,fild1=ftp[,filo1=rpts/ftp.ext] ============================================= - no need to specify output file, it defaults as shown - to subdir tmp with filename=indirname.ext (tmp/ftp.ext in this case)
'tblext1' is handly to calculate the COBOL compile failure percentage. The 'mfcblA' script compiles all programs in cbls/* & writes output to cblx/... Clean compiles write .cbl, .idy,& .int, But failures write only a .err file
mfcblA all <-- compile all programs from cbls/* to cblx/... ==========
uvcopy tblext1,fild1=cblx <-- table summarize (dflt output in rpts/cblx.ext) =========================
tblext1 2009/08/30_17:55:34 table summary of extensions/counts in directory
tbl#001 pg#001 -argument- -acum#1- %
line# count % file extension count
1 12 31 .cbl 12 31
2 2 5 .err 2 5
3 12 31 .idy 12 31
4 12 31 .int 12 31
38*100 *TOTAL* 38 *100
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# tblext2 - table summary of file extensions in all subdirs of a superdir
# - by Owen Townsend, September 2009
# tblext1 - (prior job) reads filenames from only 1 directory
#*tblext2 - (this job) reads filenames from all subdirs of a superdir
#
# uvcopy tblext2,fild1=mainframefiles[,filo2=rpts/mainframefiles.ext]
# ====================================================================
# - no need to specify output file, it defaults as shown
#
opr='$jobname - table summary of filename extensions in a directory'
rop=r2 #run option to prompt at EOJ for report disposition (vi,cat,more,etc)
fild1=?xxx,typ=DIR,rcs=256 # '?' solicits dirname if not on command line
fili1=xxxx,typ=LST,rcs=256
filo2=rpts/dirname.ext,typ=LSTt,rcs=80
@run
# create output filename in rpts subdir with same name as input subdir + .ext
opn fild1 ensure directory present
mvu f1(80),$fild1,x'00' move input dir path to w/s
scnr f0(80),'/' scan for rightmost '/'
mvc f100(60),fx1 isolate input base subdir
mvc f200(5),'rpts/' setup rpts/ subdir
cat f200(60),fx1(60) concat basedir for rpts/filename
cata8 f200(60),'.ext' concat suffix & nullterminate
mvft1 $filo2,f200(60) store outfile name
sys 'if test -d rpts || mkdir rpts' make rpts/ if not present
opn filo2 open output rpts/file
#
# capture all filenames from all subdirs into a tmp/file for readback
man10 sysv1 'find $fild1 -print -type f >tmp/tblext2'
mvft1 $fili1(60),'tmp/tblext2'
opn fili1 open file of filenames
#
# begin loop to read filenames & build table by suffix til EOF
man20 get fili1,a0(256) get each record into area 'a'
skp> man90 cc set > if EOF
mvf b0(80),'none' in case no extension found
scnr a0(80),'.' scan for rightmost '.'
skp! man30 '.' found ?
mvc b0(80),ax0 yes - store the .xxx for tbl
man30 tblt1f1 b0(16),'file extension;count',1
skp man20 repeat loop until end of dir
#
# EOD - dump table to outfile & query oprtr for display/edit/print ?
man90 tbpt1s1 filo2,'table summary of extensions/counts in directory'
cls all
eoj
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 5A1. | Cross-Refs for COBOL copybooks & called programs |
| - see all cross-refs in 'Part_3' (COBOL & JCL) |
| 5B1. | 'statallmvs1' creates table summaries from all converted COBOL programs in |
| the cbls/... subdir. and also creates table summaries for mainframe MVS JCL | |
| in jcl2/... and converted scripts in jcl3/... (already shown in Part_4). | |
| 'statallvse1' is the same,but for VSE JCL. |
| 5B2. | statcbl1 - table summarize mainframe COBOL copybooks & called programs |
| - counts each copybook & called program found in all programs |
| 5C1. | cobfil51 - COBOL Files Report |
| - information extracted from all COBOL programs in directory | |
| - filenames, Input/Output, Org, Access, record size, copybook | |
| - all programmers should have a copy before starting test/debug |
| 5C1. | cobfiles5A - COBOL files report (alternate script with additional tasks) |
| - cpyrcs1 job gets record-size from copybook/maps | |
| - loads COBOL info Indexed file for use by jobflow reports |
| 5D1. | cobmap1 - create record layouts from COBOL copybooks |
| - another of the favorite tools in Vancouver Utilities | |
| - short demo here, fully documented in COBaids1.htm. | |
| - also see 'uvhdcob' at '7B1' & 'uvhdc2' at '7B4' | |
| which show datafile field contents beside copybooknames |
| 5E1. | Animation - essential for debugging MicroFocus COBOL programs |
| - animation illustrated for Server Express under Unix/Linux | |
| - also illustrated for Net Express under SFU/UWIN/CYGWIN/Windows | |
| - This discussion shows you how our JCL/script conversion | |
| makes it easy for you to turn animation on & off. | |
| - Animation is fully documented in the MicroFocus manuals |
| 5F1. | Micro Focus COBOL 'file status' error codes |
| - 2 byte codes 00-49, excluding 1st byte '9' | |
| - codes extracted from Micro Focus website: |
| 5F2. | Micro Focus COBOL 'run time' error codes |
| - 1st byte character '9' x'39' | |
| - 2nd byte binary x'00'- x'FF' (decimal 000-255) |
| 5F3. | Micro Focus COBOL 'run time' error messages |
| - 1st line only of full text error messages on the web site |
http://supportline.microfocus.com/Documentation/books/sx40sp1/smpubb.htm
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 5G1. | splitcblcpy1 - split mixed directories of COBOL programs & copybooks |
| to separate subdirs required by COBOL conversion & compile | |
| - see job listed on page '8N1' |
| 5H1. | rebuild - Micro Focus utility to rebuild Indexed files. |
| 5I1. | acucobolx1 - extract data records from AcuCOBOL Indexed files |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| xcobcall1 |
|
| xcobcall2 |
|
| xcobcopy1 |
|
| xcobcopy2 |
|
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 5B1. | 'statallmvs1' runs several uvcopy jobs to create table summaries by |
| analyzing all files in jcl2 (MVS JCL), jcl3 (converted JCL/scripts), | |
| & cbls (converted COBOL). 'statallvse1' is the same,but for VSE JCL. | |
| The JCL reports have already been shown in Part_4. |
| 5B2. | statcbl1 - table summarize (gather statistics) for COBOL programs |
| - count refs to each copybook, called program,& file ORG type |
| 4B1. | statmvsjcl1 - table summarize (gather statistics from) mainframe JCL |
| - count refs to each program, PROC, & top-node used in all JCLs |
| 4B2. | statksh1 - table summarize (get stats for) converted Korn shell scripts |
| - count refs to each program, PROC, & top-node used in Ksh scripts |
#1. cdl <-- change to libraries superdir (/home/mvstest/testlibs for demo)
=== - or your Libraries
#2. mkdir stats <-- make subdir to receive report (if not existing)
===========
#3. statallmvs1 all <-- script to run uvcopy jobs statcbl1,statmvsjcl2,statksh1
===============
#3a. statallvse1 all <-- same, but for VSE JCL
===============
#4a. vi stats/cbls_calledpgms <-- see sample reports on page '5B2' #4b. vi stats/cbls_copybooks #4c. vi stats/cbls_ORGtypes
#4d. vi stats/jcl2_pgms <-- see sample reports on page '4B1' #4e. vi stats/jcl2_procs #4f. vi stats/jcl2_topnodes
#4g. vi stats/jcl3_pgms <-- see sample report on page '4B2' #4h. vi stats/jcl3_topnodes #4i. vi stats/jcl3_exportfiles
The following sample reports were run for the supplied set of test/demo JCL & COBOL programs in /home/uvadm/mvstest/testlibs/...
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy statcbl1 <-- create stats: COBOL copybooks, called-programs,& ORG types ===============
statcbl1 2009/05/01_11:15:02 Summary of copybooks in cbls cbls/cgl100.cbl
tbl#001 pg#001 -argument-
line# count % copybook
1 6 17 custmas.cpy
2 1 2 paymas.cpy
3 2 5 saledtl.cpy
4 1 2 sdline.cpy
5 1 2 stline.cpy
6 12 34 unixproc1.cpy
7 12 34 unixwork1.cpy
35*100 *TOTAL*
statcbl1 2009/05/01_11:15:02 Summary of called programs in cbls cbls/cgl100.cbl
tbl#002 pg#001 -argument-
line# count % called program
1 2 100 getparm
2*100 *TOTAL*
statcbl1 2009/05/01_11:15:02 Summary of ORGANIZATION types in cbls cbls/cgl100.cbl
tbl#003 pg#001 -argument-
line# count % organization
1 2 8 indexed
2 9 39 line sequential
3 12 52 record sequential
23*100 *TOTAL*
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
For each file used in each program, this report shows:
See sample report on the next page '5C2' --->
All programmers should have a copy of this report before they begin testing & debugging. It supplies instant answers to questions about file inputs & outputs, access methods, record sizes, copybooks, etc.
You could create the report with just 'cobfil51', but 'cobfiles5A' is strongly recommended, because it generates Indexed files of COBOL file info that is used by cobfil51 & also by the 'jobflow' reports.
#1. uvcopy cobfil51,fild1=cbls[,filo2=xref/cobfiles.rpt]
====================================================
#1a. uvcopy cobfil51 <-- easy alternative (files default as shown above)
===============
#2a. vi xref/cobfiles.rpt <-- view the COBOL files report
====================
#2b. uvlp12 xref/cobfiles.rpt <-- list the COBOL files report
======================== see sample report on the next page -->
#1. cobfiles5A cbls cpys maps <-- generate xref/cobfil51a & load xref/cobfil51I
========================= - run now if not already run on page '5C1'
#2. uvlp12 xref/cobfiles.rpt <-- list the COBOL files report
======================== see sample report on the next page -->
The jobflow reports (page '6B1') require Indexed files xref/cobfil51I to merge COBOL file info with the JCL/script info.
'cobfiles5A' is a handy script to both generate the cobfiles report & load the Indexed file that will be required by jobflow51 & jobflow5A.
See the 'cobfiles5A' script listed at XREFjobs.htm#3X1
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
cobfil51 ** COBOL Files Report ** Dir=cbls 2009/08/30_17:47:40 progname.cbl DDname OAM open recsz copybook.cpy FDname / Key lines ============================================se=in=up=de=========================
car100.cbl custmas SS I 256 custmas.cpy custmas
car100.cbl nalist L O 120 nalist
52
car101.cbl custmas1 SS I 256 custmas1
car101.cbl nalist L O 90 nalist
41
car120.cbl custmas SS I 256 custmas.cpy custmas
car120.cbl nalist L O 90 nalist
71
car130.cbl custmas SS I 256 custmas.cpy custmas
car130.cbl nalist L O 90 nalist
65
car140.cbl custmas SS I 256 custmas.cpy custmas
car140.cbl nalist L O 90 nalist
62
car150.cbl custmas SS I 256 custmas.cpy custmas
car150.cbl nalist L O 120 nalist
60
car200.cbl saledtl SS I 64 saledtl.cpy saledtl
car200.cbl custmas IR I 256 custmas.cpy custmas
car200.cbl key-> cm-cust
car200.cbl salelst L O 120 sdline.cpy salelst
65
car300.cbl -NoFiles- 34
cgl100.cbl acctmas SS I 80 acctmas
cgl100.cbl actlist L O 120 actlist
53
cgl200.cbl glmsold SS I 80 glmsold
cgl200.cbl glmsnew SS O 80 glmsnew
cgl200.cbl gltrans SS I 80 gltrans
61
cpy100.cbl paymas SS I 256 paymas.cpy paymas
cpy100.cbl nalist L O 120 nalist
46
sqlora1.cbl cust1in LS I 80 cust1
sqlora1.cbl exec_sql cust1 I01
110
sqlora2.cbl cust1out LS O 80 cust1
sqlora2.cbl exec_sql sqlca.cpy
sqlora2.cbl exec_sql cust1 S01
112
testunix1.cblcustmas IS I 256 custmas
testunix1.cbl key-> custnum
76
Total programs = 14, total files = 25
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'cobmap1' generates record layouts from your COBOL copybooks. It copies the copybook to another file (we call it a 'cobmap'), calculating & appending field start, end,& length onto the right side of each field definition. This information is essential to verify data records, specify SORT FIELD locations, etc.
Try the following demo, using demo copybook cpys/custmas.cpy as input, and generating the cobmap output in maps/custmas. Note that 'cobmap1' is a 'uvcopy job', a file of instructions that requires the 'uvcopy' interpreter. 'uvcopy' finds the instruction file via 'PFPATH' which is defined in the profile. 'cobmap1' is found in /home/uvadm/pf/util/cobmap1.
uvcopy cobmap1,fili1=cpys/custmas.cpy,filo1=maps/custmas ========================================================
cobmap1 start-end bytes for cobol record fields 200310101805 pg# 0001
cpys/custmas.cpy RCSZ=00256 bgn end lth typ
* custmas - cobol copy book for customer.master file mvsjcl
10 cm-num pic 9(6). 0000 0005 006 n 6
10 cm-delete pic x(4). 0006 0009 004
10 cm-name pic x(25). 0010 0034 025
10 cm-adrs pic x(25). 0035 0059 025
10 cm-city pic x(16). 0060 0075 016
10 filler001 pic x. 0076 0076 001
10 cm-prov pic x(2). 0077 0078 002
10 filler002 pic x. 0079 0079 001
10 cm-postal pic x(10). 0080 0089 010
10 cm-phone pic x(12). 0090 0101 012
10 cm-contact pic x(18). 0102 0119 018
10 cm-thisyr-sales pic s9(7)v99 comp-3 occurs 12. 0120 0124 005pns 9
10 cm-lastyr-sales pic s9(7)v99 comp-3 occurs 12. 0180 0184 005pns 9
10 filler003 pic x(16). 0240 0255 016
*RCSZ=00256 0256
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The Operating Instructions are actually simpler to generate 'cobmap's for all copybooks in the directory. Try the following:
uvcopyx cobmap1 cpys maps uop=q0i7p0 ====================================
'uvcopyx' is a script that re-runs the 'uvcopy' interpreter using the 'cobmap1' instructions on each file found in the input directory 'cpys', and writes the corresponding output to the output directory 'maps' with the same name as input.
vi maps/* <-- examine all outputs =========
See more about cobmap1 at COBaids.htm#A1
Also see 'uvhdcob' at '7B1' & 'uvhdc2' at '7B4', which show data-file field contents beside copybook-names.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The following assumes you have converted the JCL as shown on page 1Q1-1Q6 of MVSJCL.htm#1Q1 & that you have converted & compiled the programs as shown on pages 1R3-1R4 of MVSCOBOL.htm#1R3 (with mfcblA). We will illustrate using test/demo program /home/mvstest/cbls/car100.cbl'. & test/demo jcl/script /home/mvstest/jcls/jar100.ksh'. Relevant directories are:
| cbls |
|
| cblx |
|
| jcls |
|
#1. export ANIM=+A - set switch (environmental variable) for animation
============== $ANIM is otherwise null in 'cobrun $ANIM $RLX/car100'
#1a. export COBSW=+A <-- use COBSW for Windows SFU/Cygwin/Uwin & Net Express
=============== (vs ANIM for unix/linux scripts on Server Express)
#2. jar100.ksh - run the job (will now ANIMATE)
==========
#3. export ANIM="" - reset the Animation switch (to run normally)
=============
Note that the converted scripts execute the COBOL programs as follows:
cobrun $ANIM $RLX/car100 <-- sample COBOL execution in JCL/script =======================
Whenever you need to animate a program, all you have to do is set the animation switch on via 'export ANIM=+A', debug the program, & then set the animation switch off via 'export ANIM=-A'.
The mfcbl1 & mfcblA scripts always compile with the animation option '-A' & always copies the source .cbl from source directory (cbls) to the executable directory (cblx) as is required for animation.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
http://supportline.microfocus.com/Documentation/books/sx40sp1/smpubb.htm ========================================================================
00 Successful completion
02 Indexed files only. One of two possibilities: For a READ statement, the key value for the current key is equal to the value of that same key in the next record in the current key of reference. For a WRITE or REWRITE statement, the record just written created a duplicate key value for at least one alternate record key for which duplicates are allowed.
04 Length of the record being processed does not conform to the fixed file attributes for that file.
05 The referenced optional file is not present at the time the OPEN statement is executed. (see '35' for non-optional file)
07 Sequential files only. For an OPEN or CLOSE statement with the REEL/UNIT phrase the referenced file is a non-reel/unit medium.
10 No next logical record exists. You have reached the end of the file.
14 Relative files only. The number of significant digits in the relative record number is larger than the size of the relative key data item described for that file.
21 Sequentially accessed files only. Indicates a sequence error. The ascending key requirements of successive record key values has been violated, or, the prime record key value has been changed by a COBOL program between successful execution of a READ statement and execution of the next REWRITE statement for that file.
22 Indexed and relative files only. Indicates a duplicate key condition. Attempt has been made to store a record that would create a duplicate key in the indexed or relative file OR a duplicate alternate record key that does not allow duplicates.
23 Indicates no record found. An attempt has been made to access a record, identified by a key, and that record does not exist in the file. Alternatively a START or READ operation has been tried on an optional input file that is not present.
24 Relative and indexed files only. Indicates a boundary violation arising from one of the following conditions: an attempt is made to write beyond the externally defined boundaries of a file; a sequential WRITE operation has been tried on a relative file, but the number of significant digits in the relative record number is larger than the size of the relative key data item described for the file.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
30 The I/O statement was unsuccessfully executed as the result of a boundary violation for a sequential file or as the result of an I/O error, such as a data check parity error, or a transmission error.
34 The I/O statement failed because of a boundary violation. This condition indicates that an attempt has been made to write beyond the externally defined boundaries of a sequential file.
35 OPEN operation with the I-O, INPUT, or EXTEND phrases has been tried on a non-OPTIONAL file that is not present.
37 OPEN operation has been tried on a file which does not support the open mode specified in the OPEN statement.
38 OPEN operation has been tried on a file previously closed with a lock.
39 Conflict has been detected between the fixed file attributes and the attributes specified for that file in the program.
41 OPEN operation has been tried on file already opened.
42 CLOSE operation has been tried on file already closed.
43 Files in sequential access mode. The last I/O statement executed for the file, before the execution of a DELETE or REWRITE statement, was not a READ statement.
44 Boundary violation exists. Possible violations are: * An attempt has been made to WRITE or REWRITE a record that is larger than the largest, or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file. * An attempt has been made to REWRITE a record to a file, and the record is not the same size as the record being replaced.
46 Sequential READ operation has been tried on a file open in the INPUT or I-O mode but no valid next record has been established.
47 READ or START operation has been tried on a file not opened INPUT or I-O.
48 WRITE operation has been tried on a file not opened in the OUTPUT, I-O, or EXTEND mode, or on a file open I-O in the sequential access mode.
49 DELETE or REWRITE operation has been tried on a file that is not opened I-O.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'Run-Time' error codes have 1st byte '9' & 2nd byte is a binary code that must be converted from binary to decimal. You can then look up the meaning on the Micro Focus COBOL website.
These messages are output by the run-time system (RTS), and so can be produced while you are compiling, debugging, or running your program. When you select an error message number, its text and severity is listed, along with an explanation of the error or problem that caused the message, and advice on how to prevent the error.
Goto the Web-Site & Click the error number you require details about:
001 002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 033 034 035 036 037 038 039 040 041 042 043 044 045 047 048 055 065 066 067 068 069 070 071 072 073 074 075 076 077 078 079 080 081 082 086 099 100 101 102 103 104 105 106 107 108 109 110 111 112 114 115 116 117 118 119 120 121 122 123 124 125 126 127 129 135 136 137 138 139 141 142 143 144 146 147 148 149 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 173 174 175 176 177 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 203 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 231 235 236 237 238 239 240 241 242 243 249 250 251 252 253 254
Goto the Web-Site & Click the error number you require details about:
http://supportline.microfocus.com/Documentation/books/sx40sp1/smpubb.htm ========================================================================
Mainframe COBOL programs did not expect binary & will display garbage for the 2nd byte. Note that the VU conversions insert copybooks 'unixwork1.cpy' & 'unixproc1.cpy'. unixproc1 contains a subrtn to display the binary codes. BUT, you have to insert 'perform mf-display-filestat-eoj' wherever the COBOL program tests file status.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| Note |
|
001 Insufficient buffer space (Recoverable) 002 File not open when access attempted (Recoverable) 003 Serial mode error (Recoverable) 004 Illegal file name (Recoverable) 005 Illegal device specification (Recoverable) 006 Attempt to write to a file opened for INPUT (Recoverable) 007 Disk space exhausted (Fatal) 008 Attempt to input from a file opened for OUTPUT (Recoverable) 009 Directory not found (Recoverable) 010 File name not supplied (Recoverable) 011 Process limit reached (Fatal) 012 Attempt to open a file which is already open (Recoverable) 013 File not found (Recoverable) 014 Too many files open simultaneously (Recoverable) 015 Too many indexed files open (Recoverable) 016 Too many device files open (Recoverable) 017 Record error: probably zero length (Recoverable) 018 Read part record error: EOF before EOR or file open in wrong mode (Recover- 019 Rewrite error: open mode or access mode wrong (Recoverable) 020 Device or resource busy (Recoverable) 021 File is a directory (Fatal) 022 Illegal or impossible access mode for OPEN (Recoverable) 023 Illegal or impossible access mode for CLOSE (Recoverable) 024 Disk input-output error (Recoverable) 025 Operating system data error (Fatal) 026 Block I-O error (Fatal) 027 Device not available (Recoverable) 028 No space on device (Fatal) 029 Attempt to delete open file (Recoverable) 030 File system is read-only (Recoverable) 031 Not owner of file (Recoverable) 032 Too many indexed files, or no such process (Recoverable) 033 Physical I-O error (Fatal) 034 Incorrect mode or file descriptor (Recoverable) 035 Attempt to access a file with incorrect permission (Recoverable) 036 File already exists (Recoverable) 037 File access denied (Fatal) 038 Disk not compatible (Fatal) 039 File not compatible (Fatal) 040 National Language initialization not set up correctly (Fatal) 041 Corrupt index file (Recoverable) 042 Attempt to write on broken pipe (Recoverable) 043 File information missing for indexed file (Fatal) 044 Attempt to OPEN an NLS file in a non-NLS program (Fatal) 045 Attempt to OPEN an NLS file using incompatible language definition (Fatal) 047 Indexed structure overflow (Fatal) 048 Attempt to divide by zero (Fatal) 055 Routine table overflow (Fatal) 065 File locked (Recoverable) 066 Attempt to add duplicate record key to indexed file (Fatal) 067 Indexed file not open (Recoverable) 068 Record locked (Recoverable) 069 Illegal argument to isam module (Fatal) 070 Too many indexed files open (Recoverable) 070 Too many indexed files open (Recoverable) 071 Bad indexed file format (Fatal) 072 End of indexed file (Fatal) 073 No record found in indexed file (Fatal) 074 No current record in indexed file (Fatal) 075 Indexed data file name too long (Fatal) 076 Can't create lock file in /isam directory (Fatal) 077 Internal ISAM module error (Fatal) 078 Illegal key description in indexed file (Fatal) 079 COBCONFIG syntax error (Fatal) 080 Can't convert to/from Unicode codeset (Fatal) 081 Key already exists in indexed file (Fatal) 082 CALL convention not supported (Fatal) 086 Remote file system failure (Fatal) 099 Illegal operation in SORT/MERGE module (Fatal) 100 Invalid file operation (Fatal) 101 Illegal operation on an indexed file (Fatal) 102 Sequential file with non-integral number of records (Fatal) 103 Parameter cannot be passed BY VALUE (Fatal) 104 Null file name used in a file operation (Fatal) 105 Memory allocation error (Fatal) 106 Dictionary error (Fatal) 107 Operation not implemented in this run-time system (Fatal) 108 Failure to initialize data division (Fatal) 109 Invalid checksum in run-time system (Recoverable) 110 Generated code not supported by this RTS (Fatal) 111 Incompatible Class Library and Run-Time Environment versions (Fatal) 112 Unable to locate/access the required security key (Recoverable) 114 Attempt to access item beyond bounds of memory (Fatal) 115 Unexpected signal (Fatal) 116 Cannot allocate memory (Fatal) 117 Bad collating sequence (Fatal) 118 Symbol not found (Fatal) 119 Symbol redefined (Fatal) 120 Symbol string table of zero size (Fatal) 121 Symbol is not in TEXT section (Fatal) 122 Coblongjmp() called below level of cobsavenv() (Fatal) 123 Unknown relocation type (Fatal) 124 Communication failure during I/O request to the central file handler 125 All locks/ current transactions canceled due to exceeding time limit 126 Record size exceeds system limit (Fatal) 127 coblongjmp() called from a different thread to cobsetjmp() (Fatal) 129 Attempt to access record zero of relative file (Recoverable) 135 File not found (Recoverable) 136 Corrupt or invalid executable file (Fatal) 137 Illegal device specification - not mass storage 138 File closed with lock - cannot be opened (Recoverable) 139 Record length or key data inconsistency (Recoverable) 141 File already open - cannot be opened (Recoverable) 142 File not open - cannot be closed (Recoverable) 143 Rewrite/delete in sequential mode not preceded by successful read (Recover- 144 Boundary violation (Recoverable) 146 No current record defined for sequential read (Recoverable) 147 Wrong open mode or access mode for read/start (Recoverable) 148 Wrong open mode or access mode for write (Recoverable) 149 Wrong open mode or access mode for rewrite/delete (Recoverable) 151 Random read on sequential file (Recoverable) 152 REWRITE on file not opened I-O (Recoverable) 153 Subscript out of range (Fatal) 154 PERFORM nested too deeply (Fatal) 155 Illegal command line (Fatal) 156 Too many parentheses in compute statement (Fatal) 157 Not enough program memory: object file too large to load (Recoverable) 158 Attempt to REWRITE to a line-sequential file (Recoverable) 159 Malformed line-sequential file (Recoverable) 160 Overlay loading error (Recoverable) 161 Illegal intermediate code (Fatal) 162 Arithmetic overflow or underflow (Fatal) 163 Illegal character in numeric field (Fatal) 164 Run-Time subprogram not found (Fatal) 165 Version number incompatibility (Fatal) 166 Recursive COBOL CALL is illegal (Fatal) 167 Too many USING items (Fatal) 168 Stack overflow (Fatal) 169 Illegal configuration information (Fatal) 170 System program not found (Fatal) 171 Japanese operations illegal with this RTS (Fatal) 173 Called program file not found in drive/directory (Fatal) 174 Imported file not found (Fatal) 175 Attempt to run intermediate code program which had severe errors (Fatal) 176 Illegal intersegment reference (Fatal) 177 Attempt to cancel program failed (Fatal) 179 Error during chain (program not found) (Fatal) 180 End-of-file marker error (Fatal) 181 Invalid parameter error (Fatal) 182 Console input or console output open in wrong direction (Fatal) 183 Attempt to open line sequential file for I-O (Fatal) 184 ACCEPT/DISPLAY I-O error (Fatal) 185 File malformed (Recoverable) 186 Attempt to open stdin, stdout or stderr with incorrect mode (Recoverable) 187 Run-time system not found on $COBDIR path (Fatal) 188 Filename too large (Fatal) 189 Intermediate code load error (Fatal) 190 Too many arguments to CALL (Fatal) 191 Terminal type not defined (Fatal) 192 Required terminal capability description missing (Fatal) 193 Error in variable length count (Fatal) 194 File size too large (Fatal) 195 DELETE/REWRITE not preceded by a read (Fatal) 196 Record number too large in relative or indexed file (Fatal) 197 Screen handling system initialization error (Fatal) 198 Load failure (Fatal) 199 Operating System error code lies outside expected range (Fatal) 200 Run-time system internal logic error (Fatal) 201 I-O error in paging system (Fatal) 203 CALL parameter not supplied (Fatal) 205 Invalid mainframe pointer value (Fatal) 206 Reading unwritten data from memory (Fatal) 207 Machine does not exist (Recoverable) 208 Error in multi-user system (Fatal) 209 Network communication error (Recoverable) 210 File is closed with lock (Fatal) 211 Program not executable by Run-Time System (Fatal) 212 Run-Time System version incompatible with object-oriented program (Fatal) 213 Too many locks (Recoverable) 214 GO TO has not been ALTERed (Fatal) 215 Cannot ANIMATE a program running COMMUNICATIONS (Fatal) 216 Cannot initialize the named communications device (Fatal) 217 Incompatible host for native code file (Fatal) 218 Malformed MULTIPLE REEL/UNIT file (Fatal) 219 Operating system shared file limit exceeded (Recoverable) 220 Attempt to execute more than one SORT or MERGE simultaneously (Fatal) 221 Internal sort error (Fatal) 222 Merge files out of sequence (Fatal) 223 NLS language expansion error (Fatal) 224 External Language Initialization failure 225 Dynamic load error - program component missing (Fatal) 226 EXTERNAL file definition inconsistent 227 EXTERNAL data definition inconsistent (Fatal) 228 Could not allocate memory for EXTERNAL item (Fatal) 229 SORT/MERGE module does not support EXTERNAL using/giving files (Recover- 231 GENERATE encountered before corresponding INITIATE in report (Fatal) 235 Error in animator communications channel (Fatal) 236 Animated program has terminated unexpectedly (Fatal) 237 Unable to initialize animated process (Fatal) 238 STOP RUN encountered during GNT animation (Informational) 239 Shared run-time system initialization failure (Informational) 240 Object reference not valid (Fatal) 241 Cannot instantiate an abstract class (Fatal) 242 Could not resolve DoesNotUnderstand message (Fatal) 243 Class could not be loaded (Fatal) 249 Process killed (signal-number) (Fatal) 250 Not enough mainframe address space to load or run the program (Fatal) 251 Attempt to load AMODE(24) program when current setting is AMODE(31) only 252 Memory corruption detected (Fatal) 253 Cannot load file - unsupported format (Fatal) 254 Keyboard interrupt to ANIMATOR during ACCEPT (Fatal)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'rebuild' is a Micro Focus utility to rebuild Indexed files. Please the Micro Focus web site for the documentation, which was lacking a good example of rebuilding an indexed file using only the data partition.
For this demo, we will use /home/uvadm/dat1/cust1.fix (3 records listed below). These are 80 byte records with LineFeed in column 80. As a Micro Focus IDXFORMAT1 (CISAM) file the logical record-size is 79 & the LineFeed is the record control byte - LineFeed x'A0' for active records & null x'00' for deleted records.
130140 EVERGREEN MOTORS 1815 BOWEN ROAD NANAIMO BC 139923 JOHNSTONE BOILER 1250 EAST PENDER VANCOUVER BC 150825 RIGGERS INDUSTRIAL 960 - 6TH AVENUE HOPE BC
#1. Login as yourself --> /home/userxx
=====
#2. mkdir tmp1 tmp2 <-- make subdirs for I/O files
===============
#3. cp /home/uvadm/dat1/cust1.fix tmp1/cust1
========================================
- copy demo file to your homedir renaming as 'cust1' (no extension)
#4. rebuild tmp1/cust1,tmp2/cust1 -r:79 -o:LSEQ,IND -t:CISAM -k:1,6 -i
==================================================================
This will create an Indexed file (tmp/cust1.dat & tmp/cust1.idx), logical recsize=79, 1 extra byte added for record delete control byte (so physical record size will be 80 bytes), key in 1st 6 bytes.
| Note |
|
#4a. rebuild tmp1/cust1.fix,tmp2/cust1 -r:80 -o:SEQ,IND -t:CISAM -k:1,6 -i
=====================================================================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
In the example above, rebuild input was tmp1/cust1 & the output was tmp2/cust1.dat (data partition) & tmp2/cust1.idx (index partition). The data partition is named 'cust1.dat' because we specified 'IDXNAMETYP=2' in the 'extfh.cfg' file which is defined by 'export EXTFH=extfh.cfg' in our profile. See the extfh.cfg file listed at VSECOBOL.htm#5D2.
If we did not specify IDXNAMETYP=2, then the output data partition would be just 'cust1', which is the same as the input filename & threfore could not be in the same directory. We strongly recommend IDXNAMETYP=2.
Here is the 'uvcp' equivalent of the 'rebuild' example above.
uvcp "fili1=tmp1/cust1,typ=RSF,rcs=80,filo1=tmp2/cust1,typ=ISF,rcs=79,isk=0(6)" ===============================================================================
'uvcp' provides more flexibility on I/O record sizes & file types. If records have packed or binary data, you cannot specify type as LSEQ for rebuild.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'acucobolx1' is a uvcopy job to extract data from AcuCOBOL Indexed files to sequential files. AcuCOBOL Indexed files have 2 parts(files) (data & index). The indexed part has the same name as the data part + suffix of '.vix'. We can ignore the index part, but might want to sort the output on the key field to ensure sequenced on key field.
By default the extracted records will be the same length as in the indexed file, which is usually 1 fixed length for all records, but could be variable. If the data records are all character, we recommend using option 'l1' (uop=l1), to append LineFeeds on extracted data records, to allow use of unix/windows editors & printers. Do not use uop=l1 if file has any binary data x'00's etc.
We will demo 'acucobolx1' using sample data file 'acucobol1', provided in the Vancouver Utilities home directory. You can investigate with 'uvhd' as follows:
cd /home/uvadm <-- change to Vancouver Utilities home dir
uvhd dat1/acucobol1 r512 <-- investigate with uvhd utility ======================== - display 512 byte blocks
rec#=1 rsize=512 fptr=0 fsize=1024 rcount=2
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 ...........................F...........................:.......:
11110000000000C00000C00000C400000000000000000000D000000300000003
02490401010100E00000E00000D6000020000000000005000000003A0000003A
Note - showing only 1st 64 bytes of 1st 512 byte block (no useful data)
- acucobolx1 bypasses 1st block to 2nd block where data begins
rec#=2 rsize=512 fptr=512 fsize=1024 rcount=2
10 20 30 40 50 60
r# 2 0123456789012345678901234567890123456789012345678901234567890123
512 .7.7....01000ROYAL BANK OF CANADA .
0303000033333545442444424424444442222222222222222222222222222220
07070000010002F91C021EB0F6031E1410000000000000000000000000000000
64 7.7....01005CANADIAN BANK OF COMMERCE .7
3030000333334444444424444244244444544222222222222222222222222203
70700010100531E1491E021EB0F603FDD5235000000000000000000000000007
128 .7....01010BANK OF MONTREAL .7.
0300003333344442442444554442222222222222222222222222222222222030
0700020101021EB0F60DFE4251C0000000000000000000000000000000000070
192 7....01015BANK OF NOVA SCOTIA ....
3000033333444424424454254454422222222222222222222222222222220000
700030101521EB0F60EF61033F49100000000000000000000000000000000000
Note - bytes 252-511 null filled & not shown, only 4 data records in sample
Data records begin after 1st 512 bytes (file header) - record header in 1st 8 bytes of each record (will be dropped in output) - records size in 1st 2 bytes (binary) of 8 byte record header - in this sample, record data size is x'0037' = 3*16+7 = 55 bytes Data blocks are always 512 bytes & last block in file null filled - only 4 records in this sample file, so bytes 252-511 null filled
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy acucobolx1,fili1=dat1/acucobol1,filo1=tmp/acucobol1,uop=l1 ================================================================= - execute command to extract data records - User OPtion 'l1' (uop=l1) to append a line-feed on each record (to allow use of text editors on output file) - use option l1 only for files with all character data (no binary)
uvhd tmp/acucobol1 <-- investigate output file to deterime recsize =================== - uvhd defaults to 256 byte blocks
uvhd tmp/acucobol1 r56 <-- recsize is 56 for this sample file (55+1LF) ======================= uvhd tmp/acucobol1 t <-- can use option 't' (text file, stop on LF) =====================
more tmp/acucobol1 <-- can use more,cat,vi,lp,etc if Linefeed option ===================
01000ROYAL BANK OF CANADA
01005CANADIAN BANK OF COMMERCE
01010BANK OF MONTREAL
01015BANK OF NOVA SCOTIA
.... showing only 1st 4 records from input block #3 above
uvsort "fili1=tmp/acucobol1,rcs=56,typ=RST,filo1=tmp/acucobol1s,typ=LSTt,key1=0(5)" =================================================================================== - might sort output on key field (1st 5 bytes here) since Indexed file records might reuse deleted space & be out of sequence - these extracted records will be 55 bytes +1 for Linefeed (uop=l1) - input typ=RST for 55+1LF, - output typ=LSTt will remove the trailing blanks (LF after last nonblank) omit typ=LSTt if you want sorted records all 56 bytes - Do not use uop=l1 (add linefeeds) if file has any binary data x'00's etc would use 'typ=RSF' & exact rec-size (55 in this case)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is the source listing for the 'acucobolx1' utility, which would be at /home/uvadm/pf/util/acucobolx1 after normal install of Vancouver Utilities.
# acucobolx1 - extract data from AcuCOBOL Indexed file to a sequential file
# - by Owen Townsend, UV Software, May 20/2013
# - see doc at www.uvsoftware.ca/cnvaids.htm#5I1
# & following demo using sample file dat1/acucobolx1
#
# uvcopy acucobolx1,fili1=dat1/acucobol1,filo1=tmp/acucobol1
# ==========================================================
# - extract data from sample AcuCOBOL Indexed file to a sequential file
#
# AcuCOBOL Indexed files have 2 parts(files) (data & index)
# - indexed part has same name as data part + .vix suffix
# - can ignore index part, and sort output on key field to correct sequence
# - can use option 'l1' (uop=l1) to append LineFeed on extracted data records
# so you can use unix/linux/windows editors & printers
# - do not use uop=l1 (add linefeeds) if file has any binary data x'00's etc
#
opr='$jobname - extract data records from AcuCOBOL Indexed file'
opr='uop=q1l0 - option defaults'
opr=' l1 - append line-feed after each data record'
opr=' l0 - no line-feed, write size specified in 1st 2 bytes'
uop=q1l0 # option defaults
fili1=?dat1/acucobol1,typ=RSF,rcs=512
filo1=?tmp/acucobol1,typ=RSF,rcs=512
@run
opn all open files
get fili1,h0(512) get file Header (ignored)
skp> man90 (cc set > if EOF)
#
# begin loop to get each data record & write to output file
# - with rec-size coded in binary in 1st 2 bytes of 8 byte record header
man20 get fili1,a0(8) get Record header
skp> man90 (cc set > if EOF)
mvn $ra,a0(2bs) load recsize into rgstr 'a'
skp<= man90 EOF assumed if recsize <= 0
mvn $rb,$ra move insize to rgstr 'b'
clr b0(512),' ' init record data read area all blanks
get fili1,b0($rb512) get rec-data in area b (size in $rb)
skp> man90 (cc set > if EOF)
add $ca1,1 count records
#
# write output data record, append line-feed if option l1
man30 cmn $uopbl,1 option to append line-feed ?
skp< man34
mvc bb0(1),x'0A' append line-feed after data lth
add $rb,1 +1 record size for LF
man34 put filo1,b0($rb512) write output record (size in $rb)
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
| 6A1. | mvsfiles5A - script to trace data files in MVS JCL |
| - extracts all data files from subdir jcl2 (JCL procs expanded) | |
| - identify originating step# & destination step#s for each file |
| 6B1. | jobflow51 - JCL data files with COBOL file information inserted |
| - jobname,progname,LFD,org,access,I/O,rcsz,copybook,datafilename | |
| - illustrates data file usage in multi-step jobs | |
| - invaluable aid to debugging converted JCL | |
| - short demo here, fully documented in XREFjobs.htm#Part5. |
| 6B2. | jobflow5A - generate jobflow reports for ALL JCL/scripts (too big) |
| jobflow51 - generate jobflow report for 1 JCL/script | |
| - regen as needed during test/debug to reflect changes |
| 6C1. | joblog1 - run a JCL/script & capture a log file (via tee) |
| - names the log file by dropping the .ksh & appending .log | |
| - writes the logfile into subdir 'joblog' in the current directory | |
| (creates it if not present) |
| 6D1. | separate datafiles - supplied profiles make it easy for programmers |
| to have their own set of testdata |
| 6E1. | lastgenr - display latest generation of a file without having to go look. |
| - you can run from anywhere, without keying long pathnames. |
| 6F1. | getEtime - script to display 'job times' for last run of any JOBNAME |
| - retrieves jobtimes file written by last run of any JCL/script | |
| - demos how to retrieve data fields into environmental variables |
| 6G1. | splitjclproc1 - split mixed directories of JCL & PROCs to separate subdirs |
| required for JCL conversion to Korn shell scritps | |
| - see job listed on page '8M1' |
| 6H1. | scanjcl1 - scan multi-line JCL statements for pattern & qualifier |
| - promts for patterns if not specified on ,arg1=... & arg2=... | |
| - writes report to tmp/directory_pattern | |
| - matching multi-line stmts squeezed onto 1 line with line# | |
| - preceded by JOBNAME if 1st match in JCL | |
| - option m0 to omit detail lines & report matching filenames only |
| 6I1. | lockdemo1 - file locking, queue jobs to run serially |
| - code to insert at begining of JCL/scripts to ensure multiple | |
| instances of the same job will be queued to run serially. |
| 6I2. | lockdemo2 - file locking, reject 2nd attempts until 1st instance completes |
| 6J1. | lockwait1 - wait until file not in use |
| 6K1. | Vancouver Utilities file lock tests for uvcopy,uvcp,uvsort,etc |
| - just 1 test shown of many in separate document uvlocks.htm |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Script 'mvsfiles5A' creates a "data file trace" report from subdir jcl2 (MVS JCLs with procs expanded). You can run the script using our demo JCLs (& then run with your own MVS JCL).
#1. Login mvstest1 --> /home/mvstest1
or Login yourself --> your homedir
#2. cdl --> $HOME/testlibs (alias cdl='cd $HOME/testlibs)
#3. mkdir xmvs <-- make subdir for temp files & final report
==========
#4. mvsfiles5A jcl2 xmvs <-- execute script to create report
====================
#5. vi xmvs/mvsfiles3 <-- inspect report
=================
mvsfiles53 - data file trace from MVS JCL - 2011/12/12 08:29:51 Jobname Step Program DDname MOD Gen Rcsz From To DSNname ================================================================================
jgl200 001 SORT SORTIN O GL.ACCOUNT.TRAN1 jgl200 001 SORT SORTOUT NCD +1 80 002 GL.ACCOUNT.TRANS_ jgl200 001 SORT SYSIN GL.PARMS(PGL200S1) jgl200 002 CGL200 GLTRANS O +1 001 GL.ACCOUNT.TRANS_ jgl200 002 CGL200 GLMSOLD O 0 GL.ACCOUNT.MASTER_ jgl200 002 CGL200 GLMSNEW NCD +1 80 GL.ACCOUNT.MASTER_
jgl330 001 IEBGENER SYSUT1 S 0 002 GL.ACCOUNT.MASTER_ jgl330 001 IEBGENER SYSUT2 NP 80 002 &&TEMPGLM jgl330 002 IDCAMS TEMPGLM OP 001 &&TEMPGLM jgl330 002 IDCAMS ACNTMAS NC +1 80 001 003 GL.ACCOUNT.MASTER_ jgl330 003 IEBGENER SYSUT1 S 0 002 GL.ACCOUNT.MASTER_ jgl330 003 IEBGENER SYSUT2 NP 80 &&TEMPGLM2
See details at MVSJCLtest.htm#4L1.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'JobFlow' reports are your guide to testing & debugging. They show you the programs & datafiles used in each step of each JCL/script. I recommend you print these out before you start your testing & debugging.
The JObFlow reports extract the essential info about each datafile in each step. The file info from the COBOL program is inserted onto the matching info from the JCL. The following items are shown for each file in each step.
jclfil53 ** JobFlow Report I/O files info ** 20100329 page#0001 stp# progname.cbl DDname genf OAM open recsz copybook.cpy data-file-name ============================================================================== jar200.ksh
0010 sort.cbl sortin ar/sales.items
sortout $JTMP/__tempsls
0010 uvsort fili1=typ=RSF,rcs=64, 64 $SORTIN
ar/sales.items
filo1=typ=RSF,rcs=64, 64 $SORTOUT
$JTMP/__tempsls
keys=(30,6,c,a,0,6,c,a),del1=10(2c):65,del1=10(2c):85"
0020 car200.cbl sysout $SYOT/${JOBID2}_${JSTEP}_${PROGID}
saledtl SS_ I___ 64 saledtl.cpy $JTMP/%sales.sortfile
custmas IR_ I___ 256 custmas.cpy ar/customer.master.indexed
sys035 S__ O___ 120 sdline.cpy $RPTS/salesrpt_E_car200_${JSTEP}_01
sysin $JTMP/${JSTEP}_${PROGID}
JCL/script 'jar200.ksh' is a 2 step job with a SORT & a COBOL program with 4 data files. See jar200.ksh listed at MVSJCL.htm#1D2.
The JobFlow reports are listed by 'uvlp12L' which allow for 120 characters wide on 8 1/2 x 11 Landscape. We have removed the JCL/script name from the left & scrunched up to fit this documentation.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Script 'jobflow5A' generates ALL jobflow reports. You must have run 'cobfiles5A' to load an Indexed file for lookup by jobflow5A to include COBOL file information on the jobflow report. You would not print ALL job flow reports because of high volume & subject to change as you test/debug.
I recommend you use 'jobflow51' to generate & print the jobflow report for any 1 JCL/script. Regen & reprint any time you make significant changes to during testing & debugging.
| Note |
|
#1. cobfiles5A cbls cpys maps <-- generate xref/cobfil51a & load xref/cobfil51I
========================= - run now if not already run on page '5C1'
#2. jobflow5A jcl3 <-- generate All JobFlow Reports
============== - recommend alternative jobflow51 (1 at a time)
#3. uvlpd12L jobflow <-- would print ALL reports in subdir jobflow/...
================ - Do *NOT* print ALL JobFlow reports
You probably do NOT want to print all jobflow reports, since the reports would be very long & many could go out of date before you use them. It is better to print the individual jobflow report just before you intend to start test/debug for each JCL/script.
You can re-generate the report for any 1 JCL/script using script 'jobflow51' (regenerate when ever you substantially modify the JCL/script).
#1. jobflow51 jcls/jar200.ksh <-- generate JobFlow report for 1 job only
=========================
#2. uvlp12L jobflow/jar200.io <-- print jobflow report for 1 JCL only
========================= (120 chars wide 8 1/2 x 11 Landscape)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Console logging is highly recommended (especially for production) since it captures everything that happens on the screen, including operator commands & replies to prompts. See console logging in ADMjobs.htm#Part_6.
But until you get console logging activated, you could use the joblog scripts to capture the console log for 1 job at a time.
These scripts are better for the programmers, because they capture the log for just the job being tested, and it is immediately available for inspection.
The console logging system ADMjobs.htm#Part_6 is better for production where you want to capture all commands & outputs for the entire batch shift.
#1. cdd <-- change to $TESTDATA superdir
#2. joblog1 jar100.ksh <-- use joblog1 to run script jar100.ksh
================== & capture console log in joblog/jar100.log
#3. uvlp12 joblog/jar100.log <-- print the log
========================
These scripts capture the JCL/script screen displays into a file using the unix/linux 'tee' command. The log filename is created by dropping the '.ksh' extension from the jobname & then appending '.log'.
You can see 'joblog1' listed at ADMjobs.htm#6S1. You can see all scripts in /home/uvadm/sf/IBM/...
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
If you have multiple programmers, you could setup testdata superdirs in homedirs of various programmers to prevent update conflicts.
Please see the profiles described on page '1A1' to understand this tip.
/p1 :-----testdata <-- RUNDATA=$TESTDATA=/p1/testdata : :-----ar - top-node subdirs for datafiles : :-----gl - OR all datafiles in 1 subdir (mstr below) : :-----py : :-----joblog - joblog1 script stores .log files here : :-----jobtmp - job temporary files : :-----mstr - master files : :-----rpts - reports : :-----sysout - COBOL DISPLAY upon SYSLST reports : :-----tape - tape files reassigned to disc by JCL converter : :-----tmp - misc temp files & sort work files : :-----wrk - work files (inter-step)
Here is how 'userx' might setup his own testdata superdir, copy all data files, & modify his profile to use the private version of testdata.
#2. mkdir testdata <-- make private testdata superdir
==============
#3. cp -r $TESTDATA testdata <-- copy all files from shared testdata
========================
#4. vi .bash_profile <-- edit profile to modify $TESTDATA
================
export TESTLIBS=$TESTLIBS
export TESTDATA=$TESTDATA <-- existing definitions in profile
export CNVDATA=$CNVDATA
export TESTLIBS=$TESTLIBS
export TESTDATA=$HOME/testdata <-- change ONLY TESTDATA def
export CNVDATA=$CNVDATA
#5a. exit <-- logoff
#5b. Login <-- log back on to activate new TESTDATA definition
#6a. echo $TESTDATA <-- verify change effective
#6b. cdd <-- alias cdd should not take you to $HOME/testdata
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'lastgenr' is a handy script to tell you the latest generation of a file, without having to go look. You can run from anywhere, without keying long pathnames.
'lastgenr' changes to $RUNDATA, so you must enter the filename relative to $RUNDATA, which usually would include 1 level of directory. For these mvstest/demos, RUNDATA=/home/mvstest/testdata, and the 'dtree' is as follows: ('dtree' is a script provided with the Vancouver Utilities that you may find convenient for your own documentation).
dtree /home/mvstest/testdata <-- create 'dtree' report ============================
/home/mvstest :-----testdata : :-----ar : : :-----customer.master : :-----gl : : :-----account.master_000001 : : :-----account.master_000002 : : :-----account.master_000003
| Note |
|
lastgenr gl/account.master_ <-- sample command for lastgenr ===========================
031018:100923: gfile=gl/account.master_000003 <-- resulting display ===========================================
'lastgenf' is similar, except it does not change to $RUNDATA. This allows you to display latest generation of any file, not just those in $RUNDATA, but you must enter the full pathname or relative pathname from your location.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'getEtime' is a script to display 'job times' for last run of any JCL/script that has been converted by the Vancouver Utility methods. It retrieves the data fields from the jobtimes file written by last run of the named JCL/script.
This script demonstrates how to retrieve data fields into environmental variables.
# getEtime - get Elapsed time from jobtmp file & display
# - by Owen Townsend, Feb 26/06
# Demos how to get data fields from a file into environmental variables
#
# JCL/scripts converted by Vancouver Utilities write elapsed time
# into a file $RUNDATA/jobtmp/$JOBID2 in the following format:
#
# 060226:165203:JAR100: Begin=16:52:03 End=16:52:03 Elapsed=00:00:00
# ==================================================================
#
#usage: getEtime JOBNAME
# ================
#
JTF=$RUNDATA/jobtmp/$1/jobtimes
#
if [[ ! -f $JTF ]]; then
echo "usage: getEtime JOBNAME <-- arg1 must be JOBID (in caps)"
echo " ================"
echo "example: getEtime JAR100"
echo " ==============="
exit 1; fi
#
# open file, read 4 data fields into 4 variables, & close file
exec 3< $JTF # open file descriptor #3
read -u3 jobstamp jobbgn jobend jobtime # read fields into variables
exec 3<&- # close file
echo "$jobstamp $jobbgn $jobend $jobtime" # display variables
#
#Note - above 4 lines could be replaced with just 'cat $JTF'
# - but this script demos how to capture data file fields into env-vars
# - to give you flexibility in how you use the data fields
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'scanjcl1' will scan a directory of JCL for a specified pattern & qualifier on any line of possible multi-line comma-continued JCL statements. Pattern & qualifier may be specified on command line arg1=...,arg2=... or at prompts if arg1/arg2 not coded on comamnd line.
| ex#1 |
|
uvcopy scanjcl1,fild1=jcl2,arg1=RECFM=V,arg2=SORTOUT ==================================================== - scan all JCLs in jcl2/* for 'RECFM=V' qualified by 'SORTOUT' pattern & qualifier anywhere on any 1 multi-line ,comma continued stmt - SAMPLE REPORT as follows:
scanjcl1 - scan directory of JCL for a specified pattern on JCL=... Dir: jcl2 pattern1: RECFM=V qualifier: SORTOUT optns: q1m99999 2013/02/24_17:47:41 ================================================================================ 0038 //SORTOUT DD DSN=N00P.EDI810.SORTED.INVOICES, DCB=(RECFM=VB,LRECL=246,BLKSIZE=0) 0059 //SORTOUT DD DSN=N00P.EDI810.SORTED.NSCADR, DCB=(RECFM=VB,LRECL=246,BLKSIZE=0) 0080 //SORTOUT DD DSN=N00P.EDI810.SORTED.NSCACR, DCB=(RECFM=VB,LRECL=246,BLKSIZE=0) 0003 jcl2/p300027d.jcl
0089 //SORTOUT DD DSN=N00P.DPGM063.BOFA.DAYACT.COPY, DCB=(RECFM=VB,LRECL=246,BLKSIZE=0) 0001 jcl2/p300042d.jcl
0077 //SORTOUT DD DSN=N00P.ORACLE.OUT820.BKUP(+1), DCB=(RECFM=VB,LRECL=726,BLKSIZE=0) 0144 //SORTOUT DD DSN=N00P.DPGM074.EDI820.SORT, DCB=(RECFM=VB,LRECL=246,BLKSIZE=0) 0002 jcl2/p300044d.jcl ** End Dir jcl2, with 55 files, 3 with 6 matches
uvcopy scanjcl1,fild1=jcl2,arg1=RECFM=V,arg2=SORTOUT,arg3=p300044d.jcl ====================================================================== - may specify arg3=... to scan 1 file (vs all in directory) - SAMPLE REPORT as follows:
scanjcl1 - scan directory of JCL for a specified pattern on JCL=... Dir: jcl2 pattern1: RECFM=V qualifier: SORTOUT optns: q1m9999 2013/02/24_17:47:41 ================================================================================ 0077 //SORTOUT DD DSN=N00P.ORACLE.OUT820.BKUP(+1), DCB=(RECFM=VB,LRECL=726,BLKSIZE=0) 0144 //SORTOUT DD DSN=N00P.DPGM074.EDI820.SORT, DCB=(RECFM=VB,LRECL=246,BLKSIZE=0) 0002 jcl2/p300044d.jcl ** End Dir jcl2, with 55 files, 3 with 6 matches
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy scanjcl1,fild1=jcl2,arg1=RECFM=V,arg2=SORTOUT,uop=m0
===========================================================
ex#3 - option m0 to report matching filenames & match counts only
- SAMPLE REPORT as follows:
scanjcl1 - scan directory of JCL for a specified pattern on JCL=... Dir: jcl2 pattern1: RECFM=V qualifier: SORTOUT optns: q1m0 2013/02/24_17:50:00 ================================================================================ 0003 jcl2/p300027d.jcl 0001 jcl2/p300042d.jcl 0002 jcl2/p300044d.jcl ** End Dir jcl2, with 55 files, 3 with 6 matches
Note - could use option 'm' to limit number of matching statements shown
- 'uop=m1' would show only 1st matching stmt for each file with matches
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is some code you can insert at the begining of your JCL/scripts to ensure that multiple instances of the same job will be queued to run serially. Also see alternate lockdemo2 which will reject 2nd attempts to run a job until the 1st instance completes.
#!/bin/bash # lockdemo1 - demo file locking, by Owen Townsend, UV Software, March23/2013 # - run under bash or sh, flock gives bad file descriptor in ksh # lockdemo1 - demo how to queue multiple instances of 1 job that must run alone # lockdemo2 - also see alternate demo to reject attempts to rerun until 1st ends # - demo as follows: # 1. mkdir locks OR rm -f locks/* <-- clear locks/... for clean demo # ============================ # 2. lockdemo1 & <-- 1st run in background (or run on alternate login/screen) # =========== # 3. lockdemo1 <-- then foreground, 2nd run lock waits for 1st run to end # ========= jobname=$(basename $0) # get name of this script for use as locks/lockfilename exec 9> locks/$jobname echo "$jobname PID $$ $(date +%y%m%d_%H%M%S)" >locks/$jobname.$(date +%y%m%d_%H%M%S) flock -x 9; echo "$jobname Begin PID $$ $(date +%y%m%d_%H%M%S)" sleep 15 # sleep 15 for demo, could do critical processing here that must run 1 at a time # - could insert above code at begin existing JCL/script application echo "$jobname END PID $$ $(date +%y%m%d_%H%M%S)" exit 0
--> lockdemo1 & <-- run#1 in background - OR run on another terminal
=========== - to simplify console displays
[1] 4486
--> lockdemo1 <-- run#2 in foreground
=========
lockdemo1 Begin PID 4486 130324_095529
lockdemo1 END PID 4486 130324_095539 <-- 1st lockdemo1 & ends
lockdemo1 Begin PID 4493 130324_095539 <-- 2nd lockdemo1 waits until 1st ends
lockdemo1 END PID 4493 130324_095549
[1]+ Done lockdemo1
--> ls -l locks <-- list files created in locks/...
===========
-rw-r--r-- 1 uvtest apps 0 Mar 24 09:57 lockdemo1 -rw-r--r-- 1 uvtest apps 33 Mar 24 09:57 lockdemo1.130324_095529 -rw-r--r-- 1 uvtest apps 33 Mar 24 09:57 lockdemo1.130324_095533
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is some code you can insert at the begining of your JCL/scripts to ensure 2nd attempts to run a job will be rejected, until the 1st instance completes. Also see the previous lockdemo1 that ensures multiple instances of the same job will be queued to run serially.
#!/bin/bash
# lockdemo2 - demo file locking, by Owen Townsend, UV Software, March23/2013
# - run under bash or sh, flock gives bad file descriptor in ksh
# lockdemo2 - demo how to reject attempts to rerun a job until 1st instance ends
# lockdemo1 - alternate demo queue multiple instances of job that must run alone
# - demo as follows:
# 1. mkdir locks OR rm -f locks/* <-- clear locks/... for clean demo
# ============================
# 2. lockdemo2 & <-- 1st run in background (or run on alternate login/screen)
# ===========
# 3. lockdemo2 <-- then foreground, 2nd run lock waits for 1st run to end
# =========
jobname=$(basename $0) # get name of this script for use as locks/lockfilename
exec 9> locks/$jobname
echo "$jobname PID $$ $(date +%y%m%d_%H%M%S)" >locks/$jobname.$(date +%y%m%d_%H%M%S)
#
if flock -n -x 9; then : # do nothing if no filelock
else echo "$jobname PID $$ rejected, prior instance already running"
exit 99
fi
echo "$jobname Begin PID $$ $(date +%y%m%d_%H%M%S)"
sleep 15
# sleep 15 for demo, could do critical processing here that must run 1 at a time
# - could insert above code at begin existing JCL/script application
echo "$jobname END PID $$ $(date +%y%m%d_%H%M%S)"
exit 0
--> lockdemo2 & <-- run#1 in background
===========
[1] 5001
lockdemo2 Begin PID 5001 130324_103700
--> lockdemo2 <-- run#2 in foreground
=========
lockdemo2 PID 5008 rejected, prior instance already running
lockdemo2 END PID 5001 130324_103710
[1]+ Done lockdemo2
--> lockdemo2 <-- run#3 (after run#1 completes)
=========
lockdemo2 Begin PID 5028 130324_103727
lockdemo2 END PID 5028 130324_103737
--> ls -l locks <-- list files created in locks/...
=========== - output omitted, similar to prior page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Prior lockdemo1/2 use 'flock' to set & test for file locks in the same script. 'lockwait1' will demo how you might test a locked file in a separate script. It can not use 'flock' which requires the 'file descriptor#' which can not be easily be determined in a separate script using only the filename. But we can use 'fuser' which determines if a file is 'in use' by anotehr process.
#!/bin/bash
# lockwait1 - demo wait on file in use by Owen Townsend, UV Software, Mar23/2013
# - 'fuser' will determine if specified file is in use by any process
# - sleep 10 seconds & retry until file is not in use
# - can add the code below to your JCL/script to wait on any file
# that must be closed before proceeding (could be a lock file)
# - could demo this code using the lockdemo1 job as follows
#
# 1. lockdemo1 & <-- creates locks/lockdemo1 & holds lock for 15 seconds
# ===========
# 2. lockwait1 locks/lockdemo1 <-- waits until locks/lockdemo1 no longer in use
# ========================= - then execute whatever code you might want
#
jobname=$(basename $0) # get name of this script for use as locks/lockfilename
file="$1"
if [[ ! -f "$file" ]]; then
echo "usage: lockwait1 filename"
echo " =================="
echo "example: lockwait1 locks/lockdemo1"
echo " ========================="
echo " - arg1 must be a filename"
exit 99; fi
#
fuser $file >/dev/null 2>&1 # initial test for file in use
status=$? # capture status 0 in use, 1 not in use
until [[ $status -ne 0 ]] # until file not in use
do echo "$jobname waiting 10 seconds to retry file in use: $file"
sleep 10
fuser $file >/dev/null 2>&1 # test for file in use
status=$? # capture status
done
echo "$jobname ended $(date +%y%m%d_%H%M%S), file not in use: $file"
exit 0
--> lockdemo1 & <-- run #1 lockdemo1 to create lock file
===========
[1] 5623
lockdemo1 Begin PID 5623 130328_111102
--> lockwait1 locks/lockdemo1 <-- run #2 lockwait1 to wait on lock file
=========================
lockwait1 waiting 10 seconds to retry file in use: locks/lockdemo1
lockdemo1 END PID 5623 130328_111117
lockwait1 ended 130328_111126, file not in use: locks/lockdemo1
[1]+ Done lockdemo1
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| Note |
|
Screen1: uvcopy waitSS1,fili1=dat1/fileS1,typ=RSFl0h0,filo1=dat2/fileS1
=====================***********==============================
uvcopy waitSS1 <-- can omit ,fili1=... defaults as shown above
Screen2: uvcopy waitSS2,fili1=dat1/fileS1,typ=RSFl0h1,filo1=dat2/fileS1
=====================***********==============================
uvcopy waitSS2 <-- can omit ,fili1=... defaults as shown above
- option 'h1' waits/retries every 10 seconds
Screen2a: uvcp fili1=dat1/fileS1,typ=RSFl0h1,rcs=40,filo1=dat2/fileS2
===========***********=====================================
- Alternate 'uvcp' (or 'uvsort') vs 'uvcopy'
- option 'h1' waits/retries every 10 seconds
Screen2b: uvcp fili1=dat1/fileS1,typ=RSFl0h0,rcs=40,filo1=dat2/fileS2
===========***********=====================================
- option 'h0' no wait, immediately rejected
UV lock options: l0=RD/WRlock, l1=RDlock, l8=NOlock, h0=NOwait, h1=wait
|<-------------------- UV SEQ INPUT ------------------------>
job1 | job2 lock options |
lock options | l0h0 | l0h1 | l1h0 | l1h1 | l8h0 | l8h1 |
==========================================================================
| | | | | | | |
| l0 |lock fail| waits |lock fail| waits | runs | runs |
| | | | | | | |
|-------------------------------------------------------------------
UV | | | | | | | |
SEQ | l1 |lock fail| waits | runs | runs | runs | runs |
INPUT | | | | | | | |
|-------------------------------------------------------------------
| | | | | | | |
| l8 | runs | runs | runs | runs | runs | runs |
| | | | | | | |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 7A1. | uvhd - file browse/search utility for mainframe type files that do |
| not have LineFeeds & may contain Packed/Binary data | |
| - the all time favorite tool in Vancouver Utilities | |
| - short demo here, fully documented in uvhd.htm. |
| 7B1. | uvhdcob - similar to uvhd, but also shows the COBOL copybook fieldnames |
| beside the data contents. Excellent for verifying data | |
| conversions. You can see at a glance any mismatches between | |
| the actual data fields & the COBOL field definitions. | |
| - short demo here, fully documented in uvhdcob.htm. |
| 7B2. | uvhdcob v - command to verify character, numeric,& packed data fields |
| 7B4. | uvhdc2 - script for easier use of uvhdcob |
| - using uvhdcob directly requires both datafilename & copybookname | |
| - uvhdc2 saves having to specify or know the copybookname | |
| - short demo here, fully documented in uvhdcob.htm. |
| 7C1. | uvcp - data file manipulation utility |
| - convert file types (text, fixed, variable, indexed, Micro Focus) | |
| - example given to correct files FTP'd from mainframe | |
| (drop off CR/LF added by FTP to ASCII to match COBOL fixed length) |
| 7D1. | uvcpF2L - script using uvcp to convert Fixed length records w/o LineFeeds |
| - to text files with LineFeeds inserted after last nonblank | |
| - makes it easier to use the 'uvcp' utility |
| 7D2. | uvcpL2F - script using uvcp to convert text files to Fixed length records |
| - use when you need to convert a text file for use in a mainframe | |
| type application that requires fixed length with no LineFeeds. |
| 7E1. | listrec2 - list fixed length records in 100 byte segments with scale |
| - any unprintable characters will be translated to periods | |
| - record length must be supplied since no LineFeeds present |
| 7E2. | listhex2 - list fixed length records in 100 byte segments with scale |
| - same as listrec2, but list records in vertical hexadecimal |
| 7F1. | listall2 - list subdir of multiple short files (such as parms subdir) |
| - multi files on 1 page saves a lot of paper |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 7G1. | CMPjobs - Data File Comparisons for mainframe type files |
| - fixed length, variable length,& Indexed files | |
| - originally for Y2K, now enhanced for mainframe conversions |
| 7G4. | uvcmp1all - script to compare ALL files in 2 directories, for example: |
| - comparing re-converted EBCDIC files to original mainframe | |
| files to verify conversions |
| 7H1. | gentest1 - Generate test data files |
| - based on COBOL copybooks |
| 7I1. | vtocr1 - create VTOC report for files converted from mainframe |
| - provides record counts, indexed keys, etc | |
| (information not displayed by the usual unix/linux tools) | |
| - see sample report & operating instructions in MVSDATA.htm |
| 7J1. | uvsort - provides most SYNCSORT features at a much lower price |
| - up to 60 input files & 20 output files | |
| - selects, deletes, reformats | |
| - options to drop duplicate keys, select duplicate keys, etc | |
| - unique option to start a new output file on key break |
| 7K1. | uvlist - to list text files (scripts, programs, etc) |
| - as a filter to remove control codes, multi-blanks, etc |
| 7L1. | uxcp - convert mainframe EBCDIC variable length (RDW format) |
| to ASCII variable length Indexed file for Micro Focus COBOL |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Use 'uvhd' to investigate mainframe type files that do not have linefeeds & cannot be displayed or printed by the usual UNIX utilities (vi, lp, etc). 'uvhd' will display records consecutively if you keep pressing enter. You can jump to & display any record in the file by entering the record#. You can search for desired records via specified search patterns anywhere in the record of restricted to specified columns.
#1. Login uvadm --> /home/uvadm
#2. uvhd dat1/custmas1 r256 <-- run uvhd specifying filename & recsize
======================= - displays 1st record & waits for command
r# 1 1 2 3 4 5 6
b# 0 0123456789012345678901234567890123456789012345678901234567890123
0 130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANA
3333332222454545444244545524542222233332445442544422222222224444
130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
64 IMO BC V9S1H1 604-754-5531 ........
4442222222222442535343222233323332333322222222222222222200000000
9DF00000000002306931810000604D754D55310000000000000000000000C000
128 .........W0....`........)X|..f3.....\.......................f...
0000000005300016000000002570063100095000000000000000000000016000
0C0000C0270C0540C0000C0098C0263C0444C0000C0000C0000C0000C0056C00
192 ...............................f.....<........f.C
0000008900000000880000000018000680001300000000694222222222222222
00C0026C0000C0023C0000C0083C0056D0012C0000C0016D3000000000000000
ar/customer.master fsz=8192 rsz=256 recs=32 current=1 null=next,r#=rec,b#=byte,+/-recs,s=search,u=update,p=print,w=write ,q=quit,?=help -->
#1. null entry <-- display next consecutive record
==========
#2. 9999 <-- display record #9999 (or goto EOF)
#3. -1 <-- backup 1 to see last record
See uvhd.htm in volume 2 of UVdoc for description of other commands - search, update, print, write (select records for test files).
The 'i' (immediate print) command is valuable to document data problems and assign to programmers for correction.
i9f3 <-- iprint next 9 records, 3 records per form(page) ====
See much more at uvhd.htm
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob displays data file field contents beside the copybook fieldnames. The command repertoire is similar to the previously discussed 'uvhd' (browse,search,update,print,write,drop,check-sequence).
See complete documentation at uvhdcob.htm. Here is a brief demo including the 'v' verify command, which is very useful for conversions.
Before you can run uvhdcob for a particular file, you must have run 'cobmap1' to convert the copybook for that file to the corresponding 'cobmap'. Page '5D2' shows you how to do this quickly & easily for all copybooks.
#1. cd /home/uvadm <-- change to uvadm for test files
==============
#2. uvhdcob dat1/custmas1 cobol/maps/custmas1 <-- try this now
=========================================
file=testdata/ar/customer.master lastmod=20030926:0856 record#=1 totalrecs=32 recsize=256 filesize=8192 fileptr=0 cobmap=maps/custmas today=20031018:1117 rec# 1 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 ar-custno 0 5 n 130140 002 ar-delete 6 9 003 ar-name 10 34 EVERGREEN MOTORS LTD. 004 ar-adrs 35 59 1815 BOWEN ROAD 005 ar-city 60 75 NANAIMO 006 filler001 76 76 007 ar-prov 77 78 BC 008 filler002 79 79 009 ar-postal 80 89 V9S1H1 010 ar-phone 90 101 250-754-5531 011 ar-contact 102 119 LARRY WRENCH 012 ar-thisyr-sales 012 120 124pns 001234567C 013 ar-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531 rec#=1 of 32,null=next,r#=rec,s=search,u=update,p=print,i=iprint,w=write ,t=tally,c=chkseq,e=exit to uvhd,q=quit,?=help --> q
The 'v' command will verify character, numeric,& packed data fields. Verify searches the file for unprintable characters in pic x fields & invalid digits or signs in unpacked or packed numeric fields.
We have provided a doctored version of dat1/custmas1 to test/demo uvhdcob. dat1/cm1_testuvhdcob has been updated (using uvhdcob) to create errors in record#s 10 & 20.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/cm1_testuvhdcob cobol/maps/custmas1 <-- run on test/demo file ================================================ - uvhdcob displays 1st record (not shown here) & prompts for command
--> v <-- search & Verify character,numeric,& packed fields
rec# 10 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 15468X 313534363858 <-BadN 002 cm-delete 6 9 003 cm-name 10 34 TAURUS RESOURCES 004 cm-adrs 35 59 1110 - 625 HOWE STREET 005 cm-city 60 75 VANCOUVER 006 filler001 76 76 007 cm-prov 77 78 B. 42EE <-BadC 008 filler002 79 79 009 cm-postal 80 89 V6C2T6 010 cm-phone 90 101 604 685 8565 011 cm-contact 102 119 MEL RAHAL 012 cm-thisyr-sales 012 120 124pns EE0123456C <-- Bad Packed 013 cm-lastyr-sales 012 180 184pns 000000000C 014 filler003 240 255 C 19980331
v --> 10 recs verified, 4 ERRs found in rec# 10, 1st at byte# 0
2 packed & 1 numeric bad signs/digits, 1 unprintables in char fields
--> vv <-- continue Verify
rec# 20 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 2343XX 323334335858 <-BadN 002 cm-delete 6 9 003 cm-name 10 34 TERRITORIAL REWIND 004 cm-adrs 35 59 BOX 1648 005 cm-city 60 75 WHITEHORSE 006 filler001 76 76 007 cm-prov 77 78 YK 008 filler002 79 79 009 cm-postal 80 89 Y1A... 593141EEEEEE <-BadC 010 cm-phone 90 101 403-512-3948 011 cm-contact 102 119 012 cm-thisyr-sales 012 120 124pns 000000000C 013 cm-lastyr-sales 012 180 184pns 1E2E3E4E5E <-- Bad Packed 014 filler003 240 255 20021130
vv --> 10 recs verified, 10 ERRs found in rec# 20, 1st at byte# 0
5 packed & 2 numeric bad signs/digits, 3 unprintables in char fields
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
In case you are interested, here are the 'update' commands we used to create the BAD data for the 'verify' command test/demo. We will omit the uvhdcob displays.
#1. uvhdcob dat1/cm1_testuvhdcob cobol/maps/custmas1 u <-- option 'u' for update
==================================================
#2. --> 10 <-- goto record# 10
#3a. --> u 5(1),'X' <-- create non-numeric data in numeric field (cust#) #3b. --> u 78(1),x'EE' <-- create unprintable data in character field (prov) #3b. --> u 120(1),x'EE' <-- create invalid digits in packed field (thisyr sales)
#3. --> 20 <-- goto record# 20
#4a. --> u 5(2),'XX' <-- create non-num data in numeric field (cust#) #4b. --> u 83(3),x'EEEEEE' <-- create unprintables in char field (province) #4b. --> u 180(5),x'1E2E3E4E5E' <-- create BAD data in packed field (lastyr sls)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob requires you to specify both the path to the data-file & the path to the 'cobmap'. This could be awkward since data & copybookmaps are usually in different file systems. The 'uvhdc2' script is provided to solve this problem. See the setup required in uvhdcob.htm. Once we have the control file setup, you only need to specify your data file name (no path names & you can run from anywhere).
uvhdc2 ar/customer.master <-- script 'uvhdc2' to run 'uvhdcob' from anywhere ========================= - without having to specify the copybook name
To appreciate the advantage, here is the equivalent 'uvhdcob', assuming you are in $RUNDATA & running the test/demo system provided, where RUNDATA=/home/mvstest/testdata & RUNLIBS=/home/mvstest/testlibs.
uvhdcob ar/customer.master $RUNLIBS/maps/custmas ================================================
This will get even worse, when you setup your own conversion Testing & Production systems. For example assuming your RUNLIBS & RUNDATA in your profile are:
export RUNLIBS=/p2/prodlibs =========================== export RUNDATA=/p2/proddata ===========================
Then the uvhdcob command could be specified as follows:
uvhdcob /p2/proddata/ar/customer.master /p2/prodlibs/maps/custmas =================================================================
Of course you could shorten it by using your RUNLIBS & RUNDATA symbols:
uvhdcob $RUNDATA/ar/customer.master $RUNLIBS/maps/custmas =======================================================
But using the 'uvhdc2' script is the shortest:
uvhdc2 ar/customer.master =========================
See the complete setup required for 'uvhdc2' in uvhdcob.htm#H1.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
You may need to convert text files to fixed if the data is input for a COBOL program expecting fixed length records (with no LineFeed terminators). Text records are terminated by LineFeeds LF=x'0A' or CarriageReturn+LineFeed CR+LF=x'0D0A'. Text records may vary in length since trailing blanks are usually omitted & the LineFeed inserted after the last nonblank. Text files on unix systems need only the LineFeed, but files from windows or mainframes may have both CR & LF. For our example we will show both.
BBQ010 BAR-B-Q CHR015 LAWN CHAIR HAM010 CLAW HAMMER HAM020 BALL PEEN HAMMER
uvhd dat1/products h2t <-- uvhd with 'h2' option to see the LineFeeds ====================== (option 't' tells uvhd to end records on x'0A')
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 BBQ010 BAR-B-Q.. <-- LineFeed shows as '.' on character line
445333222445242500 <-- note: zones & digits CR+LF=x'0D'+x'0A'
221010000212D2D1DA
- - - showing only 1st & 4th records to save space - - -
10 20 30 40 50 60
r# 4 0123456789012345678901234567890123456789012345678901234567890123
61 HAM020 BALL PEEN HAMMER..
444333222444425444244444500
81D02000021CC0055E081DD52DA
uvcp "fili1=dat1/products,typ=LST,rcs=256,filo1=tmp/products,typ=RSF,rcs=80" ============================================================================ - convert text file to fixed length 80 byte records with no CR/LF terminators
uvhd tmp/products h2r80 <-- uvhd with option h2 for hex display ======================= - option r80 for fixed record-size
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 BBQ010 BAR-B-Q
4453332224452425222222222222222222222222222222222222222222222222
221010000212D2D1000000000000000000000000000000000000000000000000
64
2222222222222222
0000000000000000
- - - showing only 1st & 4th records to save space - - -
r# 4 0123456789012345678901234567890123456789012345678901234567890123
240 HAM020 BALL PEEN HAMMER
4443332224444254442444445222222222222222222222222222222222222222
81D02000021CC0055E081DD52000000000000000000000000000000000000000
64
2222222222222222
0000000000000000
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcp "fili1=dat1/products,typ=LST,rcs=256,filo1=tmp/products,typ=RSF,rcs=80" ============================================================================ - convert text file to fixed length 80 byte records with no CR/LF terminators
If you FTP files from the mainframe in text mode, FTP translates to ASCII and appends CR+LF on the end of each record, as shown below using our 'customers' demo file. These records were fixed length 102 bytes on the mainframe with no LineFeeds. Here are the 1st 2 records shown by uvhd using option 'h2' for vertical hexadecimal display & option 't' to tell uvhd to look for LineFeeds x'0A' to terminate records.
uvhd dat1/customers h2t <-- uvhd display in hex using LF terminators =======================
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANA
3333332222454545444244545524542222233332445442544422222222224444
130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
64 IMO BC V9S1H1 604-754-5531..
4442222222222442535343222233323332333300
9DF00000000002306931810000604D754D5531DA
10 20 30 40 50 60
r# 2 0123456789012345678901234567890123456789012345678901234567890123
104 132588 GEECOE GENERATOR SERVICE UNIT 170 - 2851 SIMPSON RICH
3333332222444444244445454525455444254452333222333325445544225444
13258800007553F5075E5214F20352693505E9401700D02851039D03FE002938
64 MOND BC V6X2R2 604-278-4488..
4444222222222442535353222233323332333300
DFE40000000002306682220000604D278D4488DA
The problem is that the COBOL program on unix expects fixed 102 byte records so we need to drop off the extra 2 bytes (CR+LF) appended by FTP.
Please see the solution (via uvcp) on the next page --->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcp "fili1=dat1/customers,typ=LST,rcs=256,filo1=tmp/customers,typ=RSF,rcs=102" =============================================================================== - drop off CR/LF (created by FTP) & force output recsize = 102
uvhd tmp/customers h2r102 <-- uvhd with options h2=hex, r102=record-size ==========================
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANA
3333332222454545444244545524542222233332445442544422222222224444
130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
64 IMO BC V9S1H1 604-754-5531
44422222222224425353432222333233323333
9DF00000000002306931810000604D754D5531
10 20 30 40 50 60
r# 2 0123456789012345678901234567890123456789012345678901234567890123
102 132588 GEECOE GENERATOR SERVICE UNIT 170 - 2851 SIMPSON RICH
3333332222444444244445454525455444254452333222333325445544225444
13258800007553F5075E5214F20352693505E9401700D02851039D03FE002938
64 MOND BC V6X2R2 604-278-4488
44442222222224425353532222333233323333
DFE40000000002306682220000604D278D4488
Above we used uvcp to restore the record size to agree with the COBOL program.
We might consider changing the COBOL program to accept a text type file vs fixed length. Change ORGANIZATION in the SELECT clause as shown below:
ORGANIZATION RECORD SEQUENTIAL
ORGANIZATION LINE SEQUENTIAL
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Fixed length records without LineFeeds cannot be viewed or printed with the usual unix/linux utilities (vi,more,lp,etc). To these utilties, the file appears as 1 long line. Try the following:
#0. cd /home/uvadm <-- easy access to dat/... test/demo files
==============
#1. vi dat1/sales1 <-- try vi on a file w/o LineFeeds
==============
- the screen will be filled with data, but records are not distinct.
- and 'vi' will display --> noEOL, 1 Line, 1280 Chars
#2. uvhd dat1/sales1 <-- try uvhd
================
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 130140 21 940802 IN111001 HAM001 00002{ 0000001 00000002{
3333332222332333333244333333224443332233333723333333233333333722
130140000021094080209E1110010081D0010000002B00000001000000002B00
64 130140 21 940802 IN111001 SCR012 00002A 0001001 00002102A
3333332222332333333244333333225453332233333423333333233333333422
130140000021094080209E111001003320120000002100001001000002102100
128 139923 35 950802 IN111002 CHR001 00002B 0002001 00004402B
3333332222332333333244333333224453332233333423333333233333333422
139923000035095080209E111002003820010000002200002001000004402200
#3. uvcp "fili1=dat1/sales1,typ=RSF,rcs=64,filo1=tmp/sales1,typ=LSTt"
=================================================================
- use uvcp to convert file type from RSF (Record Seqntl Fixed)
- to LSTt (Line Seqntl Terminated)
- option 't' inserts the LF after the last nonblank
#4. vi tmp/sales1 <-- use vi to view the converted file (typ=LST)
=============
130140 21 940802 IN111001 HAM001 00002{ 0000001 00000002{
130140 21 940802 IN111001 SCR012 00002A 0001001 00002102A
139923 35 950802 IN111002 CHR001 00002B 0002001 00004402B
| Note |
|
See complete doc for uvcp at uvcp.htm
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| uvcpF2L |
|
| uvcpL2F |
|
We will repeat the previous page demo (#3), but using the 'uvcpF2L' script (instead of using the 'uvcp' utility directly).
#1. uvcpF2L dat1/sales1 64
======================
- convert file type from RSF (fixed no LFs) to LSTt (text with LFs)
- record-size must be specified as arg2
#2. vi tmp/sales1 <-- view the output (automatically stored in 'tmp' subdir)
=============
130140 21 940802 IN111001 HAM001 00002{ 0000001 00000002{
130140 21 940802 IN111001 SCR012 00002A 0001001 00002102A
139923 35 950802 IN111002 CHR001 00002B 0002001 00004402B
139923 35 950802 IN111002 TAB013 00002C 0003001 00006902C
The 'custmas1' file records are 256 bytes with name & address in the 1st 120 bytes & 24 * 5 byte packed decimal fields in bytes 120-239. You could use uvcpF2L optional arg3 to clear the packed fields so you could view/print the name & address portion. See the uvhd view of custmas1 on page '2D1'.
#1. uvcpF2L dat1/custmas1 256 'clr=120(136):0x20'
=============================================
#2. vi tmp/custmas1 <-- view output (always left in tmp subdir)
===============
130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANAIMO BC V9S1H1 250-754-5531 LARRY WRENCH 132588 GEECOE GENERATOR SERVICESUNIT 170 - 2851 SIMPSON RICHMOND BC V6X2R2 604-278-4488 HARRY LIGHT 139923 JOHNSTONE BOILER & TANKS 1250 EAST PENDER STREET VANCOUVER BC V5L1W1 604-320-1845GEORGE BROWN
Only the 1st 3 records (of 32) are shown.
See scripts uvcpF2L & uvcpL2F listed at uvcp.htm#T6 & uvcp.htm#T7
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'listrec2' will list fixed length records in 100 byte segments with scale. Replace any unprintable characters with periods ('.'s).
We will demo listrec2 & show the output report, using test/demo file: /home/uvadm/dat1/citytax1a - 128 byte records with packed field in 88-96.
cd /home/uvadm <-- change to the uvadm home directory ==============
uvcopy listrec2,fili1=dat1/citytax1a,uop=r128m5 <-- execute listrec2 =============================================== input=dat1/citytax1a - option 'r128' = Recsize, option 'm5' = Max recs to list - we also entered options below at prompt, redundant since on command line
uop=q1r100m10s1 - option defaults
r100 - record size default 100 bytes (max 5000)
r512 - example for rcsz 512 (add 1 if indexed)
m10 - list 10 records Max & end job
m99 - probably would not want to list high numbers
- "rop=c99" would be same (Run OPtion vs User OPtion)
- "rop=b99" could be used to Bypass records
s1 - space 1 (no space between records)
s2 - space 2 (leave 1 blank line between records)
User OPtion (uop) defaults = q1r100m10s1r128m5
null to accept or re-specify (1 or more) --> r128m5 <-- could enter options
tmp/citytax1a.lst = default filo01 - null accept or reenter ?
080107:213532:listrec2: EOF fili01 rds=5 size=1280: dat1/citytax1a
080107:213532:listrec2: EOF filo01 wrts=14 size=926: tmp/citytax1a.lst
EOJ, Output File written to: tmp/citytax1a.lst
enter command: vi,cat,more,lp,uvlp12,null --> uvlp12 <-- enter uvlp12 to print
listrec2 - list (100 bytes/line) file=dat1/citytax1a 2008/01/07_21:35:31
1 2 3 4 5 6 7 8 9 1
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
10130140 JOHN HENRY 1815 BOWEN ROAD VANCOUVER BCV9S1H1......W..... ....qq.000149061970530191809 10139923 GEORGE BROWN 1250 EAST PENDER STREET VANCOUVER BCV5L1W1......W..... ....xRL00014626q980601190156 10147615 BONNIE SMITH 44430 YALE ROAD WEST VANCOUVER BCV2P6J1.!9\..9b<... ....Q.L000037692950601201031 10149304 TONY TATTERSAL 3350 S.W. MARINE DRIVE VANCOUVER BCV6N3Y9.PYL..v..... .....9.000192503930601201512 10154688 MEL RAHAL 1110 - 625 HOWE STREET VANCOUVER BCV6C2T6......D..... ....%..000115479961126082351
See more at LISTjobs.htm#B2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'listhex2' will list fixed length records in 100 byte segments with scale. Same as 'listrec2', but lists in vertical hexadecimal, showing 3 lines per 100 byte segment (characters, zones, digits).
We will demo listhex2 & show the output report, using test/demo file: /home/uvadm/dat1/citytax1a - 128 byte records with packed field in 88-96.
cd /home/uvadm <-- change to the uvadm home directory ==============
uvcopy listhex2,fili1=dat1/citytax1a,uop=r128m2 <-- execute listhex2 =============================================== input=dat1/citytax1a - option 'r128' = Recsize, option 'm2' = Max recs to list - we also entered options below at prompt, redundant since on command line
uop=q1r100m10 - option defaults
r100 - record size default 100 bytes (max 5000)
r512 - example for rcsz 512 (add 1 if indexed)
- add 1 to recsize for Indexed/relative files
m10 - list 10 records Max & end job
m99 - probably would not want to list high numbers
- "rop=c99" would be same (Run OPtion vs User OPtion)
- "rop=b99" could be used to Bypass records
User OPtion (uop) defaults = q1r100m10r128m2
null to accept or re-specify (1 or more) --> r128m2 <-- could enter options
tmp/citytax1a.hex = default filo01 - null accept or reenter ?
080107:211714:listhex2: EOF fili01 rds=2 size=1280: dat1/citytax1a
080107:211714:listhex2: EOF filo01 wrts=17 size=985: tmp/citytax1a.hex
EOJ, Output File written to: tmp/citytax1a.hex
enter command: vi,cat,more,lp,uvlp12,null --> uvlp12 <-- enter uvlp12 to print
1 2 3 4 5 6 7 8 9 1
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
10130140 JOHN HENRY 1815 BOWEN ROAD VANCOUVER BCV9S1H1......W..... 3333333322444424445522222222222222233332445442544422222222225444455452222222222244535343088800588000 1013014000AF8E085E29000000000000000181502F75E02F14000000000061E3F56520000000000023693181029C0072C004 ....qq.000149061970530191809 8000770333333333333333333333 7C0111C000149061970530191809
10139923 GEORGE BROWN 1250 EAST PENDER STREET VANCOUVER BCV5L1W1......W..... 3333333322444544245454222222222222233332445525444452555445225444455452222222222244534353088800588000 101399230075F275022F7E0000000000000125005134005E45203425540061E3F5652000000000002365C171029C0072C004 ....xRL00014626q980601190156 8800754333333337333333333333 7C0182C000146261980601190156
See more at LISTjobs.htm#B2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'listall2' is a script to list a subdir of multiple short files. A great example is the 'parms' subdir commonly used by MVS COBOL shops to hold parameter files such as SORT keys, IKJEFT01 parms, etc.
You might list parms with 'uvlpd12' (see uvlist.htm#F1) which lists all files in a directory, but each file starts on a new page. For directories of short files (like parms/...), 'listall2' will save a lot of paper.
#1. cd /home/uvadm/mvstest/testlibs <-- cd to JCL convert dir with parms subdir
===============================
#2. listall2 parms <-- call script to list multiple short files
============== - creates report in tmp/parms
#3. uvlp12 tmp/parms <-- print report
================
file# 1 - mvstest/testlibs/parms/ikjdemo1 DSN SYSTEM(DB2P) RUN PROGRAM(CAR100) PLAN(IKJPROG1) LIB('MEPP.WXS91.LOADLIB') PARMS('parmsdata added on IKJEFT01 demo Aug28/07') END
file# 2 - mvstest/testlibs/parms/pap100s1 SORT FIELDS=(78,2,CH,A,61,15,CH,A,11,25,CH,A)
file# 3 - mvstest/testlibs/parms/pgl200s1 SORT FIELDS=(1,8,CH,A,69,12,CH,A)
file# 4 - mvstest/testlibs/parms/products BBQ010 BAR-B-Q CHR015 LAWN CHAIR HAM010 CLAW HAMMER HAM020 BALL PEEN HAMMER HAM035 JACK HAMMER SAW011 HAND SAW SAW012 RIP SAW SAW051 POWER SAW TAB012 LAWN TABLE
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# listall2 - list ALL files in a directory (of multiple small files)
# without page break between files (just space)
# - this script (listall2) calls uvcopy job 'listall2'
# listall2 - sorts files by filename
# listall1 - does not sort, lists in directory sequence
#
echo "list multiple small files without page breaks"
d="$1"
if [[ ! -d "$d" ]]; then
echo "usage: listall2 directory [m200] [.xxx] <-- arg1 must be a directory"
echo " ================= - arg2 may specify max lines/file deflt 200"
echo " - arg3 may qualify files to list"
echo "example: listall2 cblx m15 .err <--list .err files in cblx 15 linesmax"
echo " ===================="
exit 1; fi
#
# sort filenames for uvcopy job listall2
test -d tmp || mkdir tmp
ls $d >tmp/listallf
sort -o tmp/listallfs tmp/listallf
rpt=$(basename $d)
#
uvcopy listall2,fild1=$d,fili2=tmp/listallfs,filo1=tmp/$rpt,uop=q0i7$2,arg1=$3
#=============================================================================
exit
Above script 'listall2' calls uvcopy job 'listall2' (listed next 2 pages)
/home/uvadm/sf/util/listall2 <-- script stored in sf/util/...
/home/uvadm/pf/util/listall2 <-- uvcopy job stored in pf/util/...
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# listall2 - list All Files in Directory (or all files matching a pattern)
# - lists filename + file contents + space before next file
# - intended for multiple short files
# (example - control card library of SORT FIELDS, etc)
# - by Owen Townsend, Apr2004, Sep2011 sort by filenames
# listall2 - sorts files by filename
# listall1 - does not sort, lists in directory sequence
#
# ** example for directory 'parms **
# 1. ls parms >tmp/parms
# 2. sort -otmp/parmssorted tmp/parms
# 3. uvcopy listall2,fild1=parms,fili2=tmp/parmssorted,filo1=tmp/parmslist
# =====================================================================
# 4. uvlp12 tmp/parmslist <-- list report
#
# This uvcopy job intended to be called by script 'listall2'
# - which sorts filenames for this uvcopy job (fili2)
#
# listall2 parms <-- script 'listall2' to run uvcopy job 'listall2'
# ==============
#
opr='uop=m170p55 - option defaults'
opr=' m170 - max lines for any 1 file'
opr=' m30 - might reduce if you only want to see 1st few lines'
opr=' p55 - lines per page (newpage if current file would exceed)'
uop=q1m170p55 # user option defaults
rop=r1x1 # run option prompt report vi/cat/more/lp/etc
fild1=?parms,typ=DIR,rcs=80 #directory of small files
fili1=xxx,typ=LST,rcs=512 #current input file
fili2=tmp/listallfs,typ=LST,rcs=512 # sorted filenames
filo1=?tmp/$fild1,typ=LSTt,rcs=256 #output report file
@run
opn fild1 open input1 directory
opn fili2 open file of sorted filenames
opn filo1 open output file
msgwa1c 'enter a filename match pattern, or null for all files'
mvc c0(80),$arg1 save pattern in area 'c'
#
# begin outer loop to read directory for next filename
man10 get fili2,a0 get next filename in directory
skp> man80 if EOF, go execute sort
cmc c0(8),' ' any filename match pattern entered ?
skp= man20
scng4 a0(80),c0(50) scan for pattern match in filename ?
skp! man10
#
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# create input filename concatenate: dirname + '/' + filename
man20 clr f0(300),' '
mvu f100(80),$fild1,x'00' move dirname until ending null
cat f100(80),'/' append '/'
cata8 f100(80),a0(80) concat current filename (a8 null terms)
mvc $fili1,f100 store input filename before open
opn fili1 open input file
#
# use system cmd 'wc -l' to get lines in new file to see if it fits on this page
sysv1w3 'wc -l $fili1 '
mvn $ca2,$ci1
#
# skip to new page if current file > optn 'p' (55 lines)
# - or if current file would cause lines to exceed option 'p' (55 lines)
man30 cmn $ca3,$uopbp current file > 55 lines ?
skp> man34
mvn $ca4,$ca3 lines on current page
add $ca4,$ca2 + lines in new file
cmn $ca4,$uopbp will new file fit on current page ?
skp< man36
man34 put filo1,'*eject' no - insert *eject for uvlp12
mvn $ca3,0 - clear line count
# print filename before file contents
man36 add $ca1,1 count input files
mvfv1 h0(80),'file# $ca1 - $fili1'
put filo1,h0
add $ca3,1 +1 lines on current page
mvn $ca4,0 clear ctr for max lines test
#
# begin inner loop to list lines from current file
man40 get fili1,b0 get next input JCL line
skp> man60 (cc > at EOF)
put filo1,b0 list current line
add $ca3,1 count lines this page
add $ca4,1 count lines this file
cmn $ca4,$uopbm reached max lines option ?
skp< man40 return to get next line
#
#----------------------------------------------------------------------
# End of current input jcl file
# - print blank line between files
# - close current files & return to get next filename from indir
man60 cls fili1 close current input file
put filo1,' ' print blank line
add $ca3,1 +1 lines on current page
skp man10
#
#----------------------------------------------------------------------
# End of input directory - close files & end job
# - option r1 will prompt for report disposition (vi/cat/more/uvlp12)
man80 cls all
eoj
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
These jobs will compare data files that may have packed/binary fields.
We will demonstrate uvcmp1 on the following 2 pages using the test files shown below:
cust# prod# description purch-date expire-date price
1 2 3 4 5 6 7
01234567890123456789012345678901234567890123456789012345678901234567890
12345 12345 sony television 950101 1-year 960101 000002911 22222 00000 dish washer 960101 2-year 980101 000004922 33333 11111 refrigerator 961231 3-year 991231 000006733 33333 22222 air conditioner 970101 3-year 000101 000006744 44444 00000 freezer 970101 4-year 010101 000009955 55555 11111 clothes dryer 991231 5-year 041231 000055566 66666 00000 micro wave 001231 6-year 061231 000066677 88888 00000 HP computer 030101 3-year 070101 000129999
12345 12345 sony television 950101 1-year 960101 000002911 22222 00000 dish CRASHER 960101 2-year 980101 000004922 33333 11111 refrigerator 961215 4-year 001215 000005500 33333 22222 air conditioner 970101 3-year 000101 000006744 44444 00000 freezer 970101 4-year 010101 000009955 55555 11111 clothes SHRINKER 990615 6-year 051201 000066699 66666 00000 micro wave 001215 6-year 999999 000066677 88888 00000 HP computer 030101 3-year 070101 000129999
Note that we have created some intentional mismatches in the 2nd file.
The operating instructions are shown on the following page --->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy uvcmp1,fili1=dat1/warmas1,fili2=dat1/warmas1a,uop=r64 ============================================================
uop=q1a0b0c0d0e0f0g0h0p30r256s8t500000u3x2y0 - option defaults
a# - dsplcmnt to exclude field #1
b# - length to exclude field #1
c# - dsplcmnt to exclude field #2
d# - length to exclude field #2
e# - dsplcmnt to exclude field #3
f# - length to exclude field #3
g# - dsplcmnt to exclude field #4
h# - length to exclude field #4
n0 - print column scale only at begin report
n1 - print column scale for each record mismatch pair
p30 - line# to test overflow at begin record only
r256 - record size
s8 - StopPrint count, after s# mismatched records
t500000 - StopRead count, after s# mismats, else read to EOF
u1 - stop print at last segment with mismatch
u2 - inhibit printing all matching segments after 1st
x# - hex or char print (x1 char, x2 hex, x0 auto)
y0 - do NOT translate, file already ASCII, default(y0)
y1 - translate char lines to ASCII (for EBCDIC files)
User OPtion (uop) defaults = q1p30r256s8t500000u3x2y0r64
-->null to accept or enter/override --> r64 <-- enter record-size
==================== EOF or StopPrint/StopRead count reached ==============
File1Total=8, File2Total=8, StopPrint=8, StopRead=500000
File1Reads=8, TotalMisMatches=4, MisMatchesPrinted=4
090218:093752:uvcmp1: EOF fili01 rds=8 size=512: dat1/warmas1
090218:093752:uvcmp1: EOF fili02 rds=8 size=512: dat1/warmas1a
090218:093752:uvcmp1: EOF fild03 size=4096: rptcmp
090218:093752:uvcmp1: EOF filo03 wrts=53 size=3058: rptcmp/warmas1 hits=4
EOJ, Output File written to: rptcmp/warmas1
enter command: vi,cat,more,lp,uvlp12,null --> vi <-- enter vi to view rpt
See differences report listed on the next page --->
Note the response to the options prompt was 'r64', specifying the record sizes as 64 bytes. We specified the options twice here to emphasize their importance, once on the command line & again at the prompt (which would be redundant).
You could enter just 'uvcopy uvcmp1' & enter filenames & options at the prompts, but it is better to enter at least the filenames on the command line, so you can use the shell history if you need to repeat the command.
uvcopy uvcmp1 <-- will prompt for filenames & options if not on command =============
For uvcmp1 (intended for 1 pair of files at a time) you could wait for the prompt to specify options, but for uvcmp2/uvcmp3 it is usually advantageous to specify options on the command line & include the 'q0' option to disable the prompts for multiple files in the directory.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcmpFA1 uvcmp1 - compare 2 files, print mismatched records, '*' flag diffs
2007/12/12_12:01:35 uop=q1p30r256s8t500000v2x0y0z1q1r64
recsize reccount file-size typ Report=rpts/warmas1.cmp
1: 64 8 0 RSF File1=dat1/warmas1
2: 64 8 0 RSF File2=dat1/warmas1a
1 2 3 4 5 6
f#rec#byte# 0123456789012345678901234567890123456789012345678901234567890123
============================================================================
1 2 0 22222 00000 dish washer 960101 2-year 980101 000004922 .
3333323333326676276766722222223333332327667233333323333333332220
22222000000049380713852000000096010102D951209801010000004922000A
*******
2 2 22222 00000 dish CRASHER 960101 2-year 980101 000004922 .
3333323333326676245454452222223333332327667233333323333333332220
22222000000049380321385200000096010102D951209801010000004922000A
*******
1 3 0 33333 11111 refrigerator 961231 3-year 991231 000006733 .
3333323333327667666767672222223333332327667233333323333333332220
3333301111102562975214F200000096123103D951209912310000006733000A
** * ** ** ****
2 3 33333 11111 refrigerator 961215 4-year 001215 000005500 .
3333323333327667666767672222223333332327667233333323333333332220
3333301111102562975214F200000096121504D951200012150000005500000A
** * ** ** ****
1 6 0 55555 11111 clothes dryer 991231 5-year 041231 000055566 .
3333323333326667667267767222223333332327667233333323333333332220
5555501111103CF48530429520000099123105D951200412310000055566000A
******** **** * * * *****
2 6 55555 11111 clothes SHRINKER 990615 6-year 051201 000066699 .
3333323333326667667254544445223333332327667233333323333333332220
5555501111103CF485303829EB520099061506D951200512010000066699000A
******** **** * * * *****
1 7 0 66666 00000 micro wave 001231 6-year 061231 000066677 .
3333323333326667627676222222223333332327667233333323333333332220
666660000000D932F071650000000000123106D951200612310000066677000A
** ******
2 7 66666 00000 micro wave 001215 6-year 999999 000066677 .
3333323333326667627676222222223333332327667233333323333333332220
666660000000D932F071650000000000121506D951209999990000066677000A
** ******
======================= EOF or stop count reached ==========================
Total=000008,read=000008,mismatches=000004,stop=000008,term=500000
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is a good illustration of the usefulness of the 'uvcmp1all' script:
When we convert mainframe EBCDIC files to ASCII, we can verify the conversions by converting back to EBCDIC & comparing the re-converted EBCDIC files to the original mainframe files.
Here is the flowchart for generating & executing the jobs to convert data-files from EBCDIC to ASCII & back to EBCDIC. If interested see the operating instructions at DATAcnv1.htm#8C1. We are explaining this only as a good example of using the 'uvcmp1all' script to compare all files in 2 directories.
cpys -------> maps --------> pfx1 --------> pfx2 ---------> pfx3 -------> pfx4
cobmap1 uvdata51 uvdata52 copy/edit uvdata55
Main -----> d1ebc ----------> d2asc ----------> d3ebc --------> rptcmp frame FTP uvcopyxx 'pfx3/*' uvcopyxx 'pfx4/*' **uvcmp1all** mismatch rpts
#4. mkdir rptcmp <-- make subdir for mismatch reprots
============
#5. uvcmp1all d1ebc d3ebc <-- compare all original files to reconverted files
=====================
#6a. vi rptcmp/* <-- inspect all mismatch reports
===========
#6b. uvlpd12 rptcmp/* <-- print all mismatch reports
================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'gentest1' will create uvcopy jobs to generate test data files based on COBOL copybooks. For type X fields, we insert 'A's in 1st field, 'B's in 2nd, etc. For type 9 fields (packed or numeric), we insert the current record#. Every 10th record, we insert the copybook fieldnames (in type X fields).
The generated uvcopy jobs are named after the copybooks and they call sub- routines to generate data for each field. Each picture field in the copybook generates a 'bal' to a subrtn, depending on field type (type X, packed, binary, signed/unsigned numeric). For example:
bal genx,'a00035b0025','address' <-- sample call to subrtn =================================
This calls subrtn 'genx' for a type X field starting at byte 35 (option a00035) that is 25 bytes long (option b0025), whose fieldname is 'address'.
Here is a summary of the subrtns called & a description of the actions performed for the various field types:
| genx |
|
| gen9 |
|
| gens |
|
| genp |
|
| genb |
|
Calling subrtns keeps the generated uvcopy jobs short since most of the field processing code is in these sub-routines. The subrtn module is called via the following code, which you can see at the end of the sample job listed on the next page.
@pf2=gentest1.sub <-- code to include subfunctions in uvcopy jobs
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
cobmap1 start-end bytes for cobol record fields 200408220851 pg# 0001
cpys/citytax1 citytax1 RCSZ=00128 bgn end lth typ
* citytax1 copybook, from signscan1 + edit meaningful names
01 citytax1.
10 folio pic x(00010). 0000 0009 010
10 name pic x(00025). 0010 0034 025
10 address pic x(00025). 0035 0059 025
10 city pic x(00020). 0060 0079 020
10 province pic x(00002). 0080 0081 002
10 zip pic x(00006). 0082 0087 006
10 post-date pic s9(00007) comp-3. 0088 0091 004pns 7
10 land-value pic s9(00009) comp-3. 0092 0096 005pns 9
10 improv-value pic s9(00009) comp-3. 0097 0101 005pns 9
10 face-value pic s9(00009) comp-3. 0102 0106 005pns 9
10 maint-tax pic s9(00007)v99. 0107 0115 009 ns 9
10 purchase-date pic x(00006). 0116 0121 006
10 filler001 pic x(00006). 0122 0127 006
*RCSZ=00128 0128
opr='JOBNAME citytax1 - generated by cobmap1 & gentest1'
opr='uop=c100 - option "c" default record output count = 100'
opr=' - may change at prompt (ex: enter "c2000" for 2000 records)'
uop=q1c100 # option defaults
was=a9000b9000
filo1=?tmp/citytax1,rcs=00128,typ=RSF
@run
opn all
bal initj inits for job (setup A-Z 0-9 patterns)
# begin loop to generate fields & output each record
loop bal initr inits for record (counts records,etc)
clr b0(00128),' ' init output area to all blanks
# --- <-- insert R/T tests if redef records
bal genx,'a00000b0010','folio'
bal genx,'a00010b0025','name'
bal genx,'a00035b0025','address'
bal genx,'a00060b0020','city'
bal genx,'a00080b0002','province'
bal genx,'a00082b0006','zip'
bal genp,'a00088b0004','post-date'
bal genp,'a00092b0005','land-value'
bal genp,'a00097b0005','improv-value'
bal genp,'a00102b0005','face-value'
bal gens,'a00107b0009','maint-tax'
bal genx,'a00116b0006','purchase-date'
bal genx,'a00122b0006','filler001'
#
put1 put filo1,b0 output current record
cmn $ca1,$uopbc reached output Count ?
skp< loop
eof cls all
eoj
@pf2=gentest1.sub
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
1. uvcopy cobmap1,fili1=cpys/citytax1,filo1=maps/citytax1
======================================================
- convert the COBOL copybook into a 'cobmap' (record layout)
2. uvcopy gentest1,fili1=maps/citytax1,filo1=pfg1/citytax1
=======================================================
- generate the uvcopy job from the cobmap
3. uvcopy pfg1/citytax1,filo1=tmp/citytax1 <-- execute the generated job
=======================================
3a. uvcopy pfg1/citytax1 <-- same (output file defaults as shown above)
====================
| uop=c100 |
|
User OPtion (uop) defaults = q1c100 null to accept or re-specify (1 or more) --> c500 <-- may change default
tmp/citytax1 = default filo01 - null accept or reenter --> <-- null accept
citytax1:040823:105849: EOF filo01 0 rds, 100 wrts, 12800 size; tmp/citytax1
4. uvhd filename=tmp/citytax1 r128 <-- examine the output
===============================
Please see the 'uvhd' output display shown on the next page --->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is the 'uvhd' command repeated from the previous page, but with option 's7' added to space out the display to make it easier to read.
4. uvhd filename=tmp/citytax1 r128s7 <-- examine the output
=================================
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 folio name address city
6666622222666622222222222222222222266676772222222222222222226677
6FC9F00000E1D500000000000000000000014425330000000000000000003949
64 przip ...................000000001purchafiller
2222222222222222777672220001000010000100001333333333777666666667
000000000000000002A90000000C0000C0000C0000C00000000105238169CC52
10 20 30 40 50 60
r# 2 0123456789012345678901234567890123456789012345678901234567890123
128 AAAAAAAAAABBBBB000002BBBBBBBBBBBBBBCCCCC000002CCCCCCCCCCCCCCDDDD
4444444444444443333334444444444444444444333333444444444444444444
1111111111222220000022222222222222233333000002333333333333334444
64 D000002DDDDDDDDDEEFFFFFF...,....,....,....,000000002GGGGGGHHHHHH
4333333444444444444444440002000020000200002333333333444444444444
400000244444444455666666000C0000C0000C0000C000000002777777888888
10 20 30 40 50 60
r# 3 0123456789012345678901234567890123456789012345678901234567890123
256 AAAAAAAAAABBBBB000003BBBBBBBBBBBBBBCCCCC000003CCCCCCCCCCCCCCDDDD
4444444444444443333334444444444444444444333333444444444444444444
1111111111222220000032222222222222233333000003333333333333334444
64 D000003DDDDDDDDDEEFFFFFF...=....=....=....=00000000sGGGGGGHHHHHH
4333333444444444444444440003000030000300003333333337444444444444
400000344444444455666666000D0000D0000D0000D000000003777777888888
Please relate this output to the copybook & the rules listed previously:
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'gentestA' script is provided to make it easier to run the gentest1 utility. The script includes both the cobmap1 & gentest1 uvcopy jobs, reducing the operating instructions to 1 line:
gentestA citytax1 - generates uvcopy job --> pfg1/citytax1 =================
uvcopy pfg1/citytax1,filo1=tmp/citytax1 <-- execute the generated job =======================================
#1. uvcopyx cobmap1 cpys maps uop=q0i7p0 <-- create cobmaps for all copybooks
====================================
#2. uvcopyx gentest1 maps pfg1 uop=q0i7 <-- create data gen jobs for all maps
===================================
#3. uvcopyX 'pfg1/*' <-- execute all data generate jobs
================
You might want to generate all test data generation jobs as shown in #1 & #2 above, but it is unlikely you would want to execute all at once because they would be generated in the 'tmp' subdir & all default to 100 records.
The uvcopy code for gentest1 & gentest1.sub is not shown here or on the web site documentation, but if you have Vancouver Utilities installed, you may find the code as follows:
/home/uvadm/pf/IBM/gentest1 - uvcopy code to generate the uvcopy jobs
to generate the test data files from copybooks
/home/uvadm/pf/IBM/gentest1.sub - uvcopy code for the sub-routines called
by the generated uvcopy jobs
Note that the generated jobs would be in your sub-directories. If you had followed the recommended setup procedures this would be:
/home/cnvdata/pfg1/xxxxxx
Each of the generated jobs loads the subrtns via the code found on the last line of each generated job, which is:
@pf2=gentest1.sub <-- loads the subrtn code
The subrtns will be loaded from /home/uvadm/pf/IBM/gentest1.sub. If you want to modify the subrtns, you should 1st copy to your own 'pf' directory & place your directory ahead of the 'uvadm' pf directory in the PFPATH variable that uvcopy uses to load uvcopy job code. Do not modify in the uvadm pf directory, because any later update install of Vancouver Utilities would overwrite your modified code.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#1. login: ordr --> /p1/testlibs/ordr (login: apay,arcv,ordr,etc)
#2. l $RUNDATA relevant subdir --> /p2/proddata/ordr
#3a. uvcopy vtocr1,fild1=${RUNDATA}/ordr,filo1=tmp/vtocrpt <- defaults
=====================================================
#3b. uvcopy vtocr1 <-- same as above (defaults omitted)
=============
prompt indir --> <-- null for default
prompt reportfile --> <-- null for default
prompt vi/uvlp/etc --> uvlp12 <-- print at 12 cpi on default printer
or ($UVLPDEST)
#4. uvlp12 tmp/vtocrpt -dlaser1 - print report on desired printer
===========================
vtocr1 Directory: /p2/proddata/ordr 2000/06/02_10:58:48 options: q1a1r0s1k2 file# file-size rcsz records dels kloc klen last-modify filename
1 298,058,233 450+ 660,883 0 16 20000602 08:59 ipalacct
16 6n
2 64 63+ 1 0 23 20000602 08:59 ipaladjw
3 598,336 31+ 18,698 0 9 20000602 08:59 ipaldcal
4 4,480 31+ 140 0 4 20000602 08:59 ipaldtrm
4 4n
5 8,896 63+ 139 0 3 20000602 08:59 ipallcal
6 2,493,696 255+ 9,741 0 16 20000602 08:59 ipallnme
7 7,680 511+ 15 0 4 20000602 08:59 ipalmisc
8 68,171,008 255+ 266,293 0 9 20000602 09:25 ipalname
9 9n
18 16n
9 10,433,792 255+ 40,757 0 12 20000602 09:28 ipalnveh
12 8n
20 19n
10 11,332,728 3839 2,952 20000602 09:29 ipalprnt
11 14,592 127+ 114 0 4 20000602 09:30 ipalrate
12 9,472 255+ 37 0 2 20000602 09:30 ipalreas
13 43,008 255+ 168 0 6 20000602 09:30 ipalrept
14 12,032 63+ 188 0 15 20000602 09:30 iordrchd
15 6,336 63+ 99 0 13 20000602 09:30 iordrmss
16 94,807,040 255+ 370,340 0 12 20000602 09:37 iordrveh
12 8n
20 9n
29 19n
661,590,417 Total 4,092,054 0
See more at VTOCjobs.htm
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'uvsort' provides most SYNCSORT features at a much lower price.
There are many more features described in uvsort.htm.
uvsort "fili1=input,rcs=64,typ=RSF,filo1=output,typ=ISF,key1=0(6)" ==================================================================
There are many more examples shown in uvsort.htm.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvlist will list ascii text files (on stdout by default) but with the main intention of piping to a laser printer. Several scripts are provided. For example, this documentation is printed with 'uvlp12D', which prints at 12 cpi, DUPLEX, with margins to allow for 3 hole punched paper.
Many options are provided for laser printers, for example you can list 132 column reports on 8 1/2 width paper using the 'uvlp18' script which includes the option to print at 18 characters per inch.
uvlist will help you get organized & stay organized by allowing you to file your important listings in standard 8 1/2 x 11 3 ring binders & by ensuring that all listings have page headings that identify the file name & the last modification date.
Here are a few sample commands for uvlist, but uvlist is not usually run directly, but rather by using 1 of the many supplied scripts with convenient pre-defined options, such as 'uvlp12' (see below).
uvlist file [format-options] [HP laser-options] <-- command format ===============================================
uvlist filename <-- display file contents on the screen =============== - standard output is the default
uvlist file | lp <-- redirect output to the printer ================
uvlist file p60 c12m300 | lp <-- format options for 60 lines/page (dflt) ============================ laser options 12 cpi, margin 300/720"
uvlp12 file <-- same as above, uvlp12 script includes =========== these options & redirects to the printer
uvlp12 file b91e95 <-- same as above, with options to ================== begin on page 91 & end on page 95
You can see 'uvlp12' (& other scripts) listed begining at uvlist.htm#E1, But here is just the 1 essential line extracted from the script.
uvlist $1 p60z2$2 a2t1c12$3 | lp $UVLPDEST $UVLPOPTN #===================================================
You can see that $1 is the filename & $2/$3 are optional addons to the default options for the uvlp12 script. Note the 2 sets of options (format & laser). Your .profile should include 'export UVLPDEST="-dlp0"' to set the destination & 'export UVLPOPTN="-onobanner"' to set other desired options.
Please see many more options & examples documented in uvlist.htm.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Option 'y' prints a column scale in the page headings. This is a BIG help to determine the layout of mainframe records when no COBOL copybook is available.
For example, we will use option 'y80' to print an 80 byte column scale for test/demo file dat1/customers. We will also specify option 'e1' to End printing after 1 page (but in fact dat1/customers is only 8 lines).
uvlp12 dat1/customers e1y80 ===========================
/home/uvadm/dat1/customers now=081102:0911 uvadm pg# 1
1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANAIMO BC V9S1H1 139923 JOHNSTONE BOILER 1250 EAST PENDER ST. VANCOUVER BC V5L1W1 150825 RIGGERS INDUSTRIAL 960 - 6TH AVENUE HOPE BC V2P6J1 201120 ALLTYPE RENTAL LTD. BOX 1819 DRAYTON VALLEY AL T0E0M0 308685 FOOTHILLS ELECTRIC 3932 - 3A ST. N.W. CALGARY AL T2E6R4 315512 PARTS PLUS BOX 510 MAIN ST. THREE HILLS AB T0M2A0 400002 ACKLANDS LTD 945 -2ND AVE. PRINCE GEORGE BC V2L3A7 406082 PRECAM RENTALS LTD. 10116-94TH AVE. FORT ST. JOHN BC V1G5G6
The scale makes it easy to determine field start & end bytes:
cust# 01-06, name 08-29, address 31-52, city 54-69, province 71-72, zip 74-79.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Sometimes you encounter a file with a lot of blank lines & blank spaces within lines that make the listing longer than it needs to be & makes it difficult to read because lines wrap to multiple lines even though the data would fit on 1 line - if we could just compress the multiple blank spaces.
For example, the output of 'utmpdump' (utility to display reboots & logins) has many blank spaces that wrap lines. Here is the command to capture the output.
#1. utmpdump /var/run/utmp >/tmp/utmpdump1
======================================
[2] [00000] [~~ ] [reboot ] [~ ] [ ] [0.0.0.0 ] [Sun Sep 14 07:17:35 2008 PDT] [1] [20021] [~~ ] [runlevel] [~ ] [ ] [0.0.0.0 ] [Sun Sep 14 07:17:35 2008 PDT]
[7] [03935] [1 ] [root ] [tty1 ] [ ] [0.0.0.0 ] [Sun Sep 14 07:29:25 2008 PDT] [7] [03939] [2 ] [uvadm ] [tty2 ] [ ] [0.0.0.0 ] [Sun Sep 14 07:29:31 2008 PDT]
[7] [03940] [3 ] [uvbak ] [tty3 ] [ ] [0.0.0.0 ] [Sun Sep 14 07:29:37 2008 PDT] [7] [03951] [4 ] [uvext ] [tty4 ] [ ] [0.0.0.0 ] [Sun Sep 14 09:22:32 2008 PDT]
We can make the listing easier to read by using uvlist as follows:
#2. uvlist /tmp/utmpdump1 c9d1i1hp0 >/tmp/utmpdump2
===============================================
- option 'c9' reduces multi spaces within lines to 1 space
- option 'd1' reduces multi blank lines to 1 blank line
- options 'i1hp0' always when using uvlist as a filter
(to inhibit laser control codes, uvlist page headings,& FormFeeds)
#3a. vi /tmp/utmpdump2 <-- display compressed report with 'vi'
=================
#3b. uvlp12 /tmp/utmpdump2 <-- OR list with 'uvlp12', etc
=====================
[2] [00000] [~~ ] [reboot ] [~ ] [ ] [0.0.0.0 ] [Sun Sep 14 07:17:35 2008 PDT] [1] [20021] [~~ ] [runlevel] [~ ] [ ] [0.0.0.0 ] [Sun Sep 14 07:17:35 2008 PDT]
[7] [03935] [1 ] [root ] [tty1 ] [ ] [0.0.0.0 ] [Sun Sep 14 07:29:25 2008 PDT] [7] [03939] [2 ] [uvadm ] [tty2 ] [ ] [0.0.0.0 ] [Sun Sep 14 07:29:31 2008 PDT]
[7] [03940] [3 ] [uvbak ] [tty3 ] [ ] [0.0.0.0 ] [Sun Sep 14 07:29:37 2008 PDT] [7] [03951] [4 ] [uvext ] [tty4 ] [ ] [0.0.0.0 ] [Sun Sep 14 09:22:32 2008 PDT]
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We have already illustrated 'uvcp' on page '7C1'. 'uxcp' is a similar utility with the addition of the Micro Focus COBOL file handler to allow access to 'variable length indexed files'.
For mainframe conversions, you may need to transfer/convert variable length files from the mainframe to Unix/Linux. If the files have packed/binary fields, you will need to use the procedures documented in MVSDATA.htm which translate char fields, but preserve packed/binary fields, based on the COBOL copybooks.
Here in CNVaids.doc, we will show you how you can convert mainframe files without packed/binary fields, using a 1 line command to 'uxcp'. Variable length files should be unloaded from the mainframe file system to 'RDW' files for FTP to Unix/Linux.
uxcp "fili1=dir1/filex,typ=RDW,rcs=500,filo1=dir2/filex,typ=IDXf8v\ =================================================================== ,tra=0(500),isk1=0(10)" =======================
See much more in uxcp.htm
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 8A1. | Over 500 Pre-Programmed jobs are provided to perform mainframe conversions |
| a help you solve data file problems not possible with unix system utilities. |
| 8B1. | tabfix1 - tabs can cause problems, such as COBOL compile failures. |
| - Or maybe you want to reduce the default expansion of 8 to 4 | |
| so you can view/print the file without text on multiple lines. | |
| - tabfix1 converts tabs to a desired number of blanks (4 default). | |
| - alternative jobs (tabfix2 & tabfix3). | |
| tabfix2 - inserts blanks so next field at multiple of option t (default t4) | |
| tabfix3 - inserts blanks to place next field depending on tab rack |
| 8C1. | tolower - translate to lower case with options to inhibit translate within |
| single &/or double quotes, clear cols 1-6 &/or 73-80 (for COBOL). |
| 8D1. | toascii - translate EBCDIC files to ASCII with options to specify I/O |
| filenames, file types, record-sizes,& record translate areas |
| 8E1. | scand2 - scan all files in directory for patterns & qualifiers |
| - very useful to identify files that match multiple criteria | |
| - grep is great when you only need to scan for 1 pattern | |
| - scand2 scans for a primary pattern qualified by 1 or 2 patterns | |
| on same line & qualified by 1 or 2 patterns anywhere in the file. |
| 8F1. | scan3d - scan all files in a directory & select records to a report file |
| that lie between any 2 specified patterns (start/stop) & | |
| optionally qualified by a 3rd pattern that must be or must not | |
| be present between the 1st 2 patterns. |
| 8I1. | acum1 - pre-programmed job to accumulate any 1 field in any datafile |
| - might be for a hash total to prove file validity after conversions | |
| or to get a 2nd opinion when COBOL reports look suspicious | |
| - prompts for file-name, file-type, field dsplcmnt, length,& type, | |
| - option to crossfoot a number of consecutive same-size fields. |
| 8J1. | cmrpt1 - customer master sales report for test file dat1/custmas1 |
| (used to demo both acum1 above & selectf1 below) | |
| - report presented here, so you can verify your results | |
| if you run 'acum1' or 'selectf1'. |
| 8K1. | selectf1 - select records depending on field value <=> 2 specified values. |
| - prompts for field displacement, length, type, number, & values. | |
| - 2 values allows you to select a range of values in any 1 field. | |
| - option to crossfoot multi contiguous same size fields for test. |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 8L1. | scan5d - pre-programmed job to scan all files in a directory, searching |
| for exception files. You specify exception conditons in a control | |
| file of patterns & minimum/maximum counts. | |
| - example given to find COBOL programs with more than 1 | |
| 'PROCEDURE DIVISION' or with any (> 0) 'EXEC SQL's |
| 8M1. | splitjclproc1 - split subdir of mixed JCLs & PROCs to separate subdirs |
| - used to separate emailed zip files of mixed JCLs & PROCs | |
| - JCL conversion requires JCLs & PROCs in separate subdirs | |
| - demos uvcopy ability to read directories & process files |
| 8N1. | splitcblcpy1 - split mixed directories of COBOL programs & copybooks |
| to separate subdirs required by COBOL conversion & compile |
| 8O1. | scanjcl4varlth1 - scan all jcl in directory for variable length files |
| - looks for IDCAMS with different max & avg record-lengths |
| 8P1. | grepx1 - extract filenames from grep output, sort,& data reduce |
| to 1 line for multiple occurrences in same file | |
| - option to insert 'vi' prior to each filename in output file | |
| - saves typing when you need to investigate & possibly change | |
| - example given for mainframe COBOL conversion | |
| (may need to change 'accept from date' for unix COBOL) |
| 8X0. | Listings of a few of the uvcopy jobs used in Part_8 |
| 8X1. | splitjclproc1 - split subdir of mixed JCLs & PROCs to separate subdirs |
| 8X2. | splitcblcpy1 - split mixed directories of COBOL programs & copybooks |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Vancouver Utilities includes over 500 pre-programmed jobs written in 'uvcopy', which has almost unlimited power to perform whatever kind of data manipulation you may need to perform. Here in CNVaids.doc we will present a few examples & refer you to many other examples thruout the Vancouver Utility documentation.
'uvcopy' is essential for mainframe conversions, because it provides mainframe capabilities on unix/linux systems, that are not possible using the standard unix/linux system utilities, such as:
Here in Part_8 of CNVaids.doc, we will illustrate a few of the pre-programmed jobs that might be useful during conversions. For example see tabfix1 at '8B1' for an easy way to convert tabs to blanks. There are many more pre-programmed uvcopy jobs thruout the JCL, COBOL, & DATA conversion manuals.
The uvcopy language is based on the IBM 360/ZOS assembler instruction set, which means many mainframers will be familiar with it. Since it is interpretive, it gives you the power of assembly without the complexity. No compile required, easy to modify & rerun.
'uvcopy' provides the capabilities on unix/linux to replace various mainframe utilities such as IDCAMS, IEBGENER, FILEAID, EASYTRIEVE, QUIKJOB, etc.
'uvcopy' allows you to do anything on unix/linux systems that you could do on the mainframe - process packed decimal fields, Indexed files, variable length files, fixed length records without linefeeds, column addressing.
See over 90 uvcopy instructions documented at uvcopy3.htm. See many good examples of pre-programmed jobs at UVjobs1.htm Also see the uvcopy training guide at uvtrain.htm#Part_4.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'tabs' sometimes cause problems, for example tabs in COBOL programs cause compile failures. As a 2nd example, sometimes you want to reduce the default expansion of 8 to less (default 4), so you can view/print the file without the text expanding on to multiple screen lines or off the print page.
uvcopy utility job 'tabfix1' is an easy way to convert tabs to a desired number of blanks (4 default). Here is the test file we will use to demo tabfix1 or the alternative jobs (tabfix2 & tabfix3).
# tabtest1 - test file for uvcopy jobs tabfix1,2,3 to replace tabs with blanks
# - no of blanks inserted depends on option 't' (t1-t8, default t4)
# tabfix1 - inserts option t blanks (default t4) regardless of position
# tabfix2 - inserts blanks so next field at multiple of option t (default t4)
# tabfix3 - inserts blanks to place next field depending on tab rack
# - 'vi' or 'lp' will expand the tabs when you examine this file
# - the 2nd last line below has 1 tab between words & without expansion would
# appear as follows (using commas to represent the tabs):
a,bb,ccc,dddd,eeeee,ffffff,ggggggg <-- see below 'commas' replaced by 'tabs'
1 2 3 4 5
0123456789012345678901234567890123456789012345678901234
=======================================================
a bb ccc dddd eeeee ffffff ggggggg <-- tab x'09' delimited
=======================================================
uvhd tf/tabtest1 t <-- option 't' for text files (else 256 byte blocks) ================== - I added '*'s below to emphasize tabs x'09'
10 20 30 40 50 60
0123456789012345678901234567890123456789012345678901234567890123
a.bb.ccc.dddd.eeeee.ffffff.ggggggg.<-- tab x'09' delimited.
60660666066660666660666666066666660322276627233226666667660
19229333944449555559666666977777779CDD0412087097045C9D9454A
* * * * * * *
uvcopy tabfix1 <-- run tabfix1 to expand each tab to 4 blanks (default) ============== - copies all lines, but only relevant lines shown below
1 2 3 4 5
0123456789012345678901234567890123456789012345678901234
=======================================================
a bb ccc dddd eeeee ffffff ggggggg <-- tab x'09' delimited
=======================================================
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy tabfix1,fili1=tf/tabtest1,filo1=tmp/tabtest1,uop=t4 ========================================================== - demo default I/O files & options - you can run with your I/O files & desired option
uvcopy tabfix1 <-- may omit fili1,filo1,& uop to run the demo ============== - enter null to accept defaults (as shown above)
uop=t4 - option defaults
t4 - replace each tab with 4 blanks (t1-t8 allowed)
120403:110607:tabfix1: uvcopy ver=20120330 pf=/home/uvadm/pf/util/tabfix1
uvcopy LNX L64 license=20120330_99V_930630 site=UV_Software
User OPtion (uop) defaults = q1t4
-->null to accept or enter/override --> <--
tf/tabtest1 = default fili01 - null accept or reenter ?
tmp/tabtest1 = default filo01 - null accept or reenter ?
120403:110609:tabfix1: EOF fili01 rds=14 size=942: tf/tabtest1
120403:110609:tabfix1: EOF filo01 wrts=14 size=958: tmp/tabtest1
Here are suggested commands to inspect the Input/Output files (results omitted since already shown on previous page).
cat tf/tabtest1 - display input test file =============== - note tab expansion when displayed
uvhd tf/tabtest1 t - use hexdump utility to see tabs x'09' ================== - option 't' for Text files (respect LineFeeds)
cat tmp/tabtest1 - display output test file ================ - note tabs converted to 4 blanks
uvhd tmp/tabtest1 t - use hexdump to verify blanks x'20' =================== - option 't' for Text files (respect LineFeeds)
If you wished to convert all tabs in all files in a directory, you can use the 'uvcopyx' script to repeat tabfix1 for all files while copying from the input directory to an output directory. For example, if you wanted to convert tabs to 3 blanks on all scripts:
#1. mv scripts scripts.old <-- rename existing scripts subdir
======================
#2. mkdir scripts <-- remake subdir for tabfix output
=============
#3. uvcopyx tabfix1 scripts.old scripts uop=q0i7t3
==============================================
options 'q0i7' inhibit prompts & reduce console messages
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# tabfix1 - uvcopy Parameter File from UVSI stored in: /home/uvadm/pf/util/
# tabfix1 - convert tabs to blanks (1 to 8, depending on option t)
#
# uvcopy tabfix1,fili1=infile,filo1=outfile,uop=t4 <-- command format
# ================================================
# uvcopy tabfix1,fili1=tf/tabtest1,filo1=tmp/tabtest1 <-- demo defaults
# ===================================================
# uvcopyx tabfix1 indir outdir uop=q0i7t4 <-- uvcopyx script repeats for
# ======================================= all files in directory
#
opr='$jobname - convert tabs to blanks option t value 1-8'
opr='uop=t4 - option defaults'
opr=' t4 - replace each tab with 4 blanks (t1-t8 allowed)'
uop=q1t4 #<-- option defaults
fili1=?tf/tabtest1,typ=LST,rcs=256
filo1=?tmp/$fili1,typ=LSTt,rcs=256
@run
opn all
mvn $rt,$uopbt load rgstr t with option 't' (no of blanks desired)
# begin loop to copy records until EOF
loop get fili1,a0(256) get current record
skp> eof
mvc b0(256),a0 move input record to output area
#---------------------------------
rep b0(256),x'09',c0($rt8) replace any tabs with blanks ($rt value)
#---------------------------------
put filo1,b0(256) write record to output file
skp loop
# end of file - close files & end job
eof cls all
eoj
rep b0(256),x'0C',x'0A' replace FF with LF
=========================
tabfix2 - inserts blanks so next field at multiple of option t (default t4)
tabfix3 - inserts blanks to place next field depending on tab rack
vi pf/util/tabfix2
==================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
This job will translate any text file from UPPER to lower case with options to inhibit translation within single &/or double quotes, clear cols 1-6 &/or 73-80 (for COBOL).
uvcopy pf/tolower,fili1=tf/CAR101.cbl,filo1=tmp/CAR102.cbl ========================================================== - input file defaults to test/demo file shown above - do NOT specify output file, it defaults to input name in tmp/... subdir
uvcopy pf/tolower <-- may omit file (default as shown above) =================
tolower - copy a text file translating UPPER case to lower case
uop=q1b0f0o3u0 - default options - q1=prompt, o3=inhibit trl within quotes
q0 - inhibit uop prompt for option default change
b1 - blank out cols 1-6 (COBOL)
b2 - blank out cols 73-80 (COBOL)
b3 - blank out cols 1-6 & 73-80 (COBOL)
f1 - convert output filename to lowercase
o1 - inhibit translate within single quotes
o2 - inhibit translate within double quotes
o3 - inhibit translate within both single & double quotes
u1 - make first char of each word UPPER case
080325:083343:tolower: uvcopy ver=20080319 pf=/home/uvadm/pf/util/tolower
uvcopy DISAM ext=dat LNX LL64 LF64 license=20080319V site=UV_Software
User OPtion (uop) defaults = q1b0f0o3u0
null to accept or re-specify (1 or more) --> <-- NULL entry
tf/CAR101.cbl = default fili01 - null accept or reenter ?
080325:083343:tolower: EOF fili01 rds=11 size=869: tf/CAR101.cbl
080325:083343:tolower: EOF filo01 wrts=11 size=869: tmp/CAR101.cbl
EOJ, Output File written to: tmp/CAR101.cbl
enter command: vi,cat,more,lp,uvlp12,null --> <-- your choice
| Note |
|
uvcopy pf/tolower,fili1=tf/CAR101.cbl,uop=b3f1,filo1=tmp/car101.cbl =================================================================== - option 'b3' Blanks columns 1-6 & 73-80 - option 'f1' translates output filename to lower case (car101 vs CAR101)
uvcopy pf/tolower,uop=b3f1 <-- may omit file (defaults as shown above) ==========================
See test/demo I/O files for both runs on the next page --->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
000010 IDENTIFICATION DIVISION. CAR100 000020* CAR100 - TEST/DEMO MAINFRAME CONVERSION TO MICRO FOCUS COBOL CAR100 000030* - CUSTOMER N&A LIST WITH REPORT HDNG & DATE VIA ACCEPT CAR100 000040 PROGRAM-ID. CAR100. CAR100 000080 SELECT CUSTMAS ASSIGN CUSTMAS CAR100 000090 ORGANIZATION SEQUENTIAL ACCESS MODE SEQUENTIAL. CAR100 000140 FD CUSTMAS RECORD CONTAINS 256 CHARACTERS. CAR100 000150 01 CM1. COPY "CUSTMAS.CPY". CAR100 000220 01 PAGE-HDNGS. CAR100 000230 05 FILLER PIC X(40) VALUE CAR100 000240 'CAR100: CUSTOMER NAME & ADDRESS LIST '. CAR100
000010 identification division. car100 000020* car100 - test/demo mainframe conversion to micro focus cobol car100 000030* - customer n&a list with report hdng & date via accept car100 000040 program-id. car100. car100 000080 select custmas assign custmas car100 000090 organization sequential access mode sequential. car100 000140 fd custmas record contains 256 characters. car100 000150 01 cm1. copy "CUSTMAS.CPY". car100 000220 01 page-hdngs. car100 000230 05 filler pic x(40) value car100 000240 'CAR100: CUSTOMER NAME & ADDRESS LIST '. car100
identification division.
* car100 - test/demo mainframe conversion to micro focus cobol
* - customer n&a list with report hdng & date via accept
program-id. car100.
select custmas assign custmas
organization sequential access mode sequential.
fd custmas record contains 256 characters.
01 cm1. copy "CUSTMAS.CPY".
01 page-hdngs.
05 filler pic x(40) value
'CAR100: CUSTOMER NAME & ADDRESS LIST '.
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'toascii' will translate EBCDIC files to ASCII with options to specify I/O filenames, I/O file types, I/O record-sizes,& 2 translate areas (start byte & length).
As you know the Vancouver Utilities has comprehensive solutions for converting mainframe EBCDIC DATA files to ASCII based on the COBOL copybooks. See DATAcnv1.htm & MVSDATA.htm for the details of those advanced solutions that translate only the character fields & preserve the packed/binary fields that would be destroyed by translating the entire record.
This is a simple job that can be used to translate all character (pic x) records without the complexity of generating a conversion job based on the COBOL copybook (as described in DATAcnv1.htm or MVSDATA.doc').
'toascii' does provide options to specify 2 translate areas (start & length). This means you can protect the rest of the record from being translated, which would destroy packed/binary fields.
We will illustrate this using /home/uvadm/dat1/custmas0, an EBCDIC file of 256 byte fixed length records with character data in bytes 0-119, packed fields in bytes 120-240,& character data in 241-255 (which we will ignore). We will display the record using 'uvhd' since you can NOT use 'vi' on EBCDIC. Please see uvhd.htm if you are unfamiliar with the 'uvhd' utility.
uvhd dat1/custmas0 r256 <-- display fixed length 256 byte records ======================= - uvhd option 'r' specifies record size
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 ......@@@@.........@......@...K@@@@....@.....@....@@@@@@@@@@....
FFFFFF4444CECDCDCCD4DDEDDE4DEC44444FFFF4CDECD4DDCC4444444444DCDC
130140000055597955504636920334B000018150266550961400000000005151
64 ...@@@@@@@@@@..@......@@@@...`...`....@@@@@@@@@@@@@@@@@@........
CDD4444444444CC4EFEFCF4444FFF6FFF6FFFF44444444444444444400000000
946000000000023059218100006040754055310000000000000000000000C000
128 .........W0....`........)X|..f3.....\.......................f...
0000000005300016000000002570063100095000000000000000000000016000
0C0000C0270C0540C0000C0098C0263C0444C0000C0000C0000C0000C0056C00
192 .E|...V}.......................f.....<........f..@@@@@@@@@@@@@@@
047000570000000088000000001800068000130000000069C444444444444444
35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3000000000000000
'uvhd' displays 256 bytes on 4 sets of 3 lines (vertical hexadecimal), characters, zones,& digits. The character line shows '.'s for characters that are unprintable in ASCII. First byte is zone 'F' & digit '1' which is a numeric '1' in EBCDIC.
All the '@' characters are x'40' EBCDIC blanks. We see '@' signs because x'40' is an '@' in ASCII.
This first display illustrates that you can NOT read EBCDIC data on ASCII systems without translation options. On the next page we will rerun uvhd with option 'a' to translate the character line to ASCII.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhd dat1/custmas0 r256a <-- rerun uvhd adding option 'a' ======================== - to translate the character line to ASCII
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANA
FFFFFF4444CECDCDCCD4DDEDDE4DEC44444FFFF4CDECD4DDCC4444444444DCDC
130140000055597955504636920334B000018150266550961400000000005151
64 IMO BC V9S1H1 604-754-5531 ........
CDD4444444444CC4EFEFCF4444FFF6FFF6FFFF44444444444444444400000000
946000000000023059218100006040754055310000000000000000000000C000
128 .........W.....-.........X@..f.....m*.......................f...
0000000005300016000000002570063100095000000000000000000000016000
0C0000C0270C0540C0000C0098C0263C0444C0000C0000C0000C0000C0056C00
192 .E@...V'........c..............f..............f.C
047000570000000088000000001800068000130000000069C444444444444444
35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3000000000000000
Note that there are 24 * 5 byte packed fields in 120-240. You can identify the end of each packed field by the sign, x'_C' or x'_D'in the last byte. For example here is the 1st 8 bytes of last segment:
192 .E@...V' <-- character line
04700057 <-- zones line
35C0046D <-- digits line
^ ^ <-- '^' marks sign/end of each packed field
Translation would destroy packed fields, so we will use our options to specify translation only for 0-119 & 241-255 (see options c0d120e240f16 on the command line below).
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy toascii,fili1=dat1/custmas0,filo1=tmp/custmas0,uop=a256b256c0d120e240f16 =============================================================================== - copy EBCDIC file custmas0 from dat1/... to tmp/... translating to ASCII
uop=q1a256b256c0d256e0f0 - option defaults
a256b256 - I/O recsize defaults
c0 - field 1 dsplcmnt to start EBCDIC translate
d256 - field 1 length (defaults to entire record)
e0 - field 2 dsplcmnt to start EBCDIC translate
f0 - field 2 length (0 disables)
080325:212204:toascii: uvcopy ver=20080319 pf=/home/uvadm/pf/util/toascii
uvcopy DISAM ext=dat LNX LL64 LF64 license=20080319V site=UV_Software
User OPtion (uop) defaults = q1a256b256c0d256e0f0c0d120e240f16
null to accept or re-specify (1 or more) -->
dat1/custmas0 = default fili01 - null accept or reenter ? <-- default filename
RSF = typ default fili01 - null accept or enter new typ ? <-- default filetype
tmp/custmas0 = default filo01 - null accept or reenter ?
RSF = typ default filo01 - null accept or enter new typ ?
InRecSize (default 256) = 256, OutRecSize (default 256) = 256 <-- dflt recsize
field #1 bgn=0,lth=120, field #2 bgn=240,lth=16 OK ? y/n ---> y <-- enter 'y'
080325:212211:toascii: EOF fili01 rds=32 size=8192: dat1/custmas0
080325:212211:toascii: EOF filo01 wrts=32 size=8192: tmp/custmas0
uvhd dat1/custmas0 r256 <-- uvhd without option 'a' since now ASCII =======================
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}...f...
0000000005300016000000002570063100095000000000000000013570016000
0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0056C00
192 .E|...V}.......................f.....<........f.C 19950531
0470005700000000880000000018000680001300000000694233333333222222
35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
You can now see that bytes 0-119 & 240-255 have been translated to ASCII and bytes 120-239 (packed fields) have been preserved unchanged. Confirm it is ASCII by checking a few characters. For example the 1st byte '1' is x'31' (zone 3 digit 1) & the 10th byte 'E' is x'45' (zone 4 digit 5), etc. Compare bytes 192-199 to the uvhd on the previous page for the EBCDIC file:
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
scan2d is very useful when you need to identify files that match multiple criteria. 'grep' is great when you only need to scan for 1 pattern. 'scand2' scans for a primary pattern qualified by 1 or 2 patterns on same line & qualified by 1 or 2 patterns anywhere in the file. Major features are:
uvcopy scand2,fild1=indir,arg1=pattern,arg2=LineQual1,arg3=LineQual2,
,arg4=FileQual1,arg5=FileQual2,arg7=LineIgnore1,arg8=LineIgnore2
,arg9=commentID[,fild2=outdir]
=====================================================================
For example you might wish to find COBOL copybooks that have the combination of of packed fields & 'occurs depending on', since these require complex data file conversions. Run this demo from the Vancouver Utilities homedir as follows:
#1. Login uvadm --> /home/uvadm #2. mkdir tmp tmp1 <-- make output subdirs if not existing #2a. rm -f tmp/* tmp1/* <-- OR clear if output subdirs already exist #3. l cobol/cpys/ <-- list input copybooks (if you so desire)
#4. uvcopy scand2,fild1=cobol/cpys,arg1=comp-3,arg4u=depending_on,uop=c1w1
======================================================================
- arg1=comp-3 is primary search pattern (arg2,arg3 Line Qualifiers not reqd)
- arg4u=depending_on is 1st of 2 File Qualifiers (anywhere in the file)
- option 'u' of arg4u required when pattern contains blanks
(blanks coded as underscores & removed when stored for search)
#5a. vi tmp/cpys_comp-3_counts <-- inspect summary report
========================= - filenames only with match counts
#5b. vi tmp/cpys_comp-3_counts <-- inspect detail report
========================= - matching line contents
#5c. l tmp1/ <-- list filenames (copybooks) selected & copied to tmp1/...
======= - optional, specified via uop=w1
See report contents listed on the next page --->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#5a. cat tmp/cpys_comp-3_counts <-- list summary report
========================== - filenames only with match counts
arg1=comp-3,arg2=pic,,arg4=depending,,,,,,uops=q1c0l3f3w0c1w1 2 matching lines of 20 lines in: cobol/cpys/custran3 4 matching lines of 25 lines in: cobol/cpys/custran4 2 matching lines of 25 lines in: cobol/cpys/custran5 8 total matches on 747 total lines in 34 files
#5b. cat tmp/cpys_comp-3_counts <-- list detail report
========================== - matching line contents
00015 10 cmt-count pic s9(3) comp-3.
00019 15 cmt-tran-amt pic s9(7)v99 comp-3 occurs 4.
00016 10 cmt-trans occurs 0 to 5 depending on cmt-count.
(last line above = 1st match to File Qualifier arg4)
2 matching lines of 20 lines in: cobol/cpys/custran3
00015 10 cmt-count1 pic s9(3) comp-3.
00016 10 cmt-count2 pic s9(3) comp-3.
00020 15 cmt-tran1-amt pic s9(7)v99 comp-3 occurs 4.
00024 15 cmt-tran2-amt pic s9(7)v99 comp-3 occurs 4.
00017 10 cmt-trans1 occurs 0 to 5 depending on cmt-count1.
(last line above = 1st match to File Qualifier arg4)
4 matching lines of 25 lines in: cobol/cpys/custran4
00020 15 cmt-tran1-amt pic s9(7)v99 comp-3 occurs 4.
00024 15 cmt-tran2-amt pic s9(7)v99 comp-3 occurs 4.
00017 10 cmt-trans1 occurs 0 to 5 depending on cmt-count1.
(last line above = 1st match to File Qualifier arg4)
2 matching lines of 25 lines in: cobol/cpys/custran5
8 total matches on 747 total lines in 34 files
#5c. l tmp1/ <-- list filenames(copybooks) selected & copied to tmp1
======= - optional, specified via uop=w1
-rw-rw-r-- 1 uvadm apps 988 Apr 2 14:19 custran3
-rw-rw-r-- 1 uvadm apps 1261 Apr 2 14:19 custran4
-rw-rw-r-- 1 uvadm apps 1239 Apr 2 14:19 custran5
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#4. uvcopy scand2,fild1=cobol/cpys,arg1=comp-3,arg4u=depending_on,uop=c1w1
======================================================================
- arg1=comp-3 is primary search pattern (arg2,arg3 Line Qualifiers not reqd)
- arg4u=depending_on is 1st of 2 File Qualifiers (anywhere in the file)
- option 'u' of arg4u required when pattern contains blanks
(blanks coded as underscores & removed when stored for search)
- ',uop=c1w1' options on command line could be specified at prompt below:
(note option descriptions before prompt for entry (or override)
uop=q1c0l3f3w0 - option defaults
c0 - default not COBOL (do not use "*" col 7 as comment ID)
c1 - COBOL option for comment ID "*" column 7
l3 - default Line qualifier & 2 Present (if specified)
l1 - Line qual1 Present(if spcfd), Line qual2 Absent(if spcfd)
l2 - Line qual1 Absent(if spcfd), Line qual2 Present(if spcfd)
l0 - Line qual1 & 2 Absent (if spcfd)
f3 - default File qualifier & 2 Present (if specified)
f1 - File qual1 Present(if spcfd), File qual2 Absent(if spcfd)
f2 - File qual1 Absent(if spcfd), File qual2 Present(if spcfd)
f0 - File qual1 & 2 Absent (if spcfd)
w1 - Write matching files to output subdir (default tmp1/...)
User OPtion (uop) defaults = q1c0l3f3w0c1w1
-->null to accept or enter/override --> <-- enter/override options
enter arg3 Line qualifier2, null to inhibit
enter arg5 File qualifier2, null to inhibit
enter arg6 comment pattern: " #"(default)," *","/*",etc
120402:141944:scand2: EOF fili01 rds=8 size=355: cobol/cpys/acntmas
120402:141944:scand2: EOF fili01 rds=15 size=877: cobol/cpys/citytax1
120402:141944:scand2: EOF fili01 rds=36 size=1789: cobol/cpys/citytax2
120402:141944:scand2: EOF fili01 rds=15 size=692: cobol/cpys/cust1
120402:141944:scand2: EOF fili01 rds=15 size=700: cobol/cpys/custmas
----- 27 lines omitted -----
120402:141944:scand2: EOF fili01 rds=21 size=941: cobol/cpys/vendorpaymasx
120402:141944:scand2: EOF fili01 size=4096: cobol/cpys/warmas
120402:141944:scand2: EOF fili03 rds=34 size=300: tmp/cpys_files
120402:141944:scand2: EOF fild01 size=4096: cobol/cpys
120402:141944:scand2: EOF fild02 size=4096: tmp1
120402:141944:scand2: EOF filo01 wrts=5 size=280: tmp/cpys_comp-3_counts
120402:141944:scand2: EOF filo02 wrts=18 size=1122: tmp/cpys_comp-3_detail
enter y/n display matching COUNTS searching for comp-3 in cobol/cpys
enter y/n display matching COUNTS searching for comp-3 in cobol/cpys
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
As a 2nd example, we might want to scan MVS JCL (to be converted) to see if there are any 'INCLUDE's on SORT steps.
uvcopy scand2,fild1=mvstest/testlibs/jcl0,arg1=INCLUDE,arg4=SORT,arg9=//*,uop=w1 ================================================================================
arg1=INCLUDE,,,arg4=SORT,,,arg7=JOB,,arg9=//*,uop=q1c0l3f3w0w1 3 matching lines of 24 lines in: mvstest/testlibs/jcl0/SPLITSL1 2 matching lines of 16 lines in: mvstest/testlibs/jcl0/SPLITSL2 5 total matches on 860 total lines in 66 files
00019 OUTFIL FILES=1,INCLUDE=(31,6,CH,EQ,C'HAM001',OR,31,6,CH,EQ,C'HAX129',
00021 OUTFIL FILES=2,INCLUDE=(31,6,CH,EQ,C'CHR001',OR,31,6,CH,EQ,C'TAB013',
00023 OUTFIL FILES=3,INCLUDE=(3,2,BI,GT,5,2,BI,OR,1,2,BI,EQ,5,2,BI)
00002 //SPLITSL1 EXEC PGM=SORT
(last line above = 1st match to File Qualifier arg4)
3 matching lines of 24 lines in: mvstest/testlibs/jcl0/SPLITSL1
00014 OUTFIL FILES=(01),INCLUDE=ALL
00015 OUTFIL FILES=(02),INCLUDE=ALL
00002 //SPLITSL2 EXEC PGM=SORT
(last line above = 1st match to File Qualifier arg4)
2 matching lines of 16 lines in: mvstest/testlibs/jcl0/SPLITSL2
5 total matches on 860 total lines in 66 files
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'scan3d' is a pre-programmed job to scan a directory of text files aand create a report including the text lines between any 2 specified patterns, optionally qualified by a 3rd pattern which must be or must not be found between the lines containing the 1st 2 patterns.
For example, you might wish to check the JCL conversion of SORT steps. scan3d can select all SORT/uvsort steps from all JCL/scripts using the demo JCL/scripts provided in /home/uvadm/mvstest/testlibs/jcl3/...
We know all converted JCL/script steps start with '#1===', end with '#4---', and that SORT steps would have PGM=SORT in between.
#1============= begin step <-- all converted steps start like this ----- step init ------ # EXEC PGM=SORT <-- mainframe EXEC shown as #comment ----- converted code ----- #4============= begin step <-- all converted steps end like this
#1. Login uvadm #2. cd mvstest/testlibs
#3. uvcopy "scan3d,fild1=jcl3,filo1=tmp/sorts,arg1=#1===,arg2=#4---,arg3==SORT"
===========================================================================
- fild1=input_subdir, filo1=report, arg1=start, arg2=end, arg3=qualifier
- note 'arg3==' 2nd '=' could be '!' for not present
#3a. uvcopy scan3d <-- can omit args & will be prompted
=============
#3b. uvcopy "scan3d,fild1=jcl3,arg1=#1===,arg2=#4---,arg3==SORT"
===========================================================
- omitting output report defaults to filo1=tmp/$fild1_arg1pattern
See output report on next page:
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Job=scan3d scan files in Dir: jcl3 Selecting From: "#1===" To: "#4---" Qualified By: "=SORT" ====================================================== 2012/05/18_17:42:46
00015 #1======================= begin step#S0010 SORT ========================
00021 ##STEP010 EXEC PGM=SORT,REGION=2048K
00024 exportfile SORTIN data/ar.sales.items
00025 exportfile SORTOUT data/ar.sales.items.sorted append
00026 exportfile SYSIN $JTMP/${JSTEP}_${PROGID}_SYSIN
00027 cat > $SYSIN <</*
00028 SORT FIELDS=(31,6,CH,A,1,6,CH,A)
00029 OMIT COND=((11,2,CH,EQ,C'65'),OR,(COND=(11,2,CH,EQ,C'85'))
00030 /*
00031 logmsg2 "Executing--> uvsort \"fili1=$SORTIN,typ=RSF,rcs=64,filo1=$SORTO..."
00032 #3----------------------------------------------------------------------
00033 uvsort "fili1=$SORTIN,typ=RSF,rcs=64,filo1=$SORTOUT,typ=RSFa,rcs=64\
00034 ,keys=(30,6,c,a,0,6,c,a),del1=10(2c):65,del1=10(2c):85"
00035 #4----------------------------------------------------------------------
00075 21 selected from 75 @EOF: jcl3/jar205.ksh
00014 #1======================= begin step#S0010 SORT ========================
00020 ##STEP010 EXEC PGM=SORT,REGION=2048K
00023 exportfile SORTIN data/ar.sales.items
00024 exportfile SORTOUT $JTMP/__tempsls
00025 exportfile PARM200S $RUNLIBS/parms/parm200s
00026 exportfile SYSIN $JTMP/${JSTEP}_${PROGID}_SYSIN
00027 cat > $SYSIN <</*
00028 SORT FIELDS=(31,6,CH,A,1,6,CH,A)
00029 OMIT COND=((11,2,CH,EQ,C'65'),OR,(COND=(11,2,CH,EQ,C'85'))
00030 /*
00031 logmsg2 "Executing--> uvsort \"fili1=$SORTIN,typ=RSF,rcs=64,filo1=$SORTO..."
00032 #3----------------------------------------------------------------------
00033 uvsort "fili1=$SORTIN,typ=RSF,rcs=64,filo1=$SORTOUT,typ=RSF,rcs=64\
00034 ,keys=(30,6,c,a,0,6,c,a),del1=10(2c):65,del1=10(2c):85"
00035 #4----------------------------------------------------------------------
00075 22 selected from 75 @EOF: jcl3/jar200.ksh
====================================================== 2012/05/18_17:42:47
EOD: 00321 selects in 0013 files of 0066 total (04212 lines)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'acum1' is a pre-programmed 'uvcopy job' to accumulate any 1 field in any 1 file for any use desired (might be for a hash total to prove file validity after conversions, or to get a 2nd opinion when COBOL reports look suspicious).
'acum1' will prompt for file-name, file-type, field dsplcmnt, length,& type, with an option to crossfoot a specified number of consecutive same-size fields.
We will demonstrate using test file /home/uvadm/dat1/custmas1, a customer master file with monthly sales fields for this-year & last-year. Here is the uvhd display of the 1st record:
uvhd dat1/custmas1 r256s3 <-- run uvhd to display test file in hexadecimal
========================= - option 'r256' record size
- option 's3' space betwn 64 byte segments
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}...f...
0000000005300016000000002570063100095000000000000000013570016000
0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0056C00
192 .E|...V}.......................f.....<........f.C 19950531
0470005700000000880000000018000680001300000000694233333333222222
35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
You could enter just 'uvcopy acum1' (#1 below) & you would be prompted for file-name, file-type, field start, length,cross-foot, type,& record-size.
Or you could enter the file-name &/or all options (#2 & #3 below). Once you understand the options, it is agood idea to enter them on the command line, which allows you to repeat the command easily from your shell history.
#1. uvcopy acum1 <-- will prompt for filename, filetype,& all options
============ (field start, length, crossft, type, recsize)
#2. uvcopy acum1,fili1=dat1/custmas1
================================
- example options for dat1/custmas1 (relate uop=... to options below)
#3. uvcopy acum1,fili1=dat1/custmas1,uop=a120b5c12d2e2f0r256
========================================================
- example options for dat1/custmas1 (see options described below)
- output report will be written to tmp/dat1_custmas1_acum1
acum1 - acum any field for hash total, etc
file type options: LST(text), RSF(fixed,default), RDWz4, RDWz2, ISF, IDXf8
uop=a0b0c1d0e0f0r0 - default options
a0 - field dsplcmnt (zero relative)
b0 - field length (must specify)
c1 - cross-foot number of fields
c12 - example for 12 months sales
d0 - field type numeric unpacked
d1 - field type binary
d2 - field type packed
e0 - edit 0 decimals
e2 - edit 2 decimals
f0 - ASCII file
f1 - EBCDIC file
r0 - recsize if typ=RSF
090220:195505:acum1: uvcopy ver=20090212 pf=/home/uvadm/pf/util/acum1
uvcopy DISAM ext=dat LNX L64 license=20090212V site=UV_Software
User OPtion (uop) defaults = q1a0b0c1d0e0f0r0
-->null to accept or enter/override -->
field length uop=b1-b15 must be specified, job cancelled
====================================================================
acum1: dsplcmnt 120, length 5, occurs 12, recsize 256: dat1/custmas1
field total--> 99,697.93 records= 32
====================================================================
See the 'acum1' uvcopy job listed at UVjobs1.htm#T3
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
This report is presented here, so you can verify yor results with the preceding 'acum1' job & the following 'selectf1' job. You can run it as follows:
uvcopy cmrpt1,fili1-dat1/custmas1 <-- run the customer master sales report =================================
cust# customer-name telephone this-year <sales> last-year ============================================================================== 130140 EVERGREEN MOTORS LTD. 250-754-5531 21335.56 12152.55- 132588 GEECOE GENERATOR SERVICES 604-278-4488 434.98 640.04 139923 JOHNSTONE BOILER & TANKS 604-320-1845 73.98 453.20 142175 LILLY ELECTRIC (1973) LTD 604-534-9787 10761.58 .00 145264 D MAGRATH SUPPLIES LTD. 250-843-2987 .00 .00 147615 X O'CONNER R.V. CENTRE 604-858-4161 4478.00 8610.30 149304 POINT GREY GOLF & COUNTRY 604-732-5572 734.37 .00 150825 RIGGERS INDUSTRIAL 604-858-4729 75.70 173.25 152355 SHAW, JOHN 604-291-6261 424.48 .00 154688 TAURUS RESOURCES 604 685 8565 18338.09 766.96 157352 D WHYTE, W. 604-980-5434 .00 .00 173320 X ZENITH TRANSPORT 604-520-3979 1420.00 .00 201120 ALLTYPE RENTAL LTD. 403-246-5274 228.01 1765.10 204700 CASE POWER EQUIPMENT 403-538-1743 1318.41 427.54 208060 E&L TRUCKING 403-231-7312 17.39- 1534.06 211140 D FORD NEW HOLLAND 403-312-2760 .00 .00 223240 X NICHOLSON CHEVROLET LTD. 403-467-4257 6148.45 3246.38 224700 OTTO MOBILES WESTERN LTD. 403-467-3197 13959.90 24673.59 231550 SPARROW ELECTRIC CO. LTD. 403-742-6139 5725.00 1742.59 234300 TERRITORIAL REWIND 403-512-3948 4901.21 .00 237286 WEBER, TOM 403-529-7425 1000.00- 849.88 301120 D ALBERTA GAS CHEMICALS LTD 403-952-2475 .00 .00 306959 X 356582 ALBERTA LTD. - - 138.98 412.97 308685 FOOTHILLS ELECTRIC 403-296-4856 270.33 43.41 313720 MONITREX ENGINEERING LTD 2256.02 2427.49 315512 PARTS PLUS 403-385-7134 340.52 .00 318833 TOP NOTCH CONSTRUCTION 403-385-2965 485.25 390.89 400002 ACKLANDS LTD 250-705-2583 1737.25 3198.49 401210 COAST RANGE CONSTRUCTION 604 681 2626 4966.28 .00 402875 HULL, DON & SONS LTD. 250-836-2964 44.50 1196.72 403887 D MILNER, LARRY 250-351-9472 66.01 4432.47 406082 PRECAM RENTALS LTD: 250-637-6351 52.46 608.06
cmrpt1 2009/02/21_07:37:05 summary table by territory dat1/custmas1
tbl#001 pg#001 -argument- -acum#1- % -acum#2- %
line# count % territory thisyr sales lastyr sales
1 12 37 1 58,076.74 58 1,508.80- 3-
2 9 28 2 31,263.59 31 34,239.14 75
3 6 18 3 3,491.10 3 3,274.76 7
4 5 15 4 6,866.50 6 9,435.74 20
32*100 *TOTAL* 99,697.93 *100 45,440.84 *100
See the 'cmrpt1' uvcopy job listed at UVjobs1.htm#U2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'selectf1' is a uvcopy pre-programmed job to select records from any file depending on the value in any specified field <=> 2 specified values. Two specified values allows you to select a range of values in any 1 field. There is an option to crossfoot multi contiguous same size fields for the test value.
Here is a sample command to select sales records with this-year sales over $50.00 OR less than -50.00. Please see the preceding customer sales report on page 'U1' to verify the selections made here. Also see the record layout on page 'T1'.
uvcopy selectf1,fili1=dat1/custmas1,uop=a120b5c12f0,arg1='>5000',arg2='|<-5000' ===============================================================================
uop=a0b0c1d0e0f0r0 - default options
a0 - field dsplcmnt (zero relative)
b0 - field length (must specify)
c1 - cross-foot number of fields
c12 - example for 12 months sales
d0 - field type numeric unpacked
d1 - field type binary
d2 - field type packed
f0 - ASCII file
f1 - EBCDIC file
r0 - recsize if typ=RSF
uop=a120b5c12d2f0 - EX: field dsp 120, lth 5, packed(c2), ASCII(f0)
arg1='>500',arg2='|<-500' <-- select recs > 5.00 OR <-5.00 in 120(5p)
arg1='=0',arg2='_' <-- select records with thisyr sales zero
arg2='&/|' - else 1st byte must be &/| AND/OR
arg2='&/|</=/>' 2nd byte must be <=>
note - conditions &| <=> values must be in SINGLE quotes (not doubles)
- if entered on command line (not if entered at the prompt)
User OPtion (uop) defaults = q1a0b0c1d0f0r0a120b5c12d2r256 -->null to accept or enter/override --> <-- enter null (accept cmnd line optns)
dat1/custmas1 = default fili01 - null accept or reenter ? RSF = typ default fili01 - null accept or enter new typ ? tmp/dat1_custmas1_sel = default filo01 - null accept or reenter ? RSF = typ default filo01 - null accept or enter new typ ?
15 records selected via >50000 & |<-50000 090221:153134:selectf1: EOF fili01 rds=32 size=8192: dat1/custmas1 090221:153134:selectf1: EOF filo01 wrts=15 size=3840: tmp/dat1_custmas1_sel
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvcopy selectf1,fili1=dat1/custmas1,uop=a120b5c12f0,arg1='>5000',arg2='|<-5000' ===============================================================================
See the 'selectf1' uvcopy job listed at UVjobs1.htm#V3
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'scan5d' is a pre-programmed uvcopy job that will scan all files in a directory, searching for exception files. You specify the exception conditons in a control file of patterns & min/max pattern counts.
For our example, we will scan a directory of COBOL programs, searching for patterns & counts that will identify what we consider to be exceptions. We expect most programs to have 1 'IDENTIFICATION DIVISION', 1 'PROCEDURE DIVISION', etc. More than 1 of these would indicate 1 file with multiple programs, which is very unusual & would be problem for out COBOL conversions.
We will also specify as 'LINKAGE SECTION' & 'EXEC SQL' as exceptions, by sepcifying 0 for min/max counts.
The default options report only the exception files, but we have specified user option 'a1' to report all files, since our directory contained only 14 programs. Without option 'a1' we would report only 3 programs as indicated by the '*' in the report below:
Job: scan5d Dir: cbl0 Table: ctl/cobolxcptn.tbl Date: 2009/11/04_12:56:54 Uops: q1a0c0a1c2 ======================================= min41-48 max51-58 identification division~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ input-output section~~~~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ working-storage section~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ procedure division~~~~~~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ linkage section~~~~~~~~~~~~~~~~~~~~~~~~00000000~~00000000~~~~~~~~~~~~~~~~~~~~~~ exec sql~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~00000000~~00000000~~~~~~~~~~~~~~~~~~~~~~ ================================================================================ 0001 0030 CAR101.cbl 1,1,1,1,0,0, 0002 0062 * sqlora2.cbl 1,1,1,1,0,9, 0003 0019 CAR300.cbl 1,1,1,1,0,0, 0004 0045 CAR150.cbl 1,1,1,1,0,0, 0005 0045 CAR130.cbl 1,1,1,1,0,0, 0006 0063 * sqlora1.cbl 1,1,1,1,0,8, 0007 0052 TESTUNIX1.cbl 1,1,1,1,0,0, 0008 0046 CGL100.cbl 1,1,1,1,0,0, 0009 0041 CAR100.cbl 1,1,1,1,0,0, 0010 0047 * CAR120.cbl 1,1,1,1,1,0, 0011 0045 CAR140.cbl 1,1,1,1,0,0, 0012 0052 CAR200.cbl 1,1,1,1,0,0, 0013 0052 CGL200.cbl 1,1,1,1,0,0, 0014 0037 CPY100.cbl 1,1,1,1,0,0, ================================================================================ Total files=14, Lines=636, Counts=14,14,14,14,1,17,
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here is how we created the exception file that was read by 'scan5d' to create the COBOL exception report shown above.
We used the demo COBOL programs supplied in /home/uvadm/mvstest/testlibs/cbl0/. We setup userid 'mvstest' as documented in MVSJCL.htm or MVSCOBOL.htm, & cpoied testlibs/* over there. You could copy testlibs/* to your homedir.
#1. Login mvstest (or yourself if you copied testlibs/* to your homedir)
#2. cdl --> $TESTLIBS (alias cdl='cd $TESTLIBS')
#3. vi ctl/cobolxcptn.tbl <-- create exception control file
=====================
# cobolxcptn.tbl - sample search table for uvcopy job 'scan5d' # - scan COBOL programs for exceptions <> expected pattern counts # - report programs with < 1 or > 1 of each of following DIVISIONs & SECTIONs # - report programs with any LINKAGE section or any 'EXEC SQL's # --- pattern col 01-40 --- min41-48 max51-58 identification division~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ input-output section~~~~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ working-storage section~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ procedure division~~~~~~~~~~~~~~~~~~~~~00000001~~00000001~~~~~~~~~~~~~~~~~~~~~~ linkage section~~~~~~~~~~~~~~~~~~~~~~~~00000000~~00000000~~~~~~~~~~~~~~~~~~~~~~ exec sql~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~00000000~~00000000~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| note |
|
#4. uvcopy scan5d,fild1=cbl0,fili2=ctl/cobolxcptn.tbl,filo3=tmp/cbl0.rpt
====================================================================
- create COBOL exception report (shown on prior page)
#5a. vi tmp/cbl0.rpt <-- view exception report
===============
#5b. uvlp12 tmp/cbl0.rpt <-- print exception report
=================== - see listing on prior page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Another example might be to analyze JCLs to determine if certain programs are being executed. I used the following table on the mvstest demo JCLs:
#3. vi ctl/JCLxcptn.tbl <-- create control file to analyze JCL
=================== for desired program EXECutions
# JCLxcptn.tbl - determine frequency of following program executions in JCLs # --- pattern col 01-40 --- min41-48 max51-58 EXEC PGM=IKJEFT01~~~~~~~~~~~~~~~~~~~~~~00000000 00000000 EXEC PGM=FTP~~~~~~~~~~~~~~~~~~~~~~~~~~~00000000 00000000 EXEC PGM=MAIL~~~~~~~~~~~~~~~~~~~~~~~~~~00000000 00000000 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#4. uvcopy scan5d,fild1=jcl0,fili2=ctl/JCLxcptn.tbl,filo3=tmp/jcl0.rpt
====================================================================
#5. cat tmp/JCLxcptn.tbl <-- display report
====================
Job: scan5d Dir: jcl0 Table: ctl/JCLxcptn.tbl Date: 2009/11/03_05:38:36 Uops: q1a0c0 ======================================= min41-48 max51-58 EXEC PGM=IKJEFT01~~~~~~~~~~~~~~~~~~~~~~00000000 00000000 EXEC PGM=FTP~~~~~~~~~~~~~~~~~~~~~~~~~~~00000000 00000000 EXEC PGM=MAIL~~~~~~~~~~~~~~~~~~~~~~~~~~00000000 00000000 ================================================================================ 0015 0007 * IKJEFT01.jcl 1,0,0, 0023 0013 * FTPGET1.jcl 0,1,0, 0026 0011 * FTPDEMO1.jcl 0,1,0, 0031 0007 * MAILDEMO.jcl 0,0,1, 0032 0010 * FTPDEMO2.jcl 0,1,0, 0040 0009 * FTPPUT1.jcl 0,1,0, ================================================================================ Total files=54, Lines=691, Counts=1,4,1,
Create your own exception table to analyze whatver problem you can think of. Using the pre-programmed jobs is easy, all you have to do is edit a simple text file. The programming job has been done for you.
In case you wish to see the coding for the 'scan5d' pre-programmed job, it is listed on the following pages. This is 1 the more powerful & complex examples and do not let it scare you. uvcopy is in fact easy to learn if you start with the simpler exercises at http://www.uvsoftware.ca/uvtrain.htm#Part_4.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The mainframe JCL conversion requires JCLs & PROCs in separate subdirs. If they were in the same library, you can use this job to separate.
uvcopy splitjclproc1,fili1=jclproc0/xxx,filo2=jcl0/xxx,fild3=proc0 ================================================================== - 1 file at a time
uvcopyxd3 splitjclproc1 jclproc0 jcl0 proc0 uop=q0i7 ==================================================== - use script uvcopyxd3 to process all files in directory
See the splitjclproc1 uvcopy job listed on page '8X1'
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The mainframe COBOL conversion requires COBOL programs & COBOL copybooks in separate subdirs. If they were in the same library, you can use this job to separate. It leaves any other unrecognized modules in the input subdir.
uvcopy splitcblcpy1,fild1=indir,fild2=cbls,fild3=cpys =====================================================
See the splitcblcpy1 uvcopy job listed on page '8X2'
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
For mainframe data file conversions, we need different procedures to convert VARIABLE length files (vs FIXED length files). This job will scan all mainframe JCL for IDCAMS with different average & maximum record-lengths.
uvcopy scanjcl4varlth1,fild1=jcldir,filo2=outfile <-- command format =================================================
uvcopy scanjcl4varlth1,fild1=jcl0,filo2=stats/jclvarlth.rpt <-- example ===========================================================
ahb09.jcl3
DEFINE CLUSTER (NAME(AHB.INT.CCONS) -
RECSZ(24,536)) -
ahbm31.ahbm
DEFINE CLUSTER (NAME(CDR.RESUMEN.AHB) -
RECSZ(250,536)) -
ahbm31.ahbm
DEFINE CLUSTER (NAME(AHB.INT.CCONS.TMETA) -
RECSZ(24,536)) -
ahod03.ahod
DEFINE CLUSTER(NAME(ARCHIVO.SUCURSAL.SAFX) -
RECSZ(40,1530)) -
KEYS (03,0) -
ahod12.ahod
DEFINE CLUSTER (NAME(SAF.MAESTRO.AHORROS) -
RECSZ(149,2129)) -
KEYS(6,2) -
ahod12.ahod
DEFINE CLUSTER (NAME(SAF.MAESTRO.AHORROS.S21) -
RECSZ(149,2129)) -
KEYS(6,2) -
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
'grepx1' will extract filenames from grep output, sort,& data reduce to 1 line for multiple occurrences in the same file. There is an option to insert 'vi' prior to each filename in output file, OR use the editor to insert the desired command (vi, cp, mv, rm, etc)
| Example |
|
ACCEPT RUN-DATE FROM DATE. <-- mainframe code
MOVE RUNDATE-MDY6 TO RUN-DATE. <-- may need to change some to this
1. grep 'from date' cbls/* >tmp/grepx1a
====================================
- select lines from all files containing 'from date', output as follows:
cbls/car100.cbl:38: accept run-date from date.
cbls/car150.cbl:44: accept run-date from date.
cbls/cpy100.cbl:35: accept run-date from date.
2. uvcopy grepx1,fili1=tmp/grepx1a,filo1=tmp/grepx1b,uop=c1d1
==========================================================
- run this job to insert 'vi' prior to each filename & clear remainder
- output as follows:
vi cbls/car100.cbl vi cbls/car150.cbl vi cbls/cpy100.cbl
3. vi tmp/grepx1b <-- could edit to modify (for commands other than 'vi')
==============
4. ksh tmp/grepx1b <-- OR execute the output script of 'vi' comamnds
=============== - may inspect each file in turn & modify if required
4a. /from date <-- search for 'from date' in current file
4b. ...... - might need to modify (see Example above)
4c. :wq - write & quit (script proceeeds to next 'vi file'
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# splitjclproc1 - split PROCs from JCLs
# - by Owen Townsend, May 17/2007
# - 1st used for Cyrus Montakab, Software Mining
# (emailed zip file of mixed JCLs & PROCs)
#
# uvcopy splitjclproc1,fili1=jclproc0/xxx,filo2=jcl0/xxx,fild3=proc0
# ==================================================================
# - 1 file at a time
#
# uvcopyxd3 splitjclproc1 jclproc0 jcl0 proc0 uop=q0i7
# ====================================================
# - use script uvcopyxd3 to process all files in directory
#
# ** logic **
#
# - input files stored in subdir jclproc0/...
# - this job will copy jclproc0/... files to jcl0
# searching for ' PROC ' on // but not //* line
# - if found, write reaminder of the file to the 3rd directory
# using the NAME from //NAME PROC ... line
#
fili1=?infile,typ=LST,rcs=256
filo2=?outfile,typ=LSTtw2,rcs=256
fild3=?outdir/procname,typ=DIR,rcs=256
filo3=xxx,typ=LSTtw2,rcs=256
@run
opn fili1
opn filo2
#
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# begin loop to copy input file to jcl output until ' PROC ' found or EOF
man20 get fili1,a0 get input from jclproc file
skp> man90 (cc set > at EOF)
scn a0(20),' PROC ' PROC ID ?
skp= man30
man26 put filo2,a0 no - copy to JCL output
skp man20 repeat copy JCL loop
#
# PROC found - ensure // but not //*, else continue copy to JCL
man30 cmc a0(3),'//*' PROC on //*comments ?
skp= man26
cmc a0(2),'//' valid PROC must have // ?
skp! man26
#
# create PROC filename from 3rddir/PROCNAME
man32 clr c0(300),x'00' clear a work area
mvu c0(20),a2,' ' copy //NAME tilending blank
mvc c100(100),$fild3 setup 3rddir
cata8 c100(100),'/' + a '/' sep
cata8 c100(100),c0(20) + PROCNAME
mvc $filo3,c100 store dir/procname
opne1 filo3 open PROC output file
skp= man40
msg 'ERR opening PROC output file - should not happen'
msgw '- enter to continue copying jclproc input to JCL output
skp man26 continue copying to JCL output
#
# copy remainder of input file to the PROC output file
man40 put filo3,a0 put to PROC file
get fili1,a0 get next input
skp> man90 (cc set > at EOF)
skp man40 repeat loop to copy PROC lines
#
# EOF - close files & end job
man90 cls all close all files
eoj end job
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# splitcblcpy1 - split library of mainframe modules
# - move COBOL programs & copybooks to separate subdirs
# (leave others behind)
# - by Owen Townsend, Dec 2009
# conversions & compiles require COBOL programs & copybooks in separate subdirs
#
# uvcopy splitcblcpy1,fild1=indir,fild2=cbls,fild3=cpys
# ===================================================
# - reads indir of mixed cbls/cpys to get next filename & opens current file
# - for each file, scan for 'IDENTIFICATION DIVISION' or ' PIC '
# - creates 'mv' to move file to cbl/ or cpy/ subdir & executes via 'sys' cmd
#
was=b4000000 # allow area 'b' table 40,000 lines of 100 bytes
fild1=?indir,typ=DIR,rcs=80 # input subdir - mixed cbls & cpys
fili1=xxxx,typ=LST,rcs=256 # - current file read from input subdir
fild2=?cbl,typ=DIR,rcs=80 # output subdir for cbls
fild3=?cpy,typ=DIR,rcs=80 # output subdir for cpys
#
# load templates to move cbls to subdir#2 & cpys to subdir#3
lod=h0(100)
mv fild1/cblxx fild2/
mv fild1/cpyxx fild3/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# fild1,fild2,fild3 replaced by actual names by 3 'rtsf1' instrns below
# at man30/man40, template moved to outarea & cblxx/cpyxx replaced by actual
@run
opn fild1 open input directory
opn fild2 open output dir for cbls
opn fild3 open output dir for cpys
#
# at init, insert actual cbls/cpys subdir names in templates
rtsf1 h0(100),h0(100),'fild1',$fild1
rtsf1 h0(100),h0(100),'fild2',$fild2
rtsf1 h0(100),h0(100),'fild3',$fild3
#
# begin loop to read input directory for next filename
man10 get fild1,a0(80) get next record (filename) in directory
skp< man10 bypass any subdirs
skp> man90 at EOF go close files & EOJ
#
# create dir/file & open current file to get 1st line & test cbls/cpys
mvc f0(80),$fild1 directory name
cata8 f0(80),'/' append '/'
cata8 f0(80),a0(30) append filename
mvc $fili1,f0 store filename before open
opn fili1 open file to get stats
add $ca0,1 count input files
#
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# read current file into memory table (to scan all lines for patterns)
man20 rtb fili1,b0(100),b0(100) read entire file into memory
sts b0(100),b0(100),'IDENTIFICATION DIVISION'
skp= man30
sts b0(100),b0(100),'ID DIVISION'
skp= man30
sts b0(100),b0(100),'PROGRAM-ID'
skp= man30
sts b0(100),b0(100),'program-id'
skp= man30
sts b0(100),b0(100),' PIC '
skp= man40
sts b0(100),b0(100),' pic '
skp= man40
sts b0(100),b0(100),' PICTURE '
skp= man40
add $ca1,1 count non cbls/cpys
skp man50
#
# move current file to cbls/... subdir
man30 mvc c0(100),h0 template to move file to cbls/...
repf4 c0(100),'cblxx',a0(30) insert actual filename
cata8 c0(100),' ' null terminate
sys c0(100) execute 'mv' for cbls
# =====
add $ca2,1 count cbls
skp man50 go close & return for next
#
# move current file to cpy/... subdir
man40 mvc c0(100),h100 template to move file to cpy/...
repf4 c0(100),'cpyxx',a0(30) insert actual filename
cata8 c0(100),' ' null terminate
sys c0(100) execute 'mv' for cpys
# =====
add $ca3,1 count cpys
skp man50 go close & return for next
#
# common point to close current file & return to get next filename
man50 cls fili1
skp man10
#
# EOD - close all dirs/files & end job
man90 cls all
msgv1 '$ca0 total files, $ca2 cbls, $ca3 cpys, $ca1 neither'
eoj
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 9A1. | 'vi' editor tutorial for users new to unix/linux |
| - the essential commands to get you started |
| 9B1. | Work in your working directory & address files thru subdirs |
| - working directories should have subdirs only | |
| - all files are in subdirs (see cleandir1 script '9C1' |
| 9B2. | setup a 'tmp/' subdir in your working directories |
| - to keep your working directory clean (no files, subdirs only) |
| 9B3. | File Naming Conventions |
| Append a digit (1,2,3,etc) on the end of filenames (customer1,sales1,etc) | |
| - makes filenames 'unique' & easy to find with vi, grep, find, etc. | |
| - makes it easy to create names for related files (customer2,sales2,etc) | |
| Misspell filenames Intentionally for same reason as appending a digit. | |
| - for example: 'tmp' vs 'temp', 'wrk' vs 'work', etc. | |
| Common prefixes to identify related files | |
| - for example prefix 'uv' makes it easy to find Vancouver Utilities | |
| (uvcopy,uvsort,uvlist,uvqrpg,uvhd,etc) |
| 9C1. | script 'cleandir1' to move any files in working directory to a subdir |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
It is most important to understand that vi has TWO modes of operation. Switch to INSERT mode using commands such as the following:
i=insert, a=append, R=replace, o=open new line, cw=change word.
Switch back to command mode using 'ESCAPE'. Make it a habit to hit ESCAPE as soon as you finish text entry. If in doubt (COMMAND or INSERT mode) - hit ESCAPE, it will do no harm if already in command mode (will beep).
vi filename - starts vi, reads the file,& displays 1st screen =========== (or blank screen if creating a new file)
k
|
h <-- . --> l
|
j
'h' - move cursor left 'j' - move cursor down 'k' - move cursor up 'l' - move cursor right
^d - down 1/2 screen ^u - up 1/2 screen
:1 - goto line# 1 :500 - goto line# 500 G - goto end-of-file
0 - move cursor to begining of current line $ - move cursor to end of current line
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| i |
|
| a |
|
| A |
|
| r |
|
| R |
|
| cw |
|
| o |
|
| O |
|
| x |
|
| dd |
|
| D |
|
5dd - delete 5 lines (current & next 4 lines below cursor)
| yy |
|
| p |
|
5yy - yank 5 lines into current buffer
- move cursor to line above intended insert point
p - put (insert) buffer (5 lines) below cursor
| dd |
|
| p |
|
5dd - delete 5 lines (& store in current buffer)
- move cursor to line above intended insert point
p - put (insert) buffer (5 lines) below cursor
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
/xxx - search for xxx anywhere in the file
- search will wrap around EOF back to cursor location
| n |
|
:1,$ s/xxx/yyy - substitute 'xxx' with 'yyy'
- from 1st line to last line (1,$)
:%s/xxx/yyy - substitute 'xxx' with 'yyy'
- on ALL lines, '%' same as '1,$'
:%s/xxx/yyy/g - substitute 'xxx' with 'yyy'
- ALL lines ('%') & ALL occurrences on each line (/g)
:g/xxx/d - on ALL lines (g=global), Delete lines with 'xxx'
:g/xxx/p - on ALL lines (g=global), Print lines with 'xxx'
| u |
|
| U |
|
. - repeat the previous change command
| J |
|
:r file2 - read a file into the workspace
(following the line with the cursor)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| m[a-z] |
|
| ma |
|
| mb |
|
'a - address mark 'a' (via prefix of single quote)
'a,'b - address a range of lines from previously marked a & b
'a,'b m . - move lines from mark 'a' thru mark 'b' to follow current line
- deletes original lines
'a,'b co . - copy lines from mark 'a' thru mark 'b' to follow current line
- preserves original lines
:w - write workspace back to the file named on the vi entry command
:w filename - write workspace to a different file
:q - quit vi (warning if changes made without writing)
:wq - write & quit
| ZZ |
|
:q! - quit without writing
:10,20 w filex - write lines 10-20 to filex
http://linuxgazette.net/152/srinivasan.html =============================================
This is an excellent tutorial on 'vim', which is an enhanced version of 'vi', used on most Linux systems.
'ftp://ftp.vim.org/pub/vim/doc/vimbook-OPL.pdf' =============================================== - everything about vim 3.8 MB .pdf file
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Your working directory should contain only subdirectories, and all files should reside within sub-directories. In the following example, your working directory should be '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
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 ===================
mfcbl1 car100.cbl <-- compile 1 COBOL program
================= - script assumes program is in subdir 'cbls'
cnvMF41 cbl0/CAR100.cbl <-- convert program from cbl0->cbl1->cbl2->cbls
======================= - script assumes cbl1,cbl2,cbls are below you
jcl2ksh41 jcl0/JAR100.jcl <-- convert JCL from jcl0->jcl1->jcl2->jcl3->jcls
========================= - script assumes jcl1,jcl2,jcl3,jcls are below you
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Normally you will only edit 1 program at a time because you will usually then compile the program & the compile script must run above the subdirs because it needs to reference source, copybooks,& compiled libraries.
It makes no sense to change into the subdir, edit 1 program,& then change back to compile the program. That would use 4 commands vs only 2 commands when you work above the subdirs.
#1. cd cbls <-- change into subdir
=======
#2. vi car100.cbl <-- edit program (specify just filename)
============= (but overall less efficient)
#3. cd .. <-- change back out (to compile program)
=====
#4. mfcbl1 car100.cbl <-- compile program
=================
#1. vi cbls/car100.cbl <-- edit program (specify subdir/filename)
================== (but overall more efficient)
#2. mfcbl1 car100.cbl <-- compile program
=================
When you move onto the next program, your keystrokes are minimized by using your shell history & changing only the program name.
#3. vi cbls/car200.cbl <-- edit 2nd program
==================
#4. mfcbl1 car200.cbl <-- compile 2nd program
=================
When you have extensive editing to do on multiple files in the same subdir, of course you would change into the directory, do the edits,& change back.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
I recommend setting up a 'tmp' subdirectory in your various working directories, and use it for any temporary files, rather than clutter up your working directory (keep your working directory clean, subdirs only).
#1a. grep 'UPSI' cbls/* >tmp/upsi <-- extract lines with UPSI
#1b. vi tmp/upsi <-- review results with editor
#1c. uvlp12 tmp/upsi <-- print results
#2a. vi cbls/apay100.cbl - edit program apay100.cbl
ma - mark start of desired paragraph (mark 'a')
mb - mark end of desired paragraph (mark 'b')
:'a,'b w tmp/chkdigit - write paragraph out to tmp subdir
(from mark 'a' to mark 'b')
:q - quit edit apay100
#2b. vi cbls/apay200.cbl - edit program apay200.cbl
-- - move to desired point
:r tmp/chkdigit - read paragraph into apay200.cbl
:wq - write/quit apay200
Don't confuse our 'tmp' subdir with /tmp which is a system wide directory.
/tmp - system temporary directory /home/joe/tmp - Joe's temporary directory /p1/testlibs/tmp - temp subdir for apay libraries
You would clean out your 'tmp' subdir at least once a day, or you could setup a 'crontab' to do this automatically.
If multiple programmers working in shared directory (such as /home/testlibs) & desire their own tmp subdir, I suggest they append their initials (tmpaa, tmpbb, etc). Cron job can still clean out via 'rm tmp*/*'.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
It is a good idea to append a digit (1,2,3,etc) on the end of filenames. For example: 'customer1', 'sales1', etc. This provides several long lasting advantages thru out the life of our applications:
It is a good idea to intentionally misspell filenames for the same reasons as explained above (appending a digit (1,2,3) on the end of filenames). Misspelling also makes them unique & easy to find with vi,grep,find,etc. For example 'tmp' vs 'temp', 'wrk' vs 'work', etc.
Common prefixes make it easy to find related files with 1 command. For example if I wanted to find all instances where my utilities are called in the scripts directory: ('uv' is common to uvcopy,uvsort,uvlist,uvqrpg,uvhd,etc).
grep 'uv' scripts/* ===================
grep 'uv' sf/*/* (uvadm scripts are sf/adm/* sf/demo/* sf/util/* sf/IBM/*) ================
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
To cleanup an existing working directory with a lot of mixed files & subdirs, you should find the 'cleandir1' script handy. You can then setup various subdirs & move the files to the apporpriate subdir.
#1. cd workdir??
============
#2. mkdir cleanup090812 <-- make subdir to receive files
===================
#3. mv cleanup090812/... subdirxx <-- move desired files to desired subdirs
=============================
# cleandir1 - cleanup current directory by moving files to subdir
# - by Owen Townsend, UV Software, Aug 12/2009
# - we recommend no files in working directory
# - all files should be stored in appropriate subdirs
#
d=$1
if [[ ! -d "$d" ]]; then
echo "usage: cleandir1 subdir <-- arg1 must be a directory"
echo " ================"
echo " cleandir1 cleanup090812 <-- example"
echo " ======================="
exit 99; fi
#
x=0
for f in *
{ if [[ -f $f ]]; then
echo "moving $f to $d"
mv $f $d
((x=x+1))
fi
}
echo "$x files moved to $d"
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 1F3 | *wildcard: cfd - Count Files in Multi dirs via *wildcard |
| 1F1 | ...: Example - count files in /home/uvadm/sf/util/... |
| 5H1 | .dat: rebuilding .idx from only .dat |
| 5H2 | .dat: IDXNAMETYPE2 for .dat & .idx |
| 4F2 | .ext: tblext2 - summarize .ext's in all subdirs of a superdir |
| 1F2 | .extensions: cfx - count files in dirs with .extensions |
| 1F3 | .extensions: 1F4. cfdx Count Files in Multi dirs with .extensions |
| 5H1 | .idx: rebuilding .idx from only .dat |
| 5H2 | .idx: IDXNAMETYPE2 for .dat & .idx |
| 2F2 | A0b0c0d3e1f2j1: results AFTER options a0b0c0d3e1f2j1 + c0d3e1 |
| 2F2 | A0b0c0d3e1f2j1: results AFTER options a0b0c0d3e1f2j1 + c2d3e1 |
| 2F1 | A0b80c0d0e0f2j1: results AFTER default options a0b80c0d0e0f2j1 |
| 8I1 | Accumulate: acum1 - accumulate any 1 field in a datafile |
| 5I1 | Acucobol: acucobolx1 - extract data from AcuCOBOL files |
| 5I1 | Acucobolx1: - extract data from AcuCOBOL files |
| 5I2 | Acucobolx1: demo acucobolx1 with sample file |
| 8I1 | Acum1: - accumulate any 1 field in a datafile |
| 8I2 | Acum1: - operating instructions |
| 8I2 | Acum1: sample report from acum1 |
| 1R1 | Admjobs.doc: 1R2. Unix/Linux aids documented in ADMjobs.doc Part 8 |
| 1R1 | Admjobs.doc: Unix/Linux aids documented in ADMjobs.doc Part 7 |
| 5E1 | Advantages: of this animation method |
| 9B1 | Advantages: of working above subdirs |
| 1R1 | Aids: 1R2. Unix/Linux aids documented in ADMjobs.doc Part 8 |
| 1R1 | Aids: Unix/Linux aids documented in ADMjobs.doc Part 7 |
| 1B1 | Aliases: Recommended Aliases in profiles |
| 1B1 | Aliases: cd aliases to RUNDATA, RUNLIBS,& CNVDATA |
| 1B2 | Aliases: for 'mvstest' RUNDATA & RUNLIBS |
| 1S1 | Allcp: - copy all files from 1 directory to a 2nd |
| 1M1 | Alldiff: diff & alldiff - marvelous utilities |
| 1M2 | Alldiff: script |
| 5E1 | Animating: Animating MicroFocus COBOL on Unix/Linux |
| 5E1 | Animation: ANIMATION operating instructions |
| 5E1 | Animation: advantages of this animation method |
| 6H1 | Arg3: ex#2 - arg3 option scan 1 file (vs all in dir) |
| 1Q2 | Ascii: dd example #2 - translate EBCDIC to ASCII |
| 8D3 | Ascii: examine ASCII output - with uvhd |
| 7G4 | Ascii-->ebcdic: Execute jobs EBCDIC-->ASCII, ASCII-->EBCDIC,& compare |
| 7G4 | Ascii-->ebcdic: Generate jobs EBCDIC-->ASCII & ASCII-->EBCDIC |
| 8A1 | Assembler: uvcopy - power of assembler without the complexity |
| 6I2 | Attempts: lockdemo2 - file locking, reject 2nd attempts until 1st ends |
| 3A1 | Available: Cross-Ref Reports Available |
| 8C1 | B3f1: rerun with options 'b3f1' |
| 1P1 | Backups: Vancouver Utility Backups & crontabs |
| 7B3 | Bad: creating BAD data |
| 7H1 | Based: gentest1 - generate test data files based on COBOL copybooks |
| 2E1 | Binary: verifytext - scan files in subdir for binary data |
| 7K3 | Blank: uvlist as a filter - compress blank lines & spaces |
| 8B1 | Blanks: tabfix1 - convert tabs to blanks (1-8, default 4) |
| 2F2 | C0d3e1: results AFTER options a0b0c0d3e1f2j1 + c0d3e1 |
| 2F2 | C2d3e1: results AFTER options a0b0c0d3e1f2j1 + c2d3e1 |
| 4F1 | Calc: tblext1 to calc compile failure % |
| 2J1 | Called: sample crossref COBOL programs called by JCL/scripts |
| 7F3 | Called: listall2 uvcopy job called by script listall2 |
| 3C2 | Called-program: xcobcall2 - crossref all Programs calling any 1 Called-Program |
| 3C2 | Called-programs: xcobcall1 - list of all Called-Programs in each Program |
| 3C2 | Calling: xcobcall2 - crossref all Programs calling any 1 Called-Program |
| 6C1 | Capture: joblog1,2,3 - capture logs via 'tee' |
| 8C2 | Car101.cbl: input file tf/CAR101.cbl |
| 8C2 | Car101.cbl: output file 1st run - tmp/CAR101.cbl |
| 8C2 | Car101.cbl: output file 2nd run - tmp/car101.cbl |
| 8C1 | Case: tolower - translate to lower case |
| 2J1 | Cbls: execute script to select desired cbls programs |
| 2J1 | Cbls: output script to select cbls programs |
| 8L3 | Certain: scan JCL for certain programs |
| 1F3 | Cfd: - Count Files in Multi dirs via *wildcard |
| 1F3 | Cfdx: 1F4. cfdx Count Files in Multi dirs with .extensions |
| 1F7 | Cfl: - Count Files & Lines in a directory |
| 1F2 | Cfx: - count files in dirs with .extensions |
| 1F2 | Cfx: examples |
| 7H3 | Citytax1: Op-Instrns for citytax1 demo file |
| 7H4 | Citytax1: output from citytax1 demo file |
| 9C1 | Cleandir1: - move files from workdir to subdir |
| 2D1 | Cleanup: - source code maintenance utility |
| 2D2 | Cleanup: demo - for COBOL programs |
| 2D2 | Cleanup: demo - sample INPUT |
| 2D2 | Cleanup: demo - sample OUTPUT |
| 7G1 | Cmpjobs.doc: CMPjobs.doc - Data File Compare |
| 1B1 | Cnvdata: cd aliases to RUNDATA, RUNLIBS,& CNVDATA |
| 5C1 | Cobfil51: vs cobfiles5A |
| 5C1 | Cobfiles5a: cobfil51 vs cobfiles5A |
| 5C1 | Cobfiles5a: cobfiles5A - recommended alternative |
| 5D1 | Cobmap: Output cobmap - maps/custmas |
| 5D2 | Cobmap: generating 'cobmap's for ALL copybooks in directory |
| 5D1 | Cobmap1: 'cobmap1' - generate record layouts from COBOL copybooks |
| 5D1 | Cobmap1: Operating Instructions |
| 2D2 | Cobol: cleanup demo - for COBOL programs |
| 2J1 | Cobol: sample crossref COBOL programs called by JCL/scripts |
| 3A1 | Cobol: Cross References for COBOL & JCL/scripts |
| 3C1 | Cobol: COBOL Cross-Ref Sample Reports |
| 4B3 | Cobol: statcbl11 - COBOL stat report samples |
| 4D3 | Cobol: table3d - table summary for text files (JCL,COBOL,etc) |
| 5A1 | Cobol: COBOL Cross-References |
| 5B2 | Cobol: statcbl11 - COBOL stat report samples |
| 5C1 | Cobol: COBOL Files Report |
| 5C2 | Cobol: sample COBOL files report |
| 5D1 | Cobol: 'cobmap1' - generate record layouts from COBOL copybooks |
| 5E1 | Cobol: Animating MicroFocus COBOL on Unix/Linux |
| 5F1 | Cobol: Micro Focus COBOL - File Status Codes |
| 5F2 | Cobol: Micro Focus COBOL - Run-time Error Codes |
| 5F3 | Cobol: Micro Focus COBOL - Run-time Error Messages |
| 7B1 | Cobol: uvhdcob - display data file fields with COBOL fieldnames |
| 7C3 | Cobol: Alternative - modify the COBOL program |
| 7H1 | Cobol: gentest1 - generate test data files based on COBOL copybooks |
| 8N1 | Cobol: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 8X2 | Cobol: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 4D2 | Coding: statlogin1 - uvcopy coding |
| 7K2 | Column: option 'y' for column scale headings |
| 2B1 | Command: listall2 - sample command & output |
| 7B1 | Command: 'v' verify data command |
| 7B2 | Command: response to search/verify command |
| 7B2 | Command: test/demo verify command |
| 7L1 | Command: uxcp command to convert file |
| 8E1 | Command: scand2 - command format & example |
| 8K2 | Command: notes re command line options |
| 9A1 | Command: 'vi' 2 modes of operation - COMMAND or INSERT |
| 9A3 | Command: Global command - to delete, etc |
| 9A4 | Command: mark command |
| 9A2 | Commands: DELETE commands |
| 9A3 | Commands: miscellaneous commands |
| 9A3 | Commands: search commands |
| 9A3 | Commands: substitution commands |
| 7C2 | Common: problem when files FTP'd from mainframe |
| 9B3 | Common: prefixes to identify related files |
| 7G1 | Compare: CMPjobs.doc - Data File Compare |
| 7G4 | Compare: Compare ALL re-converted files to original EBCDIC files |
| 7G4 | Compare: Execute jobs EBCDIC-->ASCII, ASCII-->EBCDIC,& compare |
| 7G4 | Compare: uvcmp1all - compare all files in 2 directories |
| 4F1 | Compile: tblext1 to calc compile failure % |
| 9B1 | Compiling: example - editing & compiling programs |
| 8A1 | Complexity: uvcopy - power of assembler without the complexity |
| 7K3 | Compress: uvlist as a filter - compress blank lines & spaces |
| 4D2 | Console: table2 demo - console display |
| 6I1 | Console: log from demo |
| 6I2 | Console: log from demo |
| 6J1 | Console: log from demo |
| 7E1 | Console: log |
| 7H3 | Console: displays for option changes |
| 8B2 | Console: display |
| 8C1 | Console: log |
| 8E3 | Console: display & option prompts |
| 8I2 | Console: log (option prompts) |
| 8K1 | Console: log - options prompt |
| 1T1 | Containing: editmfp1 - edit Multi-Files containing specified Pattern |
| 2C1 | Control: spreadA - list files 4-up for doc & control |
| 2C2 | Control: spreadA - list files 4-up for doc & control |
| 9B3 | Conventions: File Naming Conventions |
| 8E2 | Copied: output#3 - matching files copied to tmp1/ |
| 1G0 | Copy: scripts to list/copy/move/remove old/new files |
| 1S1 | Copy: allcp - copy all files from 1 directory to a 2nd |
| 2I1 | Copy: mksfcp1 - make script to copy files from a list of filenames |
| 2J1 | Copy: xref2cp1 - generate copy scripts from cross-reference reports |
| 9A2 | Copy: COPY lines (YANK & PUT) |
| 3C1 | Copybook: xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK |
| 3C1 | Copybooks: xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM |
| 5D1 | Copybooks: 'cobmap1' - generate record layouts from COBOL copybooks |
| 5D2 | Copybooks: generating 'cobmap's for ALL copybooks in directory |
| 7H1 | Copybooks: gentest1 - generate test data files based on COBOL copybooks |
| 8N1 | Copybooks: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 8X2 | Copybooks: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 1F1 | Count: Example - count files in /home/uvadm/sf/util/... |
| 1F1 | Count: cf - Count Files in a directory |
| 1F2 | Count: cfx - count files in dirs with .extensions |
| 1F3 | Count: 1F4. cfdx Count Files in Multi dirs with .extensions |
| 1F3 | Count: cfd - Count Files in Multi dirs via *wildcard |
| 1F5 | Count: 1F6. cl - Count Lines in a file |
| 1F7 | Count: cfl - Count Files & Lines in a directory |
| 8E2 | Count: output#1 - filenames & match count summary |
| 1E3 | Counts: llc - list files with line counts |
| 1E3 | Counts: llc - list with line counts - sample output |
| 1F5 | Counts: tblext1 - table summary counts by file extensions |
| 1F8 | Counts: statdir1 - report file counts & KB used in a Parent dir |
| 4F1 | Counts: tblext1 - table summary counts by file extensions |
| 6H2 | Counts: ex#3 - option m0 to report filenames & match counts only |
| 1P1 | Crontabs: Vancouver Utility Backups & crontabs |
| 3A1 | Cross: Cross References for COBOL & JCL/scripts |
| 3A1 | Cross-ref: Cross-Ref Reports Available |
| 3B2 | Cross-ref: Op. Instrns. - Cross-Ref 1 at a time |
| 3C1 | Cross-ref: COBOL Cross-Ref Sample Reports |
| 3C3 | Cross-ref: xcobfile2 - cross-ref programs using each filename |
| 2J1 | Cross-reference: xref2cp1 - generate copy scripts from cross-reference reports |
| 3A1 | Cross-references: more Cross-References |
| 5A1 | Cross-references: COBOL Cross-References |
| 3B1 | Cross-refs: generating ALL Cross-Refs reports |
| 2J1 | Crossref: sample crossref COBOL programs called by JCL/scripts |
| 2J1 | Crossref: xref2cp1 - create selection script from crossref |
| 3C1 | Crossref: xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK |
| 3C2 | Crossref: xcobcall2 - crossref all Programs calling any 1 Called-Program |
| 3C4 | Crossref: xcobsql2 crossref all Programs using any 1 SQL Include |
| 3D2 | Crossref: xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE |
| 3E2 | Crossref: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM |
| 3F1 | Crossref: 3F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC |
| 3G1 | Crossref: 3G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM |
| 9A1 | Cursor: CURSOR MOVEMENT |
| 5D1 | Custmas: Output cobmap - maps/custmas |
| 7D1 | Custmas1: demo#2 - using custmas1 with packed fields |
| 8J1 | Customer: master sales report |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 7C1 | Dat1: sample text file dat1/products |
| 7G1 | Dat1: dat1/warmas1a - Alternate test file#2 with differences |
| 7G1 | Dat1: test file#1 /home/uvadm/dat1/warmas1 |
| 1Q1 | Data: dd - Unix/Linux Data utility |
| 2E1 | Data: verifytext - scan files in subdir for binary data |
| 5I1 | Data: acucobolx1 - extract data from AcuCOBOL files |
| 6A1 | Data: mvsfiles5A - data file trace in MVS JCL |
| 6A1 | Data: xmvs/mvsfiles3 sample data file trace |
| 6A2 | Data: notes re mvsfiles5A data file trace |
| 7A1 | Data: uvhd - display DATA files in Vertical Hexadecimal |
| 7B1 | Data: 'v' verify data command |
| 7B1 | Data: uvhdcob - display data file fields with COBOL fieldnames |
| 7B3 | Data: creating BAD data |
| 7G1 | Data: CMPjobs.doc - Data File Compare |
| 7H1 | Data: gentest1 - generate test data files based on COBOL copybooks |
| 7I1 | Data: Data File VTOC Report |
| 7L1 | Data: uxcp - complex Data File Conversions |
| 3D2 | Datafile: xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE |
| 8I1 | Datafile: acum1 - accumulate any 1 field in a datafile |
| 3D1 | Datafiles: xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT |
| 1E2 | Date: llt - list files sorted by date/time (newest 1st) |
| 1G1 | Days: lsold1 - list files older than x days |
| 1G1 | Days: lsold2 - list files created/modified between 2 days |
| 1G2 | Days: lsnew1 - list files newer than x days |
| 1G2 | Days: lsnew2 - list files created/modified between 2 days |
| 1G3 | Days: rmold1 - remove files older than x days |
| 1Q2 | Dd2ascii: script 'dd2ascii' to translate all files in subdir |
| 8D2 | Decimal: Packed Decimal fields |
| 2F1 | Default: results AFTER default options a0b80c0d0e0f2j1 |
| 8B1 | Default: tabfix1 - convert tabs to blanks (1-8, default 4) |
| 9A2 | Delete: DELETE commands |
| 9A2 | Delete: MOVE lines (DELETE & PUT) |
| 9A3 | Delete: Global command - to delete, etc |
| 2D2 | Demo: cleanup demo - for COBOL programs |
| 2D2 | Demo: cleanup demo - sample INPUT |
| 2D2 | Demo: cleanup demo - sample OUTPUT |
| 4D1 | Demo: input file - 1st 3 of 20 records |
| 4D2 | Demo: table2 demo - console display |
| 5I2 | Demo: acucobolx1 with sample file |
| 6I1 | Demo: console log from demo |
| 6I2 | Demo: console log from demo |
| 6J1 | Demo: console log from demo |
| 7B2 | Demo: test/demo verify command |
| 7D1 | Demo: using uvcpF2L |
| 7D1 | Demo: demo#2 - using custmas1 with packed fields |
| 7F1 | Demo: listall2 demo - list all parm files |
| 7G2 | Demo: uvcmp1 demo#1 - Operating Instructions |
| 7G3 | Demo: uvcmp1 demo#1 - sample report |
| 7H3 | Demo: Op-Instrns for citytax1 demo file |
| 7H4 | Demo: output from citytax1 demo file |
| 8K1 | Depending: selectf1 - select records depending on field value |
| 7K1 | Description: uvlist - Program Description |
| 2J1 | Desired: execute script to select desired cbls programs |
| 7L1 | Desired: Output file on Unix/Linux |
| 8E2 | Detail: output#2 - matching lines detail |
| 1M1 | Diff: & alldiff - marvelous utilities |
| 7G1 | Differences: dat1/warmas1a - Alternate test file#2 with differences |
| 1F8 | Dir: statdir1 - report file counts & KB used in a Parent dir |
| 6H1 | Dir: ex#2 - arg3 option scan 1 file (vs all in dir) |
| 7G4 | Directories: uvcmp1all - compare all files in 2 directories |
| 1D1 | Directory: dtree - draw directory tree |
| 1F1 | Directory: cf - Count Files in a directory |
| 1F7 | Directory: cfl - Count Files & Lines in a directory |
| 1S1 | Directory: allcp - copy all files from 1 directory to a 2nd |
| 1S1 | Directory: scripts to process ALL files in directory |
| 2A2 | Directory: Listing ALL files in a directory |
| 2A2 | Directory: list 1st page only of all files in directory |
| 2B1 | Directory: listall2 - List All (small) Files in Directory |
| 5D2 | Directory: generating 'cobmap's for ALL copybooks in directory |
| 7H5 | Directory: Op-Instns for all files in directory |
| 8B2 | Directory: process entire directory |
| 8E1 | Directory: scand2 - scan directory for patterns & qualifiers |
| 8L1 | Directory: scan5d - search directory for exception files |
| 9B1 | Directory: tip#1 - stay in your 'working directory' |
| 9B2 | Directory: tip#2 - setup 'tmp' sub-dir in your working directory |
| 1E4 | Dirs: llr - list Recursively all dirs & all files |
| 1F2 | Dirs: cfx - count files in dirs with .extensions |
| 1F3 | Dirs: 1F4. cfdx Count Files in Multi dirs with .extensions |
| 1F3 | Dirs: cfd - Count Files in Multi dirs via *wildcard |
| 4D2 | Display: table2 demo - console display |
| 6E1 | Display: Sample Op Instrns - display latest gen file |
| 6E1 | Display: lastgenr - display last generation file |
| 6F1 | Display: getEtime - display 'job times' for last run of any JCL/script |
| 7A1 | Display: uvhd - display DATA files in Vertical Hexadecimal |
| 7B1 | Display: uvhdcob - display data file fields with COBOL fieldnames |
| 7B1 | Display: uvhdcob - sample display |
| 8B2 | Display: console display |
| 8E3 | Display: console display & option prompts |
| 7H3 | Displays: console displays for option changes |
| 2C1 | Doc: spreadA - list files 4-up for doc & control |
| 2C2 | Doc: spreadA - list files 4-up for doc & control |
| 1R1 | Documented: 1R2. Unix/Linux aids documented in ADMjobs.doc Part 8 |
| 1R1 | Documented: Unix/Linux aids documented in ADMjobs.doc Part 7 |
| 1O1 | Dos2unix: & unix2dos |
| 1D1 | Draw: dtree - draw directory tree |
| 2F1 | Drop: example - grep for EXEC & drop duplicates from result |
| 7C3 | Drop: uvcp to drop CR/LF (convert text to fixed) |
| 1D1 | Dtree: - draw directory tree |
| 2F1 | Duplicates: example - grep for EXEC & drop duplicates from result |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 7B4 | Easier: uvhdc2 - script for easier use of uvhdcob |
| 7D1 | Easier: scripts to make uvcp easier to use |
| 1Q2 | Ebcdic: dd example #2 - translate EBCDIC to ASCII |
| 7G4 | Ebcdic: Compare ALL re-converted files to original EBCDIC files |
| 8D2 | Ebcdic: investigating EBCDIC files with uvhd |
| 7G4 | Ebcdic-->ascii: Execute jobs EBCDIC-->ASCII, ASCII-->EBCDIC,& compare |
| 7G4 | Ebcdic-->ascii: Generate jobs EBCDIC-->ASCII & ASCII-->EBCDIC |
| 1T1 | Edit: editmfp1 - edit Multi-Files containing specified Pattern |
| 9A1 | Edit: starting 'vi' to edit a file |
| 9B1 | Editing: example - editing & compiling programs |
| 1T1 | Editmfp1: - edit Multi-Files containing specified Pattern |
| 6I2 | Ends: lockdemo2 - file locking, reject 2nd attempts until 1st ends |
| 8B2 | Entire: process entire directory |
| 1A1 | Env: 'profiles' provided in /home/uvadm/env |
| 5F2 | Error: Micro Focus COBOL - Run-time Error Codes |
| 5F3 | Error: Micro Focus COBOL - Run-time Error Messages |
| 9A2 | Escape: INSERT text (ESCAPE to end insert) |
| 8D3 | Examine: ASCII output - with uvhd |
| 1F1 | Example: Example - count files in /home/uvadm/sf/util/... |
| 1N1 | Example: - grep for EXEC in all JCL |
| 1Q1 | Example: dd example #1 - create a smaller test file |
| 1Q2 | Example: dd example #2 - translate EBCDIC to ASCII |
| 2F1 | Example: - grep for EXEC & drop duplicates from result |
| 6C1 | Example: using joblog1 |
| 7J1 | Example: - sort sequential & load Indexed |
| 8E1 | Example: scand2 - command format & example |
| 8E4 | Example: example#2 - scan JCL for INCLUDE on SORTs |
| 9B1 | Example: - editing & compiling programs |
| 1F2 | Examples: cfx examples |
| 1O1 | Examples: |
| 9B2 | Examples: of using 'tmp' subdir |
| 8L1 | Exception: sample exception report |
| 8L1 | Exception: scan5d - search directory for exception files |
| 9B1 | Exception: Exception to the Rule |
| 1N1 | Exec: example - grep for EXEC in all JCL |
| 2F1 | Exec: example - grep for EXEC & drop duplicates from result |
| 2J1 | Execute: script to select desired cbls programs |
| 7G4 | Execute: Execute jobs EBCDIC-->ASCII, ASCII-->EBCDIC,& compare |
| 3E1 | Executed: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT |
| 3F1 | Executed: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT |
| 3E2 | Executing: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM |
| 3F1 | Executing: 3F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC |
| 3G1 | Executing: 3G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM |
| 8B1 | Expand: run tabfix1 to expand tabs |
| 1F5 | Extensions: tblext1 - table summary counts by file extensions |
| 4F1 | Extensions: tblext1 - table summary counts by file extensions |
| 5I1 | Extract: acucobolx1 - extract data from AcuCOBOL files |
| 8P1 | Extract: grepx1 - extract filenames from grep output |
| 4F1 | Failure: tblext1 to calc compile failure % |
| 4D2 | Field: table2 - OPTIONS (for Fixed Field files) |
| 8I1 | Field: acum1 - accumulate any 1 field in a datafile |
| 8K1 | Field: selectf1 - select records depending on field value |
| 7B1 | Fieldnames: uvhdcob - display data file fields with COBOL fieldnames |
| 4D1 | Fields: table2 - Table Summaries for Fixed Length Fields |
| 7B1 | Fields: uvhdcob - display data file fields with COBOL fieldnames |
| 7D1 | Fields: demo#2 - using custmas1 with packed fields |
| 8D2 | Fields: Packed Decimal fields |
| 3C3 | Filename: xcobfile2 - cross-ref programs using each filename |
| 2I1 | Filenames: mksfcp1 - make script to copy files from a list of filenames |
| 6H2 | Filenames: ex#3 - option m0 to report filenames & match counts only |
| 8E2 | Filenames: output#1 - filenames & match count summary |
| 8P1 | Filenames: grepx1 - extract filenames from grep output |
| 9B3 | Filenames: Misspell filenames Intentionally |
| 7K3 | Filter: uvlist as a filter - compress blank lines & spaces |
| 1F9 | Find: longest1 - find longest line in a text file |
| 1H1 | Find: findowner - find files for a specified owner |
| 1I1 | Find: findgrpnw - find files with No Group Write permissions |
| 1I1 | Find: findgrpnwfix - find No Group Write perms & FIX |
| 1I1 | Findgrpnw: - find files with No Group Write permissions |
| 1I1 | Findgrpnwfix: - find No Group Write perms & FIX |
| 1H1 | Findowner: - find files for a specified owner |
| 1I1 | Fix: findgrpnwfix - find No Group Write perms & FIX |
| 4D1 | Fixed: table2 - Table Summaries for Fixed Length Fields |
| 4D2 | Fixed: table2 - OPTIONS (for Fixed Field files) |
| 7C1 | Fixed: using uvcp to convert 'text' to 'fixed' |
| 7C3 | Fixed: uvcp to drop CR/LF (convert text to fixed) |
| 7C4 | Fixed: using 'uvcp' to convert 'fixed' to 'text' |
| 7E1 | Fixed: listrec2 - list fixed length records |
| 7E2 | Fixed: listhex2 - list fixed length records in hexadecimal |
| 5F1 | Focus: Micro Focus COBOL - File Status Codes |
| 5F2 | Focus: Micro Focus COBOL - Run-time Error Codes |
| 5F3 | Focus: Micro Focus COBOL - Run-time Error Messages |
| 5H1 | Focus: rebuild - Micro Focus utility |
| 7L1 | Format: mainframe file in RDW format for FTP |
| 8E1 | Format: scand2 - command format & example |
| 7C2 | Ftp: common problem when files FTP'd from mainframe |
| 7L1 | Ftp: mainframe file in RDW format for FTP |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 6E1 | Gen: Sample Op Instrns - display latest gen file |
| 2J1 | Generate: xref2cp1 - generate copy scripts from cross-reference reports |
| 5D1 | Generate: 'cobmap1' - generate record layouts from COBOL copybooks |
| 6B2 | Generate: Op. Instrns to generate JobFlow Reports |
| 6B2 | Generate: jobflow51 - generate jobflow report for 1 JCL/script |
| 6B2 | Generate: jobflow5A - generate All jobflow reports |
| 7G4 | Generate: Generate jobs EBCDIC-->ASCII & ASCII-->EBCDIC |
| 7H1 | Generate: gentest1 - generate test data files based on COBOL copybooks |
| 3B1 | Generating: ALL Cross-Refs reports |
| 5D2 | Generating: 'cobmap's for ALL copybooks in directory |
| 6E1 | Generation: lastgenr - display last generation file |
| 7H1 | Gentest1: - generate test data files based on COBOL copybooks |
| 7H2 | Gentest1: - sample input |
| 7H5 | Gentesta: 'gentestA' script |
| 6F1 | Getetime: getEtime - display 'job times' for last run of any JCL/script |
| 9A3 | Global: Global command - to delete, etc |
| 1N1 | Grep: example - grep for EXEC in all JCL |
| 1N1 | Grep: - search for patterns in files |
| 1N1 | Grep: results |
| 2F1 | Grep: example - grep for EXEC & drop duplicates from result |
| 2F1 | Grep: grepsum1 - summarize grep search results |
| 2G1 | Grep: scan/replace jobs more powerful than grep & sed |
| 8P1 | Grep: grepx1 - extract filenames from grep output |
| 2F1 | Grepsum1: - summarize grep search results |
| 2F2 | Grepsum1: modify grepsum1 options to improve results |
| 8P1 | Grepx1: - extract filenames from grep output |
| 1I1 | Group: findgrpnw - find files with No Group Write permissions |
| 1I1 | Group: findgrpnwfix - find No Group Write perms & FIX |
| 7K2 | Headings: option 'y' for column scale headings |
| 7A1 | Hexadecimal: uvhd - display DATA files in Vertical Hexadecimal |
| 7E2 | Hexadecimal: listhex2 - list fixed length records in hexadecimal |
| 4D3 | Hlqs: sample report - summary of HLQs in all JCL |
| 1A1 | Home: 'profiles' provided in /home/uvadm/env |
| 1F1 | Home: Example - count files in /home/uvadm/sf/util/... |
| 7G1 | Home: test file#1 /home/uvadm/dat1/warmas1 |
| 6D1 | Homedir: setup 'testdata' in Your homedir ? |
| 9B3 | Identify: common prefixes to identify related files |
| 5H2 | Idxnametype2: IDXNAMETYPE2 for .dat & .idx |
| 2F2 | Improve: modify grepsum1 options to improve results |
| 3C4 | Include: xcobsql2 crossref all Programs using any 1 SQL Include |
| 8E4 | Include: example#2 - scan JCL for INCLUDE on SORTs |
| 3C4 | Includes: xcobsql1 list all SQL Includes in any 1 Program |
| 7J1 | Indexed: example - sort sequential & load Indexed |
| 9A1 | Insert: 'vi' 2 modes of operation - COMMAND or INSERT |
| 9A2 | Insert: INSERT text (ESCAPE to end insert) |
| 9A2 | Insert: INSERT text (ESCAPE to end insert) |
| 8B2 | Inspect: I/O files |
| 4D3 | Instrns: Op. Instrns to create top-node summary table |
| 6B2 | Instrns: Op. Instrns to generate JobFlow Reports |
| 6E1 | Instrns: Sample Op Instrns - display latest gen file |
| 3B2 | Instrns.: Op. Instrns. - Cross-Ref 1 at a time |
| 8L2 | Instrns.: Op. Instrns. for scan5d |
| 2C1 | Instructions: spreadA - Operating Instructions |
| 2E1 | Instructions: verifytext - Operating Instructions |
| 2G1 | Instructions: Operating Instructions |
| 3B1 | Instructions: Operating Instructions |
| 4A1 | Instructions: statallmvs1/statallvse1 - Operating Instructions |
| 4D1 | Instructions: Operating Instructions |
| 4F1 | Instructions: Operating Instructions |
| 5B1 | Instructions: statallmvs1/statallvse1 - Operating Instructions |
| 5D1 | Instructions: cobmap1 Operating Instructions |
| 5E1 | Instructions: ANIMATION operating instructions |
| 7G2 | Instructions: uvcmp1 demo#1 - Operating Instructions |
| 8B2 | Instructions: tabfix1 - Operating Instructions |
| 8D3 | Instructions: toascii Operating Instructions |
| 8I2 | Instructions: acum1 - operating instructions |
| 9B3 | Intentionally: Misspell filenames Intentionally |
| 8D2 | Investigating: EBCDIC files with uvhd |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 8E4 | Jcl0_include_counts:output#1 tmp/jcl0_INCLUDE_counts |
| 8E4 | Jcl0_include_detail:output#2 tmp/jcl0_INCLUDE_detail |
| 6B1 | Job-flow: Job-Flow reports |
| 6B1 | Jobflow: JobFlow sample report |
| 6B2 | Jobflow: Op. Instrns to generate JobFlow Reports |
| 6B2 | Jobflow: jobflow51 - generate jobflow report for 1 JCL/script |
| 6B2 | Jobflow: jobflow5A - generate All jobflow reports |
| 6B2 | Jobflow51: - generate jobflow report for 1 JCL/script |
| 6B2 | Jobflow5a: jobflow5A - generate All jobflow reports |
| 6C1 | Joblog1: example using joblog1 |
| 6C1 | Joblog1: joblog1,2,3 - capture logs via 'tee' |
| 3D1 | Ksh: xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT |
| 3D2 | Ksh: xkshfile2 - crossref all ksh SCRIPTs using any 1 DATAFILE |
| 3E1 | Ksh: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT |
| 3E2 | Ksh: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM |
| 3F1 | Ksh: 3F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC |
| 3F1 | Ksh: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT |
| 3G1 | Ksh: 3G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM |
| 3G1 | Ksh: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT |
| 2A1 | Laser: 'uvlp__' scripts for Laser printers |
| 6E1 | Lastgenf: Alternate script 'lastgenf' |
| 6E1 | Lastgenr: Rules for using lastgenr |
| 6E1 | Lastgenr: - display last generation file |
| 5D1 | Layouts: 'cobmap1' - generate record layouts from COBOL copybooks |
| 2H1 | Library: verifylib1 - verify module types in a library |
| 1E3 | Line: llc - list files with line counts |
| 1E3 | Line: llc - list with line counts - sample output |
| 1F9 | Line: longest1 - find longest line in a text file |
| 8K2 | Line: notes re command line options |
| 1Q1 | Linux: dd - Unix/Linux Data utility |
| 1R1 | Linux: 1R2. Unix/Linux aids documented in ADMjobs.doc Part 8 |
| 1R1 | Linux: Unix/Linux aids documented in ADMjobs.doc Part 7 |
| 2A2 | Linux: uvlp13LD - print Mainframe reports on Unix/Linux |
| 5E1 | Linux: Animating MicroFocus COBOL on Unix/Linux |
| 7L1 | Linux: desired Output file on Unix/Linux |
| 1E1 | List: ll_ scripts list files with various options |
| 1E2 | List: llt - list files sorted by date/time (newest 1st) |
| 1E3 | List: llc - list files with line counts |
| 1E3 | List: llc - list with line counts - sample output |
| 1E4 | List: llr - list Recursively all dirs & all files |
| 1G0 | List: scripts to list/copy/move/remove old/new files |
| 1G1 | List: lsold1 - list files older than x days |
| 1G1 | List: lsold2 - list files created/modified between 2 days |
| 1G2 | List: lsnew1 - list files newer than x days |
| 1G2 | List: lsnew2 - list files created/modified between 2 days |
| 2A2 | List: 1st page only of all files in directory |
| 2B1 | List: listall2 - List All (small) Files in Directory |
| 2C1 | List: spreadA - list files 4-up for doc & control |
| 2C2 | List: spreadA - list files 4-up for doc & control |
| 2I1 | List: mksfcp1 - make script to copy files from a list of filenames |
| 3C1 | List: xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM |
| 3C2 | List: xcobcall1 - list of all Called-Programs in each Program |
| 3C4 | List: xcobsql1 list all SQL Includes in any 1 Program |
| 3D1 | List: xkshfile1 - list all DATAFILES used in any 1 ksh SCRIPT |
| 3E1 | List: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT |
| 3F1 | List: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT |
| 3G1 | List: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT |
| 7E1 | List: listrec2 - list fixed length records |
| 7E2 | List: listhex2 - list fixed length records in hexadecimal |
| 7F1 | List: listall2 - list subdir of multiple short files |
| 7F1 | List: listall2 demo - list all parm files |
| 7F2 | List: listall2 - script to list subdir of short files |
| 2B1 | Listall2: - List All (small) Files in Directory |
| 2B1 | Listall2: - sample command & output |
| 7F1 | Listall2: - list subdir of multiple short files |
| 7F1 | Listall2: demo - list all parm files |
| 7F2 | Listall2: - script to list subdir of short files |
| 7F3 | Listall2: uvcopy job called by script listall2 |
| 7F3 | Listall2: uvcopy job called by script listall2 |
| 7E2 | Listhex2: - list fixed length records in hexadecimal |
| 2A2 | Listing: Listing ALL files in a directory |
| 8B3 | Listing: pf/util/tabtest1 - uvcopy job listing |
| 7E1 | Listrec2: - list fixed length records |
| 1E1 | Ll_: scripts list files with various options |
| 1E3 | Llc: - list files with line counts |
| 1E3 | Llc: - list with line counts - sample output |
| 1E4 | Llr: - list Recursively all dirs & all files |
| 1E2 | Llt: - list files sorted by date/time (newest 1st) |
| 7J1 | Load: example - sort sequential & load Indexed |
| 6I1 | Lockdemo1: - file locking, queue jobs to run serially |
| 6I2 | Lockdemo2: - file locking, reject 2nd attempts until 1st ends |
| 6I1 | Locking: lockdemo1 - file locking, queue jobs to run serially |
| 6I2 | Locking: lockdemo2 - file locking, reject 2nd attempts until 1st ends |
| 6J1 | Lockwait1: - wait until file not in use |
| 4C1 | Log: sample input /var/log/messages |
| 6I1 | Log: console log from demo |
| 6I2 | Log: console log from demo |
| 6J1 | Log: console log from demo |
| 7E1 | Log: console log |
| 8C1 | Log: console log |
| 8I2 | Log: console log (option prompts) |
| 8K1 | Log: console log - options prompt |
| 8M1 | Logic: procedure & logic |
| 8N1 | Logic: Logic |
| 4C1 | Logins: statlogin1 - table summary user logins by month & userid |
| 6C1 | Logs: joblog1,2,3 - capture logs via 'tee' |
| 1F9 | Longest: longest1 - find longest line in a text file |
| 1F9 | Longest1: - find longest line in a text file |
| 8C1 | Lower: tolower - translate to lower case |
| 1G2 | Lsnew1: - list files newer than x days |
| 1G2 | Lsnew2: - list files created/modified between 2 days |
| 1G1 | Lsold1: - list files older than x days |
| 1G1 | Lsold2: - list files created/modified between 2 days |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 2A2 | Mainframe: uvlp13LD - print Mainframe reports on Unix/Linux |
| 4B1 | Mainframe: statmvsjcl1 - mainframe JCL stat report samples |
| 7C2 | Mainframe: common problem when files FTP'd from mainframe |
| 7L1 | Mainframe: file in RDW format for FTP |
| 2D1 | Maintenance: cleanup - source code maintenance utility |
| 5D1 | Maps: Output cobmap - maps/custmas |
| 9A4 | Mark: command |
| 1M1 | Marvelous: diff & alldiff - marvelous utilities |
| 8J1 | Master: customer master sales report |
| 6H2 | Match: ex#3 - option m0 to report filenames & match counts only |
| 8E2 | Match: output#1 - filenames & match count summary |
| 8E2 | Matching: output#2 - matching lines detail |
| 8E2 | Matching: output#3 - matching files copied to tmp1/ |
| 4C1 | Messages: sample input /var/log/messages |
| 5F3 | Messages: Micro Focus COBOL - Run-time Error Messages |
| 5E1 | Method: advantages of this animation method |
| 5F1 | Micro: Micro Focus COBOL - File Status Codes |
| 5F2 | Micro: Micro Focus COBOL - Run-time Error Codes |
| 5F3 | Micro: Micro Focus COBOL - Run-time Error Messages |
| 5H1 | Micro: rebuild - Micro Focus utility |
| 5E1 | Microfocus: Animating MicroFocus COBOL on Unix/Linux |
| 9A3 | Miscellaneous: commands |
| 9B3 | Misspell: Misspell filenames Intentionally |
| 8M1 | Mixed: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8N1 | Mixed: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 8X1 | Mixed: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8X2 | Mixed: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 2I1 | Mksfcp1: - make script to copy files from a list of filenames |
| 9A1 | Modes: 'vi' 2 modes of operation - COMMAND or INSERT |
| 1G1 | Modified: lsold2 - list files created/modified between 2 days |
| 1G2 | Modified: lsnew2 - list files created/modified between 2 days |
| 2F2 | Modify: grepsum1 options to improve results |
| 7C3 | Modify: Alternative - modify the COBOL program |
| 2H1 | Module: verifylib1 - verify module types in a library |
| 4C1 | Month: statlogin1 - table summary user logins by month & userid |
| 1G0 | Move: scripts to list/copy/move/remove old/new files |
| 9A2 | Move: MOVE lines (DELETE & PUT) |
| 9C1 | Move: cleandir1 - move files from workdir to subdir |
| 9A1 | Movement: CURSOR MOVEMENT |
| 1F3 | Multi: 1F4. cfdx Count Files in Multi dirs with .extensions |
| 1F3 | Multi: cfd - Count Files in Multi dirs via *wildcard |
| 1T1 | Multi-files: editmfp1 - edit Multi-Files containing specified Pattern |
| 6H1 | Multi-line: scanjcl1 - scan multi-line JCL for pattern & qualifier |
| 6A1 | Mvs: mvsfiles5A - data file trace in MVS JCL |
| 6A1 | Mvsfiles3: xmvs/mvsfiles3 sample data file trace |
| 6A1 | Mvsfiles5a: mvsfiles5A - data file trace in MVS JCL |
| 6A2 | Mvsfiles5a: notes re mvsfiles5A data file trace |
| 1B2 | Mvstest: aliases for 'mvstest' RUNDATA & RUNLIBS |
| 9B3 | Naming: File Naming Conventions |
| 1G0 | New: scripts to list/copy/move/remove old/new files |
| 1G2 | Newer: lsnew1 - list files newer than x days |
| 1E2 | Newest: llt - list files sorted by date/time (newest 1st) |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 1G0 | Old: scripts to list/copy/move/remove old/new files |
| 1G1 | Older: lsold1 - list files older than x days |
| 1G3 | Older: rmold1 - remove files older than x days |
| 7H5 | Op-instns: Op-Instns for all files in directory |
| 7H3 | Op-instrns: Op-Instrns for citytax1 demo file |
| 3B2 | Op.: Op. Instrns. - Cross-Ref 1 at a time |
| 4D3 | Op.: Op. Instrns to create top-node summary table |
| 6B2 | Op.: Op. Instrns to generate JobFlow Reports |
| 8L2 | Op.: Op. Instrns. for scan5d |
| 2C1 | Operating: spreadA - Operating Instructions |
| 2E1 | Operating: verifytext - Operating Instructions |
| 2G1 | Operating: Operating Instructions |
| 3B1 | Operating: Operating Instructions |
| 4A1 | Operating: statallmvs1/statallvse1 - Operating Instructions |
| 4D1 | Operating: Operating Instructions |
| 4F1 | Operating: Operating Instructions |
| 5B1 | Operating: statallmvs1/statallvse1 - Operating Instructions |
| 5D1 | Operating: cobmap1 Operating Instructions |
| 5E1 | Operating: ANIMATION operating instructions |
| 7G2 | Operating: uvcmp1 demo#1 - Operating Instructions |
| 8B2 | Operating: tabfix1 - Operating Instructions |
| 8D3 | Operating: toascii Operating Instructions |
| 8I2 | Operating: acum1 - operating instructions |
| 9A1 | Operation: 'vi' 2 modes of operation - COMMAND or INSERT |
| 6H1 | Option: ex#2 - arg3 option scan 1 file (vs all in dir) |
| 6H2 | Option: ex#3 - option m0 to report filenames & match counts only |
| 7H3 | Option: console displays for option changes |
| 7K2 | Option: 'y' for column scale headings |
| 7K2 | Option: sample uvlist with option 'y80' |
| 8E3 | Option: console display & option prompts |
| 8I2 | Option: console log (option prompts) |
| 1E1 | Options: ll_ scripts list files with various options |
| 2F1 | Options: results AFTER default options a0b80c0d0e0f2j1 |
| 2F2 | Options: modify grepsum1 options to improve results |
| 2F2 | Options: results AFTER options a0b0c0d3e1f2j1 + c0d3e1 |
| 2F2 | Options: results AFTER options a0b0c0d3e1f2j1 + c2d3e1 |
| 4D2 | Options: table2 - OPTIONS (for Fixed Field files) |
| 8C1 | Options: rerun with options 'b3f1' |
| 8K1 | Options: console log - options prompt |
| 8K2 | Options: notes re command line options |
| 1H1 | Owner: findowner - find files for a specified owner |
| 7D1 | Packed: demo#2 - using custmas1 with packed fields |
| 8D2 | Packed: Packed Decimal fields |
| 2A2 | Page: list 1st page only of all files in directory |
| 7C2 | Page: Notes re uvcp on page above |
| 1F8 | Parent: statdir1 - report file counts & KB used in a Parent dir |
| 3G1 | Parm: 3G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM |
| 7F1 | Parm: listall2 demo - list all parm files |
| 3G1 | Parms: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT |
| 1R1 | Part: 1R2. Unix/Linux aids documented in ADMjobs.doc Part 8 |
| 1R1 | Part: Unix/Linux aids documented in ADMjobs.doc Part 7 |
| 1T1 | Pattern: editmfp1 - edit Multi-Files containing specified Pattern |
| 6H1 | Pattern: scanjcl1 - scan multi-line JCL for pattern & qualifier |
| 1N1 | Patterns: grep - search for patterns in files |
| 8E1 | Patterns: scand2 - scan directory for patterns & qualifiers |
| 8F1 | Patterns: scan3d - select lines between 2 patterns qualified by 3rd |
| 1I1 | Permissions: findgrpnw - find files with No Group Write permissions |
| 1I1 | Perms: findgrpnwfix - find No Group Write perms & FIX |
| 8A1 | Power: uvcopy - power of assembler without the complexity |
| 8A1 | Pre-programmed: Pre-Programmed jobs using 'uvcopy' |
| 9B3 | Prefixes: common prefixes to identify related files |
| 2A2 | Print: uvlp13LD - print Mainframe reports on Unix/Linux |
| 2A1 | Printers: 'uvlp__' scripts for Laser printers |
| 2G1 | Problem: sample problem for scan1d |
| 7C2 | Problem: common problem when files FTP'd from mainframe |
| 3F1 | Proc: 3F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC |
| 8M1 | Procedure: & logic |
| 1S1 | Process: scripts to process ALL files in directory |
| 8B2 | Process: entire directory |
| 3F1 | Procs: xkshproc1 - list all PROCs executed in any 1 ksh SCRIPT |
| 8M1 | Procs: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8X1 | Procs: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 7C1 | Products: sample text file dat1/products |
| 1A1 | Profiles: 'profiles' provided in /home/uvadm/env |
| 1B1 | Profiles: Recommended Aliases in profiles |
| 3C1 | Program: xcobcopy1 - list all COPYBOOKS in any 1 PROGRAM |
| 3C2 | Program: xcobcall1 - list of all Called-Programs in each Program |
| 3C4 | Program: xcobsql1 list all SQL Includes in any 1 Program |
| 3E2 | Program: xkshprog2 - crossref all ksh SCRIPTS executing any 1 PROGRAM |
| 7C3 | Program: Alternative - modify the COBOL program |
| 7K1 | Program: uvlist - Program Description |
| 2D2 | Programs: cleanup demo - for COBOL programs |
| 2J1 | Programs: execute script to select desired cbls programs |
| 2J1 | Programs: output script to select cbls programs |
| 2J1 | Programs: sample crossref COBOL programs called by JCL/scripts |
| 3C1 | Programs: xcobcopy2 - crossref all PROGRAMS using any 1 COPYBOOK |
| 3C2 | Programs: xcobcall2 - crossref all Programs calling any 1 Called-Program |
| 3C3 | Programs: xcobfile2 - cross-ref programs using each filename |
| 3C4 | Programs: xcobsql2 crossref all Programs using any 1 SQL Include |
| 3E1 | Programs: xkshprog1 - list all PROGRAMs executed in any 1 ksh SCRIPT |
| 8L3 | Programs: scan JCL for certain programs |
| 8N1 | Programs: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 8X2 | Programs: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 9B1 | Programs: example - editing & compiling programs |
| 8K1 | Prompt: console log - options prompt |
| 8E3 | Prompts: console display & option prompts |
| 8I2 | Prompts: console log (option prompts) |
| 1A1 | Provided: 'profiles' provided in /home/uvadm/env |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 8F1 | Qualified: scan3d - select lines between 2 patterns qualified by 3rd |
| 6H1 | Qualifier: scanjcl1 - scan multi-line JCL for pattern & qualifier |
| 8E1 | Qualifiers: scand2 - scan directory for patterns & qualifiers |
| 6I1 | Queue: lockdemo1 - file locking, queue jobs to run serially |
| 9A4 | Quit: WRITE & QUIT |
| 7L1 | Rdw: mainframe file in RDW format for FTP |
| 7G4 | Re-converted: Compare ALL re-converted files to original EBCDIC files |
| 5H1 | Rebuild: - Micro Focus utility |
| 5H2 | Rebuild: uvcp alternative to rebuild |
| 5H1 | Rebuilding: .idx from only .dat |
| 1B1 | Recommended: Recommended Aliases in profiles |
| 5C1 | Recommended: cobfiles5A - recommended alternative |
| 5D1 | Record: 'cobmap1' - generate record layouts from COBOL copybooks |
| 4E1 | Record-size: summary |
| 4D1 | Records: demo input file - 1st 3 of 20 records |
| 7E1 | Records: listrec2 - list fixed length records |
| 7E2 | Records: listhex2 - list fixed length records in hexadecimal |
| 8K1 | Records: selectf1 - select records depending on field value |
| 1E4 | Recursively: llr - list Recursively all dirs & all files |
| 9A4 | Reference: vim Reference |
| 3G1 | Referenced: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT |
| 3A1 | References: Cross References for COBOL & JCL/scripts |
| 6I2 | Reject: lockdemo2 - file locking, reject 2nd attempts until 1st ends |
| 9B3 | Related: common prefixes to identify related files |
| 1G0 | Remove: scripts to list/copy/move/remove old/new files |
| 1G3 | Remove: rmold1 - remove files older than x days |
| 1C1 | Rename: File Rename scripts |
| 2G1 | Replace: scan/replace jobs more powerful than grep & sed |
| 8C1 | Rerun: with options 'b3f1' |
| 7B2 | Response: to search/verify command |
| 2F1 | Result: example - grep for EXEC & drop duplicates from result |
| 1N1 | Results: grep results |
| 2F1 | Results: grepsum1 - summarize grep search results |
| 2F1 | Results: AFTER default options a0b80c0d0e0f2j1 |
| 2F2 | Results: modify grepsum1 options to improve results |
| 2F2 | Results: AFTER options a0b0c0d3e1f2j1 + c0d3e1 |
| 2F2 | Results: AFTER options a0b0c0d3e1f2j1 + c2d3e1 |
| 9B1 | Right: working above subdirs - RIGHT |
| 1G3 | Rmold1: - remove files older than x days |
| 9B1 | Rule: Exception to the Rule |
| 6E1 | Rules: Rules for using lastgenr |
| 6F1 | Run: getEtime - display 'job times' for last run of any JCL/script |
| 6I1 | Run: lockdemo1 - file locking, queue jobs to run serially |
| 8B1 | Run: tabfix1 to expand tabs |
| 8C2 | Run: output file 1st run - tmp/CAR101.cbl |
| 8C2 | Run: output file 2nd run - tmp/car101.cbl |
| 5F2 | Run-time: Micro Focus COBOL - Run-time Error Codes |
| 5F3 | Run-time: Micro Focus COBOL - Run-time Error Messages |
| 1B1 | Rundata: cd aliases to RUNDATA, RUNLIBS,& CNVDATA |
| 1B2 | Rundata: aliases for 'mvstest' RUNDATA & RUNLIBS |
| 1B1 | Runlibs: cd aliases to RUNDATA, RUNLIBS,& CNVDATA |
| 1B2 | Runlibs: aliases for 'mvstest' RUNDATA & RUNLIBS |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 8J1 | Sales: customer master sales report |
| 1E2 | Sample: use & output |
| 1E3 | Sample: llc - list with line counts - sample output |
| 1F5 | Sample: report |
| 1F8 | Sample: statdir1 - sample report |
| 2B1 | Sample: listall2 - sample command & output |
| 2C1 | Sample: spreadA - sample report |
| 2D2 | Sample: cleanup demo - sample INPUT |
| 2D2 | Sample: cleanup demo - sample OUTPUT |
| 2E1 | Sample: verifytext - sample report |
| 2G1 | Sample: problem for scan1d |
| 2G2 | Sample: report |
| 2H2 | Sample: output _more script |
| 2H2 | Sample: output _mv script |
| 2J1 | Sample: crossref COBOL programs called by JCL/scripts |
| 3B2 | Sample: report |
| 3C1 | Sample: COBOL Cross-Ref Sample Reports |
| 4C1 | Sample: input /var/log/messages |
| 4C1 | Sample: output report |
| 4D1 | Sample: output report |
| 4D3 | Sample: report - summary of HLQs in all JCL |
| 4F1 | Sample: report |
| 5C2 | Sample: COBOL files report |
| 5I2 | Sample: demo acucobolx1 with sample file |
| 6A1 | Sample: xmvs/mvsfiles3 sample data file trace |
| 6B1 | Sample: JobFlow sample report |
| 6E1 | Sample: Sample Op Instrns - display latest gen file |
| 7B1 | Sample: uvhdcob - sample display |
| 7C1 | Sample: text file dat1/products |
| 7E1 | Sample: output report |
| 7E2 | Sample: output report |
| 7G3 | Sample: uvcmp1 demo#1 - sample report |
| 7H2 | Sample: gentest1 - sample input |
| 7H2 | Sample: output |
| 7K2 | Sample: uvlist with option 'y80' |
| 7K3 | Sample: output of utmpdump |
| 7K3 | Sample: output of uvlist |
| 8F1 | Sample: Notes re sample scan3d report |
| 8F1 | Sample: scan3d - sample report |
| 8I2 | Sample: report from acum1 |
| 8L1 | Sample: exception report |
| 8O1 | Sample: report |
| 4B1 | Samples: statmvsjcl1 - mainframe JCL stat report samples |
| 4B3 | Samples: statcbl11 - COBOL stat report samples |
| 5B2 | Samples: statcbl11 - COBOL stat report samples |
| 7K2 | Scale: option 'y' for column scale headings |
| 2E1 | Scan: verifytext - scan files in subdir for binary data |
| 2G1 | Scan: scan/replace jobs more powerful than grep & sed |
| 6H1 | Scan: ex#2 - arg3 option scan 1 file (vs all in dir) |
| 6H1 | Scan: scanjcl1 - scan multi-line JCL for pattern & qualifier |
| 8E1 | Scan: scand2 - scan directory for patterns & qualifiers |
| 8E4 | Scan: example#2 - scan JCL for INCLUDE on SORTs |
| 8L3 | Scan: JCL for certain programs |
| 8O1 | Scan: scanjcl4varlth1 - scan JCL for variable length files |
| 2G1 | Scan1d: sample problem for scan1d |
| 8F1 | Scan3d: Notes re sample scan3d report |
| 8F1 | Scan3d: - sample report |
| 8F1 | Scan3d: - select lines between 2 patterns qualified by 3rd |
| 8L1 | Scan5d: - search directory for exception files |
| 8L2 | Scan5d: Op. Instrns. for scan5d |
| 8E1 | Scand2: - command format & example |
| 8E1 | Scand2: - scan directory for patterns & qualifiers |
| 6H1 | Scanjcl1: - scan multi-line JCL for pattern & qualifier |
| 8O1 | Scanjcl4varlth1: - scan JCL for variable length files |
| 1N1 | Search: grep - search for patterns in files |
| 2F1 | Search: grepsum1 - summarize grep search results |
| 7B2 | Search: response to search/verify command |
| 8L1 | Search: scan5d - search directory for exception files |
| 9A3 | Search: commands |
| 2G1 | Sed: scan/replace jobs more powerful than grep & sed |
| 8B1 | See: use 'uvhd' to see the tabs x'09' |
| 2J1 | Select: execute script to select desired cbls programs |
| 2J1 | Select: output script to select cbls programs |
| 8F1 | Select: scan3d - select lines between 2 patterns qualified by 3rd |
| 8K1 | Select: selectf1 - select records depending on field value |
| 8K1 | Selectf1: - select records depending on field value |
| 2J1 | Selection: xref2cp1 - create selection script from crossref |
| 8M1 | Separate: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8X1 | Separate: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 6K1 | Seq: test# C1 - UV SEQ INPUT vs UV SEQ INPUT |
| 6K1 | Seq: test# C1 - UV SEQ INPUT vs UV SEQ INPUT |
| 7J1 | Sequential: example - sort sequential & load Indexed |
| 6I1 | Serially: lockdemo1 - file locking, queue jobs to run serially |
| 6D1 | Setup: 'testdata' in Your homedir ? |
| 9B2 | Setup: tip#2 - setup 'tmp' sub-dir in your working directory |
| 7F1 | Short: listall2 - list subdir of multiple short files |
| 7F2 | Short: listall2 - script to list subdir of short files |
| 2B1 | Small: listall2 - List All (small) Files in Directory |
| 1Q1 | Smaller: dd example #1 - create a smaller test file |
| 7J1 | Sort: example - sort sequential & load Indexed |
| 1E2 | Sorted: llt - list files sorted by date/time (newest 1st) |
| 8E4 | Sorts: example#2 - scan JCL for INCLUDE on SORTs |
| 2D1 | Source: cleanup - source code maintenance utility |
| 7K3 | Spaces: uvlist as a filter - compress blank lines & spaces |
| 1H1 | Specified: findowner - find files for a specified owner |
| 1T1 | Specified: editmfp1 - edit Multi-Files containing specified Pattern |
| 8M1 | Split: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8N1 | Split: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 8X1 | Split: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8X2 | Split: splitcblcpy1 - split mixed COBOL programs & copybooks |
| 8N1 | Splitcblcpy1: - split mixed COBOL programs & copybooks |
| 8X2 | Splitcblcpy1: - split mixed COBOL programs & copybooks |
| 8M1 | Splitjclproc1: - split mixed JCLs & PROCs to separate subdirs |
| 8X1 | Splitjclproc1: - split mixed JCLs & PROCs to separate subdirs |
| 2C1 | Spreada: spreadA - Operating Instructions |
| 2C1 | Spreada: spreadA - list files 4-up for doc & control |
| 2C1 | Spreada: spreadA - sample report |
| 2C2 | Spreada: spreadA - list files 4-up for doc & control |
| 3C4 | Sql: xcobsql1 list all SQL Includes in any 1 Program |
| 3C4 | Sql: xcobsql2 crossref all Programs using any 1 SQL Include |
| 9A1 | Starting: 'vi' to edit a file |
| 4B1 | Stat: statmvsjcl1 - mainframe JCL stat report samples |
| 4B3 | Stat: statcbl11 - COBOL stat report samples |
| 5B2 | Stat: statcbl11 - COBOL stat report samples |
| 4A1 | Statallmvs1: statallmvs1/statallvse1 - Operating Instructions |
| 4A1 | Statallmvs1: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 5B1 | Statallmvs1: statallmvs1/statallvse1 - Operating Instructions |
| 5B1 | Statallmvs1: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 4A1 | Statallvse1: statallmvs1/statallvse1 - Operating Instructions |
| 4A1 | Statallvse1: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 5B1 | Statallvse1: statallmvs1/statallvse1 - Operating Instructions |
| 5B1 | Statallvse1: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 4B3 | Statcbl11: - COBOL stat report samples |
| 5B2 | Statcbl11: - COBOL stat report samples |
| 1F8 | Statdir1: - report file counts & KB used in a Parent dir |
| 1F8 | Statdir1: - sample report |
| 4B2 | Statistics: statksh1 - converted JCL/script statistics |
| 4B2 | Statksh1: - converted JCL/script statistics |
| 4C1 | Statlogin1: - table summary user logins by month & userid |
| 4D2 | Statlogin1: - uvcopy coding |
| 4B1 | Statmvsjcl1: - mainframe JCL stat report samples |
| 4A1 | Stats: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 5B1 | Stats: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 5F1 | Status: Micro Focus COBOL - File Status Codes |
| 9B1 | Stay: tip#1 - stay in your 'working directory' |
| 9B2 | Sub-dir: tip#2 - setup 'tmp' sub-dir in your working directory |
| 1Q2 | Subdir: script 'dd2ascii' to translate all files in subdir |
| 2E1 | Subdir: verifytext - scan files in subdir for binary data |
| 7F1 | Subdir: listall2 - list subdir of multiple short files |
| 7F2 | Subdir: listall2 - script to list subdir of short files |
| 9B2 | Subdir: examples of using 'tmp' subdir |
| 9C1 | Subdir: cleandir1 - move files from workdir to subdir |
| 4F2 | Subdirs: tblext2 - summarize .ext's in all subdirs of a superdir |
| 8M1 | Subdirs: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 8X1 | Subdirs: splitjclproc1 - split mixed JCLs & PROCs to separate subdirs |
| 9B1 | Subdirs: advantages of working above subdirs |
| 9B1 | Subdirs: working IN subdirs - WRONG |
| 9B1 | Subdirs: working above subdirs - RIGHT |
| 9A3 | Substitution: commands |
| 4D1 | Summaries: table2 - Table Summaries for Fixed Length Fields |
| 2F1 | Summarize: grepsum1 - summarize grep search results |
| 4F2 | Summarize: tblext2 - summarize .ext's in all subdirs of a superdir |
| 1F5 | Summary: tblext1 - table summary counts by file extensions |
| 4C1 | Summary: statlogin1 - table summary user logins by month & userid |
| 4D3 | Summary: Op. Instrns to create top-node summary table |
| 4D3 | Summary: sample report - summary of HLQs in all JCL |
| 4D3 | Summary: table3d - table summary for text files (JCL,COBOL,etc) |
| 4E1 | Summary: record-size summary |
| 4F1 | Summary: tblext1 - table summary counts by file extensions |
| 8E2 | Summary: output#1 - filenames & match count summary |
| 4F2 | Superdir: tblext2 - summarize .ext's in all subdirs of a superdir |
| 3G1 | Sysin: xkshparm1 - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 8B1 | Tabfix1: run tabfix1 to expand tabs |
| 8B1 | Tabfix1: - convert tabs to blanks (1-8, default 4) |
| 8B1 | Tabfix1: tf/tabtest1 - test file for tabfix1,2,3 |
| 8B2 | Tabfix1: - Operating Instructions |
| 1F5 | Table: tblext1 - table summary counts by file extensions |
| 4A1 | Table: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 4C1 | Table: statlogin1 - table summary user logins by month & userid |
| 4D1 | Table: table2 - Table Summaries for Fixed Length Fields |
| 4D3 | Table: Op. Instrns to create top-node summary table |
| 4D3 | Table: table3d - table summary for text files (JCL,COBOL,etc) |
| 4F1 | Table: tblext1 - table summary counts by file extensions |
| 5B1 | Table: statallmvs1/statallvse1 - table stats from JCL/scripts |
| 4D1 | Table2: - Table Summaries for Fixed Length Fields |
| 4D2 | Table2: - OPTIONS (for Fixed Field files) |
| 4D2 | Table2: demo - console display |
| 4D3 | Table3d: - table summary for text files (JCL,COBOL,etc) |
| 8B1 | Tabs: run tabfix1 to expand tabs |
| 8B1 | Tabs: tabfix1 - convert tabs to blanks (1-8, default 4) |
| 8B1 | Tabs: use 'uvhd' to see the tabs x'09' |
| 8B1 | Tabtest1: tf/tabtest1 - test file for tabfix1,2,3 |
| 8B3 | Tabtest1: pf/util/tabtest1 - uvcopy job listing |
| 1F5 | Tblext1: - table summary counts by file extensions |
| 4F1 | Tblext1: - table summary counts by file extensions |
| 4F1 | Tblext1: to calc compile failure % |
| 4F2 | Tblext2: - summarize .ext's in all subdirs of a superdir |
| 6C1 | Tee: joblog1,2,3 - capture logs via 'tee' |
| 1Q1 | Test: dd example #1 - create a smaller test file |
| 6K1 | Test: test# C1 - UV SEQ INPUT vs UV SEQ INPUT |
| 7B2 | Test: test/demo verify command |
| 7G1 | Test: dat1/warmas1a - Alternate test file#2 with differences |
| 7G1 | Test: file#1 /home/uvadm/dat1/warmas1 |
| 7H1 | Test: gentest1 - generate test data files based on COBOL copybooks |
| 8B1 | Test: tf/tabtest1 - test file for tabfix1,2,3 |
| 6D1 | Testdata: setup 'testdata' in Your homedir ? |
| 1F9 | Text: longest1 - find longest line in a text file |
| 4D3 | Text: table3d - table summary for text files (JCL,COBOL,etc) |
| 7C1 | Text: sample text file dat1/products |
| 7C1 | Text: using uvcp to convert 'text' to 'fixed' |
| 7C3 | Text: uvcp to drop CR/LF (convert text to fixed) |
| 7C4 | Text: using 'uvcp' to convert 'fixed' to 'text' |
| 9A2 | Text: INSERT text (ESCAPE to end insert) |
| 6F1 | Times: getEtime - display 'job times' for last run of any JCL/script |
| 9B1 | Tip: tip#1 - stay in your 'working directory' |
| 9B2 | Tip: tip#2 - setup 'tmp' sub-dir in your working directory |
| 8C2 | Tmp: output file 1st run - tmp/CAR101.cbl |
| 8C2 | Tmp: output file 2nd run - tmp/car101.cbl |
| 8E4 | Tmp: output#1 tmp/jcl0_INCLUDE_counts |
| 8E4 | Tmp: output#2 tmp/jcl0_INCLUDE_detail |
| 9B2 | Tmp: examples of using 'tmp' subdir |
| 9B2 | Tmp: tip#2 - setup 'tmp' sub-dir in your working directory |
| 8E2 | Tmp1: output#3 - matching files copied to tmp1/ |
| 8D3 | Toascii: Operating Instructions |
| 8C1 | Tolower: - translate to lower case |
| 4D3 | Top-node: Op. Instrns to create top-node summary table |
| 6A1 | Trace: mvsfiles5A - data file trace in MVS JCL |
| 6A1 | Trace: xmvs/mvsfiles3 sample data file trace |
| 6A2 | Trace: notes re mvsfiles5A data file trace |
| 1Q2 | Translate: dd example #2 - translate EBCDIC to ASCII |
| 1Q2 | Translate: script 'dd2ascii' to translate all files in subdir |
| 8C1 | Translate: tolower - translate to lower case |
| 1D1 | Tree: dtree - draw directory tree |
| 8L3 | Try: Try it yourself |
| 9A1 | Tutorial: 'vi' tutorial |
| 2H1 | Types: verifylib1 - verify module types in a library |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 1Q1 | Unix: dd - Unix/Linux Data utility |
| 1R1 | Unix: 1R2. Unix/Linux aids documented in ADMjobs.doc Part 8 |
| 1R1 | Unix: Unix/Linux aids documented in ADMjobs.doc Part 7 |
| 2A2 | Unix: uvlp13LD - print Mainframe reports on Unix/Linux |
| 5E1 | Unix: Animating MicroFocus COBOL on Unix/Linux |
| 7L1 | Unix: desired Output file on Unix/Linux |
| 1O1 | Unix2dos: dos2unix & unix2dos |
| 6I2 | Until: lockdemo2 - file locking, reject 2nd attempts until 1st ends |
| 6J1 | Until: lockwait1 - wait until file not in use |
| 4C1 | User: statlogin1 - table summary user logins by month & userid |
| 4C1 | Userid: statlogin1 - table summary user logins by month & userid |
| 1F1 | Util: Example - count files in /home/uvadm/sf/util/... |
| 8B3 | Util: pf/util/tabtest1 - uvcopy job listing |
| 1M1 | Utilities: diff & alldiff - marvelous utilities |
| 1P1 | Utility: Vancouver Utility Backups & crontabs |
| 1Q1 | Utility: dd - Unix/Linux Data utility |
| 2D1 | Utility: cleanup - source code maintenance utility |
| 5H1 | Utility: rebuild - Micro Focus utility |
| 7K3 | Utmpdump: sample output of utmpdump |
| 1A1 | Uvadm: 'profiles' provided in /home/uvadm/env |
| 1F1 | Uvadm: Example - count files in /home/uvadm/sf/util/... |
| 7G1 | Uvadm: test file#1 /home/uvadm/dat1/warmas1 |
| 7G2 | Uvcmp1: demo#1 - Operating Instructions |
| 7G3 | Uvcmp1: demo#1 - sample report |
| 7G4 | Uvcmp1all: - compare all files in 2 directories |
| 4D2 | Uvcopy: statlogin1 - uvcopy coding |
| 7F3 | Uvcopy: listall2 uvcopy job called by script listall2 |
| 8A1 | Uvcopy: Pre-Programmed jobs using 'uvcopy' |
| 8A1 | Uvcopy: - power of assembler without the complexity |
| 8B3 | Uvcopy: pf/util/tabtest1 - uvcopy job listing |
| 5H2 | Uvcp: alternative to rebuild |
| 7C1 | Uvcp: using uvcp to convert 'text' to 'fixed' |
| 7C2 | Uvcp: Notes re uvcp on page above |
| 7C3 | Uvcp: to drop CR/LF (convert text to fixed) |
| 7C4 | Uvcp: using 'uvcp' to convert 'fixed' to 'text' |
| 7D1 | Uvcp: scripts to make uvcp easier to use |
| 7D1 | Uvcpf2l: demo using uvcpF2L |
| 7A1 | Uvhd: - display DATA files in Vertical Hexadecimal |
| 8B1 | Uvhd: use 'uvhd' to see the tabs x'09' |
| 8D2 | Uvhd: investigating EBCDIC files with uvhd |
| 8D3 | Uvhd: examine ASCII output - with uvhd |
| 7B4 | Uvhdc2: - script for easier use of uvhdcob |
| 7B1 | Uvhdcob: - display data file fields with COBOL fieldnames |
| 7B1 | Uvhdcob: - sample display |
| 7B3 | Uvhdcob: Notes re uvhdcob Verify |
| 7B4 | Uvhdcob: uvhdc2 - script for easier use of uvhdcob |
| 7K1 | Uvlist: - Program Description |
| 7K2 | Uvlist: sample uvlist with option 'y80' |
| 7K3 | Uvlist: sample output of uvlist |
| 7K3 | Uvlist: as a filter - compress blank lines & spaces |
| 7K1 | Uvlp12: script |
| 2A2 | Uvlp13ld: uvlp13LD - print Mainframe reports on Unix/Linux |
| 2A1 | Uvlp__: 'uvlp__' scripts for Laser printers |
| 7J1 | Uvsort: |
| 7L1 | Uxcp: - complex Data File Conversions |
| 7L1 | Uxcp: command to convert file |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 8K1 | Value: selectf1 - select records depending on field value |
| 1P1 | Vancouver: Vancouver Utility Backups & crontabs |
| 4C1 | Var: sample input /var/log/messages |
| 8O1 | Variable: scanjcl4varlth1 - scan JCL for variable length files |
| 1E1 | Various: ll_ scripts list files with various options |
| 2H1 | Verify: verifylib1 - verify module types in a library |
| 7B1 | Verify: 'v' verify data command |
| 7B2 | Verify: response to search/verify command |
| 7B2 | Verify: test/demo verify command |
| 7B3 | Verify: Notes re uvhdcob Verify |
| 2H1 | Verifylib1: - verify module types in a library |
| 2E1 | Verifytext: - Operating Instructions |
| 2E1 | Verifytext: - sample report |
| 2E1 | Verifytext: - scan files in subdir for binary data |
| 7A1 | Vertical: uvhd - display DATA files in Vertical Hexadecimal |
| 9A4 | Vim: Reference |
| 7I1 | Vtoc: Data File VTOC Report |
| 6J1 | Wait: lockwait1 - wait until file not in use |
| 7G1 | Warmas1: test file#1 /home/uvadm/dat1/warmas1 |
| 7G1 | Warmas1a: dat1/warmas1a - Alternate test file#2 with differences |
| 7C2 | When: common problem when files FTP'd from mainframe |
| 8A1 | Without: uvcopy - power of assembler without the complexity |
| 9C1 | Workdir: cleandir1 - move files from workdir to subdir |
| 9B1 | Working: advantages of working above subdirs |
| 9B1 | Working: tip#1 - stay in your 'working directory' |
| 9B1 | Working: IN subdirs - WRONG |
| 9B1 | Working: above subdirs - RIGHT |
| 9B2 | Working: tip#2 - setup 'tmp' sub-dir in your working directory |
| 1I1 | Write: findgrpnw - find files with No Group Write permissions |
| 1I1 | Write: findgrpnwfix - find No Group Write perms & FIX |
| 9A4 | Write: WRITE & QUIT |
| 9B1 | Wrong: working IN subdirs - WRONG |
| 3C2 | Xcobcall1: - list of all Called-Programs in each Program |
| 3C2 | Xcobcall2: - crossref all Programs calling any 1 Called-Program |
| 3C1 | Xcobcopy1: - list all COPYBOOKS in any 1 PROGRAM |
| 3C1 | Xcobcopy2: - crossref all PROGRAMS using any 1 COPYBOOK |
| 3C3 | Xcobfile2: - cross-ref programs using each filename |
| 3C4 | Xcobsql1: list all SQL Includes in any 1 Program |
| 3C4 | Xcobsql2: crossref all Programs using any 1 SQL Include |
| 3D1 | Xkshfile1: - list all DATAFILES used in any 1 ksh SCRIPT |
| 3D2 | Xkshfile2: - crossref all ksh SCRIPTs using any 1 DATAFILE |
| 3G1 | Xkshparm1: - list all SYSIN/PARMs referenced in any 1 ksh SCRIPT |
| 3G1 | Xkshparm2: 3G2. xkshparm2 - crossref ksh SCRIPTS executing any 1 PARM |
| 3F1 | Xkshproc1: - list all PROCs executed in any 1 ksh SCRIPT |
| 3F1 | Xkshproc2: 3F2. xkshproc2 - crossref ksh SCRIPTS executing any 1 PROC |
| 3E1 | Xkshprog1: - list all PROGRAMs executed in any 1 ksh SCRIPT |
| 3E2 | Xkshprog2: - crossref all ksh SCRIPTS executing any 1 PROGRAM |
| 6A1 | Xmvs: xmvs/mvsfiles3 sample data file trace |
| 2J1 | Xref2cp1: - create selection script from crossref |
| 2J1 | Xref2cp1: - generate copy scripts from cross-reference reports |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 7K2 | Y80: sample uvlist with option 'y80' |
| 9A2 | Yank: COPY lines (YANK & PUT) |
| 8L3 | Yourself: Try it yourself |
| 2H2 | _more: sample output _more script |
| 2H2 | _mv: sample output _mv script |
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page