Installation Guide for Unix/Linux - CONTENTS

A0. UV Software Copyright notice, Warranty,& Support
A1. Vancouver Utilities Distribution media & Install Guides
A2. Sub-Directories in uvadm after tar extract or unzip.
A3.  Vancouver Utilities contents & sub-directories explained
A4.  Installation Summary & Creating VU administrator account.
A5.  profiles provided in /home/uvadm/env/... (stub & common profiles)
B1. Installation Procedures - setup 'uvadm' & other accounts if required
- first time installation or Reinstalling a new version ?
- setting up 'uvadm' administrator for the Vancouver utilities
B2.  Copying the media (tape,diskettes,cdrom) to the uvadm home dir
B3.  Copy supplied 'stub' profile to 'uvadm' homedir, renaming as .bash_profile
- Alternative for 'ksh' (vs 'bash'), modify/copy/rename as .profile
B4.  Modifying the 'common' profile as required for your site
 (TERM, stty erase, UVLPDEST for printer, COBDIR for Micro Focus COBOL, etc)
B5.  Preparations to Install 'UPDATE' Version of VU (method#1 mandatory for SUN)
B6.  Preparations to Install 'UPDATE' Version of VU (method#2 other machines)
B7.  Installing an Update Version (from CD)
B8.  Notes re owner, group,& permissions
C1. Compiling all 'uv' programs with script 'ccuvall'
 (uvlist,uvhd,uvhdcob,uvcp,uvsort,uvcopy,uvqrpg)
- compile options for machine-type & Indexed file type
- 32/64 bit options for compile
C2. compile options for Linux, AIX, SUN
C3. compile options for HP cc & HP gcc
- PA RISC & Itanium IA64 (obsoletes PA-RISC)
C4. Compiling 'uvhd' & 'uvhdcob' data file investigation utilities
- uvhd is a free download as per www.uvsoftware.ca/libuvhd.htm
- uvhdcob shows COBOL copybook fieldnames beside data field contents
     Compiling the JCL converters with script 'ccjclall'
     - separate script since JCL converters are included only with the
       class A mainframe conversion package (not the class B utilities package).
C5. Compiling the 'ux' programs (uxcp,uxsort,uxcopy,uxqrpg)
- to support Indexed Sequential Variable length records
  compatible with Micro Focus COBOL IDXFORMAT3 files
- the 'uv' programs support only Fixed Length Indexed files
- the 'ux' programs support both Fixed & Variable Indexed files
  but the user must have Micro Focus COBOL to compile 'ux' programs
C7. Compile Errors - send console log to UV Software

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

Installation Guide - CONTENTS (continued)

D1. D-ISAM (Fixed length Indexed files) support for Linux, AIX, HP, SUN, etc
D2.  Compiling disamNULL.c if you do not have D-ISAM support yet
D3. D-ISAM '.dat' extension options
D4.  User written subfunctions linked to uvcopy
E1. C program & uvcopy job to test 64 bit integers
F1. 'uycopy' (alternate version of uvcopy) to access SQL DataBase Tables
- compile instructions, tested in November 2008 with MySQL
G0. profiles for Vancouver Utilities on Unix/Linux
G1.  stub_profile - to be appended to homedir .bash_profile or .profile
G2.  common_profile - called by stub profiles, allows updates in 1 place
G3.  common_defines - define TESTLIBS,TESTDATA,PRODLIBS,PRODDATA for backups
G4. utilities_profile - simplified profile to access programs & scripts only
  - alternative to above 3 part profiles (G1,G2,G3)
  recommended for sites converting from a mainframe
G5. Listing of 'root_profile', suggested profile for root
- to access Vancouver Utility scripts & uvcopy jobs
- includes PS1 location & handy aliases such as alias l='ls -l'
- could use for user's who need access to Vancouver Utilities
  but do not need the power & flexibility of stub & common profiles
G6. .bashrc/.kshrc - 'rc' file required for aliases when console logging
G7. setting up & modifying 'stub' & 'common' profiles for uvadm
- may setup common profile in /home/appsadm/env for other users
H1. Testing the Vancouver Utility programs
- Please see a separate section TestDemo.htm.
- Ensure your outputs match the illustrated outputs expected.
- Also a great way to investigate & understand these utilities
I1. Documentation Overview
I2.  HTML Documentation now on UV distribution CD
 as well as on the web site (www.uvsoftware.ca)
I3.  script 'uvlp12D' to print any 1 section of documentation
J1. Preparations for a new version of Vancouver utilities
- included here for the convenience of UV Software personnel
K1. Printing 3 volumes of documentation for Vancouver Utilities
L1. Writing the Vancouver Utility Distribution CD
M1. Mass changes to entire directories of scripts, programs, etc
- example using 'rep1d' to modify all 'uvlp' scripts

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

Installation Guide - CONTENTS (continued)

N1. Compiling subfunctions for linking with programs
- not required if 'ccuvall' (C1 above) was successful
N2.  Compiling individual programs (script 'ccuv' vs 'ccuvall')
- not required if 'ccuvall' (C1 above) was successful
N3. ccuvall - script to compile most Vancouver Utility 'uv' programs
N4. ccjclall - script to compile the mainframe JCL converters
N5. ccuv - script to compile any 1 'uv' program (vs ccuvall)
N6. ccuvfa - script to compile all subfunctions, archive to lib/uvlib32/64.a
N7. ccuvcob - script to compile any 1 'ux' program.
N8. ccdisams - script to compile D-ISAM file handler
O1. Notes to users updating from previous versions

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

A0. Vancouver Utilities - Installation Guide

COPYRIGHT 1993-2010 UV Software Inc. All rights reserved - Worldwide. Please see the license agreement in the price list section. The Vancouver Utility programs are encoded with a unique registration# to aid in the prevention and detection of unauthorized copying.

A generous amount of free telephone support is included in the purchase price (see more details in uvprices.htm). User comments are encouraged and any suggestions may be incorporated into future updates.

 ============================================================================
 Owen Townsend, UV Software, 4667 Hoskins Rd., North Vancouver BC, V7K2R3
         Tel:   604-980-5434          Fax: 604-980-5404
         Email: owen@uvsoftware.ca    Web: http://www.uvsoftware.ca
 Copyright(C) 1993-2009, UV Software Inc, All rights reserved
 ============================================================================

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

A1. install.doc - Installation Overview & Recommendations

3 market versions of Vancouver Utilities

Class A
  • complete package including mainframe conversion tools
  • includes source code for compile on unix/linux/windows
  • distribution CD has precompiled binaries for Linux & Windows
Class B
  • Vancouver Utilities without mainframe conversion tools
  • includes source code for compile on unix/linux/windows
  • distribution CD has precompiled binaries for Linux & Windows
Class C
  • Vancouver Utilities without mainframe conversion tools
    and without source code
  • executables only, intended for windows

2 Distribution Files on CD

uvadm.tar
  • tar archive for Unix/Linux or Windows SFU (or Cygwin, Uwin)
uvadm.zip
  • zip archive for Windows (same contents as uvadm.tar)

These are alternative formats, but the contents are the same. You use whichever 1 is appropriate for your system. Both may hold 3 sets of binaries as follows:

subdirs of pre-compiled binaries

bin
  • binaries compiled on Red Hat Linux (always provided)
binDOS
  • '.exe's compiled by lcc-win32 on Windows (always provided)
binSFU
  • binaries compiled on Windows SFU by gcc (on request)
binCYGWIN
  • binaries compiled under Cygwin on Windows (on request)
binUWIN
  • binaries compiled under Uwin on Windows (on request)

4 Installation Guides

install.htm - Installation on Unix/Linux systems
- source code is provided for compiling on unix/linux
- But binaries are included for the Linux standard
WindowsSFU.htm - Installation on Windows under SFU
- SFU is available at http://www.microsoft.com/windows/sfu
- provides the Korn shell & most unix utilities on Windows
 'CygwinUwin'     - Installation on Windows under Cygwin or Uwin
                  - unix/linux emulators, similar to SFU
                  - UV Software has tested 3 emulators & recommends SFU
WindowsDOS.htm - Installation on native Windows without SFU
- intended to run in a command window
- 'executables only', .exe binaries supplied in 'binDOS'
- compiled by lcc-win32
- see: http://www.cs.virginnia.edu/~lcc-win32
- or: http://www.Q-Software-Solutions.com

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

A2. install/doc - Installation Overview & Recommendations

The media includes directories for source, documentation, installation scripts, test files, library archives, etc. After the tar extract or unzip, the home directory should contain the following sub-directories:

sub-directories in uvadm after restore

 /home/uvadm
 :-----batDOS          <-- BAT files for VU on native Windows
 :-----binDOS          <-- binaries for VU on native Windows (cc by lcc-win32)
 :-----bin             <-- binaries (uvcopy,uvsort,etc) distros are RedHat Linux
 :-----binREDHAT       <-- could save as binREDHAT & recompile under your OS
 :-----binSFU          <-- binaries for SFU (Services For Unix) on Windows
 :-----binCYGWIN/UWIN  <-- binCYGWIN & binUWIN optional on request
 :-----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)
 :     :----uvhtml.zip   - zip file with all HTML files
 :-----env               - profiles for Unix/Linux, SFU, Cygwin,& Uwin
 :-----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 MVSJCL.htm
 :-----perlm           <-- Perl Modules (support JCL conversion to Perl scripts)
 :-----perls           <-- Perl Scripts (few, most scripts are ksh in sf/...)
 :-----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)
 :-----src             <-- Vancouver Utilities C source code
 :-----srcf              - C source for various sub-functions
 :-----tbls              - miscellaneous tables
 :-----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

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

A3. install/doc - Installation Overview & Recommendations

Here is a little more info about some of the more important sub-directories included in the Vancouver utility distribution.

bin
  • directory to receive the executables from compiles & links
  • uvcopy, uvsort, uvqrpg, uvlist, uvcp, uvhd, uvhdcob, jclunix5
  • distributed with binaries compiled on Red Hat Linux Enterprise 3.0
  • the following 'bin's are optional upon request
binSFU
  • binaries compiled with 'gcc' under SFU & Windows XP
binCYGWIN
  • binaries compiled with 'gcc' under CYGWIN & Windows 2000
binUWIN
  • binaries compiled with 'gcc' under UWIN & Windows 2000
batDOS
  • scripts (batch files) for the Windows/DOS Vancouver Utilties
  • such as uvlpr12 script to run uvlist with laser printer
binDOS
  • executables compiled with 'lcc-win32'
  • to run in the DOS window under Windows 95,98,NT,2000
  • unix/linux users may may transfer to Windows PCs
    (uvhd,uvlist,uvsort,uvcp,uvcopy,uvqrpg)
ctl
  • conversion tables, etc (for data file & program conversions)
dat1
  • test data files for various pre-programmed conversion jobs
  • fixed length mainframe type files (vs text files in subdir tf)
doc
  • documentation for Vancouver Utilities (in text format)
dochtml
env
  • environment scripts & profiles for Unix/Linux, SFU, Cygwin, Uwin
hdr
  • header library for the C programs
lib
  • object code libraries (archives) for the uv subfunctions
    (srcf) & for the D-ISAM Indexed file support.
mvstest
  • test files to demo mainframe conversions (see MVSJCL.htm)
pf
  • pre-programmed jobs (parameter files) for uvcopy applications
  • over 500 useful jobs (many suggested by end users)
sf
  • scripts to compile programs, subfunctions, etc
  • also many end user scripts (see scripts1.doc in vol 1)
sfun
  • Korn shell 'functions' (exportgen0/1, jobset, logmsg, etc)
  • mostly for running scripts converted from Mainframe JCL
src
  • C source programs (script ccuvall compiles these into bin)
srcf
  • C source for subfunctions compiled separately
    & archived to lib/uvlib32/64.a (see scripts ccuvf & ccuvfa)
tf
  • test data files for uvcopy & the pre-programmed jobs
vsetest
  • test files to demo mainframe conversions (see VSEJCL.htm)

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

A4. Installation Overview & Recommendations

Installing Vancouver Utilities - Summary

  1. Setup user account 'uvadm' to serve as Vancouver Utilities administrator and login as uvadm, home directory /home/uvadm. See note below re common 'group' for uvadm & other users who will be working with Vancouver Utilities.

  2. Copy Vancouver Utilities media into the uvadm home directory. This package is distributed on CDROM in a tar archive for Unix/Linux and in a zip archive for Windows. Please see the tar/zip extract commands on page 'B2' ahead.

  3. Modify the '.profile' (ksh) or '.bash_profile (bash) of uvadm & all users who wish to use the package. Append the 'stub_profile' (see page 'G1') on the end of the homedir profiles. The stub_profile calls the common profile (listed on page 'G2').

After media restore, these profiles are available in /home/uvadm/env/ and you can use 'vi' to read it onto the end of the system .profile. Log off & back on to activate the new exports in the new .profile.

The common profile called by the stub profiles is distributed in /home/uvadm/env/, but you should copy to /home/appsadm/env/ to avoid losing them when a new version of Vancouver Utilities is installed.

  1. Compile the programs as explained on page 'C1' ahead.

    common 'group' ID for uvadm & other users

You should assign uvadm's group ID to match userid's of programmers who will be working with Vancouver Utilities. If you are just getting started setting up uvadm as well as other users on a new system for conversion of mainframe systems to unix/linux, I suggest 'apps' would be appropriate. See more about importance of owner, group,& permissions on page 'B8'.

setup 'appsadm' - Applications Administrator

For any serious Unix/Linux site, I recommend setting up a site administrator account 'appsadm' (separate from uvadm) to hold various profiles & scripts common to all users of the Vancouver Utilities.

This will save duplication of effort in setting up other users of Vancouver Utilities because these profiles & scripts will be common to all users. This makes it easier to make changes, add new users, etc.

You will also find APPSADM useful for establishing profiles, scripts,& environmental variables for your other application packages as well as Vancouver Utilities.

See ADMjobs.doc hardcopy manual or http://www.uvsoftware.ca/admjobs.htm

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

A5. Installation Overview & Recommendations

