EZTRVetc.doc - EasyTRieVe,DITTO,etc, conversion to Vancouver Utilities

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

Part_2 - DITTO (documentation not yet provided)
- some conversions have been done, but documentation not yet coded

Part_3 - FILEAID (documentation not yet provided)
- some conversions have been done, but documentation not yet coded

Part_4 - QUIKJOB (documentation not yet provided)
- some conversions have been done, but documentation not yet coded
Note
  • several other mainframe utility conversions are documented elsewhere
  • see MVSJCL.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,DITTO,etc, 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

1E1. Executing uvcopy job (ezdemo2) 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 'ezdemo2' 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
 MVSJCL.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

 * EZDEMO2 - CREATE CUSTOMER TELEPHONE LIST (CUSNO,NAME,TEL#)
 *         - INPUT  CUSMAS (ar/customer.master)
 *         - OUTPUT CUSTEL (rpts/customer.phone.list)
 FILE CUSMAS 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
 FILLER          103   153   A
 *
 FILE CUSTEL SYS005 F(80)
 TEL-REC           1    80   A
 TEL-CUSNO         1     6   N
 TEL-NAME          9    25   A
 TEL-NUM          36    12   A
 FILLER           48    32   A
 *
 REC-COUNT         W     5   N
 *
 JOB INPUT CUSTMAS FINISH CUSEOF
 MOVE SPACES   TO TEL-REC
 MOVE CUS-NO   TO TEL-CUSNO
 MOVE CUS-NAME TO TEL-NAME
 MOVE CUS-TEL  TO TEL-NUM
 ADD 1 TO REC-COUNT
 PUT CUSTEL
 *
 CUSEOF. 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)

 # ezdemo2 - uvcopy job converted from EasyTrieve by Vancouver Utilities
 #         - ez2uvcopy run on 2010/03/14_21:13:12 at UV_Software
 #
 # See www.uvsoftware.ca/eztrvetc.htm for conversion & execution
 # - using sample job 'ezdemo2':
 # 1. uvcopy ez2uvcopy,fili1=ezt0/EZDEMO2,filo1=ezts/ezdemo2 #<-- covnert
 # 2. export CUSMAS=ar/customer.master        <-- test file for ezdemo2
 # 3. export CUSTEL=rpts/customer.phone.list  <-- output report file
 # 4. uvcopy ezdemo2   <-- run job using exports
 #                       - OR, specify filenames on cmd line as follows:
 # 4a. uvcopy ezdemo2,fili1=ar/customer.master,filo2=rpts/customer.phone.list
 #
 # Some jobs may require manual changes:
 # 1. insert record-size on fili1=...,etc if FB(...) not coded on FILE stmtns
 # 2. check 'fineof' label on EOF PROCs, 1st PROC assumed to be EOF for fili1
 # 3. change Packed fields to unpacked if used for DISPLAY msgs
 # 4. change typ=RSF to typ=LSTt (insert LineFeeds) on output report files
 #
 was=a8192b8192c8192d8192e8192f8192g8192h8192q24000s8192  #<-- set area memories
 #* ezdemo2 - create customer telephone list (cusno,name,tel#)
 #* - input cusmas (ar/customer.master)
 #* - output custel (rpts/customer.phone.list)
 #FILE CUSMAS SYS004 F(256)
 fili1=?${CUSMAS},rcs=00256,typ=RSF
 #FILE CUSTEL SYS005 F(80)
 filo2=?${CUSTEL},rcs=00080,typ=LSTt       #<-- typ=RSF changed to typ=LSTt
 #job input custmas finish cuseof
 lodc1=q0(48)
 $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)
 $filler                          =a102(153c)
 $tel-rec                         =b0(80c)
 $tel-cusno                       =b0(6z)
 $tel-name                        =b8(25c)
 $tel-num                         =b35(12c)
 $filler                          =b47(32c)
 $rec-count                       =s0(5z)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

 @run
         opn    all
 loop    get    fili1,a0            get next record
         skp>   cuseof
         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
         add    $rec-count,1
         put    filo2,b0
         skp    loop
 #
 # begin PROC, proc name may be target of FILE FINISH EOF...
 cuseof   nop
         msgv1 '  TOTAL_RECORDS  $rec-count'
         skp    fineof
 #NB - 'skp fineof' inserted at END-PROC since PROCs often used for FINISH/EOF
 #   - modify as required for this easytrieve
 #
 # subrtns generated at end converted code & called by 'bal's
 # dhex - subrtn to DISPLAY RECORD in HEX (may remove if not required)
 #      - use to print records with packed fields if ERROR conditions occur
 # - may need to modify, change 'filo2' to filo3+? depending on inputs/outputs
 #   since FILEs cnvtd to fili1,fili2,fili3,... Last file usually output
 # - often only 1 input data & 1 output report, so filo2 often OK below
 dhex    add    $ca2,1               count DISPLAYs
         cmn    $ca2,1               1st display ?
         skp!   1
         bal    hdr                  yes - print 1st page
         mvf    h0(300),'r#'
         mvn    h2(5),$ca1           show record# within file
         vhx    h0(100),h100,h200,a0(80)
         put    filo2,h000(80)
         put    filo2,h100(80)
         put    filo2,h200(80)
         put    filo2,' '
         ret=
 #
 # hdr - subrtn to print page headings
 hdr     mvfv1  h0(100),'$jobname $fili1 $datetime'
         putb   filo2,h0
         ret=
 #
 # EOF
 fineof  cls    all
         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 MVSJCL.htm &/or VSEJCL.htm).

