uvhelp - most useful unix & Vancouver Utility commands

The unix help menus & scripts are available to anyone (regardless of whether you are a Vancouver Utility customer). See 'V91' for download instructions. 'uvhelp' can be used in 3 ways:


 #1. Using the website http://uvsoftware.ca/uvhelp.htm
     - follow the links to the submenu desired
     - to determine command format or script required for desired task

 #2. Hard-copy documentation (assuming Vancouver Utilities installed)
     - printed using script --> uvlp12D doc/uvhelp.doc

 #3. Command Line Menus (assuming Vancouver Utilities installed)
     --> uvhelp   <-- display main-menu (this page)
                    - determine sub-menu (v11,v12,etc) for command desired
     --> q        <-- quit main-menu
     --> v##      <-- enter code for sub-menu (v11,v12,etc)
                    - lower case 'v' (not UPPER case shown below)
     --> q        <-- quit sub-menu
     --> xxxxx    <-- enter command desired

Goto:   Begin this document End this document UVSI Home-Page

uvhelp - main-menu

V11. Listing files & directories sorted by name,date,size etc
llm - sorted by filename, same as 'ls -l | more', saves keystrokes
llt - sorted by creation date, latest first
llta - sorted by last access time, latest first
lls - sorted by file size, biggest first
... - several more, all scripts pipe to more, enter for next screen
V12. counting files in directories & lines in files, some matching patterns
 (wc, llc, cfd, cfdt, cfdd, cfdp, clf, clfp, clfd, clfdp)
wc - unix Word Count, examples
llc - similar to 'ls -l | more', but with file seq# & line counts/file
cfd - Count Files in a Directory (listing each file)
cfdt - Count Files in a Directory, Total only (1 line answer)
cfdd - Count Files in Directories within a parent Directory
cfdp - Count Files in a Directory with a Pattern on any line in any file
clf - Count Lines in 1 File
clfp - Count Lines in a File with a specified Pattern
clfd - Count Lines & Files in a Directory, optionally matching a pattern
clfdp - Count Lines in all Files of a Dirctory with a Pattern
V13. Renaming files in a dirctory (all or matching a pattern)
 renameL - translate filenames to lower case, renameU to UPPER case
 renameX - replace eXtension with alternate, renameP Prefix to alternate
 renameAA - replace Any pattern with any Alternate anywhere in filename
 renameB2_ - change blanks to underscores, renameD2_ '$' signs to '_'s
 rename1R - rename 1 file Recursively, searching directory tree
 ......... - several more, all scripts display old/new filenames with seq#
V14. finding differences between 2 files or 2 directories of files
diff - show differences in 2 text files, most impressive unix command
alldiff2 - diff all files in 2 sub-dirs, great for mass changes
- save old, run new, alldiff prove intended changes, no unwanted
uvcmp1 - for fixed-length files (diff works only for text files)
- great for files with packed/binary, shows diffs in hexadecimal
V15. list/remove/move files older than or newer than specified days
lsold1 - list files older than a specified number of days
lsnew1 - list files newer than a specified number of days
rmold1 - remove files older than the specified number of days
...... - several more, all recursive (descending directory tree)
- can list old files before removing (or moving to archive dir)

Goto:   Begin this document End this document UVSI Home-Page

uvhelp - unix & VU most useful command summaries

V21. find - finding files whose filenames match a pattern
- examples using unix 'find' (recursive, descends directory tree)
V22. grep - finding records (within files) matching a data pattern
- examples using unix 'grep', alias with -n to show line# of matches
V23. sed - unix utility to search/modify text files
- examples using 'sed' for search/replace
runsed1 - script to repeat sed for all files in directory
V24. removeCR, insertCR - removing & inserting CRs in text files
 converting Windows files to Unix & Unix files to Windows
V25. dropbl0 - drop all blank lines using 'sed'
dropbl1 - drop all blank lines using 'uvcp' option typ=LSTb2
dropbl2 - reduce multi blank lines to 1 using 'uvcp' option typ=LSTb1
dropbl3 - drop blank lines & COBOL blank comments (only '*'s & blanks)
- all scripts copy to tmp/ for inspection & copy back if OK
V26. tr - unix command to translate any specified characters to alternates
- folowing scripts use 'tr' to translate all files in directory
 all2lower - translate to lower-case, copying all files to 2nd subdir
 all2upper - translate to UPPER-case, copying all files to 2nd subdir
  - mainframe conversions need to inhibit translates within quotes
tolower - uvcopy job translate to lower with options inhibit within quotes
toupper - uvcopy job translate to UPPER with options inhibit within quotes
cleanup - uvcopy job with many options for lower/UPPER, clear 1-6, 73-80,etc

Goto:   Begin this document End this document UVSI Home-Page

uvhelp - unix & VU most useful command summaries

V31. uvlp__ scripts, print text files at various lpi, cpi, margins, etc
 page headings with filename,date,user,page#,line#