'profiles' provided in /home/uvadm/env

 /home/uvadm/env      <--- profiles provided here
 :-----stub_profile      - copy/rename to .profile (ksh) or .bash_profile (bash)
 :                       - defines RUNLIBS/RUNDATA for programmers & operators
 :-----common_profile    - common profile (called by stub_profile)
 :                         defines PATH's etc using $RUNLIBS/$RUNDATA
 :-----root_profile      - profile for root, copy to /root/.bash_profile (RedHat)
 :                         to access Vancouver Utility scripts & uvcopy jobs
 :
 /home/appsadm/env    <--- setup user 'appsadm' & copy from /home/uvadm/env/*
 :-----stub_profile      - customize & copy to homedirs .profile or .bash_profile
 :-----common_profile    - common profile (called by stub_profile)

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

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

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

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

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

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

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

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

See these profiles listed on pages 'G1' thru 'G3'.

See more explanations at: http://www.uvsoftware.ca/admjobs.htm#1B2

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

A6. Installation Overview & Recommendations

profiles for Vancouver Utilities on Unix/Linux

See listings of the following profiles begining on page 'G0'

G1. stub_profile - distributed in /home/uvadm/env/...
- copy (to user homedirs) & rename depending on the desired shell
  (.bash_profile for bash, .profile for ksh)
- modify RUNLIBS/RUNDATA differently for programmers or operators
- calls common_profile
G2. common_profile - distributed in /home/uvadm/env/...
- defines search PATHs to libraries & data based on $RUNLIBS & $RUNDATA
  defined in the stub_profiles of programmers & operators
  (see suggested directory designs in ADMjobs.doc Part 2)
- allows updates in 1 place to affect all users
- modify TERM & 'stty erase' character depending on most common terminal
  (distribution has TERM=linux & stty erase '^?')
G3. common_defines - define TESTLIBS,TESTDATA,PRODLIBS,PRODDATA for backups
G4. utilities_profile - simplified profile to access programs & scripts only
- alternative to above 2 part profiles which are recommended for multi-user
  sites to reduce administration (by allowing updates in 1 place).
G5. Listing of 'root_profile', suggested profile for root
- to access Vancouver Utility scripts & uvcopy jobs
- includes prompt with current directory & aliases such as alias l='ls -l'
C6. bashrc - 'rc file' distributed in /home/uvadm/env/...
- copy (to user homedirs) & rename depending on the desired shell
  (.bashrc for bash, .kshrc for ksh)
- master version supplied without the '.' for visibility
- required if you invoke another shell level (console logging script)
- carries aliases & umask which get lost on another shell level
- you should customize & store in /home/appsadm/env/...
G7. Customizing the profiles for uvadm & for other users
- modify TERM & 'stty erase' character depending on user's terminal
- modify UVLPDEST to define a laser printer near the user
- modify COBDIR for Micro Focus COBOL

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

B1. Installing the Vancouver Utilities

First time Setup/Install (from CD)

If you already have an old version of uvadm, please skip to page 'B5' --->

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


 #1. login as 'root'

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

 #3. useradd -m -g apps -s /bin/bash uvadm   <-- setup user 'uvadm'
     =====================================
 #3a. useradd -m -g apps -s /bin/ksh -d /export/home/uvadm uvadm
      ==========================================================
      - for SUN solaris, you must specify the home dir as shown above

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

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

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

'-s /bin/bash' specifies the 'bash' shell (the default on Linux systems). For Unix I recommend 'ksh' if 'bash' not available. These shells are much superior to 'sh' (Bourne shell, default on some Unix systems). The 'history' feature of bash & ksh is a reason enough to upgrade.

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

While you are still logged in as 'root', you might as well setup other user logins, you will require. Setup 'appsadm' & any new users you may need. If you plan on running the test/demos described in MVSJCL.htm or VSEJCL.htm, you will need to setup 'mvstest' or 'vsetest'.


 #4a. useradd -m -g apps -s /bin/bash appsadm   <-- for Aplctns Admin
 #4b. useradd -m -g apps -s /bin/bash mvstest   <-- for MVS JCL test/demos
 #4c. useradd -m -g apps -s /bin/bash mvstest   <--  OR VSE JCL test/demos
 #4d. useradd -m -g apps -s /bin/bash prgmr1    <-- setup programmers ...
 #4e. useradd -m -g apps -s /bin/bash oper1     <-- setup operators ...

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

B2. Installing the Vancouver Utilities

Vancouver Utilities distribution files on CD

uvadm.tar
  • VU for Unix/Linux/Windows(SFU) in a 'tar' archive
uvadm.zip
  • VU for Unix/Linux/Windows(SFU) in a 'zip' archive
uvwin.zip
  • VU for Windows/DOS (executables only) in a 'zip' archive

The distribution media (usually CD) contains uvadm.tar & uvadm.zip for Unix, Linux, or Windows(SFU). The contents are the same (see summary on page 'A2'). It would contain 'uvwin.zip' if you had ordered the Windows/DOS version (executables only).

copy Vancouver Utilities CD to disc

Note
  • we are still logged in as 'root'

 #5. mount -r -t iso9660 /dev/cdrom /mnt  <-- mount CDROM (Linux command)
     ===================================

 #6. Ensure 'uvadm' user has been setup (as discussed on previous page)
     - specify the BASH shell for Linux or the KORN shell (ksh) for Unix
     - specify group to match other programmers

 #7. login as uvadm --> /home/uvadm

 #8. ls -al          <-- ensure no existing contents (except profile)
     ======

 #9. umask 002       <-- set umask for permissions 775 on directories
     =========           (664 for files)

 #10a. tar xvf /mnt/uvadm.tar   <-- restore from .tar archive on CD
       ======================
         - - - OR - - -
 #10b. unzip /mnt/uvadm.zip     <-- alternate restore (from .zip archive)
       ====================

 #11. ls -l                       - contents should be as listed on page 'A2'.
      =====

Alternative - download uvadm.zip from web site

UV Software can give you a userid/password to download uvadm.zip, for example:


 #1. login as uvadm --> /home/uvadm  (empty directory)

 #2. ftp uvsoftware.ca
     =================
 #2a. userid --> uvsoft9
 #2b. passwd --> xxxxxxx
 #2c. binary
 #2d. get uvadm.zip
 #2e. bye

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

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

B3. Installing the Vancouver Utilities

1st time setup profiles

After media restore, the stub_profiles & common profiles are available in /home/uvadm/env/ and you can append the stub_profile to the end of your system profile as shown below. See profiles listed begining on page 'G1'.

For most unix/linux O/S's you can probably just copy to user homedirs renaming & overwriting existing .profile (for ksh) or .bash_profile (for bash).

If necessary ? you could insert the default profile from a new user setup as the 1st few lines of the supplied stub_profile.

If you are performing JCL conversion, you would modify the RUNLIBS & RUNDATA definitions in the stub profile depending on whether new user is programmer or operator.

Modify 'export TERM=...' & 'stty erase' character depending on user's terminal. Both stub & common distributions have TERM=linux & stty erase '^?'. You should set these for the majority of users & then modify the stubs for the exception users.

You should also make any other changes to the stub profile that you know might also apply to other future users. For example you would change the 'UVLPDEST' environmental variable to your laser printer destination id.

modify/copy/rename 'stub' profile for RHEL


 #1. login as uvadm --> /home/uvadm

 #2. vi env/stub_profile           <-- modify 'stub' profile for your site
     ===================

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

alternative for ksh (vs bash above)


 #3a. cp env/stub_profile .profile  <-- copy rename for ksh
      ============================
Note
  • see listings of 'stub' & 'common' profiles begining on page 'G0'
  • see more instructions on modifications required begining on page 'G7'
  • you could also setup profiles for other users (appsadm, mvstest, etc)

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

B4. Installing the Vancouver Utilities

Modify 'common' profile for uvadm


 #4. vi env/common_profile        <-- edit the common test profile
     =====================

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

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

 #4b. Change laser printer name defined by 'UVLPDEST' environmental variable
      used by the 'uvlist' utility & scripts 'uvlp12', etc.

      export UVLPDEST="-dlp0" # change 'lp0' to site laser printer
      =======================

 #4c. Change 'COBDIR', environmental variable defining where Micro Focus COBOL
      COBOL is installed on your system

      export COBDIR=/opt/microfocus/cobol  <-- default install location
      ===================================    - change if your site different

 #5. Logoff & back on to activate new .bash_profile or .profile
     (which calls env/common_profile)

Now compile the utility programs as shown on page 'C1' ahead --->

Note
  • above stub profiles call common_profile from /home/uvadm/env, but:
  • profiles in /home/uvadm/env/... should be copied to /home/appsadm/env/...
  • then you would change stub profiles to call common_profile from appsadm
  • to avoid loss if new versions of Vancouver Utilities installed
  • we delay this change so we can get going without setting up appsadm yet
  • see more about profile setups in Part 1 of ADMjobs.htm

permissions: directories 775 & files 664

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

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

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

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

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

B5. UPGRADING to New Versions of the Vancouver Utilities

If this is your 1st version of the Vancouver Utilities package, you can skip to page 'C1' (compiling the C programs) --->

Preparations to Install Update Version (from CD)

If there is any doubt about the usefulness of the old uv version, the following procedures will allow for retrieving user modified files from the old uvadm directories into the new. It will be easier to upgrade to the next version of this package if you do not make changes in the 'uvadm' directory or add your own stuff into the uvadm directories.

Note
  • Method#1 (this page) works for all machines
  • #1 is mandatory for SUN Solaris because you cannot move homedirs
  • logins would still go to the original subdir (uvadm.old)
  • Method#2 (next page) works for most machines & is a little shorter

method#1 - mandatory for Sun (OK on all machines)


 #1. login: root    - you need to be root, but ONLY for the 1st 8 steps below

 #2. cd /home                - change to the /home dir (above the uvadm dir)

 #3. rm -rf uvadm.old        - remove any existing uvadm.old (grandfather)
     ================
 #3a. mkdir uvadm.old        - OR mkdir if not already present
      ===============

 #4. cp -rp uvadm uvadm.old  - make backup copy of the uvadm directory
     ======================    'r' option copies all subdirs
                               'p' option preserves uvadm owner & permissions

 #5. rm -rf uvadm/*          - clear all contents of uvadm directory
     ==============          - before reading new uvadm.tar or uvadm.zip
                               (on the next page under uvadm login)

 #6a. cp -p uvadm.old/.bash_profile uvadm   (for Linux/bash)
      ===================================
               --- OR ---
 #6a. cp -p uvadm.old/.profile uvadm        (for Unix/ksh)
      ==============================

 #6b. cp -rp uvadm.old/env uvadm     <-- copy the common profiles (subdir)
      ==========================
      - copy existing uvadm profiles over to the now empty uvadm subdir
      - preserving any customizations made on prior version

 #7. mount -r -t iso9660 /dev/cdrom /mnt  <-- mount CDROM (Linux command)
     ===================================

 #8. exit (from root)

Install the new utilities as directed on the page 'B7' --->

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

B6. UPGRADING to New Versions of the Vancouver Utilities

method#2 - most machines (except SUN)

Note
  • Method#1 (prior page) is mandatory for SUN Solaris
  • because you cannot move home directories on SUN
  • logins would still go to the original subdir (uvadm.old)
  • Method#2 (this page) works for most machines & is a little shorter

Preparations to Install Update Version (from CD)


 #1. login: root    - you need to be root, but ONLY for the 1st 8 steps below

 #2. cd /home                - change to the /home dir (above the uvadm dir)

 #3. rm -rf uvadm.old        - remove any existing uvadm.old (grandfather)
     ================

 #4. mv uvadm uvadm.old      - rename existing 'uvadm' as 'uvadm.old'
     ==================

 #5. mkdir uvadm             - make new dir for new version of VU
     ===========
 #5a. chmod 775 uvadm        - set desired permissions
      ===============
 #5b. chown uvadm uvadm      - ensure owned by user 'uvadm'
      =================
 #5c. chown ???? uvadm:apps  - ensure group matches desired group ????
      =====================
Note
  • group ID should match the programmers who will be working with VU
  • see more discussion on pages 'B1' & 'B7'

 #6. cp -p uvadm.old/.bash_profile uvadm  <-- copy existing profile to new
     ===================================
      - copy existing uvadm profiles over to the now empty uvadm subdir
      - preserving any customizations made on prior version

 #7. mount -r -t iso9660 /dev/cdrom /mnt  <-- mount CDROM (Linux command)
     ===================================

 #8. exit (from root)

Install the new utilities as directed on the next page --->

Step #4 above allows you to retrieve any modified/customized pf/sf files at any time from uvadm.old into the new uvadm directory. This also allows you to quickly revert to your former versions if you encounter a problem. See 'Reverting to former version' discussed on page 'B8'.

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

B7. INSTALLATION - Creating uvadm Directory & Copying the Media

Installing an Update Version (from CD)

Use the 'uvadm' login account for the Vancouver Utilities. Do not install as root. Do not install in a sub-directory of your home directory. The uvadm 'group' should be common with other users (programmers) who need to share files. The group code might be 'apps' or whatever makes sense to you. The uvadm permissions should be 775 (umask=002) to allow sharing.


 #1.  login as uvadm           - login as uvadm, or if already logged in
      cd /home/uvadm           - ensure you are in the uvadm home dir

 #2.  ls -al                   - ensure NO old files are present (except profile)
      ======                   - see procedures on previous page
                               - previous profile probably OK
                               - until you review any changes required

 #3.  tar xvf /mnt/uvadm.tar  <-- restore from .tar archive on CD
      ======================
         --- OR ---

 #3a. unzip /mnt/uvadm.zip    <-- alternate restore (from .zip archive)
      ====================

 #4.  Unmount the CD
 #4a. su root; passwd ???       - need to be root to unmount
 #4b. umount /mnt               - unmount the cdrom
      ===========
 #4c. exit                      - exit from root

Now compile the utility programs as shown on page 'C1' ahead --->

Mounting CD's on various unix systems

The mounting instructions (on the previous page) were for Red Hat Linux (probably correct for all Linux systems). Mounting CDs is different on the various flavours of Unix. We will present for a few unix OS's we know.

CD Mount for SUN Solaris

Sun Solaris will automount the CD when inserted at /cdrom. So then the 'tar' command above becomes:


 #3.  tar xvf /cdrom/uvadm.tar  <-- restore from .tar archive on CD
      ========================

To unmount the CD on SUN, you can use the 'eject' command.

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

B8. INSTALLATION - Creating uvadm Directory & Copying the Media

Notes re owner, group,& permissions

You must be uvadm when you copy the media (on the previous page) in order that the new files will be owned by uvadm & have desired permissions & group. If you forgot to exit root & login uvadm, you could correct as follows:


 #1a.  Login as root              - login as root
 #1b.  cd /home/uvadm             - change to uvadm home dir

 #2.  chown -R uvadm uvadm        - change owner of all dirs & files in uvadm

 #3.  chgrp -R group? uvadm       - change group of all dirs & files in uvadm

 #4.  chmod -R 775 uvadm        <-- DON'T do this, not all same

 #4a. chmod    775 uvadm/*        - all directories should be 775
 #4b. chmod    775 uvadm/sf/*/*   - all scripts should be 775
 #4c. chmod    775 uvadm/bin/*    - all executable programs should be 775
                                    (not yet compiled see page C1 ahead)
 #4d. chmod    664 uvadm/dat1/*   - files in other subdirs should be 664
 #4e. chmod    664 uvadm/.../*    ------------- etc ------------

 #5a. chown uvadm .bash_profile   - ensure .bash_profile owner is uvadm
 #5b. chmod 664 .bash_profile     - ensure read/write .bash_profile
       ---- OR ----
 #5a. chown uvadm .profile       - ensure .profile owner is uvadm
 #5b. chmod 664 .profile         - ensure you can read/write uvadm .profile

 #6. exit                        - exit root

Reverting to old version if problems occur

Since we have saved the old '/home/uvadm' (as /home/uvadm.old), we can quickly revert to the previous version if you encounter a problem. UV Software will help you resolve the problem as soon as possible, but you may need to run your production jobs with no waiting.


 #1. login as root

 #2. mv /home/uvadm /home/uvadm.new   <-- rename just installed version

 #3. mv /home/uvadm.old /home/uvadm   <-- rename old version as current
Note
  • on some systems (such as SUN) 'mv' (rename) does not work
  • logins go the originally setup login directory
  • use the following procedure:

 #2. rm -rf /home/uvadm/*    <-- remove new version (we have it on the CD)

 #3. cp -rf /home/uvadm.old/* /home/uvadm  <-- copy old version back

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

C1. Compiling Vancouver Utility C Programs

Compile 'C' programs

The Vancouver Utilities are distributed with the 'C' utility programs already compiled (into /home/uvadm/bin) using Red Hat Enterprise 5.1 (64 bit AMD Opteron). You must recompile for other systems.

The following script will compile all 'uv' programs assuming you have restored the distribution media to your 'uvadm' directory & set your path to include the 'sf' directory of scripts. Please see page 'C4' ahead to compile the 'ux' programs that support Indexed Sequential Variable length records compatible with Micro Focus COBOL IDXFORMAT3 file types.

You can modify the 'C' compiler called by the compile scripts by exporting an alternate value for 'UVCC' as shown below. Might be used on machines that do not have the ANSI C 'cc' compiler, but do have 'gcc'. (see more info at the bottom of the next page)

 cd /home/uvadm       <----- you must be in the uvadm directory
 export UVCC=gcc        - causes compile scripts to use 'gcc' vs 'cc'

 ccuvall OStype H32/H64 uvlib32/64.a disamTYP32/64.a [options]  <-- format
 ===================================================
H32/H64
  • bits in a 'long' (C programming long integer)
  • On 32 bit hardware, we still have 64 bit integer accumulators
    using 'long long' (software implementation for 64 bit integers)
H32/H64
  • bits in a 'pointer' (C program address pointer)
  • 64 bit hardware would always have 64 bit pointers
  • DEC alpha, Itanium, 64 bit x86 chips, 64 bit AMD opteron, etc

Most computers now have 64 bit hardware & operating systems, and the compilers have options to compile C programs in 32 bit mode or 64 bit mode. The 64 bit mode causes 'long' integers & 'pointers' to be defined as 64 bits vs 32 bits.

The Vancouver Utilities do not necessarily need to be compiled in 64 bit mode. 64 bit accumulators are available via software on 32 bit hardware by using 'long long'.

Note
  • compile arguments changed in January 2009 to H32/H64
  • replacing prior arguments L32/L64 + P32/P64 (Longs + Pointers)
  • LF64 Large Files (> 2 gig) option no longer required (always provided)

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

C2. Vancouver Utilities Compile script Options

LNX (linux)


 ccuvall LNX H32 uvlib32.a disamLNX32.a - compile on Linux Intel 32 bit machine
 ======================================   with 64 bit int acums via SoftWare
                                        - DISAM COBOL compatible Indexed files

 ccuvall LNX H64 uvlib64.a disamLNX64.a - compile on Linux Intel 64 bit machine
 ======================================   64 bit Hardware integers & pointers
                                          64 bit DISAM Indexed file handler
Note
  • there is no great advantage to compiling in 64 bit mode
  • since 64 bit accumulators are provided by software (long long)
  • since Large Files (> 2 gig) are provided by software (open64 & lseek64)
  • BUT some systems might only provide 64 bit (64 bit longs & pointers)

AIX compile


 export UVCC=xlc                       <-- specify AIX C compiler (vs default cc)
 ===============

 ccuvall AIX H32 uvlib32.a disamAIX32.a -q32   <-- for IBM AIX 32 bit & DISAM
 ===========================================

 ccuvall AIX H64 uvlib64.a disamAIX64.a -q64   <-- AIX 64 bit compile
 ===========================================

 ccuvall AIX H64 uvlib64.a disamAIXnull.a -q64 <-- if disamAIX64.a missing
 =============================================   - see 'D1' create disamAIXnull.a

SUN


 ccuvall SUN H32 uvlib32.a disamSUN32.a       <-- SUN Solaris defaults to 32 bit
 ======================================

 ccuvall SUN H64 uvlib64.a disamSUN64.a -m64  <-- 64 bit option on newer SUNs
 ===========================================

 ccuvall SUN H64 uvlib64.a disamSUN64.a -xarch=v9 <-- 64 bit on older SUNs
 ================================================
Note
  • '-m64' or '-xarch=v9' is the SUN option for 64 bit longs & pointers
  • 32 bit versions probably work just as well
  • since software 'long long's are used to get 64 bit accumulators

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

C3. Vancouver Utilities Compile script Options

HPUX 'cc' compiler

Note
  • also see below HPUX 'gcc' (Gnu open source, free download)

 ccuvall HP H32 uvlib32.a disamHP32.a -Ae <-- 32 bit hardware
 ========================================   - 64 bit integer via long long
 -Ae ANSI C compiler option no longer required as of HPUX 10.20

 ccuvall HP H64 uvlib64.a disamHP64.a "-Ae +DD64"  <-- 64 bit on HPUX cc
 ================================================

 ccuvall HP H32 uvlib32.a disamHP32.a "-Ae +DD32"    <-- 32 bit on HPUX cc
 ================================================

HPUX IA64 'gcc' compiler


 export UVCC=gcc    <-- causes ccuvall to execute 'gcc' vs 'cc
 ===============

 ccuvall HP H32 uvlib32.a disamHPIA32.a -milp32
 ==============================================

 ccuvall HP H64 uvlib64.a disamHPIA64.a -mlp64   <-- 'mlp64' vs 'milp32'
 =============================================     - 64 bit recommended

test your hardware/compiler 32bit/64bit

See page 'E1' test program 'test64c' to determine if your hardware/compiler is 64 bit capable & if BIG-end or little-end. May compile & execute as follows but see sample output on page 'E1'.


 cc src/test64c.c -obin/test64c   <-- compile program (cc or gcc)
 ==============================

 bin/test64c                      <-- execute
 ===========                        - expected results on page 'E1'

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

C4. Vancouver Utilities Compile script Options

compiling uvhd & uvhdcob

The 'ccuvall' script does compile uvhd & uvhdcob, but if you need to run ccuvall in 32 bit mode, you should compile these in 64 bit mode as follows.

Note
  • These are the only 2 programs that are self-contained (do not require
    linking with archives of subfunctions). You can therefore compile these
    directly with 'cc' or 'gcc' (vs the scripts ccuvall, etc).
Note
  • uvhd & uvhdcob must have 64 bit integers to handle files > 2 gigs
  • best achieved by 64 bit options -DH64, -m64, -q64, -mlp64 (HP gcc)
  • possible (not HP) with -DH32 which uses 'long long' for 64 bit integers

 cc -DH64 -DAIX -q64 -obin/uvhd src/uvhd.c
 =========================================

 cc -DH64 -DAIX  -q64 -obin/uvhdcob src/uvhdcob.c
 ================================================
Note
  • change 'AIX' as appropriate to 'LNX','SUN', or 'HP'
  • change '-q64' to '-m64' for other machines (not HP)

compile uvhd/uvhdcob on HP IA64 gcc


 gcc -DH64 -DHP -mlp64 -obin/uvhd src/uvhd.c
 ===========================================

 gcc -DH64 -DHP -mlp64 -obin/uvhdcob src/uvhdcob.c
 =================================================

compiling JCL converters

'ccjclall' is provided to compile the JCL converters, a separate script (from ccuvall above), since the JCL converters are included only in the class A mainframe conversion package (not in the class B utilities package).


 ccjclall LNX H64 uvlib64.a disamLNX64.a      <-- example for Linux 64 bit
 =======================================

 ccjclall AIX H64 uvlib64.a disamAIX64.a -q64 <-- example for AIX 64 bit
 ============================================

disamNULL if 64 bit version missing

If 64 bit version of 'disam___' is missing (from /home/uvadm/lib/...), for your computer, see page 'D1' to compile a 'NULL' version, until UV Software can supply the required functional version.

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

C5. Compiling 'ux' programs to access IDXFORMAT3/8 files

The previous pages have documented the Instructions to compile most of the Vancouver Utility programs (uvhd,uvlist,uvcp,uvsort,uvcopy,uvqrpg,etc).

This page documents the instructions required to compile the 'ux' versions (uxcp,uxsort,uxcopy.uxqrpg) that support Indexed Sequential Variable length records compatible with Micro Focus COBOL IDXFORMAT3 & IDXFORMAT8 file types.

For more info on these file types, please see the 'File Handling' documentation for Micro Focus Object or Server Express COBOL. The Micro Focus COBOL 'EXTFH' file handler is compiled into the 'ux' versions using the 'ccuvcob' script supplied with the Vancouver Utilities.

Two versions of the programs are required since only Micro Focus COBOL users (server express 2.2+) could compile 'ux' versions whereas any user can compile 'uv' versions which use D-ISAM to support Indexed Sequential FIXED record length files.

The Micro Focus IDXFORMAT3,8 files are identified to the Vancouver Utility programs as file typ=IDXf3 & typ=IDXf8. Please see uvcp.doc, uvsort.doc, or uvcopy1.doc for more info.

compile uvlib32.a for Micro Focus on 64 bits

On 64 bit systems (such as AMD 64), the Micro Focus compiler & script ccuvcob requires option '-m32' on any libraries linked with the ux____ programs.

Before you run ccuvcob to compile uxcopy,uxsort,uxcp,uxqrpg, you must create the 'uvlib32.a' archive as follows:


 ccuvfa LNX H32 uvlib32.a -m32  <-- create 32 bit archive on a 64 bit machine
 =============================

Note that the preceding 'ccuvall' script generated uvlib32.a/uvlib64.a for linking with 'uv' & 'ux' programs. You only need to generate 'uvlib32.a' to link with the 'ux' programs on 64 bit systems using script ccuvcob to include the Micro Focus variable length Indexed file handler.

Micro Focus provides cobmode=64 but I have had problems with it. I get errmsg: ld: lib/uvlib64.a(errmsg.0) relocatin R_X86_64_32 local symbol cant be used making shared object; recompile with -fPIC. Without cobmode=64 I can compile with H64, uvlib64.a,& disamLNX64.a, but execution gives signal 11.

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