MVSJCL.htm#Part_1 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 ar jobtmp rpts tmp wrk
      ============================
      - make subdirs required for Easytrieve executions
      - see illustrations & descriptions on the next page

 #4c. cp $UV/mvstest/testdata/ar/* ar
      ===============================
      - copy supplied test/demo DATA files
      - ezdemo2 uses only ar/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
 :     :      :-----ezdemo2  - 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 contains: export RUNDATA=$HOME/testdata
 :     :-----ar              - subdir for Accounts Receivable test files
 :     :     :-----customer.master
 :     :-----rpts
 :     :     :-----customer.phone.list
 :     :-----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 'ezdemo2' 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/ezdemo2,filo1=ezt1/ezdemo2,uop=q0i7g8n1
     =================================================================
     - cleanup mainframe easytrieve source (clear cols 73-80)

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

 #5. cp ezt2/ezdemo2 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/ezdemo2 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

Manual Corrections Required

Some jobs may require manual changes, here are 4 possible reasons:

  1. insert record-size on fili1=...,etc if FB(...) was not coded on FILE stmtns

  2. check 'fineof' label on EOF PROCs, 1st PROC assumed to be EOF for fili1

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

  4. change typ=RSF to typ=LSTt (insert LineFeeds) on output report files

The 'ezdemo2' job will require #4 (change typ=RSF to typ=LSTt) on output filo2.

'typ=RSF' (Record Sequential Fixed) is the default, but if an output file is creating a report, then we need 'typ=LSTt' to insert LineFeeds required for printing on unix/linux systems.


 #6. vi ezts/ezdemo2   <-- edit/modify converted job, see listing on '2B2'
     ===============     - change line #26 as follows:
      filo2=?${CUSTEL},rcs=00080,typ=RSF    <-- before change
      filo2=?${CUSTEL},rcs=00080,typ=LSTt   <-- after change

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

1E1. Easytrieve conversion to Vancouver Utilities

Execute ezdemo2 (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 CUSMAS=ar/customer.master        <-- demo file supplied
      ================================          - see listing below
 #3b. export CUSTEL=rpts/customer.phone.list  <-- output file
      ======================================

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

       fili1=${CUSMAS} <-- $symbol replaced by export value from above
       filo1=${CUSTEL} <-- $symbol replaced by export value from above

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

alternative - filenames on command line


 #4a. uvcopy ezdemo2,fili1=ar/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 ezdemo2

The input file is provided in /home/uvadm/dat1/custmas1. The same file is also provided in /home/uvadm/mvstest/testdata/ar/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

Permuted Index of Keywords from ** Headings **

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

1E1 Command: alternative - filenames on command line
1B2 Converter: sample converter output equivalent (uvcopy job)
1D3 Corrections: Manual Corrections Required

1C3 Data: DATA directories for Easytrieve demos
1C1 Demos: Pre-Requisite for test/demos
1C3 Demos: DATA directories for Easytrieve demos
1C3 Demos: Libraries for Easytrieve demos
1C3 Directories: DATA directories for Easytrieve demos
1D2 Directory: Converting Easytrieve - ALL programs in directory
1A1 Documentation: Related Documentation

1A1 Easytrieve: Easytrieve conversion to 'uvcopy'
1B1 Easytrieve: sample Easytrieve source to illustrate conversion
1C1 Easytrieve: Easytrieve conversions - Pre-Requisites
1C2 Easytrieve: Easytrieve conversion - setup required
1C3 Easytrieve: DATA directories for Easytrieve demos
1C3 Easytrieve: Libraries for Easytrieve demos
1D1 Easytrieve: Converting Easytrieve - 1 program at a time
1D2 Easytrieve: Converting Easytrieve - ALL programs in directory
1E1 Easytrieve: Execute ezdemo2 (converted Easytrieve)
1E1 Execute: Execute ezdemo2 (converted Easytrieve)
1E1 Ezdemo2: Execute ezdemo2 (converted Easytrieve)
1E2 Ezdemo2: INPUT test file for ezdemo2

1E1 Filenames: alternative - filenames on command line

1B1 Illustrate: sample Easytrieve source to illustrate conversion

1C3 Libraries: Libraries for Easytrieve demos
1E1 Line: alternative - filenames on command line
1E2 List: OUTPUT report - telephone list

1D3 Manual: Manual Corrections Required

1C1 Pre-requisite: Pre-Requisite for test/demos
1C1 Pre-requisites: Easytrieve conversions - Pre-Requisites
1D1 Program: Converting Easytrieve - 1 program at a time
1D2 Programs: Converting Easytrieve - ALL programs in directory

1A1 Related: Related Documentation

1B1 Sample: Easytrieve source to illustrate conversion
1B2 Sample: converter output equivalent (uvcopy job)
1C2 Setup: Easytrieve conversion - setup required
1B1 Source: sample Easytrieve source to illustrate conversion

1E2 Telephone: OUTPUT report - telephone list
1C1 Test: Pre-Requisite for test/demos
1E2 Test: INPUT test file for ezdemo2

1A1 Uvcopy: Easytrieve conversion to 'uvcopy'
1B2 Uvcopy: sample converter output equivalent (uvcopy job)

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z 

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

Visitor Counters for ThisYear and LastYear

ThisYear=000098   (J=79,F=19,M=0,A=0,M=0,J=0,J=0,A=0,S=0,O=0,N=0,D=0)
LastYear=001028   (J=71,F=66,M=92,A=81,M=76,J=81,J=88,A=153,S=86,O=82,N=80,D=72)