- perfect for listing scripts, programs, parameter files, etc
uvlp12 - list at 12 cpi (90 chars on 8", leaving margin for 3 holes)
 uvlp14,16,18 - list at 14,16,18 cpi (18 cpi for 132 chars on 8")
 uvlp12D - Duplex, 12 cpi, 6 lpi, 60 lines/paage, for UV documentation
 uvlp13LD - Landscape & Duplex, 13 cpi, 8 lpi, 66 lines of 132
 uvlpd12 - list all files in directory with file list on 1st page
 ....... - about 50 more with various combinations cpi, lpi, etc
 lpstat - unix command to display status of printers & queues
 allcancel - cancel all outstanding print requests for logged in user
V32. uvhd - display any file in vertical hexadecimal
- browse,search,select,update,print,acum,count,
- a free download from www.uvsoftware.ca/libuvhd.htm
V33. uvhdcob - similar to uvhd, but displays cobol copybook fieldnames
  beside data field contents
V34. uvcp - command line utility for record selection, reformatting,
 translation, numeric field conversions among packed/zoned/binary, etc.
V35. uvsort - provides mainframe sorting capability to UNIX systems.
- replaces mainframe SORT/SYNCSORT on unix/linux systems
 UNIX system sort cannot process fixed record sizes without LineFeeds,
 packed decimal fields,& Indexed files.
V36. uvcpfix1 - copy Text files changing file-type, record-size,& reformatting
uvcpfix2 - copy Fixed-Length records changing type, size,& reformatting
 These scripts call the 'uvcp' utility & the commands are much easier to
 enter than calling uvcp directly. The scripts copy the data file to tmp/...
 You can then inspect & if OK, copy to desired location or overwrite input

Goto:   Begin this document End this document UVSI Home-Page

uvhelp - unix & VU most useful command summaries

V41. uvcopy powerful (can do anything) data file manipulation utility.
 the power of assembler without the complexity (no compile)
 just edit a parameter/instruction file & run with uvcopy interpreter
 essential for mainframe applications on Unix/Linux systems,
 because it can do many things not possible with the unix utilities
 such as: processing 'packed decimal' fields, handling 'Indexed files',
 & addressing by column# (common on mainframe, but not on unix.
V42. uvfix1,uvfixA,uvfix2,uvfixB modify 1 file or all files in directory
 applying uvcopy instructions without writing file I/O framework
 These scripts make it EASY to use the POWER of the uvcopy utility.
V43. list long records, 100 bytes/line with scale
- great for mainframe type records when you need to determine column#s
 listrec1/listhex1 - for Text records with LF terminators
 listrec2/listhex2 - for Fixed-Length records without LFs
V44. tabfix1,2,3 - converting tabs to blanks
 option for how many, or depending on column, or tab-rack
V45. table summaries, count records & acum amounts by any argument
 table2 script makes it easy, example: count sales by product#
 table2 dat1/sales3 a30b6r64 - options identify argument & recsize
 ===========================
- a30=displacement(to product#), b6=length, r64=record-size
V46. addup1 - accumulate any field by options for displacement & length
- addup1 for Text files terminated by Line-Feeds
- addup2 for Fixed-Length record files (max recsize 4096)
- Example, to acum $sales start col=54,length=9,decimals=2
 uvcopy addup1,fili1=dat1/sales2,uop=b53c9e2
 ===========================================

Goto:   Begin this document End this document UVSI Home-Page

uvhelp - unix & VU most useful command summaries

V81. vi Command Summary - minimum essentials
 + links to advanced tutorials
V82. Unix/Linux Tips & Directory Housekeeping
V83. Vancouver Utilities Directories
- links to installation & profiles required
V84. Mainframe Conversion Super-dirs & sub-dirs
- links to more information
V85. cross-references - COBOL & JCL/scripts
 sample reports - xcobcopy1/2, xkshprog1/2, cobfiles report, etc
- links to more samples & operating instructions
V91. Download & Install uvhelp & uvscripts
- available to anyone regardless of customer or not
V92. Creating your own help menus
- for your own applications, or for any commands that you would like
  to have an easy way to be reminded of the arguments required.

Goto:   Begin this document End this document UVSI Home-Page

V11. Help Menus for Unix & Vancouver Utilities

v11 - Listing files & directories

l
  • 'l' (alias l='ls -l') saves keystrokes for this commonly used command
llm
  • List Long files in Directory & pipe to more (sorted by filename)
  • like 'ls -l | more', but allows argument directory (default current)
  • saves keystrokes & adds functionality to this often repeated command
lla
  • same as llm, but lists All files including hidden .files
llc
  • list all filenames in directory with file & line counts
lld
  • list directories only (omit files)
llr
  • list files & subdirs Recursively (all the way down)
llt
  • list files sorted by last modification/creation date/time
lltr
  • same as llt, but with Reverse sort (oldest 1st)
llta
  • sorted by last access time, latest first
lls
  • list files sorted by Size, largest 1st
llsr
  • same as lls, but with Reverse sort, smallest 1st
llu
  • list files Unsorted, as stored in directory
lslp
  • list files in directory & print immediately
  • prints using 'uvlp12' - VU laser printing utility
  • see uvlp12 documented in uvlist.htm
spreadA
  • list filenames 4-up across the page
  • great for JCL/scripts, COBOL programs, copybooks, etc
    (directories with 100's or 1000's of modules)

sample output for 'llc'


 llc $UV/sf/util           <-- list Vancouver Utility script filenames
 ===============             - with File & Line counts (25 files/screen)
 llc /home/uvadm/sf/util   <-- '$UV' usually /home/uvadm
 =======================     - but could be different at your installation
 File#   Lines
     1      43 -rwxrwxr-x 1 uvadm apps 1929 Jan 20 17:29 sf/util/acum1
     2      21 -rwxrwxr-x 1 uvadm apps 900 Jan 20 17:29 sf/util/allcancel
     3      29 -rwxrwxr-x 1 uvadm apps 828 Jan 20 17:29 sf/util/allchmod
                        --- 412 lines omitted ---
   416      59 -rwxrwxr-x 1 uvadm apps 2729 Jan 20 17:29 sf/util/xvsesli2
   416 files,     15878 total lines in directory sf/util

more info on VU scripts

You can see a help screen for each script, by entering the script-name only, without its required arguments (omit the directory). See these scripts listed on pages http://uvsoftware.ca/scripts1.htm#3A1 - 3H1

Goto:   Begin this document End this document UVSI Home-Page

V12. Help Menus for Unix & Vancouver Utilities

v12 - counting Lines & Files in Directories

wc
  • unix Word Count, examples
llc
  • similar to 'ls -l | more', but with file seq# & line counts/file
cfd
  • Count Files in a Directory (listing each file)
cfdt
  • Count Files in a Directory, Total only (1 line answer)
cfdd
  • Count Files in Directories within a parent Directory
cfdp
  • Count Files in a Directory with a Pattern on any line in any file
clf
  • Count Lines in 1 File
clfd
  • Count Lines & Files in a Directory
clfp
  • Count Lines in a File with a specified Pattern
clfdp
  • Count Lines in all Files of a Dirctory with a Pattern
clfd2
  • Count Lines,Files,& KB in a directory, optionally matching a pattern

prep for demos using help files


 #0a. Login yourself --> /home/userxx
 #0b. cp -r $UV/help .  <-- copy help/ directory to your homedir

demo wc - Word Count


 #1. wc help/uvhelp            <-- wc 1 file at a time
     ==============
     88  505 3707 help/uvhelp  <-- sample output
  Lines Words Chars Filename   <-- field headings not shown by wc

 #2. wc help/uvhelp/*          <-- wc all files in directory
     ================
     88    505   3707 help/uvhelp
     58    360   2352 help/v11
     80    444   2953 help/v12
       --- 21 lines omitted ---
     79    389   3240 help/v93
   2417  13798 104767 total

Goto:   Begin this document End this document UVSI Home-Page

demo clf - Count Lines in 1 file

Note
  • following scripts based on 'wc'

 clf help/uvhelp       <-- count Lines in $UV/help/uvhelp (main menu)
 ===============
      110 help/uvhelp  <-- response

demo llc - list all files in subdir with line counts


 llc help     <-- list files in help/... with Line counts
 ========
 File#   Lines
     1     110 -rwxrwxr-x 1 uvadm apps 4555 Apr  5 10:55 help/uvhelp
     2      58 -rwxrwxr-x 1 uvadm apps 2348 Apr  5 10:57 help/v11
     3     113 -rwxrwxr-x 1 uvadm apps 3953 Apr  5 10:57 help/v12
     --- 25 lines omitted ---
    29     148 -rwxrwxr-x 1 uvadm apps 5678 Apr  5 10:47 help/v92
    29 files,      2948 total lines in directory help

demo cfd - Count all Files in 1 subdir


 cfdt help     <-- count files in help/... Total only
 =========
       29 files in directory: help   <-- response

demo clf - Count Files & Lines in subdir


 clfd help     <-- count Lines & Files (response 1 line per file)
 =========
 File#    Lines File-Name
 #0001      120 help/uvhelp
 #0002       57 help/v11
 #0003      155 help/v12
 #0004      100 help/v13
       --- 25 lines omitted ---
 #0029      101 help/v92
 #0029     3280 Total files & lines in directory

Goto:   Begin this document End this document UVSI Home-Page

demo clfd2 - Count Files,Lines,& KB in Directory


 clfd2 help
 ==========
 File#       KB     Lines File-Name
 #0001        8       120 help/uvhelp
 #0002        4        57 help/v11
 #0003        8       155 help/v12
       --- 25 lines omitted ---
 #0029        8       101 help/v92
  0029      196     3280 Total files & lines in directory help

2nd demo clfd2 - Counts with optional pattern match


 clfd2 $UV/dat1 'vendor*.dat' <-- count files in dat1/* matching 'vendor*.dat'
 ===========================
 File#       KB     Lines File-Name
 #0001        4         8 /home/uvadm/dat1/vendormas4.dat
 #0002        4         0 /home/uvadm/dat1/vendormas5.dat
 #0003        4         0 /home/uvadm/dat1/vendormas6.dat
 #0004        4         6 /home/uvadm/dat1/vendorpay4.dat
  0004       16        14 Total files & lines in directory /home/uvadm/dat1
                          with matching pattern 'vendor*dat'

demo cfdd - Count Files in all sub-Dirs of a super-Dir


 cfdd sf
 =======
 cfdd - count files in all sub-dirs of a super-dir
 00144 files in subdir #00001 sf/adm
 00078 files in subdir #00002 sf/demo
 00217 files in subdir #00003 sf/IBM
 00420 files in subdir #00004 sf/util
 00859 files in 00004 subdirs of sf 20142204:1703

Goto:   Begin this document End this document UVSI Home-Page

demo clfp - Count Lines in 1 File with a Pattern


 clfp help/v21 'grep'
 ====================
 3 lines of 0000044 contain "grep" in file: help/v21

demo clfdp - Count Lines in all Files in Directory with a Pattern


 clfdp help 'grep'
 ================
 0001 lines of 0000120 contain "grep" in file #0001 - help/uvhelp
 0013 lines of 0000155 contain "grep" in file #0003 - help/v12
 0003 lines of 0000044 contain "grep" in file #0007 - help/v21
 0013 lines of 0000051 contain "grep" in file #0008 - help/v22
 0030 Total lines contain "grep" in 0004 of 0029 files in directory: help

demo cfdp - Count Files in all Files of Directory with a Pattern


 cfdp help 'grep'
 ===============
 #0001: help/uvhelp does  contain "grep" on 0001 lines
 #0003: help/v12 does  contain "grep" on 0013 lines
 #0007: help/v21 does  contain "grep" on 0003 lines
 #0008: help/v22 does  contain "grep" on 0013 lines
  0004 files of 0029 do  contain "grep" in directory: help

cfdp - 2nd demo illustrating 'not'


 cfdp help 'uvsoftware' not
 ==========================
 #0002: env/bashrc does not contain "uvsoftware"
 #0003: env/common_defines does not contain "uvsoftware"
 #0010: env/kshrc does not contain "uvsoftware"
 #0012: env/ReleaseNotes does not contain "uvsoftware"
 #0015: env/stub.ini does not contain "uvsoftware"
  0005 files of 0023 do not contain "uvsoftware" in directory: env

more info on VU scripts

You can see a help screen for each script, by entering the script-name only, without its required arguments (omit the directory). See these scripts listed on pages http://uvsoftware.ca/scripts1.htm#5B1 - 5E1

Goto:   Begin this document End this document UVSI Home-Page

V13. Help Menus for Unix & Vancouver Utilities

v13 - file 'rename' scripts

These scripts rename all files (or files matching a pattern) in a directory. Renaming dozens or hundreds of files is often required when you import files from outside sources & these scripts can save you hours of keyboard drudgery.

renameL
  • translate filenames to lower case
renameU
  • translate filenames to UPPER case
renameLsd
  • translate filenames to lower case in all subdirs of a superdir
renameP
  • replace existing prefix with alternate
rename-P
  • remove any specified prefix
rename-P.
  • remove specified prefix up to 1st '.'
rename+P
  • add any specified prefix
renameX
  • change any specified extension to any specified alternate
rename.X
  • change specified .extension to any specified .alternate
rename-X
  • remove any specified extension
rename-.X
  • remove any specified extension back to last '.' (default)
  • may specify an alternate extension (vs '.' default)
rename+X
  • add any specified extension
rename-AA
  • remove Any pattern Anywhere in filename
renameAA
  • replace Any pattern with any Alternate
renameB2_
  • change any embedded blanks to underscores
renameD2_
  • change any '$' dollar signs to '_' underscores
rename-QQ
  • remove any 'Quotes'
rename-PP
  • remove any (Parenthesis)
rename2PP
  • rename to whatever is in (Parenthesis)
rename-TS
  • remove any timestamp _HHMMSS ('_' + 6 digits)
  • preserves anything following _###### (.dat, .txt, etc)
renameGDG
  • change mainframe GDG suffixes to Vancouver Utility gdg suffixes
  • change '.G####V00' to '_00####'
renameGDG1
  • change '.G####V00' to '_000001' (keep only latest as 000001)
rename1R
  • rename 1 file Recursively, searching the arg1 directory tree
    for the arg2 file & renaming as arg3
  • see example by entering scriptname without arguments

more info on VU scripts

You can see a help screen for each script, by entering the script-name only, without its required arguments (omit the directory). See all scripts listed on pages http://uvsoftware.ca/scripts1.htm#1B1 - 1I2. See multi rename... example at http://uvsoftware.ca/scripts1.htm#1A1

Goto:   Begin this document End this document UVSI Home-Page

example - renaming Mainframe Data Files

Here is a great example of the extreme usefulness of these 'rename' scripts. When mainframe files are transferred to unix/linux, we like to remove any quotes, translate to lower case & remove any extraneous extensions. We will also convert any '$' Dollar-signs to '_' Underscores since '$' is not allowed in unix filenames.

Assume the files have been FTP'd to /p4/cnvdata/dat1/... & we wish to copy/ rename the files into /p4/cnvdata/dat2/... as shown below:

 /p4/cnvdata
 :---dat1         <-- directory of files FTP'd from Mainframe
 :   :---'E2121653.M$TAXE.PISCINES.CLUS.VSEPRD' <-- filenames from MAINFRAME
 :   :---'E2121656.I$TAXE.FACTURAT.CLUS.VSEPRD'
 :   :---'E2122683.I$TAXE.DEGREVEM.CLUS.VSEPRD'
 :---dat2         <-- directory to rename files for unix/linux
 :   :---e2121653.m_taxe.piscines  <-- filenames desired on Unix/Linux
 :   :---e2121656.i_taxe.facturat
 :   :---e2122683.i_taxe.degrevem

the HARD way to rename files


 #1. cp dat1/* dat2  <-- copy to 2nd directory (to preserve original filenames?)
 #2. cd dat2/
 #3. mv 'E2121653.M$TAXE.PISCINES.CLUS.VSEPRD' e2121653.m_taxe.piscines
 #4. mv 'E2121656.I$TAXE.FACTURAT.CLUS.VSEPRD' e2121656.i_taxe.facturat
 #5. mv 'E2122683.I$TAXE.DEGREVEM.CLUS.VSEPRD' e2122683.i_taxe.degrevem
     mv          --- etc, could be 100's or 1000's of files ---

the EASY way to rename files


 #1. cp dat1/* dat2  <-- copy files to dat2/... before renaming (if desired)
     ==============    - no need to copy, when you have satisfied yourself
                         that these scripts work (as advertised)

 #2. rename-QQ dat2  <-- remove the quotes
     ==============
 #3. renameD2_ dat2  <-- change '$'s to '_'s, '$'s not allowed in unix filenames
     ==============
 #4. rename-X dat2 .CLUS.VSEPRD  <-- remove unwanted extensions
     ==========================
 #5. renameL dat2    <-- translate to lower case
     ============

Without these scripts, it would be a very long, boring, error-prone job to rename the files (could be hindreds) manually using 'mv' commands, OR you would have to develop similar scripts yourself.

Goto:   Begin this document End this document UVSI Home-Page

V14. Help Menus for Unix & Vancouver Utilities

v14 - diff & alldiff2 - invaluable

The Unix 'diff' utility is fantastic whenever you want to see the difference between any 2 text files (programs,copybooks,scripts,etc).

We will illustrate the 'diff' for a COBOL program BEFORE & AFTER conversion. The COBOL converter reads input from subdir 'cbl1' & writes output to 'cbl2'.


 diff -b cbl1/car100.cbl cbl2/car100.cbl
 =======================================
 8,10c8,10
 <            select custmas assign custmas
 <                   organization sequential access mode sequential.
 <            select nalist assign nalist
 ---
 >            select custmas assign EXTERNAL custmas
 >                   organization RECORD sequential access mode sequential.
 >            select nalist assign EXTERNAL nalist
 25a26
 >        01   jobid      pic  x(8).
 28a30,31
 >            display "JOBID" upon environment-name
 >            accept jobid from environment-value.
 34c37
 <            stop run.
 ---
 >            stop run returning 0.
Note
  • Specify the old file 1st & the new file 2nd, then:
  • '<' indicates the old version
  • '>' indicates the new version
  • the Line#s & Changes/Adds/Deletes required to the old version
    to make it the same as the new version

Goto:   Begin this document End this document UVSI Home-Page

alldiff2 script

The 'alldiff2' script (supplied with Vancouver Utilities) makes the unix 'diff' command even more powerful - it repeats the unix 'diff' utitity on each pair of files in 2 directories. This is great when you are make mass changes to directories - save a copy of the original, do the mass change, & run alldiff2 to confirm (changes as intended & no unintended changes).

COBOL conversion is a good example. Before each tool enhancement and re-conversion, I save the current output directory as cbls.old, then after re-conversion, I run alldiff2 to confirm changes as intended.


 #1. vi pf/IBM/cnvMF5          - modify the conversion tool (or your program)

 #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
                                 tool &/or search/replace tables

 #5. alldiff2 cbls.old cbls    <-- run alldiff to create differences report
     ======================      - in tmp/cbls.dif

 #5b. vi tmp/cbls.dif          <-- inspect difference report
      ===============

more info on diff & alldiff2

You can see a help screen by entering the script-name only, without its required arguments (omit the directory). See 'alldiff2' script listed at http://uvsoftware.ca/scripts1.htm#4A1

Goto:   Begin this document End this document UVSI Home-Page

V15. Help Menus for Unix & Vancouver Utilities

v15 - scripts to list/copy/move/remove old/new files

These scripts are recursive, they process an entire directory tree, descending all levels, looking for files older/newer than a specified no of days.

lsold1
  • list files older than a specified number of days
lsold2
  • list files created/modified within 2 specified days old
lsnew1
  • list files newer than a specified number of days
lsnew2
  • list files created/modified within 2 specified days
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
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
mvold1
  • move files older than the x days to a specified directory
cpold1
  • copy files older than the x days to a specified directory
lsold1p
  • list files older than x days & filenames with a specified pattern
lsold2p
  • list files created between 2 dates with a specified pattern
lsnew1p
  • list files newer than x days & filenames with a specified pattern
cpnew1p
  • copy files newer than the x days to a specified directory

Goto:   Begin this document End this document UVSI Home-Page

demo lsold1 & rmold1


 Given - data directory with file creations dates 2010,2011,2012,& 2013
 =====
 Required - Remove any files created more than 2 years ago (730 days)
 ========

 #1 l data    <-- list data directory to see file creation dates
 =========
 -rw-rw-r-- 1 berks apps 186208 Mar 22  2013 abilitydeletesfixa
 -rw-rw-r-- 1 berks apps   2081 Dec 26  2012 berkscodes
 -rw-rw-r-- 1 berks apps    980 Sep  8  2010 empnomagmed100_100908
 -rw-rw-r-- 1 berks apps    193 Sep 14  2010 empnotice_091310
 -rw-rw-r-- 1 berks apps    205 Sep 26  2011 networkgetin
 -rw-rw-r-- 1 berks apps    180 Nov 11 09:53 othperscomptime
 -rw-r--r-- 1 berks apps  26584 Nov 24  2010 securedsite.PDF
 -rw-rw-r-- 1 berks apps    139 Sep 26  2011 sharepointnotes
 -rw-rw-r-- 1 berks apps     84 Jun 19  2013 todo

 #2. lsold1 data 730   <-- see which files will be removed
     ===============
 -rw-rw-r-- 1 berks apps     193 Sep 14  2010 data/empnotice_091310
 -rw-rw-r-- 1 berks apps     139 Sep 26  2011 data/sharepointnotes
 -rw-r--r-- 1 berks apps   26584 Nov 24  2010 data/securedsite.PDF
 -rw-rw-r-- 1 berks apps     980 Sep  8  2010 data/empnomagmed100_100908
 -rw-rw-r-- 1 berks apps     205 Sep 26  2011 data/networkgetin

 #3. rmold1 data +730 -f  <-- remove files older than 730 days (2 years)
     ===================      '-f' option Forces removal with no prompt
                              '-i' option would prompt to remove each file

 #4. l data      <-- list to see files remaining
     ======
 -rw-rw-r-- 1 berks apps 186208 Mar 22  2013 abilitydeletesfixa
 -rw-rw-r-- 1 berks apps   2081 Dec 26  2012 berkscodes
 -rw-rw-r-- 1 berks apps    180 Nov 11 09:53 othperscomptime
 -rw-rw-r-- 1 berks apps     84 Jun 19  2013 todo

more info on VU scripts

You can see a help screen for each script, by entering the script-name only, without its required arguments (omit the directory). See some of these scripts listed at http://uvsoftware.ca/scripts1.htm#4H1 - 4H5

Goto:   Begin this document End this document UVSI Home-Page

V21. Help Menus for Unix & Vancouver Utilities

v21 'find' - find filenames by patterns

Note
  • the examples shown below assume you are in $UV (usually /home/uvadm)
  • we show only the most commonly used forms of find
  • use the 'man' pages to see all options
  • do not confuse find & grep
find
  • finds filenames only via filename patterns
grep
  • finds lines within files via data patterns

'find' - finding files whose filenames match a pattern


 find path -name patern   <-- format of 'find' command
 ======================     - 'path' is commonly coded as '.' which means the
                              current directory & all levels of sub-dirs

 find $UV -name install*   <-- find files in $UV (usually /home/uvadm)
 =======================       whose filename begins with 'install'
 ./doc/install.doc
 ./dochtml/install.htm

 cd   $UV                 <-- alternative, 1st change to $UV (/home/uvadm)
 ========                   - then use '.' (current directory) vs $UV
 find . -name install*    <-- find files whose filename begins with 'install'
 =====================
 ./doc/install.doc
 ./dochtml/install.htm

 find . -iname *install*   <-- find files with 'install' anywhere in filename
 =======================       & in UPPER or lower case (-iname vs -name)
 ./htmlcode/libinstall.htm
 ./doc/install.doc
 ./dochtml/install.htm
 ./dochtml/libinstall.htm
 ./archive/doc/INSTALL_advice

more info about 'find'

Note
  • use the 'man' pages to see all options for find, grep, or any unix command

Goto:   Begin this document End this document UVSI Home-Page

V22. Help Menus for Unix & Vancouver Utilities

v22 'grep' - find lines within files by data patterns

Note
  • we will show only the most commonly used forms of grep
  • use the 'man' pages to see all options
  • do not confuse find & grep
find
  • finds filenames only via filename patterns
grep
  • search for lines within files via data patterns

'grep' - find lines within files matching a data-pattern


 grep pattern files      <-- command format
 ==================

 grep uncompress $UV/doc/*  <-- find lines with 'uncompress' in all files in doc/...
 =========================

doc/ADMjobs.doc:10815:# - uncompress with 'tar xjf' into /root/msmtp/... doc/CNVaids.doc:1814: these to gzip/gunzip or to tar+compress/uncompress/untar. doc/UNIXtips.doc:2181:2. uncompress tarfiles.Z - uncompress, '.Z' suffix will be dropped doc/uvintro.doc:1400: these to gzip/gunzip or to tar+compress/uncompress/untar.


 grep -i 'collating sequence' $UV/doc/*  <-- display lines with 'collating sequence'
 ======================================      in all files in doc/*

doc/CNVaids.doc:5626:117 Bad collating sequence (Fatal) doc/uvcopy3.doc:6872:e - EBCDIC collating sequence (for ASCII data sort fields) doc/uvsort.doc:486:e - EBCDIC Collating Sequence (for ASCII data sort fields) doc/uvsort.doc:492:g - alternate collating sequence for DB2 UDB with some German characters

These examples show the line#s where patterns are found within the file, caused by option '-n' on an alias redefinition of grep in the profile. The Vancouver Utility common_profile has the following alias:


 alias grep='grep -n'
 ====================

If you don't want to see the line#, you could remove the alias, or to disable any alias, you can precede the command with a '\' backslash, for example:


 \grep xxxxx $UV/doc/*   <-- '\' disables alias to show line#s
 =====================

more info about 'grep'

Use the 'man' pages to see all options for grep, find, or any unix command

Goto:   Begin this document End this document UVSI Home-Page

V23. Help Menus for Unix & Vancouver Utilities

v23 - sed & runsed1/runsed2

'sed' is a powerful unix data manipulation utility. See documentation in the 'man' pages. Here we will illustrate only the 's' substitute commnad.


 Given - demo COBOL programs supplied in /home/uvadm/cobol/cbls/...
 =====
 Required - Change all 'record sequential' to 'line sequential'
 ======== - for 1 program using 'sed' directly
          - then for all programs using script 'runsed1' (which calls sed)
Note
  • you might want to do this when converting mainframe COBOL to unix
  • so you can use unix utilities (vi,more,lp,etc) which need Line-Feeds
  • only possible if your data files do not have packed fields

 #1.  Login yourself --> /home/userxx
 #2.  mkdir tmp cbl1 cbl2         <-- make tmp subdirs if not already existing
 #2a. rm -f tmp/* cbl1/* cbl2/*  <-- or clear if existing
 #3.  cp $UV/cobol/cbls/car200.cbl cbl1/  <-- copy demo program for sed
 #3a. cp $UV/cobol/cbls/cgl200.cbl cbl1/  <-- copy 2nd program for runsed1

sed command to change 1 file at a time


 #4. s '/record sequential/line sequential/' cbl1/car200.cbl >cbl2/car200.cbl
     ========================================================================

 #5. diff cbl1/car200.cbl cbl2/car200.cbl  <-- confirm changes
     ====================================
      11c11
      <                   organization record sequential
      >                   organization line sequential

runsed1 script to change all files in directory


 #6. runsed1 cbl1 cbl2   <-- specify input/output directories
     =================     - will prompt for sed commands

 #6a. --> s /record sequential/line sequential/   <-- enter sed comamnd
          =====================================
 #6b. --> ^D             <-- enter control-D to end sed command entry

 #7. alldiff2 cbl1 cbl2
     ==================
      11c11
      <                   organization record sequential
      >                   organization line sequential
      diff file# 2 - cbl1/... vs cbl2/car200.cbl
      14c14
      <                   organization record sequential
      >                   organization line sequential
      diff file# 13 - cbl1/... vs cbl2/cgl200.cbl
      2 different of 29 files compared cbl1 to cbl2

Goto:   Begin this document End this document UVSI Home-Page

runsed2 to re-run runsed1 commands

runsed1 saves the commands entered in tmp/runsed1, so if you needed to modify & re-run, you could:


 #8. vi tmp/runsed1      <-- modify sed commands saved by last runsed1
     ==============

 #9. runsed2 cbl1 cbl2 tmp/runsed1  <-- rerun (modified) sed commands
     =============================

'runsed2' could be very useful when you have a lot of sed commands. You might need to change several field-names in old mainframe COBOL, that are 'reserved words' in unix COBOL, for example:

sed 's /row/row1/' sed 's /col/col1/' sed 's /name/name1/' sed 's /cycle/cycle1/' sed 's /range/range1/' sed 's /printer/printer1/'

Vancouver Utilities includes an alternative way to mass change COBOL. Pre-programmed uvcopy job 'cobrep2' http://uvsoftware.ca/cobscan.htm#E2 has some advantages:

  1. would not change words on COBOL comments '*' column 7

  2. provides an audit trail showing modified lines

    more info on sed & runsed1/runsed2

See the 'man' pages for 'sed' documentation, see a short help screen for 'runsed1' by entering command only with no arguments. See 'runsed1' script listed at http://uvsoftware.ca/scripts1.htm#6B1

Goto:   Begin this document End this document UVSI Home-Page

V24. Help Menus for Unix & Vancouver Utilities

v24 - Removing & Inserting Carriage Returns

Text files from Windows often contain Carriage-Returns x'0D' as well as Line -Feeds x'0A'. Unix text files should be terminated only with a Line-Feed x'0A'. CR's can cause unix scripts to fail (especially if on the 1st line !/bin/ksh..) and you may be mystified because you cannot see them in the unix editors (use uvhd to see them). Here are scripts to remove CR's or insert CR's which might be required if you need to send unix files back to Windows.

removeCR - remove CR's from Windows text files

Here is a demo using removeCR, 1st we will use 'uvhd' to confirm the presence of CR's (since you cannot see them with unix editors).


 #1. Login yourself --> /home/userxx
 #2. mkdir dat1 tmp         <-- make subdirs in your homedir for tests
 #2a. rm tmp/*              <-- or remove tmp files if subdirs already exist

 #3. cp $UV/dat1/prodmas1 dat1  <-- copy demo file to your $HOME/dat1
     =========================

 #4. uvhd dat1/prodmas1 t   <-- display demo file with CR & LF terminators
     ====================     - option 't' for Text files (ended by LFs)
                              - shows 1st record as follows:
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 BBQ010 BAR-B-Q         0019500..
         44533324452425222222222333333300
         2210100212D2D10000000000019500DA
 rec#=1 rsize=32 fptr=0 fsize=256 rcount=8
Note
  • Carriage Return x'0D' in byte 30 (column 31)
  • see Line Feed x'0A' in byte 31 (column 32)

 #5. removeCR dat1/prodmas1   <-- run script to remove CR's
     ======================     - while copying to tmp/...
     --> copy back overwriting original y/n ?
     --> y <-- to copy back

 #6. uvhd dat1/prodmas1 t   <-- confirm CR's removed
     ====================
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 BBQ010 BAR-B-Q         0019500.
         4453332445242522222222233333330
         2210100212D2D10000000000019500A
 rec#=1 rsize=31 fptr=0 fsize=248 rcount=8
Note
  • CR missing & LF x'0A' shifted back to byte 30 (column 31)

Goto:   Begin this document End this document UVSI Home-Page

insertCR - insert CR's in unix text files

Now we can demo insertCR, using tmp/prodmas1 (output of from removeCR above).


 #7. insertCR dat1/prodmas1   <-- run script to insert CR's
     ======================     - while copying to tmp/...
     --> copy back overwriting original y/n ?
     --> y <-- to copy back

 #8. uvhd dat1/prodmas1 t   <-- confirm CR's removed
     ====================
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 BBQ010 BAR-B-Q         0019500..
         44533324452425222222222333333300
         2210100212D2D10000000000019500DA
 rec#=1 rsize=32 fptr=0 fsize=256 rcount=8
Note
  • CR re-inserted & LF x'0A' shifted forward to byte 31 (column 32)

more about removeCR & insertCR

You can see a help screen for each script, by entering the script-name only, without its required arguments (omit the directory). See these scripts listed at http://uvsoftware.ca/scripts1.htm#6A1 - 6A2

Goto:   Begin this document End this document UVSI Home-Page

V25. Help Menus for Unix & Vancouver Utilities

v25 - drop blank lines

Here we will illustrate 4 scripts to drop blank lines in text files. You can see the scripts listed at the link given at bottom of this page.

dropbl0
  • drop all blank lines, using 'grep', copies to tmp/...
  • for inspection & copy back
dropbl1
  • drop all blank lines, using 'uvcp' with option b2
dropbl2
  • reduce multiple blank lines to 1, using uvcp option b1
dropbl3
  • drop blank lines & COBOL cmts (only '*'s & blanks)
Note
  • these scripts save the input file in tmp/... & drop copying back
  • so you can always recover the original input file if required

 #1. Login yourself --> /home/userxx
 #2. mkdir dat1 tmp     <-- make subdirs in your homedir
 #2a. rm tmp/*          <-- or remove tmp/* files if subdirs already existing

 #3. copy demo files from /home/uvadm/dat1 to your $HOME/dat1
     - renaming so we can test the 4 dropbl scripts with no conflicts

 #3a. cp /home/uvadm/dat1/testdropbl dat1/testdropbl0
      ===============================================
      - could copy as above, but better to use $UV as below
        (in case Vancouver Utilities not installed in usual /home/uvadm)

 #3a. cp $UV/dat1/testdropbl dat1/testdropbl0  # to test dropbl0
 #3b. cp $UV/dat1/testdropbl dat1/testdropbl1  # to test dropbl1
 #3c. cp $UV/dat1/testdropbl dat1/testdropbl2  # to test dropbl2
 #3d. cp $UV/dat1/testdropbl dat1/testdropbl3  # to test dropbl3

 #4a. dropbl0 dat1/testdropbl0  <-- drop all blank lines (sed)
      ========================
 #4b. dropbl1 dat1/testdropbl1  <-- drop all blank lines (uvcp option b2)
      ========================
 #4c. dropbl2 dat1/testdropbl2  <-- reduce multi-blank lines to 1 (uvcp option b1)
      ========================
 #4d. dropbl3 dat1/testdropbl3 c1 <-- drop COBOL blank '*' comments (uvcopy)
      ===========================     as well as blank lines

Goto:   Begin this document End this document UVSI Home-Page

dat1/testdropbl demo INPUT file

 # testdropbl - test scripts to drop blank lines
 #            - see scripts dropbl0, dropbl1, dropbl2, dropbl3

# dropbl0 - uses 'sed' to drop all blank lines

# dropbl1 - uses 'uvcp' option 'b2' to drop all blank lines

# dropbl2 - uses 'uvcp' option 'b1' to reduce multi blank lines to 1

# dropbl3 - uses 'uvcopy' to drop all blank lines & all '*' COBOL comments

# begin test drop COBOL '*' comment blank lines (uvcopy) * # end of test file testdropbl

OUTPUT file tmp/testdropbl0 & 1 (same)

 # testdropbl - test scripts to drop blank lines
 #            - see scripts dropbl0, dropbl1, dropbl2, dropbl3
 # dropbl0 - uses 'sed' to drop all blank lines
 # dropbl1 - uses 'uvcp' option 'b2' to drop all blank lines
 # dropbl2 - uses 'uvcp' option 'b1' to reduce multi blank lines to 1
 # dropbl3 - uses 'uvcopy' to drop all blank lines & all '*' COBOL comments
 # begin test drop COBOL '*' comment blank lines (uvcopy)
       *
 # end of test file testdropbl

OUTPUT file tmp/testdropbl2

 # testdropbl - test scripts to drop blank lines
 #            - see scripts dropbl0, dropbl1, dropbl2, dropbl3

# dropbl0 - uses 'sed' to drop all blank lines

# dropbl1 - uses 'uvcp' option 'b2' to drop all blank lines # # dropbl2 - uses 'uvcp' option 'b1' to reduce multi blank lines to 1

# dropbl3 - uses 'uvcopy' to drop all blank lines & all '*' COBOL comments

# begin test drop COBOL '*' comment blank lines (uvcopy) * # end of test file testdropbl

Goto:   Begin this document End this document UVSI Home-Page

OUTPUT file tmp/testdropbl3

 # testdropbl - test scripts to drop blank lines
 #            - see scripts dropbl0, dropbl1, dropbl2, dropbl3
 # dropbl0 - uses 'sed' to drop all blank lines
 # dropbl1 - uses 'uvcp' option 'b2' to drop all blank lines
 # dropbl2 - uses 'uvcp' option 'b1' to reduce multi blank lines to 1
 # dropbl3 - uses 'uvcopy' to drop all blank lines & all '*' COBOL comments
 # begin test drop COBOL '*' comment blank lines (uvcopy)
 # end of test file testdropbl

more info re dropbl_ scripts

You can see a help screen for each script, by entering the script-name only, without its required arguments (omit the directory). See these scripts listed on pages http://uvsoftware.ca/scripts1.htm#6H0 - 6H3.

Goto:   Begin this document End this document UVSI Home-Page

V26. Help Menus for Unix & Vancouver Utilities

v26 - translates

tr
  • unix command to translate any specified characters to alternates
  • folowing scripts use 'tr' to translate all files in directory
all2lower
  • translate to lower-case, copying all files to 2nd subdir
all2upper
  • translate to UPPER-case, copying all files to 2nd subdir
tolower
  • uvcopy job translate to lower with options to inhibit within quotes
toupper
  • uvcopy job translate to UPPER with options to inhibit within quotes
cleanup
  • uvcopy job with many options for lower/UPPER, clear 1-6, 73-80,etc

translate demos


 #1. Login yourself -->   /home/userxx
 #2. mkdir cbl0 cbl1 cbl2  <-- make subdirs in your homedir

 #3. cp /home/uvadm/mvstest/testlibs/cbl0/car1* cbl0
     ===============================================
     - copy about 10 UPPER case COBOL programs to cbl0/ in your homedir

 #4. tr 'A-Z' 'a-z' <cbl0/car100.cbl >cbl1/car100.cbl
     ================================================
     translate 1 program from UPPER case to lower case

 #5. all2lower cbl0 cbl1
     ===================
     - script to translate ALL files in directory to output directory
     - see script listed at http://uvsoftware.ca/scripts1.htm#4F1.

 #6. all2upper cbl0 cbl1
     ===================
     - script to translate ALL files in directory to output directory
Note
  • mainframe conversions need to inhibit translates within quotes
  • all2lower & all2upper do not have those options
  • tolower & toupper are uvcopy jobs that have these options & more

Goto:   Begin this document End this document UVSI Home-Page

tolower - uvcopy job to translate to lower

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).


 #7. uvcopy tolower,fili1=cbl0/car100.cbl,filo1=cbl1/car100.cbl,uop=o3b3
     ===================================================================
     - sample command to translate 1 file to lower case
     - with option 'o3' to inhibit translate within quotes
     - with option 'b3' to clear cols 1-6 & 73-80 (for COBOL programs)
     - displays option choices as follows:
uop=q1b0f0o3u0
  • default options - q1=prompt, o3=inhibit trl within quotes
  • inhibit uop prompt for option default change
  • blank out cols 1-6 (COBOL)
  • blank out cols 73-80 (COBOL)
  • blank out cols 1-6 & 73-80 (COBOL)
  • convert output filename to lowercase
  • inhibit translate within single quotes
  • inhibit translate within double quotes
  • inhibit translate within both single & double quotes
  • make first char of each word UPPER case
Note
  • 'uvcopy tolower' command above translates only 1 file at a time
  • use the 'uvcopyx' script to repeat uvcopy for each file in directory

 #8. uvcopyx tolower cbl0 cbl1 uop=o3b3q0i31
     =======================================
     - option 'o3' to inhibit translate within quotes
     - option 'b3' to clear cols 1-6 & 73-80 (for COBOL programs)
     - option 'q0' inibits displaying option prompts for each file
     - option 'i31' inibits several other info messages
       & displays only file I/O names & record counts

See 'tolower' complete demo at http://uvsoftware.ca/cnvaids.htm#8C1 - 8C2 with sample input/output COBOL programs.

cleanup - uvcopy job with many options to process text files

See 'cleanup' demo at http://uvsoftware.ca/cnvaids.htm#2D1 - 2D2 with all options described & sample input/output COBOL programs.


 #9. uvcopyx cleanup cbl0 cbl1 uop=q0i7c5e15g8j1k1l1n1p1s8t1v1w4
     ===========================================================
     - mainframe COBOL conversion requires these options for optimum results
     - since there are so many a separate script is provided

 #9a. cleanupcbl cbl0 cbl1
      ====================
      - same as above, with options coded in script

Goto:   Begin this document End this document UVSI Home-Page

V31. Help Menus for Unix & Vancouver Utilities

v31 - uvlist: print text files (programs,scripts,etc)

'uvlist' will format text files with page headings & many laser printer options for cpi, lpi, margins, Simplex/Duplex, Portrait/Landscape, etc. The formatted output is then piped to a printer near you.

Several scripts are provided (such as 'uvlp12') which include the pipe to the printer, so you can list your files with a minimum of keystrokes.

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, OR (better) use 'uvlp13LD' Landscape & Duplex for 132 columns across & 66 lines/page.

 uvlist saves you the frustration that can occur when you pick up a listing
 without page headings to identify the filename, when it was created,&
 who created it. Here is the 1st page heading from printing uvlist.doc
 - a text file of DOCumentation (unrelated to Microsoft Word .docs).

 /home/uvadm/doc/uvlist.doc now=140323:1654 uvadm pg#  1
 =======================================================

uvlp12D - uvlist script to print UV doc

'uvlp12D' (1 of many scripts based on uvlist) is used to print the Vancouver Utility documentation as 12 chars/inch Duplex. Here is a sample command to print the documentation for 'uvlist'.


 uvlp12D doc/uvlist.doc   <-- command to format uvlist documentation
 ======================       & pipe to a printer as shown below

Here is the line in uvlp12D that calls uvlist with desired options:


 uvlist $1 p60$2 t4d1c12n-240$3 | lp $UVLPOPTN $UVLPDEST
 =======================================================

'd1' is the Duplex option, 'c12' chars/inch, 'n-240' adjusts the back-side margin for 3 hole punched paper.

As you can apreciate script names such as 'uvlp12D' are a lot easier to remember than the options required to use 'uvlist' directly.

Goto:   Begin this document End this document UVSI Home-Page

samples of other 'uvlist' scripts available

uvlp12
  • print at 12 cpi (90 chars on 8 1/2" wide)
  • my favorite for printing scripts & short programs
uvlp12D
  • print Duplex at 12cpi
  • recommended for Vancouver Utility documentation
uvlp14
  • print at 14 cpi (108 chars on 8 1/2" wide)
uvlp16
  • print at 14 cpi (120 chars on 8 1/2" wide)
uvlp18
  • print at 18 cpi (134 chars on 8 1/2" wide)
uvlp12L
  • print LANDSCAPE at 12 cpi (128 chars on 11" wide)
uvlp14L
  • print LANDSCAPE at 14 cpi (150 chars on 11" wide)
uvlp18L
  • print LANDSCAPE at 18 cpi (180 chars on 11" wide)
uvlp20L
  • print LANDSCAPE at 18 cpi (200 chars on 11" wide)
uvlp12LD
  • LANDSCAPE & DUPLEX at 12 cpi (90 chars & 60 lines)
  • used for Vancouver Utilities hard-copy documentation
uvlp13LD
  • Landscape Duplex, 13 cpi, 8 lpi
uvlp13LA
  • Landscape Automatic
  • Simplex if lines < 1000, Duplex if lines > 1000
uvlpd12
  • print all files in a Directory at 12 cpi

more info on uvlist & uvlp__ scripts

See all documentation for uvlist at http://uvsoftware.ca/uvlist.htm

Goto:   Begin this document End this document UVSI Home-Page

lpstat - show printer status

lpstat
  • unix command to see status of printers & outstanding print requests
  • use option 't' to see all printers as well as your queues

 lpstat -t   <-- show status of all printers & login user requests
 =========     - sample display as follows:
 scheduler is running
 system default destination: lp0
 device for lp0: socket://192.168.1.101:9100
 device for lp01: socket://192.168.1.105:9100
 device for lp08: socket://192.168.1.102:9100
 lp0 accepting requests since Thu 15 May 2014 03:40:53 PM PDT
 lp01 accepting requests since Thu 01 May 2014 04:51:59 PM PDT
 lp08 accepting requests since Mon 10 Dec 2012 10:58:50 AM PST
 printer lp0 now printing lp0-12207.  enabled since Thu 15 May 2014 03:40:53 PM PDT
 	Connected to printer...
 printer lp01 is idle.  enabled since Thu 01 May 2014 04:51:59 PM PDT
 printer lp08 is idle.  enabled since Mon 10 Dec 2012 10:58:50 AM PST
 lp0-12207               uvadm           332800   Thu 15 May 2014 03:40:53 PM PDT
 lp0-12208               uvadm           332800   Thu 15 May 2014 03:41:02 PM PDT

allcancel - cancel login users print requests

'allcancel' is a VU script to cancel all outstanding print requests for login user. See the script listed at http://uvsoftware.ca/scripts1.htm#4F1. Here is a sample of use:


 allcancel    <-- no arguments required
 =========      - displays confirmation, sample below

lp08-12209 cancelled lp08-12210 cancelled lp08-12211 cancelled

Goto:   Begin this document End this document UVSI Home-Page

V32. Help Menus for Unix & Vancouver Utilities

v32 - uvhd

'uvhd' is a file investigation utility. It displays any file in vertical hexadecimal & prompts for commands to browse, search, select, update, print, translate, acummulate fields, etc. uvhd is an interactive utility with 25 help screens - displayed by entering 'uvhd' with no filename or with the '?' command. See documentation at http://uvsoftware.ca/uvhd.htm

uvhd is especially valuable for unix/linux sites using file types imported from maniframes - fixed-length records with no LineFeeds that may have packed/binary fields (unix system utilities can not handle these fiel types).

Here we will present 3 examples of using uvhd for 3 different file types. First we will copy the 3 demo files from $UV/dat1 to dat1 in your homedir.


 #1. Login yourself --> /home/userxx
 #2. mkdir dat1 tmp   <-- make subdirs (if not already existing)
 #3a. cp $UV/dat1/custmas1   dat1   <-- copy demo file for ex#1
 #3b. cp $UV/dat1/vendormas2 dat1   <-- copy demo file for ex#2
 #3c. cp $UV/dat1/vendormas0 dat1   <-- copy demo file for ex#3

Ex#1 - fixed record length with packed fields


 #4. uvhd dat1/custmas1 r256  <-- display Customer N&A with packed sales
     =======================    - option 'r256' tells uvhd record-size to expect
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
         3333332222454545444244545524542222233332445442544422222222224444
         130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
      64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ..4V|...
         4442222222222442535343222233323332333324455525544442222201357000
         9DF00000000002306931810000250D754D55310C12290725E38000000246C000
     128 .........W0....`........)X}..f3.....\.................4V}.......
         0000000005300016000000002570063100095000000000000000013570000000
         0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0000C00
     192 .E|...V}.......................f.....<........f.C 19950531
         0470005700000000880000000018000680001300000000694233333333222222
         35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
 rec#=1 rsize=256 fptr=0 fsize=8192 rcount=32
 Enter command, or ?=Help, q=quit, null=NextRecord -->
Note
  • 24 x 5 byte packed fields in bytes 120-239 (This Year & Last Year sales)
  • 1st packed field 120-124 is x'001234567C' in horizontal hex.
  • calculate byte position by adding top scale to displacement on left
  • top scale of 1st byte x'00' is 56 + 64 (at begin line) = 120
  • these bytes are zero relative, would be column 121 for one relative
  • you can add 'export UVHDROP=g1' to your profile if you want 1 relative

Goto:   Begin this document End this document UVSI Home-Page

Ex#2 - display a Text file


 #5. uvhd dat1/vendormas2 t <-- display text file to see LineFeed x'0A' terminators
     ======================   - option 't' tells uvhd to expect Text file input
 rec#=1 rsize=20 fptr=0 fsize=225 rcount=8
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 DELL10 M  Dell Inc..
         44443324224666246620
         45CC100D0045CC09E3EA
 rec#=2 rsize=27 fptr=20 fsize=225 rcount=8
                  10        20        30        40        50        60
 r#    2 0123456789012345678901234567890123456789012345678901234567890123
      20 HP0010 M  Hewlett Packard .
         453333242246766772566667620
         8000100D00857C5440013B1240A

Ex#3 - display fixed-length EBCDIC file


 #6. uvhd dat1/vendormas0 r64a <-- display EBCDIC file of 64 byte records
     =========================   - option 'r64' for record size 64 bytes
                                 - option 'a' translates char line to ASCII
                      10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 DELL10 M  Dell Inc.
         CCDDFF4D44C8994C984444444444444444444444444444444444444444444444
         453310040045330953B000000000000000000000000000000000000000000000
 rec#=1 rsize=64 fptr=0 fsize=512 rcount=8
                  10        20        30        40        50        60
 r#    2 0123456789012345678901234567890123456789012345678901234567890123
      64 HP0010 M  Hewlett Packard
         CDFFFF4D44C8A98AA4D889898444444444444444444444444444444444444444
         8700100400856353307132194000000000000000000000000000000000000000
 rec#=2 rsize=64 fptr=64 fsize=512 rcount=8
Note
  • option 'a' translates only the character line of the 3 lines groups
    displayed in vertical hexadecimal - the EBCDIC codes are displayed
    on lines 2 & 3 (zones & digits for each byte).
  • For example the 'D' of DELL is x'C4' in EBCDIC, but from prior
    ASCII file dat1/vendormas2, you can see A 'D' in ASCII is x'44'

uvhd commands

See uvhd commands (browse,search,select,update,translate,accumulate,etc) on the 25 help screens - displayed by entering 'uvhd' with no filename or with the '?' command. Also see complete documentation for uvhd at http://uvsoftware.ca/uvhd.htm

Goto:   Begin this document End this document UVSI Home-Page

V33. Help Menus for Unix & Vancouver Utilities

v33 - uvhdcob

 'uvhdcob' is similar to 'uvhd', but displays COBOL copybook field-names
 beside the data-field contents. The commands are similar (browse, search,
 select, update, print, acummulate fields, etc. uvhdcob has 22 help screens
 - displayed by entering 'uvhd' with no filename or with the '?' command.
 See uvhdcob documentation at the link given at the bottom of this page.

This uvhelp screen will present just 1 example as a quick reminder of the command line required.


 #1. Login --> your homedir
 #2. mkdir dat1 tmp   <-- make subdirs (if not already existing)
 #3. cp $UV/dat1/custmas1  dat1   <-- copy demo file to your homedir

 uvhdcob dat1/custmas1 cobol/maps/custmas1
 =========================================
 rec#       1           occurs  bgn end typ<------ data (hex if typ=p/b) ----->
 001 cm-num                       0    5 n  130140
 002 cm-delete                    6    9
 003 cm-name                     10   34    EVERGREEN MOTORS LTD.
 004 cm-adrs                     35   59    1815 BOWEN ROAD
 005 cm-city                     60   75    NANAIMO
 006 filler001                   76   76
 007 cm-prov                     77   78    BC
 008 filler002                   79   79
 009 cm-postal                   80   89    V9S1H1
 010 cm-phone                    90  101    250-754-5531
 011 cm-contact                 102  119     LARRY WRENCH
 012 cm-thisyr-sales      1/12  120  124pns 001234567C
 013 cm-lastyr-sales      1/12  180  184pns 001234567D
 014 filler003                  240  255    C 19950531
 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0
 Enter command, or ?=Help, q=quit, null=NextRecord -->
Note
  • by default, uvhdcob displays only the 1st occurs field
  • enter command 'o99' to display all occurrences of item occurs
    and/or 'g99' for all occurrences of group occurs.

uvhdcob commands

See uvhdcob commands (browse,search,select,update,accumulate,etc) on the 22 help screens - displayed by entering 'uvhdcob' with no filename or with the '?' command. See complete documentation for uvhdcob at http://uvsoftware.ca/uvhdcob.htm

Goto:   Begin this document End this document UVSI Home-Page

V34. Help Menus for Unix & Vancouver Utilities

v34 - uvcp

'uvcp' is a data file manipulation utility for record selection, reformatting, translation, numeric field conversions among packed/zoned/binary, etc. See complete documentation for uvcp at the link at the bottom of this page. This help screen will present only a few examples of uvcp instruction formats.

uvcp is often used to convert file types between TEXT (records terminated by LineFeeds x'0A', typ=LST), and FIXED-LENGTH (no LineFeeds, typ=RSF).


 #1. Login yourself --> /home/userxx
 #2. mkdir dat1 tmp1 tmp2 tmp     <-- make subdirs (if not already existing)
 #2a. rm -f tmp1/* tmp2/* tmp/*   <-- or clear tmp*/* dirs if existing
 #3. cp $UV/dat1/vendormas2 dat1  <-- copy demo file to your homedir

Ex#1 - convert a text file to Fixed-Record-Length


 #4. uvcp "fili1=dat1/vendormas2,typ=LST,rcs=64,filo1=tmp1/vmas1,typ=RSF,rcs=64"
     ===========================================================================

We need to use 'uvhd' to see the LineFeeds (x'0A') & confirm absence in output. We will show only the 1st record of the Input/Output files.


 #5. uvhd dat1/vendormas2 t <-- display INPUT file to see LineFeed x'0A' terminators
     ======================   - option 't' tells uvhd to expect Text file input
 rec#=1 rsize=20 fptr=0 fsize=225 rcount=8
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 DELL10 M  Dell Inc..
         44443324224666246620
         45CC100D0045CC09E3EA

 #6. uvhd tmp1/vmas1 r64  <-- display OUTPUT file to confirm recsize 64 no LF's
     ===================    - option 'r64' tells uvhd expect fixed 64 byte records
 rec#=1 rsize=64 fptr=0 fsize=512 rcount=8
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 DELL10 M  Dell Inc.
         4444332422466624662222222222222222222222222222222222222222222222
         45CC100D0045CC09E3E000000000000000000000000000000000000000000000
Note
  • the LineFeed in the last byte of the Input file x'0A'
  • uvhd shows '.' on the character line for any non-displayable byte
  • the prior byte x'2E' is a real period '.'.

 #7. uvcp "fili1=dat1/vendormas2,typ=LST,rcs=64,filo1=tmp1/vmas1,typ=RSF,rcs=64"
     ===========================================================================

Example#1 (convert text to Fixed-Length) is repeated above, for comparison to Example#2 (Fixed to Text) which follows below.

Goto:   Begin this document End this document UVSI Home-Page

Ex#2 - convert Fixed-Record-Length to a text file


 #8. uvcp "fili1=tmp1/vmas1,typ=RSF,rcs=64,filo1=tmp2/vmas1.txt,typ=LSTt,rcs=64"
     ===========================================================================
Note
  • input 'typ=RSF' (Record Sequential Fixed) has no LineFeeds
  • output 'typ=LSTt' (Line Sequential Terminated) inserts LineFeeds
    (x'0A' as shown by uvhd for the input file to Ex#1 above)
  • option 't' of 'typ=LSTt' inserts the LF after the last non-blank
    (vs after the specified record-size 'rcs=64')
  • in the example above the 1st record is shortened to 20 bytes

Ex#3 - moving fields, inserting constants


 Given - tmp1/vmas1 as shown above by uvhd
 =====   DELL10 M  Dell Inc.
         00-05 = company-code, 07=status-code(M), 10-39=company-name

 Required - move status-code to byte 62
 ======== - shift company-name from 10-39 back to 07-36
          - insert date ccyymmdd in 50-57
          - change file type to 'typ=RST' which inserts LF in last byte
          - so both fixed length & a text file usable by unix utilities
            (best of both worlds)

 #9. uvcp "fili1=tmp1/vmas1,typ=RSF,rcs=64,filo1=tmp2/vmas2,typ=RST,rcs=64\
     ,mvc=63(1)7,mvc=7(30)10,mvc=50(8):20140325"
     ======================================================================

 #10. uvhd tmp2/vmas r64
      ==================
 rec#=1 rsize=64 fptr=0 fsize=512 rcount=8
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 DELL10 Dell Inc.                                  20140326    M.
         4444332466624662222222222222222222222222222222222233333333222240
         45CC10045CC09E3E0000000000000000000000000000000000201403260000DA

more info for 'uvcp'

Enter 'uvcp' with no arguments to see a short help screen with a few examples & a summary of the file 'typ's available. See complete doc for uvcp at http://uvsoftware.ca/uvcp.htm

file 'typ' codes common to uvcp,uvsort,uvcopy,etc

LST
  • Line Sequential Terminated by LineFeed x'0A', after specified recsize
LSTt
  • same, but LineFeed inserted after last non-blank (shortens records)
RSF
  • Record Sequential Fixed record length
RST
  • Record Sequential fixlth Terminated by LineFeed (OK if last byte unused)
RSR
  • Record Sequential fixlth Relative, LF extra, actual recsize=specified+1
ISF
  • Indexed Sequential Fixed record length (compatible with Micro Focus COBOL)
IDX
  • Indexed Sequential Variable record length (compatible with Micro Focus COBOL)
RSV
  • Record Sequential Variable length (compatible with Micro Focus COBOL)
RDW
  • Variable record length with recsize in 1st 2 bytes binary (FTP option)

Goto:   Begin this document End this document UVSI Home-Page

V35. Help Menus for Unix & Vancouver Utilities

v35 - uvsort

'uvsort' provides powerful mainframe sorting capability to UNIX systems. The UNIX system sort is totally unsatisfactory for mainframe style data processing, because it cannot handle fixed record sizes without LineFeeds, cannot sort on packed decimal fields, cannot read or write Indexed files, and specifying fixed column sort fields is extremely awkward.

uvsort provides for 300 record selects (or deletes) that may be based on multiple and/or conditions comparing record fields to constants. uvsort also provides 400 instructions for reformatting records (move,add,subtract,etc).

Here we will present 3 uvsort examples, 1st we will copy the demo files required from $UV/dat1 to your homedir.


 #1. Login yourself --> /home/userxx
 #2. mkdir dat1 tmp1 tmp     <-- make subdirs (if not already existing)
 #2a. rm -f tmp1/*  tmp/*    <-- or clear tmp*/* dirs if existing
 #3a. cp $UV/dat1/sales9 dat1     <-- copy demo file for ex#1 & 2
 #3a. cp $UV/dat1/custmas1 dat1   <-- copy demo file for ex#3

dat1/sales9 - test file for uvsort demos

          1         2         3         4         5         6
 1234567890123456789012345678901234567890123456789012345678901234
 CUST#    SLM  DATE   INV#     PROD#     QTY   PRICE    AMOUNT
 ================================================================
 130140    21 940802 IN111001  VAR001  000020 0000001 000000020
 139923    35 950802 IN111002  TAB013  000023 0003001 000069023
 150825    44 960804 IN1122    HAM001  000025 0005001 000125025
 201120    44 970807 CR5234    WHIP75  000027 0007001 000189027
 308685    21 990812 IN6605    SAW051  00001p 0000001 00000001p
 315512    44 000805 IN2251    CHR001  00001s 0003001 00003901s
 400002    85 010812 CR245     HAX129  00001v 0006001 00009601v
 406082    35 020815 IN33001   BBQ001  00001w 0007001 00011901w

uvsort ex#1 - sort demo file on product


 uvsort "fili1=dat1/sales9,rcs=64,typ=RSF,filo1=tmp1/s91,typ=RSF,key1=30(6ca)"
 =============================================================================
      - sort sales file on product 30-35 zero relative (31-36 one relative)
      - output records as follows:
 406082    35 020815 IN33001   BBQ001  00001w 0007001 00011901w
 315512    44 000805 IN2251    CHR001  00001s 0003001 00003901s
 150825    44 960804 IN1122    HAM001  000025 0005001 000125025
 400002    85 010812 CR245     HAX129  00001v 0006001 00009601v
 308685    21 990812 IN6605    SAW051  00001p 0000001 00000001p
 139923    35 950802 IN111002  TAB013  000023 0003001 000069023
 130140    21 940802 IN111001  VAR001  000020 0000001 000000020
 201120    44 970807 CR5234    WHIP75  000027 0007001 000189027

Goto:   Begin this document End this document UVSI Home-Page

uvsort ex#2a - sort on sales descending within salesman


 uvsort "fili1=dat1/sales9,rcs=64,typ=RSF,filo1=tmp1/s92,key1=53(9zd),key2=10(2)"
 ================================================================================
 - sort $sales Zoned decimal Descending within salesman Character Ascending (default)
 - output records as follows:
 - note that pqrstuvwxy in units of zoned decimal fields are negatives -0:-9
 201120    44 970807 CR5234    WHIP75  000027 0007001 000189027
 150825    44 960804 IN1122    HAM001  000025 0005001 000125025
 139923    35 950802 IN111002  TAB013  000023 0003001 000069023
 130140    21 940802 IN111001  VAR001  000020 0000001 000000020
 308685    21 990812 IN6605    SAW051  00001p 0000001 00000001p
 315512    44 000805 IN2251    CHR001  00001s 0003001 00003901s
 400002    85 010812 CR245     HAX129  00001v 0006001 00009601v
 406082    35 020815 IN33001   BBQ001  00001w 0007001 00011901w

uvsort ex#2b - allternate keys=(...) vs key1/2=...


 uvsort "fili1=dat1/sales9,rcs=64,typ=RSF,filo1=tmp1/s92,keys=(53,9,z,d,10,2,c,a)"
 =================================================================================
 - same as ex#2a, but illustrating alternate method of specifying keys
 - Character,Ascending default so ',c,a' can be omitted since last field
 - specify as ',,' if not last key, for example 'keys=(53,9,,,10,2)'

uvsort ex#3 - sort customer master by name & truncate output

 uvsort "fili1=dat1/custmas1,rcs=256,typ=RSF,filo1=tmp1/cusnames,rcs=35,typ=LSTt\
 ,key1=10(25),del1=8(1):X,del1=8(1):D"
 ================================================================================
 - sort on customer-name 10-34, output only 35 bytes, just cust# & name
 - changing 'typ=RSF' Fixed 256 to 'typ=LSTt' Text file with LF in last non-blank
 - also deletes records with 'X' or 'D' in byte 8 (column 9)
 - use '\' continue long commands on 2nd line, but ',' must be in col 1 of 2nd line
 - 1st few records of output as follows:

input - 1st 8 records of 32

130140 EVERGREEN MOTORS LTD. 132588 GEECOE GENERATOR SERVICES 139923 JOHNSTONE BOILER & TANKS 142175 LILLY ELECTRIC (1973) LTD 145264 D MAGRATH SUPPLIES LTD. 147615 X O'CONNER R.V. CENTRE 149304 POINT GREY GOLF & COUNTRY 150825 RIGGERS INDUSTRIAL

output - 1st 8 of 23 (9 dropped)

400002 ACKLANDS LTD 201120 ALLTYPE RENTAL LTD. 204700 CASE POWER EQUIPMENT 401210 COAST RANGE CONSTRUCTION 208060 E&L TRUCKING 130140 EVERGREEN MOTORS LTD. 308685 FOOTHILLS ELECTRIC 154689 FRANKLIN RESOUCES

Goto:   Begin this document End this document UVSI Home-Page

uvsort field data types

a
  • alphabetic (case insensetive, lower & upper treated equally)
c
  • character ASCII (the default), same as Binary (bit by bit)
e
  • EBCDIC collating sequence (for ASCII data sort fields)
g
  • alternate collating sequence for DB2 UDB with some German characters
  • see exact sequence on page C3 of uvsort documentation (link below)
i
  • integer (2 or 4 bytes) Intel reversed byte architecture
p
  • packed decimal, sign in right nibble, x'0D' negative, else positive
s
  • sorts lower & UPPER case together with lower preceding each pair
  • syncsort compatible, exact sequence on page C3 of uvsort documentation
u
  • unsigned integer (length must be 2 or 4)
y
  • special field type for the Year2000 problem (2 digit years)
  • default window '50' years 50-99 = 1950-1999, 00-49 = 2000-2049
  • specify run option 'y__' to modify window
z
  • zoned decimal, sign in zone of units, x'40' bit negative, else positive

more info for 'uvsort'

Enter 'uvsort' with no arguments to see a short help screen with a few examples & a summary of the file 'typ's available. See complete doc for uvsort at http://uvsoftware.ca/uvsort.htm

Goto:   Begin this document End this document UVSI Home-Page

V36. Help Menus for Unix & Vancouver Utilities

v36 - uvcpfix1 & uvcpfix2

uvcpfix1 & uvcpfix2 are scripts to make it easy to change file-types, record-sizes, reformat records, translate, etc. These scripts use 'uvcp', but the coding required is much simpler than coding the uvcp comamnd directly (see examaples on help screen 'v34').

Ex#1 - uvcpfix1 convert text to Fixed


 Required - we need to create a new file of product codes & descriptions
 ========   for a COBOL program that expects fixed-length 32 byte records.

 Method - use the editor to create a text file of products & descriptions
 ====== - then convert the file to Fixed-Length using uvcpfix1

 Extra - also store a Line-Feed in the last byte for unix convenience
 ===== - not required for the COBOL program
       - but allows us to use unix utilities on a fixed length file
       - possible only when last byte unused

 #1. Login --> /home/userxx
 #2. mkdir dat1 tmp     <-- make subdirs (if not already existing)

 #3. vi dat1/products   <-- use editor to create text file of
     ================       product codes & descriptions, as follows:
      BBQ010   BAR-B-Q
      CHR015   LAWN CHAIR
      HAM010   CLAW HAMMER
        --- etc ---

 #4. uvcpfix1 dat1/products 32 RST
     =============================
     - convert dat1/products from text to fixed-lenth in tmp/products
     - arg3 'RST' inserts LF x'0A' in the last byte
     - see all file-type codes at the end of this help file (v36).

 #5. uvhd tmp/products r32   <-- check output file with uvhd
     =====================     - note LF x'0A' in last byte
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 BBQ010   BAR-B-Q               .
         44533322244524252222222222222220
         221010000212D2D1000000000000000A
 rec#=1 rsize=32 fptr=0 fsize=288 rcount=9

 #6. cp tmp/products dat1
     ====================
     - save output file by copying back to dat1/products
     - overwrites input (could rename if desired)

Goto:   Begin this document End this document UVSI Home-Page

Ex#2 - uvcpfix2 change Fixed to Text & reformat records


 Given - customer master & sales history file (see uvhd of 1st record below)
 ===== - 256 byte records with 24 x 5 byte packed fields (thisyr & lastyr sales)
       - packed fields & no LineFeeds mean 'vi' can not be used

 Required - create a 'Customer Telephone List' from customer master & sales file
 ======== - customer#, customer-name, telephone#,& contact-name

 #1. Login --> /home/userxx
 #2. mkdir dat1 tmp     <-- make subdirs (if not already existing)

 #3. cp $UV/dat1/custmas1 dat1   <-- copy demo file to your homedir
     =========================

 #4. uvhd /home/uvadm/dat1/custmas1  <-- inspect cust master file
     ==============================    - to see where desired fields are
                      10        20        30        40        50        60
 r#        1 0123456789012345678901234567890123456789012345678901234567890123
           0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
             3333332222454545444244545524542222233332445442544422222222224444
             130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
          64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ..4V|...
             4442222222222442535343222233323332333324455525544442222201357000
             9DF00000000002306931810000250D754D55310C12290725E38000000246C000
         128 .........W0....`........)X}..f3.....\.................4V}.......
             0000000005300016000000002570063100095000000000000000013570000000
             0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0000C00
         192 .E|...V}.......................f.....<........f.C 19950531
             0470005700000000880000000018000680001300000000694233333333222222
             35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
 rec#=1 rsize=256 fptr=0 fsize=8192 rcount=32

 #5. uvcpfix2 dat1/custmas1 256 65 LSTt 'mvc=35(30)90'
     =================================================
     - convert fixed 256 record to 65 byte text (1st 35 + 90-119)
     - we need to move (mvc) tel# & contact-name from 90-119 to 35-64
     - file type 'LSTt' inserts the Line-Feed after the last non-blank
     - instructions (mvc) must be enclosed in single quotes
     - writes output to tmp/custmas1 (for inspection & relocation if OK)

Goto:   Begin this document End this document UVSI Home-Page


 #6. vi tmp/custmas1     <-- inspect output (1st 3 records shown below)
     ===============
      130140    EVERGREEN MOTORS LTD.    250-754-5531 LARRY WRENCH
      132588    GEECOE GENERATORS        604-278-4488 HARRY LIGHT
      139923    JOHNSTONE BOILER & TANKS 604-320-1845 GEORGE BROWN

 #6a. uvhd tmp/custmas1 t <-- inspect with uvhd to see the LineFeed x'0A'
      ===================   - inserted after last non-blank
 rec#=1 rsize=61 fptr=0 fsize=1665 rcount=32
                  10        20        30        40        50        60
 r#    1 0123456789012345678901234567890123456789012345678901234567890123
       0 130140    EVERGREEN MOTORS LTD.    250-754-5531 LARRY WRENCH.
         3333332222454545444244545524542222233323332333324455525544440
         130140000056527255E0DF4F230C44E0000250D754D55310C12290725E38A
 rec#=2 rsize=58 fptr=61 fsize=1665 rcount=32
                  10        20        30        40        50        60
 r#    2 0123456789012345678901234567890123456789012345678901234567890123
      61 132588    GEECOE GENERATOR SERVICES604-278-4488 JOE LIGHT.
         3333332222444444244445454525455444533323332333324442444450
         13258800007553F5075E5214F2035269353604D278D44880AF50C9784A

 #7. cp tmp/custmas1 dat1/custelephones
     ==================================
     - save output file by copy/rename from tmp/custmas1 to dat1/custelephones

file 'TYP' codes used by Vancouver Utiltiies

LST
  • Line Sequential Terminated by LineFeed x'0A', after specified recsize
LSTt
  • same, but LineFeed inserted after last non-blank (shortens records)
RSF
  • Record Sequential Fixed record length
RST
  • Record Sequential fixlth Terminated by LineFeed (OK if last byte unused)
RSR
  • Record Sequential fixlth Relative, LF extra, actual recsize=specified+1
ISF
  • Indexed Sequential Fixed record length (compatible with Micro Focus COBOL)
IDX
  • Indexed Sequential Variable record length (compatible with Micro Focus COBOL)
RSV
  • Record Sequential Variable length (compatible with Micro Focus COBOL)
RDW
  • Variable record length with recsize in 1st 2 bytes binary (FTP option)

more information

You can see a help screen for each script, by entering the script-name only, without its required arguments. See these scripts listed on pages http://uvsoftware.ca/uvcp.htm#T6 & T7

Goto:   Begin this document End this document UVSI Home-Page

V41. Help Menus for Unix & Vancouver Utilities

v41 - uvcopy - powerful data manipulation utility

'uvcopy' is a powerful (can do anything) data file manipulation utility. It gives you the power of assembler without the complexity. The uvcopy interpreter interprets/executes a parameter file of instructions - just edit & run (no compile required).

'uvcopy' is essential to running mainframe applications on Unix/Linux systems, because it can do many things not possible with the standard unix/linux utilities such as: processing 'packed decimal' fields, handling 'Indexed files' (compatible with Micro Focus COBOL),& field addressing by column# (common in mainframe utilities, but not in unix utilities).

sample uvcopy job - cleanupcobol

Here is a demo of sample uvcopy job 'cleanupcobol' which will sequence# in cols 1-4, clear 73-80, translate to lower except in quotes.


 #1. Login yourself --> /home/userxx
 #2. mkdir cbl1 cbl2    <-- make subdirs for demo
 #3. cp $UV/cobol/cbls/car100.cbl cbl1  <-- copy demo COBOL to your homedir
     =================================

 #4. uvcopy cleanupcobol,fili1=cobol/cbls/car100.cbl,filo1=tmp/car100.cbl
     ====================================================================
     - test with demo input file supplied
     - here are 1st 5 lines of input & output

sample INPUT demo program

      000010 IDENTIFICATION DIVISION.                                    CAR100
      000020 PROGRAM-ID. CAR100.                                         CAR100
      000030 ENVIRONMENT DIVISION.                                       CAR100
      000040 INPUT-OUTPUT SECTION.                                       CAR100
      000050 FILE-CONTROL.                                               CAR100

sample OUTPUT

      0001   identification division.
      0002   program-id. car100.
      0003   environment division.
      0004   input-output section.
      0005   file-control.

Goto:   Begin this document End this document UVSI Home-Page

sample 'uvcopy job' (parameter/instruction file)

 # cleanupcobol - cleanup COBOL program source
 #              - by Owen Townsend, UV Software, March27/2014
 #
 # uvcopy cleanupcobol,fili1=cobol/cbls/car100.cbl,filo1=tmp/car100.cbl
 # ====================================================================
 # Sequence# in cols 1-4, clear 73-80, translate to lower except in quotes
 # - this 'uvcopy job'  supplied in /home/uvadm/pf/demo/cleanupcobol
 # - test file for demo supplied in /home/uvadm/cobol/cbls/car100.cbl
 #
 fili1=?input,rcs=100,typ=LST
 filo1=?output,rcs=100,typ=LSTt
 @run
        opn    all
 #
 # begin loop to get/process/put records until EOF
 man20  get    fili1,a0(100)        get next record
        skp>   man90                (cc set > at EOF)
        mvc    b0(100),a0           move in area 'a' to out area 'b'
        clr    b72(28),' '          clear anything past column 72
        clr    b0(6),' '            clear any existing seq#
        add    $ca1,1               increment for new seq#
        mvn    b0(4),$ca1           insert new seq# (4 digits OK)
        trlq3  b0(80)               translate to lowercase except in quotes
        put    filo1,b0(100)        write to output file
        skp    man20                return to get next record
 #
 # EOF - close files & end job
 man90  cls    all
        eoj

See all instructions documented at http://uvsoftware.ca/uvcopy3.htm

Goto:   Begin this document End this document UVSI Home-Page

pre-programmed uvcopy jobs

 There are over 500 pre-programmed 'uvcopy jobs' supplied with Vancouver Utilities.
 For example 'cobmap1' will convert COBOL copybooks to record layouts (cobmaps)
 - calculating & storing start/end/length bytes on the right-hand side.

cobmap1 - convert 1 or all copybooks to record layouts


 #1. Login yourself --> /home/userxx
 #2. mkdir cpys maps    <-- make subdirs for demo
 #3a. cp $UV/cobol/cpys/acntmas cpys  <-- copy demo copybooks to your homedir
 #3b. cp $UV/cobol/cpys/custmas cpys  <-- copy demo copybooks to your homedir
 #3c. cp $UV/cobol/cpys/sales   cpys  <-- copy demo copybooks to your homedir

 #4. uvcopy cobmap1,fili1=$UV/cobol/cpys/custmas,filo1=maps/custmas
     ==============================================================
     - convert 1 copybook at a time

 #5. uvcopyx cobmap1 cpys maps uop=q0i7
     ==================================
     - convert ALL copybooks in directory
Note
  • as you can see it is easier (keyins) to convert all vs 1 at a time
  • 'uvcopyx' is a script that runs a uvcopy job for all files in directory
  • here is the output for just 1 of the 3 copybooks

output - cobmap (record layout)

 cobmap1  COBOL record layout            2014/04/04_21:16:37  pg# 0001
 cobol/cpys/custmas                                RCSZ=00256  bgn  end  lth typ
 * custmas - cobol copy book for custmas file (see uvtrain.do
      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

Goto:   Begin this document End this document UVSI Home-Page

V42. Help Menus for Unix & Vancouver Utilities

v42 - uvfix scripts - Easy way to use uvcopy

The 'uvfix' scripts make it easy to employ the powerful uvcopy instructions without having to program the uvcopy framework (file I/O, etc). You only need to enter the uvcopy instructions desired when prompted. See http://uvsoftware.ca/uvcopy3.htm for the 90 instructions available.

There are 4 'uvfix_' scripts (in /home/uvadm/sf/util/...) that call 4 'uvfix_' uvcopy jobs (from /home/uvadm/pf/util/...). The scripts make the command line as simple as possible - specify only the input file-name & record-size if fixed. The output files are written to the tmp/... subdir (in your current dir) where you can inspect & then copy back overwriting the input file if desired.

uvfix1
  • copy 1 Text file to tmp/... applying uvcopy instructions
  • then inspect (with vi tmp/...) & copy back if desired
uvfixA
  • copy ALL Text files from 1 subdir to a 2nd subdir
    while applying uvcopy instructions
  • then inspect (with vi subdir2/*) & change name to subdir1 if OK
uvfix2
  • copy 1 Fixed-Length file to tmp/... applying uvcopy instructions
  • then inspect (with uvhd tmp/...) & copy back if desired
uvfixB
  • copy ALL Fixed-Length files from 1 subdir to a 2nd subdir
    while applying uvcopy instructions
  • then inspect (with uvhd subdir2/...) & change name to subdir1 if OK

Goto:   Begin this document End this document UVSI Home-Page

uvfix1 - modify a text file by instruction keyins


 Given - directory of COBOL programs /home/uvadm/cobol/cbls
 =====

 Required - copy/modify cobol program car100.cbl as follows:
 ======== - clear cols 1-6 & 73-80
          - sequence# in cols 1-4
          - translate to lower-case except in quotes
Note
  • this is same task as performed by uvcopy job 'cleanupcobol'
  • which is a complete uvcopy job including the I/O framework
  • the uvfix1 does the same task by entering only 5 instructions

 #1. Login yourself --> /home/userxx
 #2. mkdir cbls tmp     <-- make subdirs in your homedir
 #2a. rm tmp/*            - or clear tmp if subdirs exist
 #3. cp $UV/cobol/cbls/car100.cbl cbls  <-- copy demo progam to your subdir
     =================================

 #4. uvfix1 cbls/car100.cbl  <-- modify 1 file at a time
     ======================    - reply to prompts as follows:
     uop=q1n99r8192 - user option defaults
           n99      - output record count limit (high# copies to EOF)
              r8192 - recsize ONLY for Fixed-Length OUTPUT records if desired
                    - for Fixed-Length, reply RSF/RST at prompt (default text typ=LSTt)
                    - for Text files: accept default recsize & default typ=LSTt
     User OPtion (uop) defaults  = q1r8192n999999

 #4a. -->null to accept or enter/override -->   <-- null reply, no options required

 #5.      reply to instruction prompts as follows:
          ========================================
 #5a. --> clr  b72(8),' '  <-- clear cols 73-80
 #5b. --> clr  b0(6),' '   <-- clear cols 1-6
 #5c. --> add  $ca1,1      <-- increment line counter
 #5d. --> mvn  b0(4),$ca1  <-- insert seuw=ence# in cols 1-4
 #5e. --> trl  b0(80)      <-- translate to lowercase except in quotes
 #5f. --> .                <-- enter '.' to end keyins & execute

sample INPUT - 1st 5 lines

      000010 IDENTIFICATION DIVISION.                                    CAR100
      000020 PROGRAM-ID. CAR100.                                         CAR100
      000030 ENVIRONMENT DIVISION.                                       CAR100
      000040 INPUT-OUTPUT SECTION.                                       CAR100
      000050 FILE-CONTROL.                                               CAR100

sample OUTPUT - 1st 5 lines

      0001   identification division.
      0002   program-id. car100.
      0003   environment division.
      0004   input-output section.
      0005   file-control.

Goto:   Begin this document End this document UVSI Home-Page

uvfixA - modify ALL Text files in subdir


 Given - directory of COBOL programs /home/uvadm/cobol/cbls
 =====

 Required - copy/modify all cobol programs in directory
 ======== - clear cols 1-6 & 73-80
          - sequence# in cols 1-4
          - translate to lower-case except in quotes
Note
  • this is same task as performed by uvfix1 above for 1 file only
  • BUT, here we are processing an entire directory
  • with no more effort than for 1 file

 #1. Login yourself --> /home/userxx
 #2. mkdir cbl1 cbl2      <-- make subdirs in your homedir
 #2a. rm -f cbl1/* cbl2/*   - or clear subdirs if existing
 #3. cp $UV/cobol/cbls/car* cbl1  <-- copy demo progams to your subdir
     ===========================

 #4. uvfixA cobol/cbl1 cbl2 LSTt  <-- run uvfixA specifying I/O subdirs
     ===========================    - reply to prompts as follows:
      uop=q1r8192n99999 - user option defaults
            r8192       - output reccsize for fixed length records typ=RSF/RST
                        - for text files: accept default recsize & default typ=LSTt
                n999999 - output record count limit (high# copies to EOF)
      User OPtion (uop) defaults  = q1r8192n999999

 #4a. -->null to accept or enter/override -->   <-- null reply, no options required
 #4b. -->did you create outdir (dflt tmp) --> y <-- reply 'y' to continue

 #5.      reply to instruction prompts as follows:
          ========================================
 #5a. --> clr  b72(8),' '  <-- clear cols 73-80
 #5b. --> clr  b0(6),' '   <-- clear cols 1-6
 #5c. --> add  $ca1,1      <-- increment line counter
 #5d. --> mvn  b0(4),$ca1  <-- insert seuw=ence# in cols 1-4
 #5e. --> trl  b0(80)      <-- translate to lowercase except in quotes
 #5f. --> .                <-- enter '.' to end keyins & execute
Note
  • output results for uvfixA similar to above shown for uvfix1
  • but for multiple programs vs 1

Goto:   Begin this document End this document UVSI Home-Page

uvfix2 - modify 1 Fixed-length file


 Given    - dat1/custmas1 customer master record
 =====    - cust#, cust-name, address, city, prov, postal, tel#,& contact

 Required - create a telephone list with selected fields:
 ======== - cust#, cust-name, telephone#, contact

 #1. uvhd dat1/custmas1    <-- investigate Input file (1st record only)
     ==================      - need uvhd since packed fields & no linefeeds
                   10        20        30        40        50        60
 r#     1 0123456789012345678901234567890123456789012345678901234567890123
        0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
          3333332222454545444244545524542222233332445442544422222222224444
          130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
       64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ..4V|...
          4442222222222442535343222233323332333324455525544442222201357000
          9DF00000000002306931810000250D754D55310C12290725E38000000246C000
      128 .........W0....`........)X}..f3.....\.................4V}.......
          0000000005300016000000002570063100095000000000000000013570000000
          0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0000C00
      192 .E|...V}.......................f.....<........f.C 19950531
          0470005700000000880000000018000680001300000000694233333333222222
          35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000

     uvfix2 filename options       <-- must specify at least 1 option
     =======================         - usually 'r' input recsize

 #2. uvfix2 dat1/custmas1 r256s65  <-- specify option 'r256' input recsize
     ============================    - & 's65' output recsize
                                     - or could enter at prompt below
      uop=q1n99r0s0      - user option defaults
            n99          - output record limit (n99 means all records)
               r0        - Input Record size must be specified
               r8192     - max record-size 8192
                    s0   - Output Recsize defaulted from Input recsize if s0
                    s80  - may specify a value to override the default from in recsize
      User OPtion (uop) defaults  = q1n99r0s0r256s65

 #2a. -->null accept or override -->      <-- null (options on command line)
 #2b. -->RSF = default file type --> LSTt <-- enter 'LSTt' for Text file output

 #3.      reply to instruction prompts as follows:
          ========================================
 #3a. --> mvc  b35(30),a90  <-- move tel# & contact to follow cust# & name
 #3b. --> .                 <-- enter '.' end instructions & execute

 #4. more tmp/custelephones    <-- display output file (in tmp/...)
     ======================
      130140    EVERGREEN MOTORS LTD.    250-754-5531 LARRY WRENCH
      139923    JOHNSTONE BOILER & TANKS 604-320-1845 GEORGE BROWN
      154689    FRANKLIN RESOUCES        604-666-5489 RON BENNETT
