EZTRVetc.doc - Contents


Part_1 - Easytrieve converter introduction
- sample Easytrieve source file to illustrate conversion
- converter output equivalent (uvcopy job)
- Setup required for Easytrieve conversion
- Libraries & Data directories required
- Converting Easytrieve - 1 program at a time
- Converting Easytrieve - ALL programs in directory
- Executing uvcopy job converted from Easytrieve
- test/data Input/Output files illustrated
- possible manual changes required after conversion

Part_2 - QUIKJOB (documentation not provided here)
- see https://www.uvsoftware.ca/jclcnv1demo.htm#6B1 - 6B4
Note
  • several other mainframe utility conversions are documented elsewhere
  • see JCLcnv1demo.htm for SORT, IDCAMS, IEBGENER, FTP, IKJEFT01, etc

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

Part_1. EasyTrieve conversion to Vancouver Utilities

Part 1 Contents


1A1. Easytrieve converter introduction

1B1. sample Easytrieve source file to illustrate conversion

1B2. converter output equivalent (uvcopy job)

1C0. Converting Easytrieve source to uvcopy code

1C1. Pre-Requisites, setup profiles as per ADMjobs.doc

1C2. Setup required for Easytrieve conversion

1C3. Libraries & Data directories required for Easytrieve conversion

1D1. Converting Easytrieve - 1 program at a time

1D2. Converting Easytrieve - ALL programs in directory

1D3. Possible manual changes after auto-conversion

1E1. Executing uvcopy job (eztlist1) converted from Easytrieve

1E2. test/data Input/Output files illustrated

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

1A1. Easytrieve Conversion - Overview

Easytrieve conversion to 'uvcopy'

'ez2uvcopy' is a Vancouver Utility (from UV Software) to convert CA Easytrieve to the uvcopy interpretive language. 'uvcopy' is a powerful data manipulation language that was developed to replace various mainframe utilities when converting to Unix or Linux systems.

uvcopy provides functions that are non-existent in the usual Unix utilities:

uvcopy is somewhat similar to the IBM 360 assembler language, so if you have a mainframe background the code will look familiar to you. In addition to the usual basic instructions, uvcopy has many powerful instructions for scan/replace, table processing, etc.

uvcopy has the power of assembler but without the complexity of compiling since it is 'interpretive' (just edit the parameter file & rerun).

There is a lot of documentation for uvcopy, but if you have a mainframe background, I think you could get a quick start by studying the examples given in UVjobs1.htm. Then you could run the 'eztlist1' conversion given in Part 1 of this EZTRVetc.doc & refer to the uvcopy3.htm instruction manual as required.

Related Documentation

 install.htm       - install guide for Vancouver Utilities on Unix/Linux
 ADMjobs.htm       - Site Admin (backups, cron scheduling, console logs)
 UVjobs1.htm       - pre-programmed uvcopy jobs to Demo & Customize
 uvcopy1.htm       - uvcopy introduction, file declarations, etc
 uvcopy2.htm       - work areas,$symbols,options,patterns,registers,etc
 uvcopy3.htm       - detailed instruction reference (with alpha index)
 CNVaids.htm       - Mainframe JCL/COBOL/DATA Conversion Aids
 JCLcnv1demo.htm   - Converting MVS JCL to Unix/Linux Korn shell scripts
 VSEJCL.htm        - Converting VSE JCL to Unix/Linux Korn shell scripts

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

1B1. Easytrieve conversion to Vancouver Utilities

sample Easytrieve source to illustrate conversion

 * EZTLIST1 - CREATE CUSTOMER TELEPHONE LIST
 *          - cust#, name, tel#, contact
 * - demo EasyTrieve conversion to uvcopy
 * - by Owen Townsend, UV Software, Oct2011, updt Mar2015
 FILE CUSTMAS SYS004 F(256)
 CUS-REC           1   256   A
 CUS-NO            1     6   N
 CUS-NAME         11    25   A
 CUS-ADRS         36    25   A
 CUS-CITY         61    17   A
 CUS-PROV         78    02   A
 CUS-POSTAL       81    10   A
 CUS-TEL          91    12   A
 CUS-CONTACT     103    18   A
 *
 FILE EZTLIST SYSLST F(80)
 TEL-REC           1    80   A
 TEL-CUSNO         1     6   N
 TEL-NAME          9    25   A
 TEL-NUM          36    12   A
 TEL-CONTACT      50    68   A
 REC-COUNT         W     5   N
 *
 JOB INPUT CUSTMAS FINISH CUSTEOF
 MOVE SPACES   TO TEL-REC
 MOVE CUS-NO   TO TEL-CUSNO
 MOVE CUS-NAME TO TEL-NAME
 MOVE CUS-TEL  TO TEL-NUM
 MOVE CUS-CONTACT  TO TEL-CONTACT
 ADD 1 TO REC-COUNT
 PUT EZTLIST
 GO TO JOB
 *
 CUSTEOF. PROC
 DISPLAY 'TOTAL RECORDS' REC-COUNT
 END-PROC

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