C6. Compiling 'ux' programs to access IDXFORMAT3/8 files

compiling 'ux' programs


 ccuvcob ux____ AIX/HP/LNX/SUN H32 uvlib___32/64.a disam___32/64.a <-- format
 =================================================================

Example for Linux:


 #1. ccuvcob uxcp LNX H32 uvlib32.a disamLNX32.a
     ===========================================
 #2. ccuvcob uxsort LNX H32 uvlib32.a disamLNX32.a
     =============================================
 #3. ccuvcob uxcopy LNX H32 uvlib32.a disamLNX32.a
     =============================================
 #4. ccuvcob uxqrpg LNX H32 uvlib32.a disamLNX32.a
     =============================================

Example for AIX:


 #1. ccuvcob uxcp AIX H32 uvlib32.a disamAIX32.a   -q32
     ===========================================
 #2. ccuvcob uxsort AIX H32 uvlib32.a disamAIX32.a -q32
     =============================================
 #3. ccuvcob uxcopy AIX H32 uvlib32.a disamAIX32.a -q32
     =============================================
 #4. ccuvcob uxqrpg AIX H32 uvlib32.a disamAIX.32a -q32
     =============================================

always specify H32 for ccuvcob

  1. Script 'ccuvcob' calls Micro Focus 'cob' to compile the 'ux' utilities.

  2. 'cob' defaults to 32 bit compiles, so we must specify H32

  3. Archives linked with 'ux' utilities must also be 32 bits

  4. Note 'uvlib32.a compiled on prior page with option '-m32'

  5. Micro Focus does provide 'cobmode=64' but I have had problems with it (see problem described on previous page).

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

C7. Compiling Vancouver Utility C Programs

Compile Problems

If you have 'error' messages during the compiles, please capture the error messages and email them to me (owen@uvsoftware.ca). Note that some systems may generate some 'warning' messages which can be ignored if there are no 'error' messages.


 ccuvall OStype H32/H64 uvlib32/64.a disam___32/64.a >ccerrs 2>&1
 ===================================================
lp ccerrs
  • OR print the error log & fax to UV Software Inc.

using alternate C compilers

export UVCC=gcc <-- causes compile scripts to use gcc vs cc

export UVCC=xlc <-- causes compile scripts to use xlc for AIX

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

D1. Compiling Vancouver Utility C Programs

D-ISAM libraries available

Here are the contents of /home/uvadm/lib/... as of January 2009. You should see a disam___32/64.a matching your machine (to link with uvcopy,uvsort,etc).

Directory: /home/uvadm/lib

         disamAIX32.a  disamAIX64.a  disamDEC64.a  disamHP64.a
         disamHPIA.a   disamINT32.a  disamLNX32.a  disamLNX64.a
         disamSCO32.a  disamSFU32.a  disamSUN32.a  disamSUN64.a

compiling D-ISAM

D-ISAM is proprietary to Byte Designs & UV Software is licensed to distribute only the linkable archive (disamAIX64.a, disamHP64.a, disamLNX64.a, etc).

UV Software has compiled their copy of the D-ISAM source modules on the various machines & distributes only the compiled linkable archives listed above. The script to compile the source modules is listed on page 'N6'.

dcheck - utility to verify D-ISAM files

'dcheck' is a Byte Designs utility to validate D-ISAM files. You should copy the dcheck___ program matching your machine to /home/uvadm/bin & rename to just 'dcheck'. For example, if you are running on AIX:


 cp lib/dcheckAIX bin/dcheck   <-- change AIX as req'd (HP,LNX,SUN,etc)
 ===========================

if disam___ NOT available for your machine

If you do not see the version you require, you need to compile src/disamNULL.c dummy program to lib/disamNULL.a, so you can compile uvcopy, uvsort, etc.

Please see the listing of 'disamNULL.c' on the next page which includes the instructions for compiling & archiving into lib.

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

D2. Compiling Vancouver Utility programs

/home/uvadm/src/disamNULL.c

 /* disamNULL.c - null program used when no DISAM library required   */
 /*             - to compile Vancouver Utility programs (uvcopy,etc) */
 /* disamNULL allows compiling Vancouver Utilitie programs on 64 bit */
 /* machines when the 64 bit version of D-ISAM is not yet available  */
 /* - examples below assume that disamAIX64.a is missing for your AIX*/
 /* D-ISAM file handler for Indexed files from www.bytedesigns.com  */
 /* - compatible with C-ISAM and Micro Focus COBOL IDXFORMAT1       */
 /* UV Software is allowed to provide only 'object code' for D-ISAM */
 /* Since UVSI has only Linux at their development site, UVSI must  */
 /* get time on other machines to create 64 bit versions of D-ISAM  */

 /* ls -l /home/uvadm/lib   <-- see if a 64 bit version available   */
 /* =====================       for your machine & operating system */
 /* - disamAIX32.a,disamLNX32.a,disamLNX64.a,disamSUN64.a,etc       */
 /* - disamAIX64.a missing, you could compile & archive as follows: */

 /* 1. cc -c -Ihdr src/disamNULL.c       <-- compile to object (.o) */
 /*    ===========================                                  */
 /* 2. ar r lib/disamAIX64null.a disamNULL.o <-- create archive to  */
 /*    =====================================     link with utilities*/
 /* 3. rm disamNULL.o                   <-- remove object          */
 /*    ==============                                              */
 /* then compile Vancouver Utility programs as follows:                */
 /*                                                                    */
 /* ccuvall AIX H64 uvlib64.a disamAIX64null.a <-- compile all programs*/
 /* ==========================================                         */
 /* ccc uvcopy AIX H64 uvlib64.a disamAIX64null.a <-- compile 1 program*/
 /* =============================================                      */
 /* declare structures referenced by DISAM functions */
 /* - see original in srcf/iswrap.c                  */
 struct keypart
   { short kp_start;
     short kp_leng;
     short kp_type;
   };
 struct keydesc
   { short k_flags;
     short k_nparts;
     struct keypart k_part[5];
     short k_len;
     int   k_rootnode;
   };

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

 /* dummy DISAM functions called by uvcopy,uvsort,uvcp,uvqrpg */
 int isbuild (char *name, int len, struct keydesc *kdsc, int mode)
 { return(0); }
 int isaddindex (int isfd, struct keydesc *kdsc)
 { return(0); }
 int iserase (char *name)
 { return(0); }
 int isindexinfo (int isfd, struct keydesc *dest, int idx)
 { return(0); }
 int islock (int isfd)
 { return(0); }
 int isunlock (int isfd)
 { return(0); }
 int isopen (char *name, int mode)
 { return(0); }
 int isclose (int isfd)
 { return(0); }
 int isstart (int isfd, struct keydesc *key, int len, char *data, int mode)
 { return(0); }
 int isread (int isfd, char *data, int mode)
 { return(0); }
 int iswrite (int isfd, char *data)
 { return(0); }
 int isdelete (int isfd, char *data)
 { return(0); }
 int isrewrite (int isfd, char *data)
 { return(0); }
 /*-------------------------- end disamNULL.c -------------------------*/

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

D3. Compiling Vancouver Utility programs

Indexed file .dat for Micro Focus COBOL & Vancouver Utilities

The Micro Focus COBOL default is NO '.dat' extension. We highly recommend the Micro Focus COBOL option 'IDXNAMETYPE=2' to read/write Indexed files with the '.dat' extension. You can code this in the 'extfh.cfg' file defined by env-var $EXTFH, which is defined in the common_profile 'G2'.


 export EXTFH=$RUNLIBS/ctl/extfh.cfg  <-- define location of extfh.cfg
 ===================================    - EXTFH defined in common_profile

 IDXNAMETYPE=2    <-- option within extfh.cfg
 =============