Note

Goto:   Begin this document End this document UVSI Home-Page

V43. Help Menus for Unix & Vancouver Utilities

v43 - listrec1,listrec2,listhex1,listhex2

Here are 4 pre-programmed uvcopy jobs to list long records 100 bytes per line with a scale & option for max number to list (default 3). The reports are stored in tmp/... with input filename & '.lst' suffix.

listrec1
  • list text records, up to 4000 bytes, ended by Line-Feeds x'0A'
listrec2
  • list fixed-length records up to 8192 bytes
listhex1
  • list text records up to 4000 bytes, ended by Line-Feeds x'0A'
  • in vertical hexadecimal (3 lines/100 bytes, characters/zones/digits)
listhex2
  • list fixed-length records up to 8192 bytes
  • in vertical hexadecimal (3 lines/100 bytes, characters/zones/digits)

We will illustrate the fixed-length jobs (listrec2 & listhex2) using the customer master name,address,& sales demo file ($UV/dat1/custmas1).

listrec1 - demo using dat1/custmas1


 #1. Login --> /home/userxx
 #2. mkdir dat1 tmp     <-- make subdirs (if not already existing)

 #3. cp $UV/dat1/custmas1 dat1   <-- copy demo file to your homedir
     =========================

 #4. uvhd /home/uvadm/dat1/custmas1  <-- inspect cust master file
     ==============================
 rec#=1 rsize=256 fptr=0 fsize=8192 rcount=32
                      10        20        30        40        50        60
 r#        1 0123456789012345678901234567890123456789012345678901234567890123
           0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
             3333332222454545444244545524542222233332445442544422222222224444
             130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
          64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ..4V|...
             4442222222222442535343222233323332333324455525544442222201357000
             9DF00000000002306931810000250D754D55310C12290725E38000000246C000
         128 .........W0....`........)X}..f3.....\.................4V}.......
             0000000005300016000000002570063100095000000000000000013570000000
             0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0000C00
         192 .E|...V}.......................f.....<........f.C 19950531
             0470005700000000880000000018000680001300000000694233333333222222
             35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000

Goto:   Begin this document End this document UVSI Home-Page


 #5. uvcopy listrec2,fili1=dat1/custmas1,uop=r256m2
     ==============================================
     - run listrec2 with User OPtions r256 (record-size) & m2 (max recs to list)
     - listrec2 displays default options & prompts to allow option changes
 uop=q1r256l000m3s2t0  - option defaults
       r256            - recsize default 256 (max 8000, add 1 if Indexed)
           l000        - List size 000 defaults to record-size
           l100        - List size 100 would List FIRST 100 ONLY
                       - use "uvlp12L" Landscape 12cpi to print 100/line
               m3      - list 10 records Max & end job
               m99     - probably would not want to list high numbers
                       - "rop=c99" same (Run OPtion vs User OPtion)
                       - "rop=b99" could be used to Bypass records
                  s2   - space 2 (leave 1 blank line between records)
                  s1   - space 1 (no space between records)
                    t1 - Translate from EBCDIC to ASCII
 User OPtion (uop) defaults     = q1r256l000m3s2t0r256m2
 -->null to accept or enter/override --> r256m2 <-- could specify options here

 #6. vi tmp/custmas1.lst  <-- inspect output report
     ===================
 listrec2 - list (100 bytes/line) file=dat1/custmas1 2014/03/31_08:51:24
 rec#:rcsz          1         2         3         4         5         6         7         8         9        10
           1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 0001:0000 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANAIMO          BC V9S1H1    250-754-55
      0100 31 LARRY WRENCH     ..4V|............W0....`........)X}..f3.....\.................4V}........E|...V}
      0200 .......................f.....<........f.C 19950531
      0256
 0002:0000 132588    GEECOE GENERATOR SERVICESUNIT 170 - 2851 SIMPSON  RICHMOND         BC V6X2R2    604-278-44
      0100 88 HARRY LIGHT      ...h....8\........U\.............hl........p....#....%<........6.........G......
      0200 ...........................B.<..........A 20030430
      0256