1B2. Easytrieve conversion to Vancouver Utilities

sample converter output equivalent (uvcopy job)

 # eztlist1 - uvcopy job converted from EasyTrieve by Vancouver Utilities
 #         - ez2uvcopy run on 2015/03/26_18:29:34 at UV_Software
 # See documentation at www.uvsoftware.ca/eztrvetc.htm
 # - or www.uvsoftware.ca/jclcnv1demo.htm#Part_6
 #
 was=a8192b8192c8192d8192e8192f8192g8192h8192q24000s8192  #<-- set area memories
 #* eztlist1 - create customer telephone list
 #* - cust#, name, tel#, contact
 #* - demo easytrieve conversion to uvcopy
 #* - by owen townsend, uv software, oct2011, updt mar2015
 #file custmas sys004 f(256)
 fili1=?${CUSTMAS},rcs=00256,typ=RSF
 #*
 #file eztlist syslst f(80)
 filo2=?${EZTLIST},rcs=00080,typ=LSTt
 #*
 lodc1=q0(48)
 $custmas                         =a0(256c)
 $cus-rec                         =a0(256c)
 $cus-no                          =a0(6z)
 $cus-name                        =a10(25c)
 $cus-adrs                        =a35(25c)
 $cus-city                        =a60(17c)
 $cus-prov                        =a77(2c)
 $cus-postal                      =a80(10c)
 $cus-tel                         =a90(12c)
 $cus-contact                     =a102(18c)
 $eztlist                         =b0(80c)
 $tel-rec                         =b0(80c)
 $tel-cusno                       =b0(6z)
 $tel-name                        =b8(25c)
 $tel-num                         =b35(12c)
 $tel-contact                     =b49(68c)
 $rec-count                       =s0(5z)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

 @run
         opn    all
 #job input custmas finish custeof
 job010  get    fili1,a0            get next record
         skp<=  2
         bal    custeof
         skp    job900
         add    $ca1,1              count records in file
 #
         clr    $tel-rec,' '
         mvf    $tel-cusno,$cus-no
         mvf    $tel-name,$cus-name
         mvf    $tel-num,$cus-tel
         mvf    $tel-contact,$cus-contact
         add    $rec-count,1
         put    filo2,b0
         skp    job010
 #*
 #*EJect
 custeof nop
         msgv1 ' TOTAL RECORDS $rec-count '
         ret=
 nofin   ret=                       dummy subrtn if no FINISH on job
 job900  cls    all                 end all files
         eoj

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

1C1. Easytrieve conversion to Vancouver Utilities

Easytrieve conversions - Pre-Requisites

Easytrieve conversions will probably be performed following the JCL conversions (documented in JCLcnv1demo.htm &/or VSEJCL.htm).

JCLcnv1demo.htm#Part_3 instructed you to setup user 'mvstest' (/home/mvstest), copy supplied demo files from /home/uvadm/mvstest/..., run the conversions,& execute the resulting Korn shell scripts.

If you did the above, you are ready to begin the Easytrieve conversions, because mvstest includes the directories & files required for the easytrieve test/demos.

If you have not already setup 'mvstest', the following instructions will show you how to setup 'testlibs' & 'testdata' in your homedir, copy the demo files, run the conversions,& execute the resulting uvcopy jobs.

The following instructions will assume your userid is 'userxx'.

Pre-Requisite for test/demos

You must setup your profile to use the Vancouver utilities as instructed in admjobs.htm#Part_1.

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

1C2. Easytrieve conversion to Vancouver Utilities

Easytrieve conversion - setup required

Note

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

 #2a. mkdir testlibs   - make superdir for library subdirs
      ==============

 #2b. mkdir testlibs   - make superdir for library subdirs
      ==============

 #3a. cdl   <-- change into libraries using alias 'cdl' (in common_profile)
      ===       alias cdl='cd $RUNLIBS' & RUNLIBS=$HOME/testlibs

 #3b. mkdir ezt0 ezt1 ezt3 ezts tmp
      =============================
      - make subdirs required for Easytrieve conversions
      - see illustrations & descriptions on the next page

 #3c. cp $UV/mvstest/testlibs/ezt0/* ezt0
      ===================================
      - copy supplied test/demo easytrieve source files
      - use $UV (usually /home/uvadm) in case your site is non-standard

 #4a. cdd   <-- change into libraries using alias 'cdd' (in common_profile)
      ===       alias cdd='cd $RUNDATA' & RUNDATA=$HOME/testdata

 #4b. mkdir data1 jobtmp rpts tmp
      ===========================
      - make subdirs required for Easytrieve executions
      - see illustrations & descriptions on the next page

 #4c. cp $UV/mvstest/testdata/data1/* data1
      =====================================
      - copy supplied test/demo DATA files
      - eztlist1 uses only data1/customer.master
      - but copies several small files in case of other demos

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