Early versions of Vancouver Utilities (uvcopy,uvsort,uvcp) used only the D-ISAM file handler for Indexed files (compatible with Micro Focus IDXFORMAT1). The early versions of D-ISAM read either .dat or no extension, but always created files without the '.dat' extension (compatible with Micro Focus COBOL if not using IDXNAMETYPE=2 in EXTFH=extfh.cfg.

In 1998 environmental variable 'DISAMEXT' was provided for sites that wanted to use '.dat' extensions (compatible with MF COBOL IDXNAMETYPE=2).


 export DISAMEXT="dat"   <-- cause uvsort, etc to read/write .dat extensions
 =====================     - define in common_profile (page 'G2')

ISDATEXT=".dat" D-ISAM update 2010

In April 2010, Byte Designs enhanced D-ISAM with env-var ISDATEXT to allow the option of writing Indexed files without the '.dat' extension.


 export ISDATEXT=".dat"  <-- cause uvsort, etc to read/write .dat extensions
 ======================    - define in common_profile (page 'G2')

You could drop the older DISAMEXT, but it will not do any harm as long as you also define ISDATEXT=".dat".

Indexed file capability UNIX vs mainframe

Note that I have recoded the 'keydesc' structure to allow 9 keys, each of which may have up to 3 parts. The OS/3 mainframe allowed only 5 single part keys. Key duplicates & changes are not allowed on the 1st key, but are allowed on keys 2-9. These defaults may be over-ridden if desired.

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

D4. Compiling Vancouver Utility C Programs

user written subfunctions linked to uvcopy

As of July 2000, xxa,xxb,& xxc instructions are provided to call user subfunctions. These subfunctions must have been compiled & archived to /home/uvadm/lib/uvlib32/64.a so they can be linked to uvcopy & uvqrpg.

uvsubxxa.c, uvsubxxb.c,& uvsubxxc.c are 3 dummy subfunctions provided in subdir /home/uvadm/srcf/... that you may modify with your desired C code.


 #1. cd /home/uvadm
 #2. vi srcf/uvsubxxa.c                 <-- modify dummy instrn with yours
 #3. ccuvf uvsubxxa LNX H32             <-- compile & archive to lib/uvlib32.a
 #4. ccuv uvcopy LNX H32 uvlib32.a disamLNX32.a <-- compile&link uvcopy w subrtns
 uvcopy instructions xxa, xxb, xxc have no operands
   - areas i,j,k must be stored for subrtn arg1,2,3 (see area1,2,3 below)
   - instrn ctrs 21,22,23 must be stored for arg4,5,6 (see ctr1,2,3 below)
   - counters are defined here as long, but in uvcopy/uvqrpg as UVi64
     which is long if H64 but long long if H32
   - counters are pointers so you can store them as well as reference them

See more documentation for 'xxa' & 'uvsubxxa.c' in uvcopy3.htm in volume 2. Look up 'xxa' in the instructions index on pages 3 & 4.

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

E1. TESTING the Vancouver Utility programs

C program to test 64 bit integers

A C program & a uvcopy job are supplied to test 64 bit integers. Please see program listings, operating instructions, & expected outputs on pages Q1 to Q4 of TestDemo.htm#Q1. Here are the operating instructions & expected output for the C program.


 cc src/test64c.c -o bin/test64c   <-- compile test64c.c program
 ===============================

 bin/test64c                       <-- execute
 ===========                         - expected results below
  00. 0000000000004096 * 04 = 0000000000016384 = 00 40 00 00 00 00 00 00
  01. 0000000000016384 * 04 = 0000000000065536 = 00 00 01 00 00 00 00 00
  02. 0000000000065536 * 04 = 0000000000262144 = 00 00 04 00 00 00 00 00
  03. 0000000000262144 * 04 = 0000000001048576 = 00 00 10 00 00 00 00 00
  04. 0000000001048576 * 04 = 0000000004194304 = 00 00 40 00 00 00 00 00
  05. 0000000004194304 * 04 = 0000000016777216 = 00 00 00 01 00 00 00 00
  06. 0000000016777216 * 04 = 0000000067108864 = 00 00 00 04 00 00 00 00
  07. 0000000067108864 * 04 = 0000000268435456 = 00 00 00 10 00 00 00 00
  08. 0000000268435456 * 04 = 0000001073741824 = 00 00 00 40 00 00 00 00
  09. 0000001073741824 * 04 = 0000004294967296 = 00 00 00 00 01 00 00 00
  10. 0000004294967296 * 04 = 0000017179869184 = 00 00 00 00 04 00 00 00
  11. 0000017179869184 * 04 = 0000068719476736 = 00 00 00 00 10 00 00 00
  12. 0000068719476736 * 04 = 0000274877906944 = 00 00 00 00 40 00 00 00
  13. 0000274877906944 * 04 = 0001099511627776 = 00 00 00 00 00 01 00 00
  14. 0001099511627776 * 04 = 0004398046511104 = 00 00 00 00 00 04 00 00
  15. 0004398046511104 * 04 = 0017592186044416 = 00 00 00 00 00 10 00 00
Note
  • the 32 bit limit is at #09 above 1,073,741,824 is OK in 32 bits
  • following entries zeros or garbage if 64 bit software not working

recompile with various options for 32/64 bits


 gcc src/test64c.c -o bin/test64c        <-- use 'gcc' vs 'cc'
 ================================
 xlc -q64 src/test64c.c -o bin/test64c   <-- xlc & -q64 for AIX
 =====================================
 cc -m64 src/test64c.c -o bin/test64c    <-- '-m64' for some machines/OSs
 ====================================      - SUN, Micro Focus cc
 cc +DD64 src/test64c.c -o bin/test64c   <-- '+DD64' for 'cc' on HPUX IA64
 =====================================
 gcc -mlp64 src/test64c.c -o bin/test64c <-- '-mlp64' for 'gcc' on HPUX IA64
 =======================================

Some OS's have a symbolic link or any alias from 'cc' to 'gcc'. You can look for this with following commands:

      which cc     <-- should show path location of cc
      which gcc    <-- should show path location of gcc
      ls -l /bin/*cc*      <-- list all cc programs in /bin
      ls -l /usr/bin/*cc*  <-- or might be in /usr/bin

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

E2. TESTING the Vancouver Utility programs

uvcopy job to test 64 bit integers

Page 'E1' above compiled & executed a very small 'C program' to test 64 bit integers. Now we will run similar tests using a 'uvcopy job'.

'testint2' is uvcopy job to test uvcopy processing of 32 & 64 bit integers. You have already compiled the uvcopy interpreter with 'ccuvall' on 'C1' - 'C3'. We will give the instructions here to recompile just uvcopy for Linux on both 32 bit & 64 bit hardware/software. You should change 'LNX' to the proper code for your system (SUN,HP,AIX,SFU,etc).


 #1. ccuv uvcopy LNX H32 uvlib32.a disamLNX32.a
     ==========================================
     - compile on 32 bit hardware (long = 32 bits)
     - 64 bit integers achieved via Software (long long = 64 bits)

 #2. uvcopy testint2    <-- execute uvcopy job 'testint2'
     ===============      - displays output via 'more'

 #3. ccuv uvcopy LNX H64 uvlib64.a disamLNX64.a
     ==========================================
     - compile on 64 bit hardware (long = 64 bits)
     - option 'H64' tells uvcopy to expect long 64 bits & not use 'long long'

 #4. uvcopy testint2    <-- execute uvcopy job 'testint2'
     ===============      - displays output via 'more'
Note
  • Please see the expected outputs for both 32 & 64 bits
  • listed on pages Q1 & Q2 of TestDemo.htm#Q1.

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

F1. 'uycopy' to access SQL DataBase Tables

In November 2008, a new version of uvcopy, 'uycopy' was created to provide access to SQL DataBase tables. It had to be a separate version (from uvcopy) because it requires the SQL C-API libraries for compilation at sites with an SQL DataBase installed.

'uycopy' uses file 'typ=DBT' to define a DataBase Table & environmental variables (DBhost1, DBuser1, DBpass1) for connection to the DataBase. Please see documentation for uycopy in SQLdemo.htm#Part_2.

compiling 'uycopy' with SQL DataBase libraries

  1. You must download & install MySQL as instructed at SQLdemo.htm#Part_1.


 #2. ccmysqlLNX64 uycopy   <-- execute script to compile 'uycopy'
     ===================

script to compile 'uycopy'

 # ccmysqlLNX64 - script to compile Vancouver Utility C program
 #              - provides access to MySQL DataBase libraries
 # - by Owen Townsend, UV Software, Nov 05/2008
 # - for Linux on 64 bit system, with option for debug
 #
 pgm="$1";
 if [[ ! -f src/$pgm.c ]]; then
    echo "usage: ccmysqlLNX64 program"
    echo "       ===================="
    echo "example: ccmysqlLNX64 uycopy"
    echo "         ==================="
    echo "compile with MySQL libraries on Linux 64 bit with debug option"
    exit 99; fi;
 #
 sqlinclude="-I/usr/include/mysql"
 sqllibs="-L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -L/usr/lib64 -lssl -lcrypto"
 syms="-DLNX -DH64 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
 #
 cc $syms -Ihdr src/${pgm}.c $sqlinclude $sqllibs \
           lib/uvlib64.a lib/disamLNX64.a -o bin/${pgm}
 #=====================================================
 exit 0

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

G0. profiles for Vancouver Utilities on Unix/Linux

'profiles' provided in /home/uvadm/env

 /home/uvadm/env      <--- profiles provided here
 :-----stub_profile      - copy/rename to .profile (ksh) or .bash_profile (bash)
 :                       - defines RUNLIBS/RUNDATA for programmers & operators
 :-----common_profile    - common profile (called by stub_profile)
 :                         defines PATH's etc using $RUNLIBS/$RUNDATA
 :-----root_profile      - profile for root, copy to /root/.bash_profile (RedHat)
 :                         to access Vancouver Utility scripts & uvcopy jobs
 :
 /home/appsadm/env    <--- setup user 'appsadm' & copy from /home/uvadm/env/*
 :-----stub_profile      - customize & copy to homedirs .profile or .bash_profile
 :-----common_profile    - common profile (called by stub_profile)

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

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

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

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

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

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

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

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

See these profiles listed on pages 'G1' thru 'G3'.

See more explanations at: http://www.uvsoftware.ca/admjobs.htm#1B2

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

G0a. profiles for Vancouver Utilities on Unix/Linux

profiles for Vancouver Utilities on Unix/Linux

G1. stub_profile - distributed in /home/uvadm/env/...
- copy (to user homedirs) & rename depending on the desired shell
  (.bash_profile for bash, .profile for ksh)
- modify RUNLIBS/RUNDATA differently for programmers or operators
- calls common_profile
G2. common_profile - distributed in /home/uvadm/env/...
- defines search PATHs to libraries & data based on $RUNLIBS & $RUNDATA
  defined in the stub_profiles of programmers & operators
  (see suggested directory designs in ADMjobs.doc Part 2)
- allows updates in 1 place to affect all users
- modify TERM & 'stty erase' character depending on most common terminal
  (distribution has TERM=linux & stty erase '^?')
G3. 'common_defines' - called by 'common_profile'
- defines TESTLIBS,TESTDATA,PRODLIBS,PRODDATA for backup/restore scripts
G4. utilities_profile - simplified profile to access programs & scripts only
- alternative to above 2 part profiles which are recommended for sites
  converting from a mainframe
G5. Listing of 'root_profile', suggested profile for root
- to access Vancouver Utility scripts & uvcopy jobs
- includes prompt with current directory & aliases such as alias l='ls -l'
G6. bashrc - 'rc file' distributed in /home/uvadm/env/...
- copy (to user homedirs) & rename depending on the desired shell
  (.bashrc for bash, .kshrc for ksh)
- master version supplied without the '.' for visibility
- required if you invoke another shell level (console logging script)
- carries aliases & umask which get lost on another shell level
- you should customize & store in /home/appsadm/env/...
G7. Customizing the profiles for uvadm & for other users
- modify TERM & 'stty erase' character depending on user's terminal
- modify UVLPDEST to define a laser printer near the user
- modify COBDIR for Micro Focus COBOL
- see Part 1 of ADMjobs.doc for comprehensive instructions to setup
  profiles for other users & to run conversions for your JCL
  (vs only the test/demos in Part 1 of MVSJCL.doc)

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

G1. profiles for Vancouver Utilities on Unix/Linux

stub_profile for Unix/Linux

 # stub_profile - to be copied to user homedirs and renamed as
 #              '.profile' for Korn shell or '.bash_profile' for bash (Linux)
 #              - stub_profile calls 'common_profile'
 #              - by Owen Townsend, March 2010, update Nov 2010
 #
 # stub_profile - for users of Vancouver Utilities
 # - defines $RUNLIBS & $RUNDATA for common_profile, which uses them
 #   to define PATHs to libraries & data (test or production)
 #
 # common_profile & stub_profile - distributed in $UV/env/...
 # - do not modify profiles in $UV because new versions of uvadm would overwrite
 # - copy to $APPSADM/env/... (/home/appsadm/env/...) & modify for your site
 # - then programmers can copy stub_profile to end of their .profile
 #   cat $APPSADM/env/stub_profile >>.profile
 # - see more at www.uvsoftware.ca/install.htm#A4
 #   ---OR--- at www.uvsoftware.ca/admjobs.htm#Part_1
 #
 ls -ld $HOME/*
 echo "$LOGNAME logging in, $HOME homedirs listed above"
 runlibs=testlibs; rundata=testdata;  # setup defaults
 echo "Vancouver Utility profile for JCL,COBOL,& DATA conversions"
 echo "runlibs=testlibs, rundata=testdata"
 #
 #    ** uncomment '##' lines to allow choice of RUNLIBS/RUNDATA **
 #
  ## echo "enter nothing for default runlibs=$runlibs"
  ## echo " - or enter desired subdir, or enter 'b' to bypass"
  ## read reply
  ## if [[ -n "$reply" ]]; then
  ##    runlibs=$reply
  ##    until [[ -d "$runlibs" || "$runlibs" = "b" ]]
  ##      do echo "enter runlibs subdir in homedir, or 'b' to bypass"
  ##         read runlibs
  ##      done
  ## fi
  ## echo "enter nothing for default rundata=$rundata"
  ## echo " - or enter desired subdir, or enter 'b' to bypass"
  ## read reply
  ## if [[ -n "$reply" ]]; then
  ##    rundata=$reply
  ##    until [[ -d "$rundata" || "$rundata" = "b" ]]
  ##      do echo "enter rundata subdir in homedir, or 'b' to bypass"
  ##         read rundata
  ##      done
  ## fi
 #           ** define RUNLIBS/RUNDATA & call common_profile **
 export RUNLIBS=$HOME/$runlibs
 export RUNDATA=$HOME/$rundata
 export CNVDATA=$HOME/cnvdata
 #Note - above are for programmer initial testing/training in their homedirs
 #      - RUNLIBS would soon change to a common library, for example:
 # export RUNLIBS=/t1/batch/testlibs   # common library for programmers
 # export RUNDATA=$HOME/testdata       # programmers might keep separate DATA
 # export RUNLIBS=/p1/batch/prodlibs   # production library on different machine
 # export RUNDATA=/p2/batch/proddata   # production data
 #                                     # mount points /t1/p1/p2 setup by sysadmin
 #
 . /home/uvadm/env/common_profile      #<-- call common_profile (setup PATH,etc)
 ## . /home/appsadm/env/common_profile #<-- should call from 'appsadm'
 #====================================
 #Note - VU distribution stub_profile calls common_profile from /home/uvadm/env
 # - after uvadm install, you should setup appsadm & store env/profiles there
 # - then all user profiles should call common_profile from /home/appsadm/env/...
 # - prevents loss of customized common_profile when new version uvadm installed
 #
 #            ** user preferences & overrides of common_profile **
 #
 #Note - here are some #commented items that you may need or want to activate:
 #
 # export TERM=linux       # TERM - modify depending on your terminal
 #                         # (vt100,xterm,at386,ansi,etc)
 # stty erase '^?'         # erase char - modify depending on your terminal
 #                         #  '^?' for linux/at386, '^H' for vt100,ansi,xterm
 # stty intr '^C'          # interrupt ^C, (probably already default ?)
 #
 # alias l='ls -l'         # save keystrokes on very often used commands
 # alias rm='rm -i'        # confirm removes (see more aliases in common_profile)
 #
 # export UVLPDEST="-dlp0" # default destination for uvlp(uvlist) scripts
 #                         # change to a printer near you & un-comment
 #
 #     ** for programmer testing when production scheduler has NO profile **
 #
 export RUNLIBSDATA=T1  # inhibit RUNLIBS/RUNDATA redefs in .ini files
 # .ini files called at begin JCL/scripts to redefine libs/data for each script
 # - for sites that need different LIBS/DATA for different systems
 # - might be used for JCL/scripts run under schedulers (cron,control-M,etc)
 # - RUNLIBSDATA=T1 allows programmers to test JCL/scripts using definitions
 #   in common_profile (inhibits redefines in .ini file at begin JCL/scritps)
 #
 #                   ** Console Logging - optional **
 #
 # - uncomment 7 '##' lines below to activate console logging
 # - must setup subdirs matching $LOGNAME in $APPSADM/log1/...,log2/...,log3/...
 # - subdirs log1,log2,log3 hold logfiles for: current file, month, lastmonth
 # - see details at www.uvsoftware.ca/admjobs.htm#Part_6
 # - console logging for production operators to capture entire logon session
 # - programmers can use the 'joblog1' script to capture log for 1 job at a time
  ## login1 || exit 2          # exit here if 2nd login
  ## logfixA $LOGNAME          # process log1 file to log2 (to allow read/print)
  ## echo "--> logview   <-- execute logview script to see prior console logs"
  ## echo "logging requires .bashrc/.kshrc with PS1='<@$HOST1:$LOGNAME:$PWD >'"
  ## echo "logging requires $LOGNAME subdirs in \$APPSADM/log1 & log2"
  ## if [[ -d $APPSADM/log1/$LOGNAME && ( -f .kshrc || -f .bashrc) ]]; then
  ##    echo "script $APPSADM/log1/$LOGNAME/$(date +%y%m%d_%H%M%S)"
  ##    exec script $APPSADM/log1/$LOGNAME/$(date +%y%m%d_%H%M%S)
  ## fi
 # 'exec script' must be the last non-comment line in the profile
 # 'script' disables aliases & umask 002 - put in .bashrc/.kshrc to be effective
 # ============================
 # cp $APPSADM/env/kshrc .kshrc  # copy to your homedir restoring correct name
 # ============================

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

G2. profiles for Vancouver Utilities on Unix/Linux

common_profile for Unix/Linux

 # common_profile - to be '.' dot executed by user .profile or .bash_profile
 #                - for users of Vancouver Utilities,COBOL,etc
 #                - by Owen Townsend, March 4/2010
 #                - see www.uvsoftware.ca/admjobs.htm#Part_1
 #
 # common_profile - defines search PATHs based on $RUNLIBS & $RUNDATA
 #                  which must be defined in user's .profile or .bash_profile
 #                  before calling this commmon_profile
 #
 # stub_profile - copied to user homedirs & renamed as .profile or .bash_profile
 #              - defines RUNLIBS & RUNDATA before calling common_profile
 #              - stub_profile distributed in $UV/env contains following:
 #
 #     export RUNLIBS=$HOME/testlibs
 #     export RUNDATA=$HOME/testdata
 #     export CNVDATA=$HOME/cnvdata
 #     . /home/uvadm/env/common_profile   #<-- call this common_profile
 #     . /home/appsadm/env/common_profile #<-- should change uvadm to appsadm
 #
 #Note - profiles distributed in $UV/env/... (usually /home/uvadm/env/...)
 #     - should setup user 'appsadm' & copy $UV/env/... to $APPSADM/env/...
 #     - then change stub_profiles to call common_profile from $APPSADM/env/...
 #       (so you will not lose your changes to profiles when new uvadm installed)
 #
 #Note - stub_profiles also contain code to perform 'console logging'
 #     - you must uncomment 7 ## lines at end of stub_profile to activate
 #     - see more explanations at www.uvsoftware.ca/admjobs.htm#Part_6
 #
 #                  ** begin code for common_profile **
 #
 export UV=/home/uvadm           # UV homedir symbol used below
 export APPSADM=/home/appsadm    # site applications administrator
 export LOGDIR=$APPSADM          # console logging subdirs log1,log2,log3
 #
 # setup PATH for Vancouver Utilities programs & scripts (uvadm & appsadm)
 # - append onto system PATH, using symbols defined above ($UV, $APPSADM, etc)
 #
 export PATH=$PATH:$HOME/bin:$HOME/sf:$APPSADM/bin:$APPSADM/sf:$RUNLIBS/sf
 export PATH=$PATH:$UV/bin:$UV/sf/adm:$UV/sf/demo:$UV/sf/util:$UV/sf/IBM
 #
 #Note - APPSADSM appears before UV so user modified scripts/jobs in APPSADM
 #       can be stored in $APPSADM & be found prior to original versions in $UV
 #     - $UV/sf subdirectoried to adm,demo,util,IBM (April2003+)
 #
 #----------------------------------------------------------------------------
 # setup 'PFPATH' for uvcopy & uvqrpg interpreter to find Parameter Files (jobs)
 export PFPATH=$RUNLIBS/pf,$RUNLIBS/pfx3,$RUNLIBS/ezts,$HOME/pf,$APPSADM/pf
 export PFPATH=$PFPATH,$UV/pf/adm,$UV/pf/demo,$UV/pf/util,$UV/pf/IBM
 # - use symbol $UV (defined above) to shorten PFPATH definition
 # - UV/pf/... follows RUNLIBS,APPSADM,HOME to allow user duplicate names
 # - uvcopy accepts ',' delimiters as well as ':' in case of SFU on Windows
 #
 #----------------------------------------------------------------------------
 # setup PATH & FPATH for JCL/scripts converted from mainframe Vancouver Utils
 # - see www.uvsoftware.ca/mvsjcl.htm or www.uvsoftware.ca/vsejcl.htm
 export PATH=$PATH:$RUNLIBS/jcls  # RUNLIBS defined in common_profile
 export FPATH=$APPSADM/sfun       # ksh functions used by VU JCL/scripts
 #Nov19/10 - FPATH changed from $RUNLIBS/sfun to $APPSADM/sfun
 #         - RUNLIBS defined in stub_profile (before calling this common_profile)
 #
 #----------------------------------------------------------------------------
 # Indexed file extension controls for Vancouver Utilities
 export DISAMEXT="dat"  # .dat/.idx Indexed files for uvsort,uvcopy,uvcp,etc
 #                      # uvsort,etc expects .dat on data partition of ISAM files
 #                      # COBOL equivalent is 'IDXNAMETYPE=2' in $EXTFH/extfh.cfg
 export ISDATEXT=".dat" #Apr14/10 - new way to control DISAM .dat extension
 #                      # - omit both above if you want NO .dat extension
 #
 # printer destinations for VU laser printing scripts
 # - modify UVLPDEST to the network printer closest to you
 export UVLPDEST="-dlp0"       # default dest for uvlp(uvlist) scripts
 export UVLPOPTN="-onobanner"  # for unix/linux (SFU does not allow)
 export UVHDPRINT=uvlp12       # script for uvhd 'i' immediate print command
 export UVHDPWIDE=uvlp12L      # script for uvhd 'iprint' Landscape 100 chs/line
 export COBMAPDIR=$RUNLIBS/maps # for uvhdcob (display data with fieldnames)
 #
 #-------------------------------------------------------------------------
 # For Micro Focus COBOL Server Express
 # - see compile scripts mfcbl1 & mfcblA in /home/uvadm/sf/IBM
 # - Also required to compile 'ux' programs (uxcp,uxsort,uxcopy,uxqrpg) with
 # - cobccuv script to support Indexed Seqntl Variable length (IDXFORMAT3 files)
 # - COBDIR defined in common_profile with other site dependent path variables
 export COBDIR=/opt/microfocus/cobol
 export PATH=$PATH:$COBDIR/bin
 export LD_LIBRARY_PATH=$COBDIR/lib:$LD_LIBRARY_PATH
 export LANG=en_US                   # fix animator display carets vs data
 #note - for COBOPT & EXTFH, might change $UV to $RUNLIBS ??
 export COBOPT=$UV/ctl/cobdirectives # compiler options & Directives
 export COBCPY=$RUNLIBS/cpys         # copybook search, compile script overrides
 export EXTFH=$UV/ctl/extfh.cfg      # file handler configuration
 # - [XFH-DEFAULT] IDXNAMETYPE=2 for .dat ext on data part (.idx on index part)
 export ASLMFRETRY="5,15"  # limited licenses, retry 5 times, wait 15 secs btwn
 #
 # export COBMODE=64              # generate 64 bit programs (activate Jan14/09)
 #Sep2008 COBMODE=64 Err-> CE0001 odbcecm depmod n/f, OK if #-C SQL cobdirectives
 # - but uxcopy,etc will not link with uvlib.a in 64 bit mode ???
 # - ld: lib/uvlib64.a(errmsg.o) relocation R_X86_64_32 cant make shared object
 # - w/o COBMODE=64, can compile w H64, but execute gives err 114 signal 11
 # - must compile uvlib32.a with -m32 & uxcopy with H32
 # - need new versions of Micro Focus for COBMODE=64 (5.4 ? 2010+)
 #
 # define TERM & TERMINFO for MicroFocus color coding in animator
 # #commented out here?, could define in stub profile depending on Terminal
 # export TERMINFO=$COBDIR/terminfo # provides color coding in MFC animator
 # export TERM=ansi                     # for animator (& vim multicolor)
 #
 #                     ** setup for COBOL-IT **
 #
 # export COBOLITDIR=/opt/cobol-it-std-64
 # . $COBOLITDIR/bin/cobol-it-setup.sh
 # export COB_CONFIG_DIR=$COBOLITDIR/share/cobol-it/config
 # export COB_LIBRARY_PATH=$RUNLIBS/cblx
 #
 #-------------------------------------------------------------------------
 # define TERM & dependent 'erase' char
 # export TERM=linux         # TERM - modify depending on your terminal
 #                         # (vt100,xterm,at386,ansi,etc)
 stty erase '^?'           # erase char - modify depending on your terminal
 #                         #  '^?' for linux/at386, '^H' for vt100,ansi,xterm
 # stty intr '^C'          # interrupt ^C, (probably already default ?)
 #-------------------------------------------------------------------------
 # Recommended items
 umask 002                     # permissions 775 dirs, 664 files
 set -o ignoreeof              # disallow logoff via ctl D (use exit)
 export HOST1=$(uname -n)      # add to PS1 prompt if desired
 trm=$(tty)                    # capture terminal device for PS1
 trmv=${trm#/dev/}             # remove prefix /dev/
 export PS1='<@$HOST1:$LOGNAME:$PWD> '
 export EDITOR=vi              # for Korn shell history
 export VISUAL=vi              # for Korn shell history
 export HISTSIZE=1000;         # Korn shell history file size
 #-------------------------------------------------------------------------
 # alias commands to prompt for overwrite (highly recommended)
 # - use option '-f' when you have many files  (rm -f tmp/*, etc)
 alias rm='rm -i'              # confirm removes
 alias mv='mv -i'              # confirm renames
 alias cp='cp -i'              # confirm copy overwrites
 alias rmf='rm -f'             # force removes (no prompts)
 alias mvf='mv -f'             # force renames (no prompts)
 alias cpf='cp -f'             # force copies (no prompts)
 alias l='ls -l'               # save keystrokes
 # alias more='less'             # less is way better than more
 # alias vi='vim'                # use vim
 # alias vi='\vi'                # use vi (Red Hat Linux defaults to vim)
 alias grep='grep -n'          # ensure filename & line# on matching lines
 # alias df='df -H'              # ensure -H on df (Disc Free Human readable)
 # alias du='du -s -h -c '       # -s summary -h Human-read, -c grand total
 alias uname='uname -a'        # ensure -a on uname (All info)
 alias cduv='cd $UV'           # Vancouver Utilities
 alias cdl='cd $RUNLIBS'       # quick access to LIBS superdir
 alias cdd='cd $RUNDATA'       # DATA superdir
 alias cdc='cd $CNVDATA'       # data CONVERSION superdir
 alias cdk='cd $CMPDATA'       # data COMPARISON superdir
 alias cdb='cd $BACKUP'        # BACKUP superdir
 alias cdr='cd $RESTORE'       # RESTORE superdir
 # aliases - ineffective if console logging activated (in user stub profile)
 #         - ifso, place aliases in .bashrc (or .kshrc, for ksh)
 #-------------------------------------------------------------------------
 # Verify that critical environmental variables have been defined
 # (by stub_profile or this common_profile)
 if [[ "$UV" = "" || "$APPSADM" = "" || "$COBDIR" = "" ]]; then
    echo "UV=$UV, APPSADM=$APPSADM,or COBDIR=$COBDIR not defined"
    echo "- enter to exit"; read $reply; exit 99; fi
 if [[ "$RUNLIBS" = "" || "$RUNDATA" = "" ]]; then
    echo "RUNLIBS=$RUNLIBS or RUNDATA=$RUNDATA not defined"
    echo "- enter to exit"; read $reply; exit 99; fi
 #Dec15/10 - set LOGMSGACK, activate ACK option in logmsg2 in JCL/scripts
 export LOGMSGACK=y
 #-------------------------------------------------------------------------
 # call common_defines - define environmental variables for PRODLIBS,PRODDATA
 #                       ,TESTLIBS,TESTDATA,& TAPE backup devices
 . $UV/env/common_defines        #<-- distributed in /home/uvadm/env/...
 #=======================
 # . $APPSADM/env/common_defines #<-- copy to /home/appsadm/env/ & modify as reqd
 #==============================
 #
 #Mar2010 - common_defines now called here from common_profile
 #        - optional, required by some scripts to define:
 #          PRODLIBS,PRODDATA,TESTLIBS,TESTDATA,TAPE devices for backups, etc
 #
 #Pre-Mar2010 - stub_profile called both 'common_defines' & 'common_profile'
 #            - stub_profile now calls only 'common_profile'
 #------------------------- end of common_profile ---------------------------

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

G3. profiles for Vancouver Utilities on Unix/Linux

common_defines

 # common_defines - define environmental variables for Vancouver Utilities
 #                - PRODLIBS,PRODDATA,TESTLIBS,TESTDATA,& TAPE backup devices
 #
 # - this file distributed in /home/uvadm/env/common_defines
 # - copy to /home/appsadm/env/... before modifying for your site
 #   (won't lose your changes when new version of Vancouver Utilities installed)
 #
 #Mar2010 - common_defines now called by common_profile
 #        - required by some scripts to define:
 #          PRODLIBS,PRODDATA,TESTLIBS,TESTDATA,TAPE devices for backups, etc
 #
 #Pre-Mar2010 - stub_profile called both 'common_defines' & 'common_profile'
 #            - stub_profile now calls only 'common_profile'
 #
 export TESTLIBS=/p1/testlibs  #<-- examples for user sites
 export TESTDATA=/p1/testdata  #  - see overrides for 'mvstest' below
 export PRODLIBS=/p2/prodlibs
 export PRODDATA=/p2/proddata
 export BACKUP=/p3/backup
 export RESTORE=/p3/restore
 export HOMEDIRS=/home         # HOMEDIRS=/export/home for SUN solaris
 #
 export TAPERWD=/dev/st0       # rewind tape device for Linux SCSI
 export TAPENRW=/dev/nst0      # NO rewind tape device for Linux SCSI
 #
 # override above examples with 'mvstest' definitions for testing at UV Software
 # user implementation would delete following & modify above
 # - depending on user site disc partitioning & file design
 export TESTLIBS=/home/mvstest/testlibs
 export TESTDATA=/home/mvstest/testdata
 export BACKUP=/h33/backup    #<-- for testing at UV Software
 export RESTORE=/h33/restore
 #------------------------- end of common_defines ---------------------------

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

G4. profiles for Vancouver Utilities on Unix/Linux

profile for utilities ONLY

 # utilities_profile - for users of Vancouver Utilities only
 #          - simplified profile to access VU programs in /home/uvadm/bin/...
 # programs - uvsort, uvhd, uvcopy, uvcp, uvlist, uvqrpg, etc
 # scripts  - over 500 Korn shell scripts in /home/uvadm/sf/...
 # uvcopy jobs - over 500 uvcopy parameter files in /home/uvadm/pf/...
 #
 export UV=/home/uvadm   # <-- UV homedir symbol used below
 # setup PATH for Vancouver Utilities programs & scripts (uvadm & appsadm)
 # - append onto system PATH, using symbol $UV defined above
 export PATH=$PATH:$UV/bin:$UV/sf/adm:$UV/sf/demo:$UV/sf/util:$UV/sf/IBM
 # setup 'PFPATH' for uvcopy & uvqrpg interpreter to find Parameter Files (jobs)
 export PFPATH=$HOME/pf:$UV/pf/adm:$UV/pf/demo:$UV/pf/util:$UV/pf/IBM
 #
 #----------------------------------------------------------------------------
 # misc setups for Vancouver Utilities
 export DISAMEXT="dat"   # .dat/.idx Indexed files for uvsort,uvcopy,uvcp,etc
 # DISAMEXT="dat" causes uvsort,etc to expect .dat on data partition of ISAM file
 # MicroFocus COBOL equivalent is 'IDXNAMETYPE=2' in extfh.cfg
 #
 # printer destinations for VU laser printing scripts
 # - modify UVLPDEST to the network printer closest to you
 export UVLPDEST="-dlp0"       # default dest for uvlp(uvlist) scripts
 export UVLPOPTN="-onobanner"  # for unix/linux (SFU does not allow)
 export UVHDPRINT=uvlp12       # script for uvhd 'i' immediate print command
 export UVHDPWIDE=uvlp12L      # script for uvhd 'iprint' Landscape 100 chs/line
 #
 #-------------------------------------------------------------------------
 #Note - down to here is mandatory for Vancouver Utilities
 #     - following lines may be deleted/modified for established sites
 #-------------------------------------------------------------------------
 # Miscellaneous, Recommended items
 umask 002                     # permissions 775 dirs, 664 files
 set -o ignoreeof              # disallow logoff via ctl D (use exit)
 HOST1=$(uname -n)             # add to PS1 prompt if desired
 trm=$(tty)                    # capture terminal device for PS1
 trmv=${trm#/dev/}             # remove prefix /dev/
 export PS1='<@$trmv:$LOGNAME:$PWD> '
 export EDITOR=vi              # for Korn shell history
 export VISUAL=vi              # for Korn shell history
 export HISTSIZE=1000;         # Korn shell history file size
 alias l='ls -l'               # aliases (add more as desired)
 #-------------------------------------------------------------------------
 # define TERM & dependent 'erase' char
 export TERM=linux         # TERM - modify depending on your terminal
 #                         # (vt100,xterm,at386,ansi,etc)
 stty erase '^?'           # erase char - modify depending on your terminal
 #                         #  '^?' for linux/at386, '^H' for vt100,ansi,xterm
 # stty intr '^C'          # interrupt ^C, (probably already the default ?)
 #------------------ end of Vancouver Utility profile stuff -----------------

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

G5. profiles for Vancouver Utilities on Unix/Linux

.kshrc/.bashrc for Unix/Linux

 # bashrc - initialization file for the bash shell (vs kshrc for Korn shell)
 #        - file stored at /home/uvadm/env/...
 #        - '.' of '.bashrc' omitted for visibility
 #NOTE - copy to your homedir & rename .bashrc(bash/linux) or .kshrc(ksh/unix)
 #
 # - aliases coded here, as well as in .bash_profile(linux) or .profile(unix)
 # - useful if console logging via 'script' command (see ADMjobs.doc)
 # - aliases & umask in profile get lost by the 'script' console logging command
 # - this saves having to remember '. aliases' after login when logging
 # - could also code functions here
 #
 # alias commands to prompt for overwrite (highly recommended)
 # - use option '-f' when you have many files  (rm -f tmp/*, etc)
 alias rm='rm -i'              # confirm removes
 alias mv='mv -i'              # confirm renames
 alias cp='cp -i'              # confirm copy overwrites
 alias rmf='rm -f'             # force removes (no prompts)
 alias mvf='mv -f'             # force renames (no prompts)
 alias cpf='cp -f'             # force copies (no prompts)
 #
 # aliases for quick 'cd's to commonly accessed directories
 # - requires env-vars RUNLIBS, RUNDATA, CNVDATA in your profile
 alias cdl='cd $RUNLIBS'       # quick access to libs superdir
 alias cdd='cd $RUNDATA'       # quick access to data superdir
 alias cdc='cd $CNVDATA'       # quick access to data conversion superdir
 alias cdb='cd $BACKUP'        # quick access to backup superdir
 alias cdr='cd $RESTORE'       # quick access to restore superdir
 #
 # misc aliases
 alias l='ls -l'               # save keystrokes
 alias vi='vim'                # use vim (vs vi)
 alias grep='grep -n'          # ensure -n option used on grep
 #
 # set umask, which also gets lost when console logging
 umask 002                     # ensure dirs 775 & files 664
 #--------------------------- end of bashrc ---------------------------------

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

G6. profiles for Vancouver Utilities on Unix/Linux

root_profile - root access to Vancouver Utilities

 # root_profile - for Red Hat Enterprise Linux & Vancouver Utilities
 # - supplied with Vancouver Utilities in /home/uvadm/env/root_profile
 # - to be copied/renamed to /root/.bash_profile
 # - to allow root to access Vancouver Utility scripts & uvcopy jobs
 # - includes handy aliases such as alias l='ls -l'
 # - includes prompt to identify current directory
 # - could also use for user's who need access to Vancouver Utilities
 #   but do not need the power & flexibility of stub & common profiles
 #
 # Get the aliases and functions
 if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
 # above is only significant code in default RHEL root profile
 # following code added by Owen Townsend, UV Software
 #--------------------------------------------------------------------------
 # setup PATH for Vancouver Utilities programs & scripts (uvadm & appsadm)
 # - append onto system PATH, using symbols defined above ($UV, $APPSADM)
 export UV=/home/uvadm                # <-- UV homedir symbol used below
 export APPSADM=/home/appsadm         # <-- site applications administrator
 export PATH=$PATH:$HOME/bin:$HOME/sf:$APPSADM/bin:$APPSADM/sf
 export PATH=$PATH:$UV/bin:$UV/sf/adm:$UV/sf/demo:$UV/sf/util:$UV/sf/IBM
 # - $UV/sf subdirectoried to adm,demo,util,IBM (April2003+)
 # - APPSADSM appears before UV so user modified scripts/jobs in APPSADM
 #   can be stored in $APPSADM & be found prior to original versions in $UV
 #
 # setup 'PFPATH' for uvcopy interpreter to find Parameter Files (jobs)
 export PFPATH=$HOME/pf:$APPSADM/pf
 export PFPATH=$PFPATH:$UV/pf/adm:$UV/pf/demo:$UV/pf/util:$UV/pf/IBM
 #--------------------------------------------------------------------------
 # define prompt for root
 export PS1='$LOGNAME:$PWD# '
 #--------------------------------------------------------------------------
 # alias commands to prompt for overwrite (highly recommended)
 # - use option '-f' when you have many files  (rm -f tmp/*, etc)
 alias rm='rm -i'              # confirm removes
 alias mv='mv -i'              # confirm renames
 alias cp='cp -i'              # confirm copy overwrites
 alias l='ls -l'               # save keystrokes
 alias more='less'             # less is way better than more
 # alias vi='vim'                # use vim
 # alias vi='\vi'                # use vi (Red Hat Linux defaults to vim)
 alias grep='grep -n'          # ensure -n option used on grep
 #--------------------------------------------------------------------------
 # define COBOL env-vars for root on Red Hat Enterprise Linux
 # - needed to install Micro Focus COBOL & apply patches
 export COBDIR=/opt/microfocus/cobol   # default COBDIR for RHEL
 export PATH=$PATH:$COBDIR/bin
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COBDIR/lib
 export LANG=en_US  # fix MFC SX 4.0 animator displaying carets vs data
 #--------------------------------------------------------------------------

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

G7. profiles for Vancouver Utilities on Unix/Linux

setting up profiles for 'uvadm'

Instructions have already been given (on page 'B3') to setup the supplied 'stub' profile in the uvadm home dir renaming as '.bash_profile', assuming the bash shell (rename as '.profile' for ksh). The 'common' profile in /home/uvadm/env/ was also modified depending on site printer, COBDIR, etc.

setting up profiles for other users

Please see ADMjobs.htm re setting up profiles for other users such as appsadm, mvstest, vsetest, your programmers,& your operators.

ADMjobs.doc recommends setting up an 'appsadm' account to store the profiles so they do not get overwritten when a new version of Vancouver Utilities is installed.

ADMjobs will copy all /home/uvadm/env/ profiles to /home/appsadm/env, then make further modifications for other users. One significant change is to modify the stub profiles to call the common profile from appsadm not uvadm. See the details in ADMjobs.htm.

profiles for SFU, UWIN, & CYGWIN

The unix/linux profiles are listed completely on the pages above. You can examine the profiles for other systems as shown below. Note that profiles above have been split into a 'stub_profile' and a 'common profile' (test or prod). This is highly recommended but has not been done for the following profiles:

 vi /home/uvadm/env/other_profiles/profile_LINUX
 vi /home/uvadm/env/other_profiles/profile_SFU
 vi /home/uvadm/env/other_profiles/profile_UWIN
 vi /home/uvadm/env/other_profiles/profile_CYGWIN
Note
  • also see install guides as follows:

/home/uvadm/doc/install.doc - www.uvsoftware.ca/install.htm

/home/uvadm/doc/WindowsSFU.doc - www.uvsoftware.ca/windowssfu.htm

/home/uvadm/doc/CygwinUwin.doc - www.uvsoftware.ca/cygwinuwin.htm

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

H1. TESTING the Vancouver Utility programs

Please see the separate section TestDemo.htm. I strongly recommend you run these tests & ensure your outputs match the expected outputs which are illustrated following each test/demo. Please call/email UV Software if you find any discrepancies or need any help running these tests.

Running these 'test/demo's is also a great way to investigate the Vancouver Utilities & find out which utilities will be the most useful to you.

Contents of 'TestDemo.doc'

 uvhd - binary file investigation & display in vertical hexadecimal
 uvcp - file copy with record selection & reformatting
 uvsort - file sort utility with record selection & much more
 uvlist - list text files, inserting laser printer control codes
 uvcopy - the most powerful Vancouver Utility (data manipulation, etc)
 uvqrpg - Quick Report Generator

table1 - pre-programmed table analysis of any field by any argument cobmap1 - pre-programmed job to create record layouts from COBOL copybooks

D-ISAM
  • test uvcp/uvsort processing Indexed Sequential Fixed length records
  • compatible with Micro Focus COBOL IDXFORMAT1 files

scan1d - scan all files in a directory for matches to qualified patterns rep2 - copy files replacing patterns, qualified by other patterns prodfix1 - uvcopy equivalent of the rep2 pre-programmed job above

testint2
  • test conversion of decimal to integer & back (32/64 bit tests)
  • Be sure to run this test if you have compiled with the 64 bit option.
  • see page 'E1' or even better at TestDemo.htm#Q1
testIDXL
  • test uxcp processing Indexed Sequential Variable length records
  • compatible with Micro Focus COBOL IDXFORMAT3 files
tabfix1
  • converting tabs to blanks
 More pre-programmed jobs for various useful file conversions
          - UPPER/lower case, EBCDIC/ASCII, etc

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

I1. Documentation Overview

The following are some of the documentation files are included on the distribution media in subdirectory 'doc'.

install.doc
  • installation guide for UNIX systems
WindowsSFU.doc
  • installation for Windows with SFU (Services For Unix)
WindowsDOS.doc
  • installation & demonstration for Windows/DOS versions
  • see spearate install guides for these versions of VU
TestDemo.doc
  • Testing & Demonstrating the Vancouver Utilties
  • a great way to get started using these utilities
  • see summary on the previous page
uvtrain.doc
  • training guide for the Vancouver Utilities
uvlist.doc
  • documentation listing utility
uvhd.doc
  • hexdump utility for any file
uvcp.doc
  • a mini-version of uvcopy that allows all parameters
    on the command line (replaces mainframe DATA utility)
uvsort.doc
  • parameter driven sort for UNIX systems
    compatible with the uvcp utility (replaces SORT & SORT3)
uvqrpg.doc
  • report generator
uvcopy_.doc
  • documentation for the uvcopy program
    (uvcopy1.doc, uvcopy2.doc, etc thru uvcopy5.doc)
  • uvcopy is a powerful data manipulation program
    that is the basis for many applications in the pkg
MVSJCL.doc
  • Converting MVS JCL to Korn shell scripts for Unix/Linux
MVSCOBOL.doc
  • Converting MVS mainframe COBOL to Micro Focus on Unix/Linux
MVSDATA.doc
  • Converting MVS EBCDIC DATA files to ASCII for Unix/Linux
  • preserving packed fields & correcting zoned signs
VSEJCL.doc
  • Converting VSE JCL to Korn shell scripts for Unix/Linux
VSECOBOL.doc
  • Converting VSE mainframe COBOL to Micro Focus on Unix/Linux
VSEDATA.doc
  • Converting VSE EBCDIC DATA files to ASCII for Unix/Linux
  • preserving packed fields & correcting zoned signs
DATAcnv1.doc
  • Converting EBCDIC to ASCII with or without copybooks
  • convert mainframe data files to '|' delimited text files
    for loading databases (SQL Server or Oracle)
COBaids.doc
  • COBOL programming aids, such as 'cobmap' which generates
    record layouts from COBOL copybooks
UVjobs.doc
  • Pre-Programmed jobs for the uvcopy interpreter
    TABLEjobs, HTMLjobs,
    SCANjobs, REPjobs, INSERTjobs, LABELjobs,
    LISTjobs, COPYjobs, FIXjobs, DROPjobs, UVjobs1, UVjobs2,
    REFORMjobs, CMPjobs,
    COBaids, COBscans, ADMjobs, AIDjobs,
    VTOCjobs, XREFjobs, TAPEjobs,

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

I2. Documentation in HTML available on distribution CD & on web site

Vancouver Utilities Documentation on the WEB site


 http://www.uvsoftware.ca     <-- UV doc on the web site
 ========================

Documentation Also on Distribution CD for install

The Vancouver Utilities distribution CD now contains subdir 'dochtml'. If you install as directed in install.doc, you can point your web browser to the dochtml subdir as follows: (replace 'httpd://' with 'file:/') Also see dochtml/uvhtml.zip which contains all the HTML documentation files.


 file:/home/uvadm/dochtml
 ========================

Vancouver Utilities Doc HTML Home-Page

    summary - Description of the Vancouver Utilties
    uvintro - Detailed Description, Customer References,
            - Price List
    Mainframe Conversion Library
      - MVSJCL,VSEJCL,MVSCOBOL,VSECOBOL,MVSDATA,VSEDATA,DATAcnv1
    Vancouver Utility Program User Guides
      - uvhd,uvlist,uvsort,uvcopy,uvcp,uvqrpg,uvhdcob
    uvhd documentation - file investigation utility
    uvhd program (free download) - free sample of Vancouver Utilities
    Installation  - Vancouver Utilities Installation Guide
    Install & Demonstrate - Windows/DOS Vancouver Utilties
    Testing & Demonstrating - Unix/Linux Vancouver Utilties
    uvtrain       - Training Guide: uvhd, uvlist, uvcp, uvsort, uvcopy
    Photo Gallery - Vancouver Map and City, Owen Townsend, etc
    Pre-Programmed jobs (for the uvcopy interpreter)
      - HTMLjobs, TABLEjobs, SCANjobs, REPjobs, COBOLaids
    Unix & Linux shell scripts - 200+ scripts for conversions and everyday use
    UVprofile - UV Software, Company Profile and Products
    uvprices  - price lists and license agreements

Over 99.8% of the HTML you see here on the UV Software web site was generated automatically. Only a few small files such as index.htm were coded manually. The voluminous documentation (99.8%) continues to be maintained via the UNIX 'vi' editor. When website updates are made (monthly or whatever) the 99.8% is reconverted & merged with the few small hand coded files. The result is 'tar'd, compressed,& FTP'd to the webserver.

This may be of interest to other sites with legacy documentation. If your legacy documentation has a clear set of rules for page headings & section/chapter references, then you (or UV Software) could write a uvcopy job to automatically convert your legacy documentation to HTML.

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

I3. Printing any 1 section of Documentation

Customers receive 1 pre-printed (duplex) copy of the documentation mounted in a standard 3 ring 8 1/2 x 11 binder with tabs for each section. The documentation is also on the distribution media & you may print additional copies as follows:

Assuming you are in /home/uvadm, using recommended profiles (see install.doc pages G0-G3), have set UVLPDEST to a PCL5 compatible Duplex laser printer and have loaded the laser printer with 3 hole punched 20 pound copy paper.


 export UVLPDEST=-dlaserxx  <-- specify your laser printer
 =========================    - if not set in your profile

 uvlp12D doc/install.doc    <-- use uvlp12D to print any 1 document (Duplex)
 =======================      - see script listed on the next page

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

I4. Printing any 1 section of Documentation

script uvlp12D - print Duplex at 12 cpi

 #!/bin/ksh
 # uvlp12D - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
 # uvlp12D - print a file at 12 cpi (90 chars on 8 1/2 x 11)
 #         - DUPLEX mode (new option April 98)
 #         - pg hdngs with: filename, mod-date, today-date, page#s
 #         - for HP laserjet 4 printers & compatibles
 #
 #usage: uvlp12D filename [group1] [group2]  <-- may override default options
 #       ==================================
 #
 # - 1 of several: uvlp12,uvlp14,uvlp16,uvlp12L,uvlp14L,uvlp12D,uvlp14LD,etc
 # - these scripts invokes uvlist & pipe to the spooler
 # - see uvlist.doc for many group1(file) & group2(laser printer) options
 # - these scripts convert group2 options into HP PCL5 escape sequences
 # - scriptnames reflect commonly used uvlist options, for example:
 #   group1:  p60  = 60 lines per page
 #            b50e60 = Begin print at page 50 & End print at page 60
 #   group2:  d1   = duplex mode
 #            c12  = 12 cpi = 90 chars across on 8 1/2 " paper
 #            m280 = default margin offset by 280/720 inch (for 3 hole punches)
 #
 # .profile should specify environmental variables for 'lp', for example:
 # export UVLPDEST="-dlp0"       #<-- destination 'lp0' ("-dLPT1" for SFU)
 # export UVLPDEST=""            #<-- null to use lpadmin default
 # export UVLPOPTN="-onobanner"  #<-- 'nobanner' option for lp
 # export UVLPOPTN=""            #<-- null disable for Windows SFU
 #
 if [ -f "$1" ]; then :
    else echo "ERROR - $1 is not a file"; exit 1; fi
 uvlist $1 p60$2 a2d1c12n-240$3 | lp $UVLPOPTN $UVLPDEST
 #======================================================
 uvln=$(basename $0)
 linesf=$(wc -l $1); lines=${linesf% *}
 echo "$uvln printing $1 on $UVLPDEST, lines=$lines"
 exit 0

See uvlist.htm for complete details on the Laser printer options and the various scripts available.

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

J1. Installation Guide for Vancouver Utilities

Preparations for new version of VU

This section is mostly for the benefit of UV Software personnel. This is a list of things to do in preparation for shipping the Vancouver Utilities package to a new customer or sending an update to an existing customer.

The Vancouver Utilities (programs, scripts, documentation) is continuously being enhanced. When we get a new order, we try to complete the current round of updates, especially any resulting from test conversions of the new customer's JCL.

A. update versions.doc

Update versions.htm with brief descriptions of recent updates. This allows existing customers to see what has changed since their last update.


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

 #2. vi doc/versions.doc   <-- update summary of recent changes
     ===================

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

J2. Preparations for new version of VU

B. update common page 1 - if contents changed

Run 'repage1' if the common (documentation overview) contents page has changed. The first page of most documents is a list of all documents in the package to show how the current document relates to other documents.

Updating this common page 1 used to be a laborious manual editing job. As of April 2008, we use uvcopy job 'repage1' to automatically update all documents with the common page 1 (about 60 of 100). See repage1 details at uvcopy7.htm.


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

 #2. mkdir new  <-- make temp subdir for new page1
     =========

 #3. head -58 doc/MVSJCL.doc >new/page1
     ===================================
     - extract page 1 from an existing document for update

 #4. vi new/page1    <-- update common page 1 as required
     ============

 #4a. mv doc doc.old  <-- change name of existing doc subdir
      ==============

 #4b. mkdir doc       <-- make new doc subdir
      =========

 #5. uvcopy repage1,fild1=doc.old,fild2=doc,fili3=new/page1
     ======================================================
      - copy all from doc.old to new doc/... replacing page 1's

 #5a. uvcopy repage1  <-- same as above, files default as shown above
      ==============

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

J3. Preparations for new version of VU

C. update mvstest & vsetest

UV Software tests MVS & VSE conversions using login/homedirs /home/mvstest & /home/vsetest. Before a new version of /home/uvadm is sent to new customers, /home/mvstest & /home/vsetest are copied to /home/uvadm/mvstest & /home/uvadm/vsetest, to ensure the customer gets the latest version of the test/demo libraries & data.

The mvstest & vsetest JCL, COBOL,& DATA files are a vital part of the 'test/demo's documented in part 1 of MVSJCL.htm & VSEJCL.htm.

After copying mvstest & vsetest to /home/uvadm, the Op. Instrns. below will clear our conversion results to allow the new customer to run the test/demos & see if he gets the same results as listed in part 1 of MVSJCL.htm & VSEJCL.htm

Before giving the Operating Instructions, we will illustrate the directories:

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

J4. Preparations for new version of VU

homedirs: mvstest, vsetest,& uvadm

 /home
 :-----mvstest            mvstest to be copied to /home/uvadm/mvstest ----->
 :     :-----cmpdata
 :     :-----cnvdata
 :     :-----testdata
 :     :     :-----ar
 :     :     :-----gl
 :     :     :--etc--          <-- several subdirs omitted
 :     :     :-----wrk
 :     :-----testlibs          <-- see all subdirs at MVSJCL.htm#1A1
 :     :     :-----cbl0
 :     :     :-----cbl1
 :     :     :-----cbl2
 :     :     :-----cbls
 :     :     :-----jcl0
 :     :     :-----jcl1
 :     :     :-----jcl2
 :     :     :-----jcl3
 :     :     :-----jcls
 :     :     :--etc--
 :     :     :-----xref
 :     :-----tmp
 /home
 :-----vsetest            vsetest to be copied to /home/uvadm/vsetest ----->
 :     :-----cmpdata
 :     :-----cnvdata           <-- vsetest contents same as mvstest
 :     :-----testdata
 :     :-----testlibs          <-- see all subdirs at VSEJCL.htm#1A1
 /home
 :-----uvadm              Vancouver Utilities homedir
 :     :-----bin               <-- see all subdirs at install.htm#A2
 :     :-----doc
 :     :-------etc--           <-- several uvadm subdirs omitted
 :     :-----lib
 :     :-----mvstest        <----- /home/uvadm/mvstest copied from /home/mvstest
 :     :     :-----cmpdata
 :     :     :-----cnvdata
 :     :     :-----testdata
 :     :     :-------etc--     <-- contents same as for /home/mvstest
 :     :     :-----testlibs
 :     :-----pf
 :     :-----sf
 :     :-----sfun
 :     :-------etc--
 :     :-----src
 :     :-----vsetest        <----- /home/uvadm/vsetest copied from /home/vsetest
 :     :     :-----cmpdata
 :     :     :-----cnvdata
 :     :     :-----testdata
 :     :     :-------etc--     <-- contents same as for /home/mvstest
 :     :     :-----testlibs

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

J5. Preparations for new version of VU

D. Clean-up /home/mvstest & /home/vsetest

  1. Login as mvstest --> /home/mvstest

  2. Clean up temporary & output results from recent tests


 2a. testdatainit  <-- clear tmp/* wrk/* jobtmp/* joblog/* rpts/* etc
     ============
  1. clear any extra GDG generation files created by recent testing


 #3a. cdd (alias for cd $HOME/testdata) --> /home/mvstest/testdata

 #3b. l gl          <-- list gl/... test data files
      ====
      -rw-rw-r-- mvstest apps 3394 Jun 18  2007 account.acntlist_000001
      -rw-rw-r-- mvstest apps 3394 Jun 18  2007 account.acntlist_000002
      -rw-rw-r-- mvstest apps 3394 Jun 18  2007 account.acntlist_000003
      -rw-rw-r-- mvstest apps 8720 Jun 10  2007 account.master_000001
      -rw-rw-r-- mvstest apps 8720 Jun 10  2007 account.master_000002
      -rw-rw-r-- mvstest apps 8720 Jun 10  2007 account.master_000003
      -rw-rw-r-- mvstest apps 1600 Jun 10  2007 account.tran1
      -rw-rw-r-- mvstest apps 1600 Jun 10  2007 account.trans_000001
      -rw-rw-r-- mvstest apps 1600 Jun 10  2007 account.trans_000002
      -rw-rw-r-- mvstest apps 1600 Jun 10  2007 account.trans_000003
      -rw-rw-r-- mvstest apps 1600 Jul 29  2007 account.trans_000004
      -rw-rw-r-- mvstest apps 1600 Jul 29  2007 account.trans_000005
      -rw-rw-r-- mvstest apps 1600 Oct 21 15:16 acnt.trans_000001
      -rw-rw-r-- mvstest apps 1600 Oct 21 15:17 acnt.trans_000002
      -rw-rw-r-- mvstest apps 1600 Oct 21 15:17 acnt.trans_000003

 #3c. Remove any generation files beyond those shown above

 #4. Repeat above for 'vsetest'

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

J6. Preparations for new version of VU

E. Refresh /home/uvadm/mvstest & /home/uvadm/vsetest

 We will copy the latest test/demo files from /home/mvstest/* & /home/vsetest/*
 to /home/uvadm/mvstest/... & /home/uvadm/vsetest/...
  1. Login as uvadm --> /home/uvadm


 #2a. rm -rf mvstest/*    <-- clear all subdirs in /home/uvadm/mvstest
      ================

 #2b. cp -r /home/mvstest/* mvstest  <-- refresh with latest test/demo files
      =============================

 #3a. rm -rf vsetest/*    <-- clear all subdirs in /home/uvadm/vsetest
      ================

 #3b. cp -r /home/vsetest/* vsetest  <-- refresh with latest test/demo files
      =============================

Clear UV Software conversion results

We will clear the JCL & COBOL conversion output subdirs, so the user can recreate as per part 1 of MVSJCL.doc & VSEJCL.doc.

  1. we are still logged in as uvadm --> /home/uvadm


 #2a. cd mvstest/testlibs  <-- change to /home/uvadm/mvstest/testlibs
      ===================

 #2b. mvstestlibsinit      <-- script to clear MVS JCL/COBOL conversions
      ===============

 #3a. cd vsetest/testlibs  <-- change to /home/uvadm/vsetest/testlibs
      ===================

 #3b. vsetestlibsinit      <-- script to clear VSE JCL/COBOL conversions
      ===============

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

J7. Preparations for new version of VU

F. sort all files & subdirs in uvadm

Note that the 'ls' command sorts before displaying, so files appear to be in alpha sequence. Most other unix commands do not sort. It is a lot nicer when the results of commands (such as find) appear in alpha sequence.

So, every few months, we sort all files & subdirs in /home/uvadm/... using script 'sortcpio' (see /home/uvadm/sf/adm/sortcpio). We will use root to rename uvadm as uvadm.old & make new uvadm for sorted files.


 #1. Login as root
     =============

 #2. cd /home

 #3a. mv uvadm uvadm.old      <-- change name of existing uvadm
 #3b. mkdir uvadm             <-- make new uvadm to receive sorted files
 #3c. chown uvadm:apps uvadm  <-- restore owner & group
 #3d. chmod 775 uvadm         <-- restore permissions

 #4a. cp -p uvadm.old/.bash_profile uvadm   <-- restore profile
      ===================================
 #4b. cp -pr uvadm.old/env uvadm            <-- restore 'env' subdir
      ==========================
      - 'env' subdir contains the common_profile called by .bash_profile

 #34. /home/uvadm/sf/adm/newuvadm  <-- easy alternative to #3a-#4b above
      ===========================

 #5a. mkdir /home/tmp         <-- sortcpio requires /home/tmp/ subdir
 #5b. chmod 777 tmp           <-- set permissions
 #5c. rm -f /home/tmp/*       <-- OR remove files if already present

 #6. Login as uvadm

 #7. cd /home

 #8x. sortcpio uvadm.old uvadm  <-- will NOT work, since PATH set for uvadm
      ========================    - use command below to call from uvadm.old

 #8. uvadm.old/sf/adm/sortcpio  uvadm.old  uvadm
     ===========================================
     - sortcpio sorts all files & subdirs from uvadm.old to uvadm

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

K1. Installation Guide for Vancouver Utilities

printing Vancouver Utility manuals

Here are the procedures that UV Software follows to update files & print the documentation for new customers or update requests. The documentation is organized in three 3-ring 2-inch binders with clear covers to insert volume titles & UV Software identification.

Volume 1
  • Installation, administration, test/demos, etc
Volume 2
  • Program reference manuals
  • uvlist, uvhd, uvcp, uvsort, uvcopy, uvqrpg, etc
Volume 3
  • Mainframe conversion manuals
  • MVSJCL, MVSCOBOL, MVSDATA, DATAcnv1, CNVaids,
  • OR VSEJCL, VSECOBOL, VSEDATA, DATAcnv1, CNVaids,

1. update 'Dates' in cover & spine files

The files to print covers & spines are stored in /home/uvadm/doc/... (coverV1,coverV2,coverV3MVS,coverV3VSE,spineV1,spineV2,spineV3MVS,spineV3VSE).

These files contain 'MONTH & YEAR' to be updated for each new customer.

Here are a few lines from 'doc/coverV1'. The '!codes' are PCL5 laser printer pseudo codes that will be converted to 'escape' codes by the 'escape2' job used to print the covers & spines. The PCL5 sequences are coded with '!'s because the true 'escape's would make the files difficult to edit.

 !E!&l01X!&l40C!&k2G!(s1P!(s60V!(s3B!(s0S!(s4101T  <-- PCL5 laser codes
   Vancouver Utilities Volume 1
    Installation Guide !&l28C!(s32V
    versions UVprices April 2008        <-- Month & Year to be updated
    Owen Townsend, UV Software...etc...

 #1a. vi doc/coverV*    <-- update Month & Year in all covers
      ==============

 #1b. vi doc/spineV*    <-- update Month & Year in all spines
      ==============

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

K2. printing Vancouver Utility manuals

2. Print Covers & Spines

The following assumes we are logged in as uvadm in homedir /home/uvadm/... & environmental variable 'UVLPDEST' in our profile has been set to a laser printer (for example 'export UVLPDEST=-dlaserxxx').

We will use uvcopy job 'escape2' (/home/uvadm/pf/adm/escape2) to print the cover & spine files (updated above). 'escape2' converts the '!' codes to true escapes required for the PCL5 codes used to set FONT sizes as desired.


 #2. Load the laser printer with light blue 67 pound stock. See the UV Software
     web site background color for the light blue shade.

 #2a. uvcopy escape2,fili1=doc/coverV1
      ================================

 #2b. uvcopy escape2,fili1=doc/coverV2
      ================================

 #2c. uvcopy escape2,fili1=doc/coverV3MVS  - OR coverV3VSE
      ===================================

 #2d. uvcopy escape2,fili1=doc/spineV1
      ================================

 #2e. uvcopy escape2,fili1=doc/spineV2
      ================================

 #2f. uvcopy escape2,fili1=doc/spineV3MVS  - OR spineV3VSE
      ===================================

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

K3. printing Vancouver Utility manuals

3. Print Tabs for Dividers

We use Avery 'Big Tab' Dividers (product# 11121) to separate & identify our documentation sections. These have 5 tabs per set & include white stock 8 1/2 x 11 with perforations for laser printing the Big Tab Inserts.

The files of tab descriptions are stored in /home/uvadm/doc/... (UVtabs1, UVtabs2, UVtabsV3). These are similar to the cover & spine files with PCL5 codes to position printing & set FONT sizes.


 #3. Load laser printer with Big Tab Insert pages.

 #3a. uvcopy escape2,fili1=doc/UVtabsV1
      =================================

 #3b. uvcopy escape2,fili1=doc/UVtabsV2
      =================================

 #3c. uvcopy escape2,fili1=doc/UVtabsV3
      =================================

There are 18 tabs on each sheet of tab insert blanks. The files contain some extra tabs (both MVS & VSE titles in doc/UVtabsV3), but the tabs we will use are:

Volume 1
  • Install ADMjobs TestDemo scripts1 UVjobs1
  • XREFjobs TABLEjobs CMPjobs versions UVprices
Volume 2
  • uvlist uvhd uvhdcob uvsort uvcp
  • uvcopy1 uvcopy2 uvcopy3 uvcopy4 uvcopy5
  • uvcopy6 uvcopy7 uvqrpg LISTjobs UVoverlay
Volume 3
  • CNVaids MVSJCL MVSCOBOL MVSDATA DATAcnv1
  • CNVaids VSEJCL VSECOBOL VSEDATA DATAcnv1 <-- OR if VSE

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

K4. printing Vancouver Utility manuals

Op. Instrns. to print 3 volumes of documentation


 UVdoc?? page-options laser-options  <-- print doc script format
 ==================================

 UVdoc?? p60 [c12d1m300n-240]  <-- option defaults (2 groups: format & laser)
 ============================    - must specify 'p60', may default laser options
         p60                 - specifies the lines per page
              c12            - 12 characters per inch
                 d1          - duplex option (append to m300)
                   m300      - offsets the left margin 300/720 inch (decipts)
                               to the right for 3 hole punching
                       n-240 - backside margin offset (right 200 decipts)

 #4a. UVdocV1 p60          <-- Volume 1 (Installation,ADMjobs,TestDemo,etc)
      ===========

 #4a. UVdocV2 p60          <-- Volume 2 (program references)
      ===========            - uvlist,uvhd,uvcp,uvsort,uvcopy1-7,uvqrpg

 #4a. UVdocMVS p60         <-- 'MVS' Conversions
      ============           - CNVaids,MVSJCL,MVSCOBOL,MVSDATA,DATAcnv1
      - - - OR for VSE - - -

 #4a. UVdocVSE p60         <-- 'VSE' Conversions
      ============           - CNVaids,VSEJCL,VSECOBOL,VSEDATA,DATAcnv1
Note
  • use laser printer option 'd0' if your printer does not have Duplex

 UVdocV1 p60 d0    <-- print Volume 1 Simplex (Duplex option off)
 ==============      - ONLY if you do NOT have a DUPLEX printer

script to print any 1 document


 uvlp12D doc/install.doc
 =======================
 example: print this install.htm Duplex 12cpi

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

K5. printing Vancouver Utility manuals

scripts to print 3 volumes of documentation

 #!/bin/ksh
 # UVdocV1 - Korn shell script from UVSI stored in: /home/uvadm/sf/adm/
 # UVdocV1 - print volume 1 for the Vancouver Utilities
 #         - install guide, TestDemo, scripts, XREFjobs, versions, etc
 #         - by Owen Townsend - UV Software Inc.
 #
 #usage: UVdocV1 format-options [HP compatible printer options]
 #ex:    UVdocV1 p60      <-- recommended options (must enter at least 1 arg)
 #       ===========
 # - must enter at least 1 arg (see uvlist.doc for option details)
 # - defaults shown below, over-ride if desired
 #
 echo "UVdocV1 - print volume #1 doc for the Vancouver Utilities"
 echo "        - Install, ADMjobs, TestDemo, scripts1, UVjobs1"
 echo "        - XREFjobs, TABLEjobs, CMPjobs, versions, UVprices"
 echo "export UVLPDEST=-dlaser?  <-- change default dest to laser printer"
 echo "                              (script uses UVLPDEST if defined)"
 echo "UVdocV1 page-format-options [laser-printer-options]"
 echo "                           <-- enter 'p60' if other defaults OK"
 echo "UVdocV1 p60 d1c12m300n-240 <-- default options"
 echo "        p60                   60 lines per page"
 echo "            d1                DUPLEX option (append d1 to arg#2)"
 echo "              c12             11 chars/inch & margins for 3 hole punch"
 echo "                 m300         front margin offset right 300/720 inch"
 echo "                     n-240    back margin offset right 240/720 inch"
 echo "                              (Duplex back margin sign reversed)"
 if [[ -z "$1" ]]
 then echo "UVdocV1 requires at least 1 arg (laser options will default)"
      echo "UVdocV1 p60          <-- enter 'p60' if other defaults OK"
      exit 99; fi
 #
 uvlp12D doc/install.doc    $1 $2
 uvlp12D doc/ADMjobs.doc    $1 $2
 uvlp12D doc/TestDemo.doc   $1 $2
 uvlp12D doc/versions.doc   $1 $2
 uvlp12D doc/uvprices.doc   $1 $2
 #
 uvlp12D doc/scripts1.doc   $1 $2
 uvlp12D doc/UVjobs1.doc    $1 $2
 uvlp12D doc/TABLEjobs.doc  $1 $2
 uvlp12D doc/CMPjobs.doc    $1 $2
 uvlp12D doc/SQLdemo.doc    $1 $2
 #
 exit 0

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

K6. printing Vancouver Utility manuals

scripts to print 3 volumes of documentation

 # UVdocV2 - print volume 2 for the Vancouver Utilities
 #         - Program References
 #
 #   - - - 25 lines omitted, similar to UVdocV1 on prior page - - -
 #
 uvlp12D doc/uvlist.doc     $1 $2
 uvlp12D doc/uvhd.doc       $1 $2
 uvlp12D doc/uvhdcob.doc    $1 $2
 uvlp12D doc/uvsort.doc     $1 $2
 uvlp12D doc/uvcp.doc       $1 $2
 #
 uvlp12D doc/uvcopy1.doc    $1 $2
 uvlp12D doc/uvcopy2.doc    $1 $2
 uvlp12D doc/uvcopy3.doc    $1 $2
 uvlp12D doc/uvcopy4.doc    $1 $2
 uvlp12D doc/uvcopy5.doc    $1 $2
 #
 uvlp12D doc/uvcopy6.doc    $1 $2
 uvlp12D doc/uvcopy7.doc    $1 $2
 uvlp12D doc/uvqrpg.doc     $1 $2
 uvlp12D doc/LISTjobs.doc   $1 $2
 uvlp12D doc/uvtrain.doc    $1 $2
 exit 0
 # UVdocMVS - print MVS Mainframe conversions for the Vancouver Utilities
 #          - volume 3 of Vancouver Utilities
 #   - - - 25 lines omitted, similar to UVdocV1 on prior page - - -
 #
 uvlp12D doc/CNVaids.doc    $1 $2
 uvlp12D doc/MVSJCL.doc     $1 $2
 uvlp12D doc/MVSCOBOL.doc   $1 $2
 uvlp12D doc/MVSDATA.doc    $1 $2
 uvlp12D doc/DATAcnv1.doc   $1 $2
 uvlp12D doc/EZTRVetc.doc   $1 $2
 exit 0

3rd volume alternative for VSE

 # UVdocVSE - print VSE Mainframe conversions for the Vancouver Utilities
 #   - - - 25 lines omitted, similar to UVdocV1 on prior page - - -
 #
 uvlp12D doc/CNVaids.doc    $1 $2
 uvlp12D doc/VSEJCL.doc     $1 $2
 uvlp12D doc/VSECOBOL.doc   $1 $2
 uvlp12D doc/VSEDATA.doc    $1 $2
 uvlp12D doc/DATAcnv1.doc   $1 $2
 uvlp12D doc/EZTRVetc.doc   $1 $2
 # uvlp12D doc/VSERPG.doc     $1 $2
 exit 0

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

L1. Installation Guide for Vancouver Utilities

Creating Vancouver Utility distribution CD

Here is the procedure I was using in 2007 on my HP Kayak workstation (RHEL 3.0). It did not have a CD writer so I FTP'd the tar/zip files to my windows PC before writing the CD. I may change this on my new HP xw9400 with RHEL 5.1.

uvadm - vital subdirs

 /home/uvadm
 :-----bin             <-- binaries (uvcopy,uvsort,etc) distros are RedHat Linux
 :-----doc               - Vancouver Utilities documentation (text)
 :-----env               - profiles for Unix/Linux, SFU, Cygwin,& Uwin
 :-----hdr               - hdr files for C compiles
 :-----lib               - libraries for C compiles (subfunctions,DISAM,etc)
 :-----mvstest         <-- test/demos for MVS JCL/COBOL mainframe conversions
 :-----pf              <-- Parameter Files for uvcopy & uvqrpg
 :-----sf              <-- Script Files
 :-----src             <-- Vancouver Utilities C source code
 :-----tf                - test files for various examples in doc
 :-----tmp               - tmp subdir (test/demo outputs)
 :-----vsetest         <-- test/demos for VSE JCL/COBOL mainframe conversions

The above are the most vital subdirs in the Vancouver Utilities (see page 'A2' for the complee list). Before customizing & creating the distribution CD, I copy the uvadm subdirs over to a backup subdir.

In /home2/uvbak/b1,b2,...b9 I maintain the last 9 daily backups (as well as on DAT tape). For customizing for a new customer I simply use the next available (oldest) backup subdir.

backup subdirs

 /home2/uvbak
 :-----b1            <-- backup dirs for uvadm/...
 :-----b2
 :-----b3
  --etc--
 :-----b9            <-- for example, we will use b9 for customizing
 :-----uvadm.tar       - create tar file for FTP to windows & write to CD
 :-----uvadm.zip       - also create zip file for FTP to windows & write to CD
Note
  • to allow us to copy files from uvadm/... to uvbak/b9/...
  • our profiles have umask 002 (permissions 775 on dirs & 664 on files)
  • uvadm & uvbak must also be in the same group ('apps' suggested)

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

L2. Creating Vancouver Utility distribution CD

customizing prior to writing VU CD


 #1. Login as uvadm --> /home/uvadm

 #2. clear the oldest backup subdir (using b9 for example)

 #2a. rm -rf /home2/uvbak/b9/*    <-- clear all old subdirs & files
      ========================
 #2b. rm -rf /home2/uvbak/b9/.*   <-- clear old .profile etc
      ========================

 #3. cp -r * /home2/uvbak/b9      <-- copy all /home/uvadm/* to b9
     =======================

 #4. cd /home2/uvbak/b9           <-- change over to backup subdir
     ==================

 #5. update license & registration site & name in selected programs
     (such as uvcopy & uvsort). Relevant lines are as follows:
      sncopy(Y.version,"20090909",8,3);
      sncopy(Y.license,"090909_00V_930630",19,3);
      sncopy(Y.sitename,"UV Software",30,3);
      sncopy(Y.regname,"Owen Townsend",30,3);

We will update the version/license,& change sitename/regname to the new customer info.


 #5a. vi src/uvcopy.c     <-- update version,license,site,name in uvcopy
      ===============
 #5b. vi src/uvsort.c     <-- same for uvsort, etc
      ===============

 #6. Recompile to ensure we did not create any errors in our updates

 #6a. ccuvall LNX H32 uvlib32.a disamLNX32.a
      ======================================
      - for any Linux 32 machine with 32 bit longs & pointers

 #6b. ccuvall LNX H64 uvlib64.a disamLNX64.a
      ======================================
      - for my AMD Opteron 64 bit HP xw9400 at UV Software

 #7. Create tar & zip files in /home2/uvbak/... in the uvbak homedir
     above our current working dir /home2/uvbak/b9/...

 #7a. tar cvf ../uvadm.tar .
      ======================

 #7b. zip -r ../uvadm.zip .
      =====================

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

L3. Creating Vancouver Utility distribution CD

Write VU to CD on Linux

  1. cd .. <-- change back up to /home2/uvbak


 9. mkisofs -o uvadm.iso uvadm.tar uvadm.zip
    ========================================
    - create an ISO9660 CD image containing uvadm.tar & uvadm.zip

10a. Login as root (must be root to run 'cdrecord')

10b. cd /home2/uvbak


 10c. cdrecord -v uvadm.iso    <-- write the ISO9660 image to CD
      =====================
      - the CD device is determined by CDR-DEVICE in /etc/cdrecord.conf
  1. Verify the write by reading back (into /home2/uvbak/b10)


 11a. mount -r -t iso9660 /dev/cdrom /mnt
      ===================================
      - mount the CD (to verify write OK)

 #12a. logoff root
 #12a. login uvadm --> /home/uvadm
 #12c. cd /home2/uvbak/b10     <-- change into b10 subdir to read CD
 #12d. rm -rf *                <-- clear all files from b10 subdir

 #13. tar xvf /mnt/uvadm.tar   <-- read back (with tar) to verify CD write OK
      ======================

 #13a. unzip /mnt/uvadm.zip    <-- OR read back with UNZIP to verify CD write OK
       ====================
 14a. Print a label for the CD. I use windows program 'Click N Design' and
      blank white labels for CD Stomper. The file for ClickNDesign is in
      /home/uvadm/tf/UnixLinux.cnd

 #14b. Apply the label using CD Stomper.

 #15a. Box up the Manuals (printed on page 'K4') & CD (written here)
 #15b. Prepare Waybill & Commercial Invoice.
 #15c. Ship the box via Fedex

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

L4. Creating Vancouver Utility distribution CD

alternate FTP & write CD on Windows


 #1. open a DOS command window for FTP

 #2. cd C:\UVftp          <-- change into subdir reserved for FTP
     ===========

 #3. ftp 192.168.0.4      <-- FTP to RHEL 5.1 on HP xw9400 workstation
     ===============
 #3a. enter userid/passwd (uvbak/...)
 #3b. binary               <-- ensure binary mode
 #3c. get uvadm.tar        <-- get the tar file
 #3d. get uvadm.zip        <-- get the zip file

 #4. write the files to CD, using Windows XP drag & drop

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

M1. Mass Changes to entire directories of scripts

rep1d - search/replace on all files

The Vancouver Utilities includes several pre-programmed jobs that allow you to make mass changes to entire directories of scripts, programs, etc. Better than 'sed' because they are easier to understand, provide qualifiers, and audit reports.

Our example is based on the 'uvlp' scripts (see uvlp12 listed on prior page). These scripts execute the 'uvlist' utility & pipe the output to the 'lp' print spooler. This worked on Unix/Linux, but did not work on SFU, UWIN, or CYGWIN. But I could simply redirect the output to '/dev/lp0' for UWIN & 'LPT1' for CYGWIN & SFU.

Since there were about 50 of these scripts, I used 'rep1d' (mass change job) to change all '| lp -onobanner $dest' to '/dev/lp0' or 'LPT1'.


 #1. rm -f tmp/*         <-- clear the tmp subdir (for rep1d output)

 #2. uvcopy rep1d,fild1=sf/util,fild2=tmp   <-- run rep1d mass change utility
     ====================================       (fild1=input,fild2=output)
     - rep1d prompts for options & search/replace/qualifiers as follows:
 uop=q1a1b99999c0d256e0p1 - option defaults
       a1                 - begin scan at line #1 (default) of input file
       a0                 - causes prompt for search pattern to BEGIN scan
         b99999           - end scan at line #99999 (dflt) of input file
         b0               - causes prompt for search pattern to END scan
               c0         - begin scan at col #1 (zero rel) of input lines
                 d256     - length of scan area default 256 bytes
                     e0   - do not erase any output files
                     e1   - erase output files with no replacements
                       p1 - 1 present qual(31-60) & 1 absence qual(61-80)
                       p2 - 2 present quals(31-60+61-80) & NO absent quals
 User OPtion (uop) defaults  = q1a1b99999c0d256e0p1
  null to accept or re-specify         -->                       <-- null OK
 did you create outdir/remove files ?  --> y                     <-- ENTER
 enter search pattern (max 64 bytes)   --> | lp -onobanner $dest <-- ENTER
 enter replacement pattern (max 64)    --> > /dev/lp0            <-- ENTER
 enter qualifier present (null disable)--> uvlist                <-- ENTER
 enter absent qualifier, or 2nd present-->                       <-- null
 enter match options: p,s,q1/q2/q3,n   -->                       <-- null
 rep1d:031223:183823: EOF fili01 19 rds, 0 wrts, 827 size; sf/util/allcancel
 rep1d:031223:183823: EOF filo02 0 rds, 19 wrts, 827 size; tmp/allcancel
                       ... many lines omitted ...
 rep1d:031223:183824: EOF fili01 32 rds, 0 wrts, 1426 size; sf/util/uvlp12 1 hits
 rep1d:031223:183824: EOF filo02 0 rds, 32 wrts, 1415 size; tmp/uvlp12 1 hits
 rep1d:031223:183824: EOF fild01 194 rds, 0 wrts, 4096 size; sf/util 47 hits
 display/edit/print/none ? (more/vi/lp/null)--> more   <-- display audit report

See the audit report on the next page --->

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

M2. Mass Changes to entire directories of scripts

rep1d - search/replace on all files

Here is a sample report from 'rep1d' the mass change utility, we ran on the previous page to change all occurrences of 'lp -onobanner' with '/dev/lp0' in the entire directory of /home/uvadm/sf/util while copying to subdir tmp.

rep1d - sample audit report

 Job: $jobname  InDir: sf/util  OutDir: tmp  Search: | lp -onobanner $dest
 Replacement: /dev/lp0  QualPresent: uvlist
 MatchOptions:   UserOptions: q1a1b99999c0d256e0p1
 ====================================================== 2003/12/23_18:38:23
 00026 uvlist $1 p60z2$2 a2t1c12$3 > /dev/lp0
 00031                   1 reps @EOF: tmp/uvlp12
 00029 uvlist $1 p41$2 a2t1o1m150j-200c16$3 > /dev/lp0
 00034                   1 reps @EOF: tmp/uvlp16L
          ............. many lines omitted ...............
 00036 uvlist tmp/wrtbig.$JOBID hp20$2 a2o3b3m-150j150c5v24$3 > /dev/lp0
 00042                   1 reps @EOF: tmp/wrtbig
 ====================================================== 2003/12/23_18:38:24
  EOD: 00047 reps in 0043 files of 0192 total (06476 lines)

Note that the audit report shows just the resulting lines where changes have been made. After inspecting the audit report & a few of the modified scripts in the 'tmp' output subdir, we will copy the tmp subdir contents back to the original input subdir sf/util.


 #3. vi rep1d.aud         <-- inspect audit report
     ============

 #4. vi tmp/uvlp12        <-- inspect some output files (optional)
     =============

 #5. cp -f tmp/* sf/util  <-- copy rep1d output back to input
     ===================

See REPjobs.htm for other mass change jobs, such as 'rep2d' which uses a table of search/replace patterns. This provides an unlimited number of search/replacements vs the 1 search/replace of 'rep1d'.

See uvtrain.htm#5B1 for operating instructions to change all uvlp scripts for A4 size 8 x 12 paper (vs letter size 8 1/2 x 11).

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

N1. Compiling Subfunctions & Archiving

The procedures on this page are not required if you successfully ran the 'ccuvall' script (see page 'C1') which compiles & archives all subfunctions, and then compiles most programs (linking with subfunctions).

These instructions to compile & archive individual subfunctions would only be needed if you had some problems with the ccuvall. If interested you can see the subfunction compile scripts (ccuvf & ccuvfa) in the 'sf' subdir.

compiling subfunctions & archiving to link with programs

Example: compile & archive the UVstring.c subroutine


 #1. cc -c -DLNX -DH64 srcf/UVstring.c <-- compile 1 subfunction (on Linux)
     =================================   - writes UVstring.o to current dir

 #2. ar -r lib/uvlib64.a UVstring.o    <-- archive to lib/uvlib64.a
     ==============================
            --- or ---

 #1. ccuvf UVstring LNX H64 uvlib64.a  <-- compile & archive any subfunctn
     ================================
        -- or much better --

 #1. rm lib/uvlib64.a           <-- remove existing archive before recompile
     ================

 #2. ccuvfa LNX H64 uvlib64.a   <-- compile & archive all subfunctions on Linux64
     ========================       from dir srcf to archive lib/uvlib64.a

 #2a. ccuvfa AIX H64 uvlib64.a -q64 <-- example for AIX 64 bit machine
      =============================

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

N2. scripts to COMPILE 'uv' Programs

The procedures on this page are not required if you successfully ran the 'ccuvall' script (see page 'C1') which compiles & archives all subfunctions, and then compiles most programs (linking with subfunctions).

Compiling Programs Individually (uvcopy example)

 cc -Ihdr src/uvcopy.c lib/uvlib32.a lib/disamLNX32.a -obin/uvcopy
    -DLNX -DH32 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 =================================================================
        --- OR easier, using script 'ccuv' ---

 ccuv uvcopy LNX H32 uvlib32.a disamLNX32.a  <-- see script 'ccuv' listed on 'L4'
 ==========================================

 ccuv uvcopy AIX H64 uvlib64.a disamAIX64.a -q64  <-- example for AIX 64 bit
 ===============================================
        --- choices for ccuv script above ---

 ccuv uvcopy INT/HP/SUN/AIX/LNX/SFU H32/H64 uvlib32/64.a disam___32/64.a [optns]
 =======================================================================
Note
  • '___' could be AIX,HP,LNX,SUN,etc
  • options could be '-g' for debugging, '-Ae' for HP ANSI C compiler,
    '-m32' compile 32 bit mode on 64 bit machine
    '-q32' or '-q64' compile 32/64 bit mode on AIX

compile for debugging


 ccuv uvcopy LNX H64 uvlib64.a disamLNX64.a -g   <-- arg6 '-g' for debugging
 =============================================
        --- OR easier (if Linux) ---

 ccdebugLNX64 uvcopy    <-- script similar to above with hard-coded options
 ===================        for debugging on Linux 64 bit

Compiling 'ux' programs for Variable Length Indexed files

See instructions on page 'C4' for script 'ccuvcob' (listed on page 'L5')


 ccuvcob uxcopy SUN H64 uvlib64.a disamSUN64.a  <-- example for uxcopy
 =============================================      (or uxcp,uxsort,uxqrpg)

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

N3. scripts to Compile ALL 'uv' Programs

 #!/bin/ksh
 # ccuvall - Korn shell script from UVSI stored in: /home/uvadm/sf/adm/
 # ccuvall  - script to compile all Vancouver Utility programs
 #          - by Owen Townsend, UV Software, Mar1993 - Jan2009
 #          - see more details in the 'ccuv' script called by this ccuvall
 # June2008 - see 'ccjclall' to compile the JCL conversion utilities
 #          - separate since JCL converters only in class A pkg (not class B)
 #
 echo "compile all Vancouver Utility programs"
 os="$1"; hw="$2"; uvlib="$3"; disam="$4"; opts="$5";  # capture args
 if [[ $# -gt 3 ]]; then :
 else
  echo "usage: ccuvall OStype H32/H64 uvlib32/64.a disam___32/64.a [options]"
  echo "       ============================================================"
  echo "       ccuvall LNX H32 uvlib32.a disamLNX32.a       # Linux 32 bit"
  echo "       ccuvall LNX H64 uvlib64.a disamLNX64.a       # Linux 64 bit"
  echo "       ccuvall AIX H64 uvlib64.a disamAIX64.a -q64  # AIX 64 bit"
  echo "       ccuvall SUN H64 uvlib64.a disamSUN64.a       # SUN "
  echo "       ccuvall HP  H64 uvlib64.a disamHP64.a  -Ae   # -Ae ANSI C reqd"
  echo "arg1 must be LNX,AIX,HP,SUN,etc"
  echo "arg2 must be H32 or H64 for longs & pointers 32 bits or 64 bits"
  echo "    (programs use software long long for 64 bit integer acums)"
  echo "arg3 must be subfunctions archive lib/uvlib32/64.a"
  echo "arg4 must be D-ISAM archive lib/disam___32/64.a (___=LNX,AIX,SUN,HP)"
  echo "arg5 options: -q64 AIX 64bit, -Ae HP ANSI, -g debug, -m32 compile on 64"
  exit 91; fi;
 #
 rm  -f lib/$uvlib                          # remove old archive (for linker)
 ccuvfa        $os $hw $uvlib $opts         # compile all subfunctions & archive
 echo "subfunctions compiled, now compile Vancouver Utility programs"
 ccuv uvcopy    $os $hw $uvlib $disam $opts  # compile programs
 ccuv uvcp      $os $hw $uvlib $disam $opts
 ccuv uvhd      $os $hw $uvlib $disam $opts
 ccuv uvhdcob   $os $hw $uvlib $disam $opts
 ccuv uvlist    $os $hw $uvlib $disam $opts
 ccuv uvoverlay $os $hw $uvlib $disam $opts
 ccuv uvqrpg    $os $hw $uvlib $disam $opts
 ccuv uvsort    $os $hw $uvlib $disam $opts
 echo "Vancouver utility compiles completed on $(date)"
 echo "ls -l bin should show: uvcopy,uvcp,uvhd,uvhdcob,uvlist,uvqrpg,uvsort"
 echo " - use 'ccjclall' to compile: jclproc41/51,jclunix41/51,jclperl61"
 echo " - use 'ccuvcob' to compile: uxcopy,uxcp,uxqrpg,uxsort"
 echo " - see install.doc page C4 to compile ux.... (requires Micro Focus COBOL)"
 exit

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

N4. scripts to Compile each 'uv' Program

 #!/bin/ksh
 # ccjclall - Korn shell script from UVSI stored in: /home/uvadm/sf/adm/
 # ccjclall - script to compile Vancouver Utility JCL converters
 #          - separate script since converters only in class A pkg (not class B)
 #          - by Owen Townsend, UV Software, Mar1993 - Jan2009
 #
 echo "compile all Vancouver Utility JCL converters"
 os="$1"; hw="$2"; uvlib="$3"; disam="$4"; opts="$5";  # capture args
 if [[ $# -gt 3 ]]; then :
 else
  echo "usage: ccjclall OStype H32/H64 uvlib32/64.a disam___32/64.a [options]"
  echo "       ============================================================"
  echo "       ccjclall LNX H32 uvlib32.a disamLNX32.a       # Linux 32 bit"
  echo "       ccjclall LNX H64 uvlib64.a disamLNX64.a       # Linux 64 bit"
  echo "       ccjclall AIX H64 uvlib64.a disamAIX64.a -q64  # AIX 64 bit"
  echo "       ccjclall SUN H64 uvlib64.a disamSUN64.a       # SUN "
  echo "       ccjclall HP  H64 uvlib64.a disamHP64.a  -Ae   # -Ae ANSI C reqd"
  echo "- arg1 must be LNX,AIX,HP,SUN,etc"
  echo "- arg2 must be H32 or H64 for longs & pointers 32 bits or 64 bits"
  echo "      (programs use software long long for 64 bit integer acums)"
  echo "- arg3 must be subfunctions archive lib/uvlib32/64.a"
  echo "- arg4 must be D-ISAM archive lib/disam___32/64.a (___=LNX,AIX,SUN,HP)"
  echo "- arg5 options (-q64 AIX 64 bit, -Ae HP ANSI, -g debug, etc"
  exit 91; fi;
 #
 echo "subfunctions compiled, now compile Vancouver Utility programs"
 ccuv jclproc41 $os $hw $uvlib $disam $opts  # compile programs
 ccuv jclproc51 $os $hw $uvlib $disam $opts
 ccuv jclunix41 $os $hw $uvlib $disam $opts
 ccuv jclunix51 $os $hw $uvlib $disam $opts
 ccuv jclperl61 $os $hw $uvlib $disam $opts
 ccuv uvtime    $os $hw $uvlib $disam $opts
 echo "Vancouver JCL converter compiles completed on $(date)"
 echo "ls -l bin should show: jclproc41/51,jclunix41/51,jclperl61,uvtime"
 exit

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

N5. scripts to Compile each 'uv' Program

 #!/bin/ksh
 # ccuv - script to compile C prgm & link functions (/home/uvadm/sf/adm/ccuv)
 #     - by Owen Townsend - UV Software, Aug1992 - Jan2009
 #Jan2009 - L32/L64+P32/P64 back to H32/H64, uvlib32/64.a on cmd line
 #        - LF64 (Large File support always defined in programs
 # Must execute in /home/uvadm/... with following subdirs:
 #   src/...             - C source programs
 #   lib/uvlib32/64.a    - archive of subfunctions to be linked in
 #   lib/disam___32/64.a - archive library for D-ISAM (___=LNX,SUN,HP,AIX,etc)
 #   bin/...             - subdir to receive executable program
 # Specify options arg#6: -g debug, -Ae ANSI HP-UX, -q64 AIX 64bit, -m32 on 64
 #
 echo "----->compile C program, script ccuv $*"
 # set compiler - symbol UVCC if defined, else gcc if OS Windows*, else cc
 if [[ -n "$UVCC" ]]; then UVCC=$UVCC; else UVCC=cc; fi
 pgm="$1"; os="$2"; hw="$3"; uvlib="$4"; disam="$5"; opts="$6"  #capture args
 if [[ -f src/$pgm.c && $# -gt 4 ]]; then :
  else echo "ccuv program OStype H32/H64 uvlib32/64.a disam___32/64.a [options]"
  echo "     ================================================================="
  echo "     ccuv uvcopy LNX H32 uvlib32.a disamLNX32.a    #Linux 32 bit"
  echo "     ccuv uvcopy LNX H64 uvlib64.a disamLNX64.a    #Linux 64 bit"
  echo "     ccuv uvcopy AIX H64 uvlib64.a disamAIX64 -q64 # AIX"
  echo "     ccuv uvcopy HP  H64 uvlib64.a disamHP64  -Ae  # -Ae ANSI C req'd"
  echo "     ccuv uvcopy SUN H64 uvlib64.a disamSUN64      # SUN on 64 bit"
  echo "arg1 program to be compiled in subdir src/... (do not specify .c ext)"
  echo "arg2 must be LNX,AIX,HP,SUN,etc"
  echo "arg3 must be H32 or H64 for longs & pointers 32 bits or 64 bits"
  echo "     (H32 uses software long long for 64 bit integer acums)"
  echo "arg4 must be subfunctions archive lib/uvlib32/64.a"
  echo "arg5 must be D-ISAM archive lib/disam___32/64.a (___=LNX,AIX,SUN,HP)"
  echo "arg6 options: -q64 AIX 64bit, -Ae HP ANSI, -g debug, -m32 compile on 64"
  exit 91; fi;
 #
 if [[ "$os" = "HP" || "$os" = "SUN" || "$os" = "AIX" || "$os" = "DEC" ||\
       "$os" = "INT" || "$os" = "LNX" || "$os" = "SCO" ||\
       "$os" = "CWIN" || "$os" = "UWIN" || "$os" = "SFU" ]]; then :
 else echo "arg2 OS types: HP,SUN,AIX,DEC,INT,LNX,UWIN,CWIN,SFU"; exit 92; fi
 if [[ "$hw" = "H32" || "$hw" = "H64" ]]; then :
 else echo "arg3 must be H32/H64, 32/64 bits in C longs&pointers"; exit 93; fi
 # verify that arg4 is the subfunctions archive lib/uvlib32/64.a
 if [[ ! -f lib/$uvlib ]]; then
    echo "arg4 must be the subfunctions archive uvlib32/64.a"; exit 94; fi
 # verify that arg5 is the D-ISAM archive lib/disam___32/64.a
 if [[ ! -f lib/$disam ]]; then
    echo "arg5 must be the D-ISAM archive lib/disam___32/64.a"; exit 95; fi
 #
 # combine -Dsymbols to shorten command line
 syms="-D$os -D$hw"
 # setup Large File options (always as of Jan 2008)
 LFS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
 #
 $UVCC $opts $syms $LFS -Ihdr src/${pgm}.c lib/$uvlib lib/$disam -o bin/${pgm}
 #============================================================================
 exit 0

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

N6. Compile subfunctions to link with programs

 #!/bin/ksh
 # ccuvfa - Korn shell script from UVSI stored in: /home/uvadm/sf/adm/
 # ccuvfa - compile All C subfunctions in /home/uvadm/srcf/...
 #        & add to the archive (lib/uvlib32/64.a)
 #      - by Owen Townsend, UV Software, Aug1992 - Jan2009
 # May export alternative compiler: export UVCC=gcc (GNU), UVCC=xlc (AIX)
 # Must execute in /home/uvadm/... which includes following subdirs:
 #   srcf/...         - subdir of C subfunction source (.c extensions)
 #   lib/uvlib32/64.a - archive to receive objects (to link with main programs)
 # May specify options as arg #6 (-g debug, -Ae for ANSI HP-UX, -q64 AIX 64 bit)
 # Also see ccuvfa    - compiles & archives ALL subfunctions
 # Also see ccuvall   - compiles & links everything
 # set compiler from $UVCC if defined, else gcc if OS Windows*, else cc
 if [[ -n "$UVCC" ]]; then UVCC=$UVCC
 # elif [[ "$OS" == Windows* ]]; then UVCC=gcc
 else UVCC=cc; fi
 os="$1"; hw="$2"; uvlib="$3" opts="$4"
 if [[ $# -gt 2 ]]; then :
 else echo "ccuvfa OStype H32/H64 uvlib32/64.a [options]"
  echo "    =========================================="
  echo "    ccuvfa LNX H32 uvlib32.a      # Linux 32 bit"
  echo "    ccuvfa LNX H64 uvlib64.a      # Linux 64 bit"
  echo "    ccuvfa LNX H64 uvlib64.a -m32 # Linux 64 for ccuvcob"
  echo "    ccuvfa AIX H64 uvlib64.a -q64 # AIX 64 bit"
  echo "    ccuvfa HP  H64 uvlib64.a -Ae  # HP -Ae ANSI C compiler reqd"
  echo "    ccuvfa SUN H64 uvlib64.a      # SUN "
  echo "arg1 must be LNX,AIX,HP,SUN,etc"
  echo "arg2 must be H32 or H64 for longs & pointers 32 bits or 64 bits"
  echo "     (programs use software long long for 64 bit integer acums)"
  echo "arg3 must be subfunctions archive lib/uvlib32/64.a"
  echo "arg4 options: -q64 AIX 64bit, -Ae HP ANSI, -g debug, -m32 compile on 64"
  exit 91; fi;
 if [[ "$os" = "HP" || "$os" = "SUN" || "$os" = "AIX" || "$os" = "DEC" ||\
       "$os" = "INT" || "$os" = "LNX" || "$os" = "SCO" ||\
       "$os" = "CWIN" || "$os" = "UWIN" || "$os" = "SFU" ]]; then :
 else echo "OS types: HP,SUN,AIX,DEC,INT,LNX,UWIN,CWIN,SFU"; exit 92; fi
 if [[ "$hw" = "H32" || "$hw" = "H64" ]]; then :
 else echo "arg2 must be H32/H64, 32/64 bits in C longs&pointers"; exit 93; fi
 # if AIX 64 bit option (-q64), set 'ar' option -X64
 if [[ "$opts" == *-q64* ]]; then X64="-X64"; fi
 # setup Large File options (always as of Jan2008)
 LFS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
 x=0
 rm -f lib/$uvlib;  # remove old lib/uvlib__.a
 for i in srcf/*
 do
    f=${i##*/}
       $UVCC -D$os -D$hw $opts $LFS -c -Ihdr srcf/$f
    ar $X64 r lib/$uvlib ${f%.c}.o
    let x=x+1
 done
 rm -f *.o                # remove all objects from current directory
 echo "$x files compiled from srcf & archived to lib/$uvlib"
 echo "ar tv lib/$uvlib  - to display archive table of contents"
 exit

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