Note
  • any unprintable bytes (packed fields) are shown as '.' periods

 #6a. uvlp12L tmp/custmas1.lst  <-- alternative print report Landscape 12 cpi
      ========================

Goto:   Begin this document End this document UVSI Home-Page

listhex2 - list in vertical hexadecimal


 #7. uvcopy listhex2,fili1=dat1/custmas1,uop=r256m2
     ==============================================
     - run listhex2 with User OPtions r256 (record-size) & m2 (max recs to list)

 #8. vi tmp/custmas1.hex    <-- inspect output report
     ===================
 listhex2 - list Vertical Hexadecimal file=dat1/custmas1 2014/03/31_09:12:07
                1         2         3         4         5         6         7         8         9        10
 seq#  1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
 00001 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANAIMO          BC V9S1H1    250-754-55
       3333332222454545444244545524542222233332445442544422222222224444444222222222244253534322223332333233
       130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E19DF00000000002306931810000250D754D55
       31 LARRY WRENCH     ..4V|............W0....`........)X}..f3.....\.................4V}........E|...V}
       3324455525544442222201357000000000000530001600000000257006310009500000000000000001357000000004700057
       310C12290725E38000000246C0000C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0000C0035C0046D
       .......................f.....<........f.C 19950531
       00000000880000000018000680001300000000694233333333222222
       0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
 00002 132588    GEECOE GENERATOR SERVICESUNIT 170 - 2851 SIMPSON  RICHMOND         BC V6X2R2    604-278-44
       3333332222444444244445454525455444554452333222333325445544225444444422222222244253535322223332333233
       13258800007553F5075E5214F20352693535E9401700D02851039D03FE002938DFE40000000002306682220000604D278D44
       88 HARRY LIGHT      ...h....8\........U\.............hl........p....#....%<........6.........G......
       3324455524444522222200060001350000000055000000000000066000000007800021000230000000030000000014100000
       880812290C97840000000048C0088C0000C0055C0000C0000C0058C0000C0030C0013C0045C0000C0056C0000C0067C0000C
       ...........................B.<..........A 20030430
       00000000000000000000000000041300000000004233333333222222
       0000C0000C0000C0000C0000C0027C0000C0000C1020030430000000

 #8a. uvlp12L tmp/custmas1.hex  <-- alternative print report Landscape 12 cpi
      ========================

more information

You can see help screens for uvcopy jobs, by entering 'uvcopy jobname', example: uvcopy listhex2 (omitting ',fili1=filename). See these jobs documented on pages http://uvsoftware.ca/cnvaids.htm#7E1 & 7E2.

Goto:   Begin this document End this document UVSI Home-Page

V44. Help Menus for Unix & Vancouver Utilities

v44 - tabfix1,2,3 - replace tabs with blanks

'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. There are 3 versions of this pre-programmed uvcopy job:

tabfix1
  • convert tabs to a specified number of blanks (4 default).
tabfix2
  • inserts blanks so next field at multiple of option t (default 4)
  • tabfix2 with option t8 duplicates appearance of tab files on unix
tabfix3
  • inserts blanks to place next field depending on a specified tab-rack

demo tabfix1


 #1. Login --> /home/userxx (your homedir)
 #2. mkdir dat1 tmp     <-- make subdirs (if not already existing)
 #2a. rm -f tmp/*       <-- &/or remove any existing tmp/ files

 #3. cp $UV/dat1/tabtest1 dat1   <-- copy demo file to your homedir
     =========================     - 1st 3 records shown below

 #4. cat dat1/tabtest1   <-- display demo file  with cat (or more, vi, etc)
     =================
 # tabtest1 - test file for uvcopy jobs tabfix1,2,3 to replace tabs with blanks
 #          - the tab line (between the === lines) has 1 tab between words
 # - unix utilities (vi,lp,more,etc) expand tabs to next multiple of 8, so
 #   it appears as if 7 blanks in 'a       bb', 6 blanks in 'bb      ccc', etc
           1         2         3         4         5
 0123456789012345678901234567890123456789012345678901234
 =======================================================
 a	bb	ccc	dddd	eeeee	ffffff	ggggggg	<-- tab x'09' delimited
 =======================================================

 #5. uvhd dat1/tabtest1 t   <-- display demo file with uvhd
     ====================     - to see the tab characters x'09's
               10        20        30        40        50        60
      0123456789012345678901234567890123456789012345678901234567890123
      a.bb.ccc.dddd.eeeee.ffffff.ggggggg.<-- tab x'09' delimited.
      60660666066660666660666666066666660322276627233226666667660
      19229333944449555559666666977777779CDD0412087097045C9D9454A
       *  *   *    *     *      *       *  <-- '*'s added for emphasis

Goto:   Begin this document End this document UVSI Home-Page


 #6. uvcopy tabfix1,fili1=dat1/tabtest1 [,filo1=tmp/tabtest1]
     =========================================================
     - run tabfix1 to expand each tab to 4 blanks (default)
     - output file will default to tmp/... with same name
      uop=t4   - option defaults
          t4   - replace each tab with 4 blanks (t1-t8 allowed)
      User OPtion (uop) defaults  = q1t4
      -->null to accept or enter/override -->   <-- enter null

 #7. cat tmp/tabtest1   <-- display output file
     ================
           1         2         3         4         5
 0123456789012345678901234567890123456789012345678901234
 =======================================================
 a    bb    ccc    dddd    eeeee    ffffff    ggggggg    <-- tab x'09' delimited
 =======================================================

process entire directory

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 document End this document UVSI Home-Page

$UV/pf/util/tabtest1 - uvcopy job listing

 # 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=dat1/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=?dat1/tabtest1,typ=LST,rcs=1024
 filo1=?tmp/$fili1,typ=LSTt,rcs=1024
 @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(1024)           get current record
       skp>  eof
       mvc   b0(1024),a0              move input record to output area
 #---------------------------------
       rep   b0(1024),x'09',c0($rt8)  replace any tabs with blanks ($rt value)
 #---------------------------------
       put   filo1,b0(1024)           write record to output file
       skp   loop
 # end of file - close files & end job
 eof   cls   all
       eoj

The uvcopy code for 'tabfix1' is listed here because it is short. If you have Vancouver Utilities installed, you can inspect other jobs such as tabfix2 or tabfix3, for example:


 vi $UV/pf/util/tabfix2
 ======================
 See tabfix2 & 3 documented at http://uvsoftware.ca/UVjobs1.htm#E2 & E3.

Goto:   Begin this document End this document UVSI Home-Page

V45. Help Menus for Unix & Vancouver Utilities

v45 - table summaries of counts & amounts by any argument

'table2' is a pre-programmed uvcopy job to table summarize record counts & any 2 qty/amt fields by any desired argument (dept, state, city, salesman, etc). 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.

table2 demo - summarize qty & amt for dat1/sales2


 #1. Login --> /home/userxx
 #2. mkdir dat1 tmp     <-- make subdirs (if not already existing)
 #2a. rm -f tmp/*       <-- &/or remove any existing tmp/ files

 #3. cp $UV/dat1/sales3 dat1   <-- copy demo file to your homedir
     =======================     - 1st 3 records shown below
            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+
Required
  • Read the sales3 file, building a memory table by product# 30(6)
    of quantity 38(6) & $amount 53(9)
  • at EOF, write the table out to a file for display &/or print

 #4a. uvcopy table2  <-- minimum entry, will solicit filename & options
      =============

 #4b. uvcopy table2,fili1=dat1/sales3  <-- better to enter at least filename
      ===============================    - will prompt for options (see below)

 #4c. uvcopy table2,fili1=dat1/sales3,uop=a30b6c38d6e53f9g3r64
      ========================================================
      - could enter all options required (with experience)
      - will be prompted to allow option changes (as follows)

script alternative

There is also a script'table2' (vs uvcopy job 'table2'), with easier syntax. Following script command #4d. is same as uvcopy command #4c. above.


 #4d. table2 dat1/sales3 a30b6c38d6e53f9g3r64
      =======================================

Goto:   Begin this document End this document UVSI Home-Page

table2 - option prompts

 uop=a0b0c0d0e0f0g0n0p0r0 - option defaults
 uop=a0                 - argument displacement (0 relative)
 uop=  b0               - argument length
 uop=    c0             - acum#1 dsplcmnt (omit c,d,e,f for counts only)
 uop=      d0           - acum#1 length
 uop=        e0         - acum#2 displacement (0 relative)
 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=            g__    - table formats g1-g12 see uvcopy.doc tbf f1-f12
 uop=        n0         - argument n0=unpacked, n1=packed, n2=binary
 uop=        p0         - acum-fields p0=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 dat1/sales3 file
 product#;quantity;amount  <-- ENTER this for demo Field Headings
 Summary of Qty & Amt by Product#  <-- ENTER this for demo Report Heading
 User OPtion defaults     = q1a0b0c0d0e0f0g0n0p0r0
 -->null accept or enter/override --> a30b6c38d6e53f9g3r64 <-- could enter here
 Enter fieldnames ';' separated --> product;qty;amount <-- enter fieldnames
 Enter report title --------------> Sales by Product   <-- enter report title

Output File written to: tmp/sales3_tbl_product Enter: more,print,uvlpr12,edit,null --> more <-- defaults to more

 table2  2014/03/31_10:07:25  sales by product
 tbl#0001  tblo1t1 n0($rn32)               -acum#1-   %        -acum#2-    %
 line#     count  %    1strec#  product        qty               amount
     1         3  15         8  BBQ001          39   39        3,310.39   73
     2         2  10        12  BIT075          26-  26-         860.26-  19-
     3         1   5         3  CHR001          22   22          440.22    9
     4         5  25         1  HAM001          41   41        1,390.41   30
     5         2  10         7  HAX129          10   10          600.10   13
     6         2  10        11  SAW051          24-  24-         560.24-  12-
     7         1   5         2  SCR012          21   21          210.21    4
     8         4  20         4  TAB013          17   17           29.83-   0
              20*100             *TOTAL*       100 *100        4,501.00 *100
Note
  • this example illustrates the maximum options for table2
  • often all you want is the automatic record counts by argument
  • which would simply the comamnd line to:

 uvcopy table2,fili1=dat1/sales3,uop=a30b6r64
 ============================================

more info re table2

You can see a help screen by entering 'uvcopy table2' omitting filename. See table2 documentation at http://uvsoftware.ca/cnvaids.htm#4D1

Goto:   Begin this document End this document UVSI Home-Page

V46. Help Menus for Unix & Vancouver Utilities

v46 - addup any field by displacement(length)

addup1
  • accumulate any field by entering options for displacement & length
  • addup1 for Text files terminated by Line-Feeds (max recsize 4096)
addup2
  • accumulate any field by entering options for dsplcmnt,length,& recsize
  • addup2 for Fixed-Length record files (max recsize 4096)

addup1 demo


 #1. Login --> /home/userxx
 #2. mkdir dat1 tmp     <-- make subdirs (if not already existing)
 #2a. rm -f tmp/*       <-- &/or remove any existing tmp/ files

 #3. cp $UV/dat1/sales2 dat1   <-- copy demo file to your homedir
     =======================     - 1st & last records shown below
           1        2         3         4         5         6
 123456789012345678901234567890123456789012345678901234567890123
  cust# slsm#  date  invoice# product#    qty   price    amount
 130140    21 990802 IN111001  HAM001  000020 0000101 000002020
 406082    65 030816 IN441     VAR200  00001y 0000101 00000191y
Required
  • Read sales2 file, accumulate $amount cols 54-62
  • at EOF, display total (also writes total line to tmp/sales2.tot)

 #4a. uvcopy addup1  <-- minimum entry, will solicit filename & options
      =============

 #4b. uvcopy addup1,fili1=dat1/sales2  <-- better to enter at least filename
      ===============================    - will prompt for options (see below)

 #4c. uvcopy addup1,fili1=dat1/sales2,uop=b53c9e2
      ===========================================
      - could enter all options required (with experience)
      - will be prompted to allow option changes (as follows)

Goto:   Begin this document End this document UVSI Home-Page

addup1 demo - enter options when prompted


 #4b. uvcopy addup1,fili1=dat1/sales2  <-- better to enter at least filename
      ===============================    - will prompt for options (see below)
uop=b00c0e0
  • default options
     b53c9e2 - demo options for dat1/sales2 text records $amt cols 54-62
     b53     - begin byte# (zero relative)
        c9   - field length
          e2 - decimal places to edit result

User OPtion (uop) defaults = q1b00c0e0

 -->null to accept or enter/override --> b53c9e2 <-- Enter options for demo
 140514:170748:addup1: EOF fili01 rds=20 size=1280: dat1/sales2
 140514:170748:addup1: EOF filo01 wrts=1 size=59: tmp/sales2.tot

 EOF, records=20, total= 10,643.00 in 53(9) of: dat1/sales2
 ==========================================================
 - total displayed as above
 - also written to tmp/sales2.tot (1 line as above)

addup2 demo as follows:


 uvcopy addup2,fili1=dat1/sales1,uop=b53c9e2r64
 ==============================================
 - addup2 for Fixed-Length records
 - dat1/sales1 64 byte records w/o LineFeeds

summary of addup/acum jobs available

addup1
  • accumulate any field by entering options for displacement & length
  • addup1 for Text files terminated by Line-Feeds (max recsize 4096)
  • demo above, see code listing at uvtrain.htm#6B3
addup2
  • accumulate any field by entering options for dsplcmnt,length,& recsize
  • addup2 for Fixed-Length record files (max recsize 4096)
acum1
  • similar to addup1/addup2, but provides more options for:
  • field types (numeric unpacked, packed, binary)
  • cross-footing multiple consecutive same size/type fields
  • ASCII or EBCDIC
  • see details at CNVaids.htm#8I1
genacum2
  • generate jobs to accumulate ALL numeric fields in a file
  • automatically generated from the COBOL copybook
  • see complete details at DATAcnv1.htm#8G1

Goto:   Begin this document End this document UVSI Home-Page

V81. Help Menus for Unix & Vancouver Utilities

v81 - vi editor

Here is a 'vi' command summary, the minimum essentials you should know. See the 'man' pages for all commands & options.

TWO modes of operation - COMMAND or INSERT

  1. COMMAND mode - cursor movement, read/write files, etc

  2. INSERT mode - enter 1 of 'i,a,A,R,o,cw' to begin insert mode - enter text (insert or replace) - hit ESCAPE to end insert mode & return to command mode

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).

starting 'vi' to edit a file


 vi filename   <-- starts vi, reads the file,& displays 1st screen
 ===========       (or blank screen if creating a new file)

CURSOR MOVEMENT

                                 k
                                 |
                           h <-- . --> l
                                 |
                                 j
 'h'  - move cursor left
 'j'  - move cursor down
 'k'  - move cursor up
 'l'  - move cursor right
Note
  • early versions of vi used j,k,h,l for cursor movement
    because early consoles were teletypes & had no arrow-keys
  • modern versions allow the use of the 'arrow keys'
 ^d   - down 1/2 screen
 ^u   -  up  1/2 screen
Note
  • I use '^' to represent the 'control key'
 :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 document End this document UVSI Home-Page

INSERT text (ESCAPE to end insert)

i
  • enter insert mode at cursor location
a
  • append text after cursor location
A
  • append text onto the end of the current line
r
  • replace 1 character under the cursor
  • automatically returns to command mode (no need to ESCAPE)
R
  • replace (overwrite) text until ESCAPE
cw
  • change word (from cursor to end of word)
  • ESCAPE to end change & adjust line to new word length
o
  • open (insert) a new line BELOW the cursor
O
  • open (insert) a new line ABOVE the cursor

DELETE commands

x
  • delete character (under cursor)
dd
  • delete current line
D
  • delete from the cursor to end of line

5dd - delete 5 lines (current & next 4 lines below cursor)

COPY lines (YANK & PUT)

yy
  • yank current line (into current buffer)
  • move cursor to line above intended insert point
p
  • put (insert) buffer to line below cursor
 5yy - yank 5 lines into current buffer
     - move cursor to line above intended insert point
 p   - put (insert) buffer (5 lines) below cursor

MOVE lines (DELETE & PUT)

dd
  • delete current line (& store in current buffer)
  • move cursor to line above intended insert point
p
  • put (insert) buffer to line below cursor
 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 document End this document UVSI Home-Page

search commands

 /xxx - search for xxx anywhere in the file
      - search will wrap around EOF back to cursor location
n
  • repeat previous search (next)

substitution commands

 :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)

Global command - to delete, print, etc

 :g/xxx/d          - on ALL lines (g=global), Delete lines with 'xxx'
 :g/xxx/p          - on ALL lines (g=global), Print lines with 'xxx'

miscellaneous commands

u
  • undo the last change command
U
  • Undo all changes to the current line (since cursor move to it)
 .  - repeat the previous change command
J
  • Join line below cursor onto current line
 :r file2 - read a file into the workspace
            (following the line with the cursor)
 ^+A - increment the number under the cursor
     - cursor can be anywhere on a multi-digit number
     - '^' represents the 'control key'
ga
  • print the ASCII & HEX value of the character under the cursor

Goto:   Begin this document End this document UVSI Home-Page

MARK lines & copy

m[a-z]
  • mark current line as a,b,c,... (any 1 of 26 alphas)
m a
  • mark current line as mark 'a'
  • can move cursor to some other line
mb
  • mark new current line as mark 'b'
  • no need to leave space between mark command & mark letter
 'a          - goto mark 'a' (addressed by preceding with sungle quote)
             - NO preceding ':' as on following commands
 :'a,'b      - address a range of lines from previously marked a & b
             - may use with 'move' & 'copy' as follows:
 :'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

MARK lines, write to tmp/, read into 2nd file

vim dir/file1 <-- edit file1

ma
  • mark desired start line as mark 'a'
  • move cursor to some other line
mb
  • mark desired end line as mark 'b'

 :'a,'b w tmp/file1x  <-- Write selected lines to tmp/...
 ===================
 :q                     - quit editing file1

vim dir/file2 <-- edit file2

 ...         - move cursor to line above desired insert

 :r tmp/file1x        <-- read lines (selected from file1) into file2
 =============
 :wq                    - write & quit

Goto:   Begin this document End this document UVSI Home-Page

registers a-z

Registers are addressed by preceding '"' double quote vs single quote for marks. Registers are handy for capturing data lines for later insertion as desired.

 "a 5yy   - yank 5 lines into register "a
 "a5yy    - no need to leave space between register ID & Yank number & command
 "a p     - put contents of register "a (following current line)
 "A 2yy   - Append 2 more lines to contents of register "a
            (Upper case register Appends, lower case replaces)

registers to yank lines in file1 & put in file2

You can yank lines into registers (a-z) that will be preserved between files & between logon sessions (since stored in .viminfo file) (a very powerful feature that you should take advantage of).

vim dir/file1 <-- edit file1

 ...         - move cursor to 1st line desired

 "a5yy       - yank 5 lines into register "a
 =====
 :q          - quit editing file1

vim dir/file2 <-- edit file2

 ...         - move cursor to line above desired insert

 "ap         - put lines from register "a into file2
 ===
 :wq                    - write & quit

Goto:   Begin this document End this document UVSI Home-Page

WRITE & QUIT

 :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
  • write & quit (same as :wq)

:q! - quit without writing

vim References

'vim' is an enhanced version of 'vi', used on most Linux systems. On Linux 'vi' is usually an alias to 'vim'. Use '\vi' if you really want the old 'vi'.


 http://guru99.com/the-vi-editor.html  (nofollow)
 ======================================
 - excellent tutorial on 'vim'

 http://linuxgazette.net/152/srinivasan.html
 =============================================
 - another excellent tutorial on 'vim'

 'ftp://ftp.vim.org/pub/vim/doc/vimbook-OPL.pdf'
 ===============================================
 - download everything about vim 3.8 MB .pdf file

 http://guru99.com/unix-linux-tutorial.html (nofollow)
 ============================================
 - many other tutorials on unix/linux

Goto:   Begin this document End this document UVSI Home-Page

V82. Help Menus for Unix & Vancouver Utilities

v82 - unix tips, Directory Housekeeping

It is extremely important to establish guidelines for directory design you are migrating to unix/linux. I suggest you adopt a set of conventions & housekeeping rules for your home-directory and other working-directories.

Here are a few directories to illustrate the rules suggested. Of course there would be several more subdirs in practise, especially for testlibs (working directory for mainframe conversion).

 /home/userxx      <-- Your homedir (your personal working-directory)
 :-----src           <-- your source programs
 :-----bin           <-- your compiled executables
 :-----data          <-- data files
 :-----sf            <-- Script Files
 :-----tmp           <-- temporary files, sort work files, etc
 :-----tmp1          <-- tmp1/tmp2 dirs for mass change demos
 :-----tmp2
 :-----testlibs      <-- a working-directory (within your homedir)
 :     ;               - for mainframe to unix conversion project
 :     :-----cbls      <-- COBOL programs converted from mainframe
 :     :-----cblst     <-- COBOL compile listings
 :     :-----cblx      <-- COBOL compiled executables
 :     :-----data      <-- data files
 :     :-----sf        <-- Script Files
 :     :-----tmp       <-- temporary files

Goto:   Begin this document End this document UVSI Home-Page

suggested rules for working directories

  1. No files in your homedir or other workingdirs.

  2. All files should be kept in subdirs within workingdirs.

  3. Stay in the workingdir, do not change into the subdirs, address your files thru 1 level of subdir, because many scripts access multiple subdirs. For example you might edit a program & compile as follows:


 #3a. vi cbls/car200.cbl  <-- edit your program
      ==================
 #3b. mfcbl1 car200.cbl   <-- compile the program
      =================

'mfcbl1' is the Vancouver Utility compile script for Micro Focus COBOL. It reads source from cbls/car200.cbl, writes the executable to cblx/car200.int, & the compiler listing to cblst/car200.lst - so you must be positioned above these subdirs for the script to access the subdir/files.

If you plan to edit multiple programs you might change into the subdir, but usually you will do 1 edit & then compile (2 commands) vs 4 commands if you change in, edit, change out,& then compile.

  1. Keep the number of subdirs in your workingdirs to a mangeable number. Nice if the subdirs fit on 1 screen for easy review.

  2. Setup a tmp/ subdir in your working dir to hold any temporary files which would clutter up your working dir. Use the tmp/ subdir whenever you need to write out parts of programs or scripts to be read into other programs or scripts. The tmp subdir is also used by uvsort to write its merge files (for large sorts).

Note that many Vancouver Utility scripts use the tmp/ subdir to write an output file for you to confirm results before copying back to desired destination.

  1. Clean out the tmp/ subdir frequently to make it easy for you to review outputs of scripts that write their outputs there for you to inspect.

  2. Note that when all files are kept within subdirs, then any file appearing in the working dir is an error situation needing investigation. For example JCL/scripts export the COBOL program logical name to the physical filename (usually in the data/ subdir). Any incorrect export results in the file being written with the logical name in the working dir where it attacts attention for investiagtion & resolution.

  3. Keep contents of a subdir 'pure' so we can mass change contents. For example cbls/ should contain nothing but source COBOL programs, cpys/ should contain nothing but copybooks, jcls should contain nothing but JCL/scripts (Korn shells).

Goto:   Begin this document End this document UVSI Home-Page

V83. Help Menus for Unix & Vancouver Utilities

v83 - Vancouver Utilities home directory

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

Installing Vancouver Utilities & profiles required

See Installation at http://uvsoftware.ca/install.htm

 See profiles listed at http://uvsoftware.ca/admjobs.htm#1C0
 - env/stub_profile copied to your homedir & renamed .profile or .bash_profile
 - stub_profile calls common_profile from $APPSADM/env/common_profile
 - should copy profiles from $UV/env to $APPSADM/env & customize for your site
 - ensure your stub_profiles call common_profile from $APPSADM
 - to prevent loss of common_profile when new version of Vancovuer Utilities installed
 /home/appsadm              <-- setup user 'appsadm' (your site admin vs uvadmin)
 :-----env                    - copy profiles from /home/uvadm/env/...
 :     :-----common_profile   - common profile (called by stub_profile)
 :     :                      - customize as desired for your site
 :     :-----stub_profile     - copy to homedirs & rename .profile or .bash_profile

Goto:   Begin this document End this document UVSI Home-Page

Notes

  1. You may install the Vancouver Utilities anywhere desired if you change the definition of environmental variable '$UV' in the common_profile, for example:

      export UV=/home/uvadm        #<-- default (line 36 of common_profile_uv)
      export UV=/opt/uvsw/uvadm    #<-- alternate suggested

All subsequent references in the profiles use '$UV', for rexample:

      export PATH=$PATH:$UV/bin:$HOME/bin:$HOME/sf:...etc...
  1. Profiles provided for Vancouver Utilities reflect this directory structure. 'common_profile_uv' & 'stub_profile_uv' are distributed in the env/ subdir. Users can copy the stub_profile_uv to their homedir, renaming as .profile for Unix, or .bash_profile for Linux. See profiles listed begining at http://uvsoftware.ca/admjobs.htm#1C0.

  2. It is best to address Vancouver utility files using '$UV', for example, to copy a demo file to your homedir/subdir for test/demo/exercises:


      cp $UV/dat1/custmas1 data/
      ==========================
  1. The uvadm subdirs for 'sf' (script files) & 'pf' (uvcopy parameter files) are further sub-directoried as shown above, but there is no need for you to subdirectory sf & pf in appsadm or your homedir.

Goto:   Begin this document End this document UVSI Home-Page

V84. Help Menus for Unix & Vancouver Utilities

v84 - mainframe conversion directories

The following test/demo directories are supplied in $UV/mvstest/... We suggest copying to a subdir in your homedir for training & initial conversion/testing some of your JCL & COBOL programs.

 /home/uvadm/mvstest   <-- test/demo libraries supplied in /home/uvadm/...
 /home/userxx          <-- can copy to your homedir & run test/demos
 :-----testlibs        <-- super-dir of conversion sub-dirs
 :     :--UV--cbl0        - COBOL programs ('*' means files present)
 :     :------cbl1        - cleaned up, cols 1-6 & 73-80 cleared, etc
 :     :------cbl2        - cnvMF5 converts mainframe COBOL to MicroFocus COBOL
 :     :---ux-cbls        - copy here (standard source library) before compiling
 :     :------cblst       - cobol source listings from compiles
 :     :------cblx        - compiled COBOL programs (.int's)
 :     :--UV--cpy0        - for COBOL copybooks
 :     :------cpy1        - cleaned up, cols 1-6 & 73-80 cleared, etc
 :     :------cpy2        - cnvMF5 converts mainframe COBOL to MicroFocus COBOL
 :     :---ux-cpys        - copy here (standard copybook library)
 :     :--UV--ctl         - conversion control files (jclunixop51,cobdirectives)
 :     :------errs        - JCL converter writes ERROR reports here
 :     :--UV--jcl0        - test/demo JCLs supplied
 :     :------jcl1        - intermediate conversion 73-80 cleared
 :     :------jcl2        - PROCs expanded from procs
 :     :------jcl3        - JCLs converted to Korn shell scripts
 :     :------jcl4        - JCL/scripts with file info #cmts (I/O,recsize,Pack/Bin)
 :     :---ux-jcls        - copy here manually 1 by 1 during test/debug
 :     :------maps        - 'cobmaps' record layouts generated from copybooks
 :     :------pf          - uvcopy jobs to replace utilities (easytrieve,etc)
 :     :--UV--parm0       - control cards & includes (SORT FIELDS, etc)
 :     :------parms       - control cards with 73-80 cleared
 :     :--UV--proc0       - test/demo PROCs supplied
 :     :------procs       - will be merged with jcl1, output to jcl2
 :     :------sf          - for misc scripts you may wish to write
 :     :------sqls        - DB2/Oracle scripts to create/load tables
 :     :------tmp         - tmp subdir used by uvsort & various conversions
 :     :------xref        - cross-references (see XREFjobs.htm)
 --UV-- Marks subdirs containing UV Software demo files for conversion
        - COBOL programs, copybooks, JCLs, PROCs, Parms,& data
        - control files required for conversions or executions
  ---ux-  marks the most important outputs of the conversion
          most other subdirs can go away after the conversion is complete

Goto:   Begin this document End this document UVSI Home-Page

library subdirs for production (after conversion)

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

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

data subdirs for test/demo executions

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

subdirs for DATA conversion

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

Goto:   Begin this document End this document UVSI Home-Page

setup directories for test/demo conversions


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

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

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

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

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

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

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

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

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

 #6b. copymvsctls  <-- script to copy control files from /home/uvadm/ctl
      ===========      to $RUNLIBS/ctl/...

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

 #7. vi ctl/jclunixop51  <-- customize JCL converter options ?
     ==================
Note

Goto:   Begin this document End this document UVSI Home-Page

links to mainframe conversion info

 http://uvsoftware.ca/mvsjcltest1.htm
 - best place to begin learning about mainframe conversion of JCL,COBOL,& DATA
 http://uvsoftware.ca/mvsjcltest1.htm#Part_2
 - sample JCL/script conversions
 - shows original mainframe JCL & converted equivalent Korn shell scripts
 http://uvsoftware.ca/mvsjcltest1.htm#Part_3
 - operating instructions to perform the conversions of JCL & COBOL
 http://uvsoftware.ca/datacnv1.htm#Part_3
 - converting EBCDIC DATA to ASCII preserving packed/binary fields
 http://uvsoftware.ca/datacnv1.htm#Part_4
 - converting fixed-length records to pipe|delimited text files
   for loading database tables

Goto:   Begin this document End this document UVSI Home-Page

V85. Help Menus for Unix & Vancouver Utilities

v85 - JCL & COBOL Cross-References

xrefall
  • script to run all cross-ref reports

JCL/script Cross-References

xkshfile1
  • list all datafiles in each JCL/ksh/script
xkshfile2
  • shows all JCL/ksh/scripts using each data-file
xkshparm1
  • list all SYSIN/PARM modules in each JCL/ksh/script
xkshparm2
  • shows all JCL/ksh/scripts referencing each SYSIN/PARM
xkshproc1
  • list all PROCs executed in each JCL/ksh/script
xkshproc2
  • shows all JCL/ksh/scripts executing each PROC
xkshprog1
  • list all programs executed in each JCL/ksh/script
xkshprog2
  • shows all JCL/ksh/scripts executing each program

COBOL program Cross-References

xcobcopy1
  • list all 'copy'books used in each program
xcobcopy2
  • shows all programs using each 'copy'book
xcobcall1
  • list all 'called'programs called by each program
xcobcall2
  • shows all programs calling each 'called'program
xcobfile2
  • crossref all PROGRAMS using each external-file

COBOL Files Report

cobfil51
  • COBOL Files Report
    (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

Goto:   Begin this document End this document UVSI Home-Page

sample xkshprog1 - programs executed in each script

 xkshprog1 ** list all PROGRAMs executed in each ksh SCRIPT **
 Keyword=progid:program  Exclude=~~ Include=~~ Skip=       page#  1
 Directory=/home/userxx/testlibs/jcl3
 Options=q1a16b16c4e0d0j0l0s2w1a18b16c4d8j4l1q0i7
 =======================================================2011/11/05_16:35:15
 jar100.ksh         car100
 jar200.ksh_2       car200          sort
 jgl100.ksh         cgl100
 jgl200.ksh_2       cgl200          sort
 jgl300.ksh_2       idcams          iebgener

**TotalFiles: 5, TotalWords: 8, TotalRefs: 8

sample xkshprog2 - all scripts executing each program

  xkshprog2 ** crossref to show all ksh SCRIPTS executing each PROGRAM **
  Keyword=progid:program  Exclude=~~ Include=~~ Skip=       page#  1
  Directory=/home/userxx/testlibs/jcl3 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4d8j4l1q0i7
  =======================================================2011/11/05_16:35:15
  car100           jar100.ksh
  car200           jar200.ksh
  cgl100           jgl100.ksh
  cgl200           jgl200.ksh
 *idcams           jgl300.ksh
 *iebgener         jgl300.ksh
 *sort_2           jar200.ksh      jgl200.ksh

**TotalWords: 7, TotalFiles=8, TotalRefs: 8

Goto:   Begin this document End this document UVSI Home-Page

sample xcobcopy1 - all copybooks used in each program

 xcobcopy1 ** list all COPYBOOKS in each PROGRAM **
 Keyword=copy:include  Exclude=unix Include=.cpy Skip=       page#  1
 Directory=/home/userxx/testlibs/cbls
 Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1q0i7
 =======================================================2011/11/05_16:35:14
 car100.cbl       custmas.cpy
 car200.cbl_4     custmas.cpy     saledtl.cpy     sdline.cpy      stline.cpy

**TotalFiles: 2, TotalWords: 5, TotalRefs: 5

sample xcobcopy2 - all programs using each copybook

  xcobcopy2 ** crossref all PROGRAMS using each COPYBOOK **
  Keyword=copy:include  Exclude=unix Include=.cpy Skip=       page#  1
  Directory=/home/userxx/testlibs/cbls Options=q1a16b16c4e0d0j0l0s2w1a16b16c4e3l1q0i7
  =======================================================2011/11/05_16:35:14
  custmas.cpy_2    car100.cbl      car200.cbl
  saledtl.cpy      car200.cbl
  sdline.cpy       car200.cbl
  stline.cpy       car200.cbl

**TotalWords: 4, TotalFiles=5, TotalRefs: 5

Goto:   Begin this document End this document UVSI Home-Page

sample COBOL Files Report

 cobfil51  ** COBOL Files Report ** Dir=cbls  2011/10/23_16:39:38
 progname.cbl DDname       OAM   open recsz  copybook.cpy  FDname / Key    lines
 ================================================================================
 car100.cbl   custmas      SS_   I___   256  custmas.cpy   custmas
 car100.cbl   nalist       L__   O___   120                nalist
                                                                              52
 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
 cgl100.cbl   acctmas      SS_   I___   128                acctmas
 cgl100.cbl   actlist      L__   O___   120                actlist
                                                                              57
 cgl200.cbl   glmsold      SS_   I___   128                glmsold
 cgl200.cbl   glmsnew      SS_   O___   128                glmsnew
 cgl200.cbl   gltrans      SS_   I___    80                gltrans
                                                                              65
                    ** Note re COBOL Files Report **

links to Cross-References info

 http//uvsoftware.ca/mvsjcltest1.htm#Part_4
 - more cross-references & operating instructions
 http//uvsoftware.ca/xrefjobs.htm
 - complete documentation on cross-references

Goto:   Begin this document End this document UVSI Home-Page

V91. Help Menus for Unix & Vancouver Utilities

v91 - download & install uvhelp & uvscripts

The unix help menus & scripts are available to anyone (regardless of whether you are a Vancouver Utility customer). If you are a customer since April 2014, you already have the help menus with the normal install. If you are not a customer (or have an older version of Vancouver Utilites), You can download as follows:


 http://uvsoftware.ca/help     <-- display files in subdir help/
 =========================       - will see files within help/ subdir
 uvhelp           - main menu
 v11              - sub menus
 etc
 v91
 uvhelp.zip     <-- left click on zip file to save in Downloads directory

 http://uvsoftware.ca/scripts  <-- display files in subdir scripts/
 ============================
 allcp
 alldiff          - about 175 scripts in scripts/ subdir
 etc
 uvscripts.zip  <-- left click on zip file to save in Downloads directory

installing help menus & scripts

We assume installation in your homedir on unix/linux. You can also install on Windows systems if you have SFU (Services For Unix - a free download from Microsoft), which allow you to run Korn shell scripts on Windows systems.

 /home/userxx      <-- your homedir
 :-----help          - subdir for help menus
 :-----scripts       - subdir for scripts
 :-----sf            - alternative name for Script Files
                       (used by Owen Townsend - I like short names)

 #0. Login --> /home/userxx

 #1a. mkdir help
 #1b. cp /root/Downloads/uvhelp.zip help/
 #1c. cd help
 #1d. unzip uvhelp.zip
 #1e. cd ..

 #2a. mkdir scripts
 #2b. cp /root/Downloads/uvscripts.zip scripts/
 #2c. cd scripts
 #2d. unzip uvscripts.zip
 #2e. cd ..

Goto:   Begin this document End this document UVSI Home-Page

3. Add the help & scripts subdirs to your PATH


 #3a. vi .profile        - for Unix systems
 #3b. vi .bash_profile   - for Linux systems

 export PATH=$PATH:$HOME/help:$HOME/scripts
 ==========================================

 #4. Download the Korn shell (free) if you do not already have it
    Note that the 1st line of all scripts is --> #!/bin/ksh

 www.kornshell.com
 =================
 - Look for the binary/executable version for your machine
   (AIX, HP, SUN, Linux, etc)
 - login as root & copy to /bin/ksh

 #4a. Alternative (to Korn shell) could create a symbolic link to bash
      As root you could --> ln -s /bin/ksh /bin/bash
  1. Login out & backin to make new PATH effective

  2. Test help menus - will give example for finding scripts to remove old files ('rmold1' - a script based on the unix 'find' command).


 #6a. uvhelp
      ======
      --> main menu displayed by more
      --> page down to submenu (v15) documenting desired actions
      --> determine script desired & arguments required
      --> q  <-- quit main menu

 #6b. rmold1        <-- Vancouver Utility script (using unix find)
      ======          - to remove files older than a number of days
      Entering scriptname with no arguments displays help for that script, so
      you can confirm arguments required, with no danger of executing anything.

 #6c. rmold1 /u3/backups +365 -f  <-- remove files older than 1 year from backups
      ==========================

 #6d. rmold1 /u3/backups +365 -i  <-- Alternative '-i' option for prompt
      ==========================      & reply y/n to remove each file

 #6d. mvold1 /u3/backups /u4/archive +365   <-- Alternative to MoVe vs ReMove
      ===================================

 #6e. lsold1 /u3/backups 365      <-- could also LiSt files before removing
      ======================          to first see files older than 365 days
Note
  • The 'rmold1' script command above is the same as using the unix 'find'
    command directly as follows:

      find /u3/backups -mtime +365 -exec rm -f {} \:
      ==============================================
      But how many of you can understand & remember this syntax ?
      The uvhelp menus & scripts makes actions like this much easier.

Goto:   Begin this document End this document UVSI Home-Page

V92. Help Menus for Unix & Vancouver Utilities

v92 - Creating your own help menus

You can add help menus for unix commands not covered by uvhelp, or for your own applications, or for any commands that you would like to have an easy way to be reminded of the arguments required.

First decide on filenames for your help menus. The help menus supplied by UV Software are 'uvhelp' for the main-menu & 'v11', v12', etc for sub-menus. You might decide to have a main-menu named simply 'help' if (not alread used) & sub-menus named 'u11', 'u12', etc (for User menus). You can name your sub-menus anything desired, as long as the your main-menu name matches the sub-menu filename. Here is a diagram of suggested names:

 /home/userxx          <-- your homedir
 :-----help              - subdir for help menus
 :     :-----uvhelp    <-- main-menu for Vancouver Utility helps
 :     :-----v11         - 1st sub-menu for VU helps
 :     :-----...               --- etc ---
 :     :-----v99         - last sub-menu for VU helps
 :     :
 :     :-----help      <-- main-dir for YOUR help menus ('help' vs 'uvhelp')
 :     :-----u11         - 1st sub-menu for your User helps (u## vs v##)
 :     :-----...               --- etc ---
 :     :-----ftp         - OR you might name for the topic
 :     :-----payments    - OR your applications

It is incredibly easy to create the help menus. Simply insert "more <<'EOF'" at the beginning of your text, 'EOF' at the end, make the file executable,& store your new help file in the help/ subdir, which we showed in your homedir, but could be anywhere as long as it is in the PATH defined in your profile or the common_profile to make available to all users.


 #1. Login --> /home/userxx
 #2. mkdir help      <-- already present if VU help installed in your homedir

 #3. vi help/help    <-- create your main-menu
     ============      - can name your main-menu 'help' (vs 'uvhelp')
                         (if your site does not already have a 'help' menu)
     # help            - 1st line or 2 should hold filename & description
     # date,author,etc   (info preceding more <<'EOF' not to appear on helps)
     more <<'EOF'      - at begining of your help display (main-menu)
     u11. xxxxxxxxx    - your submenu names & short descripion
       ---etc---       - add as desired when desired
     u99. xxxxxxxxx
     EOF               - at end of your help file (main-menu)

Goto:   Begin this document End this document UVSI Home-Page


 #4. vi help/u11     <-- create your sub-menu(s)
     ============
     # u11             - 1st line or 2 should hold filename & description
     # date,author,etc   (info preceding more <<'EOF' not to appear on helps)
     more <<'EOF'      - at begining of your help display (sub-menu)
     u11. xxxxxxxxx    - your submenu names & short descripion
       ---etc---       - add as desired when desired
     u99. xxxxxxxxx
     EOF               - at end of your help file (sub-menu)
  1. Add the help directory to your PATH (if not already present)


 #5a. vi .profile        - for Unix systems
      ===========
 #5b. vi .bash_profile   - for Linux systems

      export PATH=$PATH:$HOME/help
      ============================
  1. OR add help directory to the PATH defined in the common_profile so all users can access


 #6a. vi /home/appsadm/env/common_profile
      ===================================

      export PATH=$PATH:/home/appsadm/help  <-- better to put common menus
      ====================================      in admin directory

sample User main-menu

 # help - help main-menu for ABC Corp (vs uvhelp for Vancovuer Utilities)
 #      - by Joe Blow, April 09/2014
 more <<'EOF'
                 ** help - main-menu for ABC Corp **
 u11. payment system
 u12. sales system
 u13. FTP instructions
       --- etc ---
 u99.
 EoF   - end sample user main-menu (vs 'EOF' for this documentation file)

sample User sub-menu

 # u11 - help sub-menu for payment system
 #      - by Joe Blow, ABC Corp, April 09/2014
 more <<'EOF'
                   ** u11 - payment system **
 ----------- payment system instructions -------------
 --------------------- details -----------------------
 EoF   - end sample user sub-menu (vs 'EOF' for this documentation file)

Goto:   Begin this document End this document UVSI Home-Page

Visitor Counters for ThisYear and LastYear

ThisYear=001079   (J=192,F=187,M=220,A=212,M=268,J=0,J=0,A=0,S=0,O=0,N=0,D=0)
LastYear=002013   (J=203,F=181,M=151,A=144,M=170,J=167,J=197,A=145,S=141,O=157,N=148,D=209)