1C3. Directories/Files for Easytrieve demos

Libraries for Easytrieve demos

 /home/userxx            <-- can setup in your home-dir
 :----testlibs             - profile contains: export RUNLIBS=$HOME/testlibs
 :    :----ezt0            - subdir for Easytrieve source from the mainframe
 :    :     :----eztlist1  - Easytrieve source for demo
 :    :----ezt1            - cleaned up source (col 73-80 cleared)
 :    :----ezt2            - converter output (uvcopy jobs)
 :    :----ezts            - copy here before any changes
 :    :                    - protect overwriting edits on conversion reruns
 :    :----tmp             - subdir often required by Vancouver Utilities
                           - to keep working directory clean

DATA directories for Easytrieve demos

 :----testdata                      - profile: export RUNDATA=$HOME/testdata
 :    :----data1                    - subdir for data files
 :    :    :----customer.master     - input for eztlist1
 :    :    :----customer.phone.list - output report
 :    :----rpts
 :    :    :----customer.phone.list - optional, reports in separate subdir
 :    :
 :    :----tmp             - subdir required for 'uvhd' etc

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

1D1. Easytrieve conversion to Vancouver Utilities

Converting Easytrieve - 1 program at a time

The following Operating Instructions are based on the supplied demo 'eztlist1' which was listed on page '1B1' & the expected converter output on page '1B2'.


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

 #2. cdl   <-- change into libraries using alias 'cdl' (in common_profile)
     ===       alias cdl='cd $RUNLIBS' & RUNLIBS=$HOME/testlibs

 #3. uvcopy cleanup,fili1=ezt0/eztlist1,filo1=ezt1/eztlist1,uop=q0i7g8n1
     ===================================================================
     - cleanup mainframe easytrieve source (clear cols 73-80)

 #4. uvcopy ez2uvcopy,fili1=ezt1/eztlist1,filo1=ezt2/eztlist1
     ========================================================
     - convert mainframe easytrieve source to uvcopy code

 #5. cp ezt2/eztlist1 ezts
     =====================
     - copy to ezts before any changes that may be required
     - protects overwriting your edits in case of conversion reruns
Note
  • see page '1E1' to Execute the converted easytrieve (uvcopy job)
  • will first document converting ALL easytrieve source code in directory

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

1D2. Easytrieve conversion to Vancouver Utilities

Converting Easytrieve - ALL programs in directory

The operating instructions to convert ALL files in a directory are actually easier than for 1 file at a time, because we only need to specify the directory names (vs individual files).

Note that 'uvcopy' is replaced by 'uvcopyx' which is a script that repeats the specified uvcopy job (cleanup or ez2uvcopy) for all files in the directory.


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

 #2. cdl   <-- change into libraries using alias 'cdl' (in common_profile)
     ===       alias cdl='cd $RUNLIBS' & RUNLIBS=$HOME/testlibs

 #3. uvcopyx cleanup ezt0 ezt1 uop=q0i7g8n1
     ======================================
     - cleanup mainframe easytrieve sources (clear cols 73-80)

 #4. uvcopyx ez2uvcopy ezt1 ezt2 uop=q0i7
     ====================================
     - convert mainframe easytrieve sources to uvcopy jobs

 #5. cp ezt2/* ezts  <-- do NOT do this
     ==============