N7. scripts to COMPILE 'ux' Programs

 #!/bin/ksh
 # ccuvcob - Korn shell script from UVSI stored in: /home/uvadm/sf/adm/
 # ccuvcob - compile UV program with Micro Focus COBOL to use EXTFH
 #           for variable length Indexed files IDXFORMAT3 & IDXFORMAT8
 #         - by Owen Townsend, UV Software, Dec2002 - Jan2009
 # Jan2009 - Micro Focus compile tested with uvlib32.a & disam___32.a
 #           (specify option '-m32' to compile uvlib & disam on 64 bit machines)
 #         - will soon test 64 bit via cobmode=64 ? where to specify ?
 #
 pgm="$1"; os="$2"; hw="$3"; uvlib="$4"; disam="$5"; opts="$6"  #capture args
 if [[ -f src/$pgm.c && $# -gt 4 ]]; then :
  else
  echo "ccuvcob program OStype H32/H64 uvlib32/64.a disam___32/64.a [options]"
  echo "====================================================================="
  echo "ccuvcob uxcopy LNX H32 uvlib32.a disamLNX32.a      # LNX 32 bit"
  echo "ccuvcob uxcopy LNX H64 uvlib64.a disamLNX64.a      # LNX 64 bit"
  echo "ccuvcob uxcopy AIX H64 uvlib64.a disamAIX64.a -q64 # AIX 64 bit"
  echo "ccuvcob uxcopy HP  H64 uvlib64.a disamHP64.a  -Ae  # HP -Ae ANSI C"
  echo "ccuvcob uxcopy SUN H64 uvlib64.a disamSUN64.a      # SUN 64 bit"
  echo "- arg1 program to be compiled in subdir src/... (no .c ext)"
  echo "- arg2 must be LNX,AIX,HP,SUN,etc"
  echo "- arg3 must be H32 or H64 for longs & pointers 32 bits or 64 bits"
  echo "       (H32 uses software long long for 64 bit integer acums)"
  echo "- arg4 must be subfunctions archive lib/uvlib32/64.a"
  echo "- arg5 must be D-ISAM archive lib/disam___32/64.a (___=LNX,AIX,SUN,HP)"
  echo "- arg6 options: -q64 AIX 64, -Ae HP ANSI, -g debug, -m32 compile on 64"
  echo "-----> Must specify -m32 for Micro Focus COBOL compiler"
  echo "-----> Must have Micro Focus COBOL installed"
  exit 91; fi;
 if [[ "$os" = "HP" || "$os" = "SUN" || "$os" = "AIX" || "$os" = "DEC" ||\
       "$os" = "INT" || "$os" = "LNX" || "$os" = "SCO" ||\
       "$os" = "CWIN" || "$os" = "UWIN" || "$os" = "SFU" ]]; then :
 else echo "arg2 OS types: HP,SUN,AIX,DEC,INT,LNX,UWIN,CWIN,SFU"; exit 92; fi
 if [[ "$hw" = "H32" || "$hw" = "H64" ]]; then :
 else echo "arg3 must be H32/H64, 32/64 bits in C longs&pointers"; exit 93; fi
 # verify that arg4 is the subfunctions archive lib/uvlib32/64.a
 if [[ ! -f lib/$uvlib ]]; then
    echo "arg4 must be the subfunctions archive uvlib32/64.a"; exit 94; fi
 # verify that arg5 is the D-ISAM archive lib/disam___32/64.a
 if [[ ! -f lib/$disam ]]; then
    echo "arg5 must be the D-ISAM archive lib/disam___32/64.a"; exit 95; fi
 isam=${disam%.*}      # remove the .a to pass as a -Dvariable
 # establish COBOL options for Micro Focus COBOL compile
 export COBOPT=$UV/ctl/cobdirectives # Micro Focus COBOL directives (-C options)
 export EXTFH=$UV/ctl/extfh.cfg      # COBOL File Handler Configuration
 #
 cob -x $opts -N LITLINK\"2\" -CC -Ihdr -CC -I$COBDIR/include -CC -D$os \
 -CC -D$hw -CC -D$isam src/$pgm.c lib/$uvlib lib/$disam -o bin/$pgm
 #=======================================================================
 rm -f $pgm.o
 exit 0
 #

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

N8. scripts to COMPILE 'ux' Programs

 #!/bin/ksh
 # ccdisams - script to compile all DISAM subfunctions in a directory
 #            & add the objects to a library archive
 # by Owen Townsend, UV Software, 1993, update DISAM96 1998, DISAM06 1996
 # compile in disam06 superdir with subdirs: base, head, wrap, sf, lib
 # base - I copied all base functions into wrap (will compile all in wrap)
 # wrap - originally just 'std' functions, I added 'is' functions from base
 # head - disam06 headers - isconfig.h modified for UV Software
 #      - header files from base & wrap moved to head
 # sf   - my compile scripts (added to disam06 superdir by OT)
 # lib  - for the output archive (added to disam06 superdir by OT)
 #
 #usage:   sf/ccdisams sourcedir archive  [options]
 #example1:  sf/ccdisams wrap lib/disamLNX32.a
 #       2:  sf/ccdisams wrap lib/disamLNX64.a
 #       3:  sf/ccdisams wrap lib/disamHP32.a  -Ae
 #       4:  sf/ccdisams wrap lib/disamSUN64.a
 #       5:  sf/ccdisams wrap lib/disamAIX64.a -q64
 #
 # lib names reflect UNIX system (INT,HP,SUN,DEC,LNX,UWIN,CWIN)
 # See disam compile instrns for DWIN (lcc-win32) in windos.doc
 # - creates lib/disamDWIN.lib (vs .a for unix/linux/UWIN/CWIN)
 #
 # default to 'cc' but allow user to: export UVCC=gcc
 if [[ -z "$UVCC" ]]; then UVCC=cc; fi
 lib="$1"; disama="$2"; opts="$3";  # capture args in symbols
 echo "compiling all programs in $lib and archiving to $disama"
 if [[ ! -d "$lib" ]]; then
    echo "usage: ccdisams srcdir archive"
    echo "       ======================="
    echo "example: ccdisams wrap disamLNX64.a"
    echo "         =========================="
    echo " - arg1 must be a directory & arg2(output) must not exist"
    exit 1; fi
 if [[ -f "$disama" ]]; then
    echo "- arg2 output archive must not exist, remove before regen"
    exit 1; fi
 # set ar option -X64 if AIX 64 bit
 if [[ "$opts" == *-q64* ]]; then X64="-X64"; fi
 x=0
 # compile all subfunctions in directory & archive to library
 for i in $lib/*
 do
    f=${i##*/}                          # remove the directory
    b=${f%.c}                           # remove the .c to get basename
    if [[ "$f" = *.c ]]                 # if current file is C source
    then $UVCC $opts -c -Ihead  $lib/$f # compile current .c to object .o
    ar $X64 r $disama $b.o              # add .o to archive
    rm $b.o                             # remove .o
    let x=x+1
    fi
 done
 ar $X64 tv $disama          # display archive table of contents
 echo "$x files compiled from $lib & archived to $disama $opts"
 exit

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

O1. Vital notes to users updating from previous versions

April2003 PATH changed for UV Script Files (subdir 'sf')

Prior to March 2003, all Korn shell scripts were supplied in 1 directory (/home/uvadm/sf). This has now been split to multiple sub-directories as shown below. If you are not doing a mainframe conversion, you probably only need the 1st 3 (adm,demo,& util). If you are converting from an IBM mainframe you need the 1st 4 (including IBM, but excluding OS3).

PATH definition - from profile on page 'G2'

 export PATH=$PATH:$UV/bin
 export PATH=$PATH:$UV/sf/adm:$UV/sf/demo:$UV/sf/util:$UV/sf/IBM:$UV/sf/OS3
 #=========================================================================
 export PATH=$PATH:$APPSADM/sf:$HOME/sf:$RUNLIBS/jcls:$RUNLIBS/sf

This requires changing the profiles of all logins using Vancouver Utilities. However you could combine back into just 1 directory (/home/uvadm/sf) as shown below. This would avoid having to change the users 'PATH' in the .profiles, but you will need to change PFPATH (see next page).

combining 'sf' subdirs back into 1 dir


 #1. mv sf sfs         <-- change name of supplied sf with subdirs

 #2. mkdir sf          <-- make new directory (for all files in 1 dir)

 #3. mv sfs/*/* sf     <-- move all files from all subdirs to 1 dir

 #4. rm -r sfs         <-- remove separate subdirs

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

O2. Vital notes to users updating from previous versions

May2003 PFPATH changed (for uvcopy Parameter Files)

Prior to March 2003, the uvcopy interpreter searched for its jobs (Parameter Files) via environmental variables PFPATH1,2,3,4.

Old PFPATH1,2,3,4 definition (now obsolete)

 export PFPATH1=$UV/pf         # pre-programmed jobs (UV=/home/uvadm)
 export PFPATH2=$APPSADM/pf    # applications administrator jobs
 export PFPATH3=$RUNLIBS/pf    # jobs specific to each application
 export PFPATH4=$HOME/pf       # programmer uvcopy jobs

new PFPATH definition - from profile on page 'G2'


 export PFPATH=$UV/pf/adm:$UV/pf/demo:$UV/pf/util:$UV/pf/IBM:$UV/pf/OS3
 #=====================================================================
 export PFPATH=$RUNLIBS/pf:$APPSADM/pf:$HOME/pf:$PFPATH  #<-- UV pfs last
 #=====================================================

PFPATH1,2,3,4 has been replaced by 1 symbol 'PFPATH' which is a ':' colon delimited string similar to the unix 'PATH'. This is much more flexible and allows many more entries than the previous limit of 4.

The search priority is similar to PATH, ie - you should place your high priority directories at the front. The UV pre-programmed jobs should probably be at the end to allow you to have your intentional duplicate jobnames found prior to any accidental duplicate jobname in the UV directories.

combining 'pf' subdirs back into 1 dir

I think this is more flexible, but if you really did not want have to change any user profiles, you could combine back into 1 directory as follows:


 #1. mv pf pfs         <-- change name of supplied pf with subdirs

 #2. mkdir pf          <-- make new directory (for all files in 1 dir)

 #3. mv pfs/*/* pf     <-- move all files from all subdirs to 1 dir

 #4. rm -r pfs         <-- remove separate subdirs

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

O3. Vital notes to users updating from previous versions

uvsort Max Memory Increased

You can now specify up to 2 gigabytes of memory for uvsort. The same sort is also built in to some other utilities (uvcopy,uvqrpg,uxcopy,uxqrpg). The default Max Memory is now 64 megabytes (vs 8 megabytes). Sort times may not be much different for small files, but could be dramatically improved for large files (especially if over 6.4 gigabytes).

The number of workfiles has also been increased from 50 to 100. These work files are created in the 'tmp'subdir while reading the input file(s). These sorted workfiles are then merged during the sort output phase. If (WorkFiles * MaxMemory) < filesize, the sort will be efficient, there will be no need for intermediate sorts & merges. 6.4 gig is the default max file size for efficient sorting (100 workfiles * 64 meg = 6.4 gig).

You may increase the Max Memory via run option 'm' (rop=m???). For example to specify 256 megabytes (vs the 64 meg default):


 uvsort "fili1=bigfile,typ=RSF,rcs=351,filo1=sorted,key1=71(20),rop=m256"
 ========================================================================

Be sure to leave lots of memory for unix system swapping, otherwise the sort will actually be slower instead of faster.

max filename lengths increased

The maximum filename lengths for uvcopy,uvqrpg,uxcopy,& uxqrpg have been increased from 80 bytes to 180 bytes. Note that uvsort,uvcp,uxsort,& uxcp already allowed 200 bytes for maximum filename length.

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

Visitor Counters for ThisYear and LastYear

ThisYear=000153   (J=135,F=18,M=0,A=0,M=0,J=0,J=0,A=0,S=0,O=0,N=0,D=0)
LastYear=001560   (J=117,F=115,M=151,A=105,M=86,J=88,J=101,A=320,S=103,O=133,N=91,D=150)