Note
  • NEVER copy ALL converted jobs (ezt2/*) to the execution directory
  • we will copy 1 at a time when we are ready to test/debug each job
  • this protects overwriting your edits when mass conversions are rerun
  • 'ezts' holds only the jobs that are already tested or in debug

 #5a. cp ezt2/eztlist1 ezts
      =====================
      - copy 1 at a time only when we ready to edit/test/debug each job
      - protects overwriting your edits in case of conversion reruns

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

1D3. Easytrieve conversion to Vancouver Utilities

possible manual changes after auto-conversion

After automatic conversion by 'ez2uvcopy', many jobs will execute with no manual changes, but some may require changes. Here are the possible changes we are aware of & some of these may be automated in future.

  1. insert record-size on fili1=...,etc if FB(...) not coded on FILE stmtns - 'rcs=99999' is coded if the record-size cannot be found

  2. change default file 'typ=RSF' ('FB'in mainframe Easytrieve) if required - 'typ=LSTt' for output report files (to insert LineFeeds) typ=LSTt is coded autoamtically if 'SYSLST' was coded on the FILE - 'typ=ISF' if Indexed Sequential keyed file

  3. change Packed fields to unpacked if used for DISPLAY msgs

  4. 'SORT' statements are #commented out - can code manually, see https://www.uvsoftware.ca/uvcopy3.htm#sort - or could code a preceding 'uvsort' in the script that calls easytrieve

  5. 'REPORT' writer not converted automatically - can code equivalent instructions manually - or use 'uvqrpg' (VU report writer) vs 'uvcopy' default

  6. Some statements not fully converted, but easy to fix manually, for example:

    IF FIELDA EQ 'A', 'B', 'C'   <-- easytrieve
    cmc $fielda,'A'              <-- auto conversion to uvcopy
    tst $fields,'ABC'            <-- manual correction
  1. Most programs have 'GO TO JOB' at end of the input file coding - if not the converter automatically generates - but could be fooled if some prior conditional 'GO TO JOB' exist

  2. MACRO's require manual change, often used for record definitions %custmas <-- easytrieve macro (record def from library) lod=qq0(48),custmas <-- uvcopy equivalent (library def fild7=...)

  3. Some special symbols may not be recognized, for example: IF EOF FILEA <-- easytrieve cmc a0(4),'EOF~' <-- uvcopy equivalent

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

1E1. Easytrieve conversion to Vancouver Utilities

Execute eztlist1 (converted Easytrieve)


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

 #2. cdd   <-- change into data dirs using alias 'cdd' (in common_profile)
     ===       alias cdd='cd $RUNDATA' & RUNDATA=$HOME/testdata

 #3. Export Logical filenames to Physical filenames

 #3a. export CUSTMAS=data1/customer.master     <-- demo file supplied
      ====================================       - see listing below
 #3b. export EZTLIST=rpts/customer.phone.list  <-- output file
      -======================================

The converted uvcopy job (listed on page '1B2') defines the files as:

       fili1=${CUSTMAS} <-- $symbol replaced by export value from above
       filo1=${EZTLIST} <-- $symbol replaced by export value from above

 #4. uvcopy eztlist1    <-- execute the job using exported filenames
     ===============

alternative - filenames on command line


 #4a. uvcopy eztlist1,fili1=data1/cutsomer/master,filo1=rpts/customer.phone.list
      ==========================================================================

See Input records & Output report listed on teh next page -->

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

1E2. Easytrieve test/demo data files

INPUT test file for eztlist1

The input file is provided in /home/uvadm/dat1/custmas1. The same file is also provided in /home/uvadm/mvstest/testdata/data1/customer.master for the test/demo. This file contains 24 packed decimal fields & cannot be displayed or printed by normal unix/linux utilities (vi,lp,etc). Here is the 'uvhd' of first record:


 uvhd dat1/custmas1 r256
 =======================
                   10        20        30        40        50        60
 r#     1 0123456789012345678901234567890123456789012345678901234567890123
        0 130140    EVERGREEN MOTORS LTD.    1815 BOWEN ROAD          NANA
          3333332222454545444244545524542222233332445442544422222222224444
          130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
       64 IMO          BC V9S1H1    250-754-5531 LARRY WRENCH     ..4V|...
          4442222222222442535343222233323332333324455525544442222201357000
          9DF00000000002306931810000250D754D55310C12290725E38000000246C000
      128 .........W0....`........)X}..f3.....\.................4V}...f...
          0000000005300016000000002570063100095000000000000000013570016000
          0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0056C00
      192 ...............................f.....<........f.C 19950531
          0000008900000000880000000018000680001300000000694233333333222222
          00C0026C0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000

OUTPUT report - telephone list

 130140  EVERGREEN MOTORS LTD.      250-754-5531
 132588  GEECOE GENERATOR SERVICES  604-278-4488
 139923  JOHNSTONE BOILER & TANKS   604-320-1845
 142175  LILLY ELECTRIC (1973) LTD  604-534-9787
 145264  MAGRATH SUPPLIES LTD.      250-843-2987
 147615  O'CONNER R.V. CENTRE       604-858-4161
      - - - etc (22 lines removed) - - -
 318833  TOP NOTCH CONSTRUCTION     403-385-2965
 400002  ACKLANDS LTD               250-705-2583
 401210  COAST RANGE CONSTRUCTION   604 681 2626
 402875  HULL, DON & SONS LTD.      250-836-2964
 403887  MILNER, LARRY              250-351-9472
 406082  PRECAM RENTALS LTD:        250-637-6351
         TOTAL RECORDS              00032

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

Visitor Counters for ThisYear and LastYear