| Part_1 | Introduction & Overview |
| Summary of Functions available. | |
| - browse,search,update,acum,print,iprint,write,seqcheck,tally,verify,move | |
| Pre-Requisites (preparation for use) | |
| - generate cobmaps from copybooks & export RUNLIBS | |
| Illustration of 'cobmap' record-layout & 'uvhdcob' display | |
| Operation Instructions & command line options | |
| Inter-Operation of uvhdcob & uvhd | |
| - may 'e'xit to uvhd & 'q'uit back to uvhdcob |
| Part_2 | - Help Screens (19 help screens) |
| - command line options | |
| - commands & examples for: | |
| - browse, search, update, acum, print, iprint, write, write options | |
| - sequence check, tally(count), verify data, move fields |
| Part_3 | Test/Demo uvhdcob with various file-types |
| - EBCDIC fixed length, ASCII fixed length, variable length Text, | |
| variable length RDW (Record Descriptor Word, recsize in binary prefix), | |
| Indexed files (fixed-length IDXFORMAT1 & variable length IDXFORMAT3/8) | |
| - copybooks (record layouts) for the demo datafiles | |
| (vendormas, vendorpay, vendorpaymas, vendorpaymasa) | |
| - listings of text version of demo Data-Files | |
| (vendormas2,vendorpay2,vendorpaymas2) | |
| - must use uvhd or uvhdcob to display other file types | |
| Demo uvhdcob using vendormas# of all file types & vendormas copybook | |
| - vendormas0,vendormas1,vendormas2,vendormas4,vendormas4 | |
| - suffix 0=EBCDIC-fixed,1=ASCII-fixed,2=Text,3=RDW,4=IDXf3 | |
| Demo uvhdcob for Multi-Record-Type files | |
| - display for vendorpaymas (vendor names & vendor payments) |
| Part_4 | Demo the 'Verify' command (using dat1/custmas1x with known bad data) |
| - verify searches the file for unprintable characters in pic x fields & | |
| invalid digits or signs in unpacked or packed numeric fields. | |
| Demo the 'Find' command to find records by record# | |
| - for variable length record files (Text, RDW, IDXFORMAT3/8) | |
| - N/R for Fixed length since we can calc offset & jump to any record# |
| Part_5 | Scripts uvhdc1/uvhdc2 make it easier to use the 'uvhdcob' program |
| - requires only the data-file-name (no copybookname, no record-size, | |
| - requires initial setup of a control file to relate data file names | |
| to the corresponding copybooks & filetype options | |
| - requires $CTLMAPDIR or $CNVDATA or $RUNLIBS or $RUNDATA (in profile) | |
| to define superdir for the control-file & copybookmap | |
| - uvhdc1 used for the Part_3 demos vendormas,vendorpay,vendorpaymas | |
| - uvhdc2 relevant to mainframe conversion sites & filename conventions |
| Part_6 | - Environmental Variables for uvhdcob |
| UVHDCOBROP - specify favorite options (such as 50 lines/screen) | |
| UVHDCOBPRINT - specify immediate printing script (uvlp12 default) | |
| uvhddiff2 - script to compare 2 data files using uvhdcob & diff |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 1A1. | Difference between uvhdcob & uvhd |
| - uvhd displays data only (in vertical hexadecimal) | |
| - uvhdcob displays data beside COBOL copybook fieldnames | |
| - sample uvhdcob display of customer master demo file |
| 1A2. | uvhdcob function summary |
| 1B1. | Preparation to use uvhdcob |
| - convert copybooks to 'cobmaps' (record layouts) | |
| - 1 at a time or all copybooks in the directory | |
| - cobmap file is the 2nd input to uvhdcob |
| 1C1. | sample 'cobmap' (record layout generated from copybook) |
| - shows field start/end/length/type on right-hand side | |
| - see $UV/dat1/custmas1, $UV/cobol/cpys/custmas1, $UV/cobol/maps/custmas1 |
| 1C2. | sample 'uvhdcob' display for 1st record of dat1/custmas1 |
| - with COBOL copybook fieldnames beside data field contents | |
| - with default option 'o1' (shows only 1st field of occurs) |
| 1C3. | sample 'uvhdcob' display for 1st record of dat1/custmas1 |
| - with option 'o99' to show ALL occurrences of occurs fields |
| 1C4. | display with options 'o99' all occurs & 'i4' inhibit zero/blank fields |
| - use option 'i4' to show more info on fewer screens | |
| - useful if you have large records with many zero/blank fields. |
| 1C5. | display with options 'o5' 5 occurs & 'i1' inhibit zero/blank occurs fields |
| - use option 'o#' to specify the number of 'item' occurs fields displayed. | |
| - 'o5' will display just the 1st 5 of any item occurs fields. |
| 1D1. | demo uvhdcob with GROUP occurs options |
| - using demo data file dat1/custran1 & copybook cobol/cpys/custran1 | |
| 1D2. | 'g1' option (default) shows 1st occurrence only |
| 1D3. | 'g99' to show all group occurs fields |
| 1E1. | demo uvhdcob with group & ITEM occurs options |
| - using demo data file dat1/custran2 & copybook cobol/cpys/custran2 | |
| 1E2. | 'g1o1' options (default) shows 1st occurrences only |
| 1E3. | 'g99o99' to show all group occurs & all item occurs fields |
| 1E4. | add option 'i4' (g99o99i4) to inhibit all zero/blank fields |
| 1F1. | demo uvhdcob 'OCCURS DEPENDING ON' |
| - using demo data file dat1/custran3 & copybook cobol/cpys/custran3 | |
| - variable length RDW data file with occurs count at 118(2p) |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 1G1. | demo uvhdcob with multiple 'Occurs Depending On's ('ODO's) |
| uvhdcob dat1/custran4 cobol/maps/custran4 z4g99o99i4 |
| 1H1. | demo uvhdcob with 2 levels of 'group occurs' |
| uvhdcob dat1/custran6 cobol/maps/custran6 r256g99o99i4 |
| 1I1. | uvhdcob command line & options |
| TYPE control record for files with multi record types (redefined records) |
| 1J1. | Inter-Operation of uvhdcob & uvhd (complement each other) |
| uvhdcob shows only 1st 36 bytes of pic x fields | |
| - may use 'e' command to 'exit' uvhdcob & call uvhd | |
| which displays the entire record in vertical hexadecimal | |
| 64 byte segments on 3 lines (characters, zones, digits) | |
| - when you 'quit' uvhd, you are returned to uvhdcob on the same record |
In 2011, 'occurs' processing was greatly enhanced. Previously only 'item occurs' was handled (occurs on same statement as 'picture'). uvhdcob now handles 'group occurs' (occurs on group name with no picture with multiple higher level# fields following).
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
What is the difference between 'uvhd' & 'uvhdcob' ?
uvhdcob datafile=dat1/custmas1 20090222:0844 copybook=cobol/maps/custmas1 options= record#=1 totalrecs=32 recsize=256 filesize=8192 fileptr=0 rec# 1 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 012 120 124pns 001234567C 013 cm-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 dat1/custmas1 null=next,r#=rec,s=search,u=update,x=undo,p=print,i=iprint,w=write,t=tally ,v=verify,c=chkseq#,e=exit to uvhd,q=quit,?=help -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo uvhdcob for supplied copybook directory /home/uvadm/cobol/cpys Try this demo, then substitute your copybook directory for cobol/cpys in whatever parent directory makes sense at your site.
#1. cd /home/uvadm <-- change to the uvadm home dir
==============
#2. l cobol <-- list subdirs in cobol directory
=======
/home/uvadm/cobol
:-----cbls
:-----cblst
:-----cblx
:-----cpys <-- COBOL copybooks
:-----ctl
:-----maps <-- copybooks converted to record layouts (cobmaps)
#3. mkdir cobol/maps <-- you may need to make maps subdir for your site
================
#4. uvcopyx cobmap1 cobol/cpys cobol/maps uop=q0i7p0
================================================
- generate cobmaps from copybooks
#5. export RUNLIBS=/home/uvadm/cobol
================================
Exporting the cobol directory allows you to enter only the cobmap basename on the uvhdcob command line (add the export to your profile).
#6a. uvhdcob dat1/custmas1 cobol/maps/custmas1 - test with demo file & cobmap
========================================= (explicit cobmap path)
#6b. uvhdcob dat1/custmas1 maps/custmas1 <-- retest using RUNLIBS option
=================================== for cobmap directory path
| Note |
|
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob requires prior generation of 'cobmaps' from the COBOL copybooks. You could regenerate the cobmaps for uvadm as follows:
#1. Login as uvadm --> /home/uvadm
#2. uvcopyx cobmap1 cobol/cpys cobol/maps uop=q0i7p0
================================================
- generate cobmaps for all files in directory
#2a. uvcopy cobmap1,fili1=cobol/cpys/custmas1,filo1=cobol/maps/custmas1
==================================================================
- generate cobmap for 1 copybook at a time
cobmap1 start-end bytes for cobol record fields 199905101503 pg# 0001
cpys/custmas1 RCSZ=0256 bgn-end lth typ
* custmas1 - cobol copy book for custmas1 file (see uvtrain.
10 cm-num pic 9(6). 000-0005 006 n 06
10 cm-delete pic x(4). 006-0009 004
10 cm-name pic x(25). 010-0034 025
10 cm-adrs pic x(25). 035-0059 025
10 cm-city pic x(16). 060-0075 016
10 filler001 pic x. 076-0076 001
10 cm-prov pic x(2). 077-0078 002
10 filler002 pic x. 079-0079 001
10 cm-postal pic x(10). 080-0089 010
10 cm-phone pic x(12). 090-0101 012
10 cm-contact pic x(18). 102-0119 018
10 cm-thisyr-sales pic s9(7)v99 comp-3 occurs 12. 120-0124 005pns 09
10 cm-lastyr-sales pic s9(7)v99 comp-3 occurs 12. 180-0184 005pns 09
10 cm-thisyr-xft pic s9(7)v99 comp-3. 240-0244 005pns 09
10 cm-lastyr-xft pic s9(7)v99 comp-3. 245-0249 005pns 09
10 filler003 pic x(6). 250-0255 006
*RCSZ=0256 0256
Note that this sample cobmap was used for the uvhdcob sample illustrated on the previous page (please relate the fieldnames & locations).
Also note that the 'cobmaps' are very useful to COBOL shops for other reasons (when you need to know field locations for sorting, verifying data, etc).
You may find it convenient to print cobmaps for all copybooks, and mount in a 3 ring binder for easy reference. See documentation for the 'cobmap' utility in COBaids.doc .
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1 cobol/maps/custmas1 =========================================
rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 012 120 124pns 001234567C 013 cm-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1 cobol/maps/custmas1 o99 <-- option o99 may be on cmd line ============================================= - OR use command o99 at prompts
--> o99 <-- command 'o99' at prompt (same as option o99 on command line)
now=20110815:1536 uvhdcob dat1/custmas1 o99 version=20110815 copybook=cobol/maps/custmas1 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 001 120 124pns 001234567C 012 cm-thisyr-sales 002 125 129pns 000000000C 012 cm-thisyr-sales 003 130 134pns 000000000C 012 cm-thisyr-sales 004 135 139pns 000257300D 012 cm-thisyr-sales 005 140 144pns 000514600C 012 cm-thisyr-sales 006 145 149pns 000000000C 012 cm-thisyr-sales 007 150 154pns 000029587D --- continue to EOR --> 012 cm-thisyr-sales 008 155 159pns 000266331C 012 cm-thisyr-sales 009 160 164pns 000404945C 012 cm-thisyr-sales 010 165 169pns 000000000C 012 cm-thisyr-sales 011 170 174pns 000000000C 012 cm-thisyr-sales 012 175 179pns 000000000C 013 cm-lastyr-sales 001 180 184pns 001234567D 013 cm-lastyr-sales 002 185 189pns 000000000C 013 cm-lastyr-sales 003 190 194pns 000003457C 013 cm-lastyr-sales 004 195 199pns 000004567D 013 cm-lastyr-sales 005 200 204pns 000000000C 013 cm-lastyr-sales 006 205 209pns 000002838C 013 cm-lastyr-sales 007 210 214pns 000000000C 013 cm-lastyr-sales 008 215 219pns 000008138C 013 cm-lastyr-sales 009 220 224pns 000005668D 013 cm-lastyr-sales 010 225 229pns 000001123C 013 cm-lastyr-sales 011 230 234pns 000000000C 013 cm-lastyr-sales 012 235 239pns 000001669D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
You can use option 'i4' to inhibit displaying zero/blank fields, and show more info on fewer screens. This is useful if you have large records with many zero/blank fields.
uvhdcob dat1/custmas1 cobol/maps/custmas1 o99i4 <-- option o99 all occurs & =============================================== i4 inhibit 0/b fields
--> o99i4 <-- command 'o99' at prompt (same as option o99i4 on command line)
now=20110815:1537 uvhdcob dat1/custmas1 o99i4 version=20110815 copybook=cobol/maps/custmas1 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 007 cm-prov 77 78 BC 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 001 120 124pns 001234567C 012 cm-thisyr-sales 004 135 139pns 000257300D 012 cm-thisyr-sales 005 140 144pns 000514600C 012 cm-thisyr-sales 007 150 154pns 000029587D 012 cm-thisyr-sales 008 155 159pns 000266331C 012 cm-thisyr-sales 009 160 164pns 000404945C 013 cm-lastyr-sales 001 180 184pns 001234567D 013 cm-lastyr-sales 003 190 194pns 000003457C 013 cm-lastyr-sales 004 195 199pns 000004567D 013 cm-lastyr-sales 006 205 209pns 000002838C --- continue to EOR --> 013 cm-lastyr-sales 008 215 219pns 000008138C 013 cm-lastyr-sales 009 220 224pns 000005668D 013 cm-lastyr-sales 010 225 229pns 000001123C 013 cm-lastyr-sales 012 235 239pns 000001669D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
You can use option 'o#' to specify the number of 'item' occurs fields displayed. For example 'o5' will display just the 1st 5 of any item occurs fields. 'Item occurs' are fields where 'occurs' is coded on the 'pic' (vs group).
Option 'g#' may specify the number of 'group' occurs fields to be displayed. Defaults are g1 for 1st occurs of group & o1 for 1st occurs of item occurs.
You can combine options o# & g# with option 'i1' to inhibit displaying zero/blank 'item occurs' fields, option 'i2' to inhibit displaying zero/blank 'group occurs' fields, and 'i4' to inhibit displaying ALL zero/blank fields (regardless of occurs or not).
uvhdcob dat1/custmas1 cobol/maps/custmas1 o5i1 <-- option o5 for 5 occurs & ============================================== i1 inhibit 0/b occurs fields
--> o5i1 <-- command 'o5i1' at prompt (same as option o5i1 on command line)
now=20110815:1537 uvhdcob dat1/custmas1 o5i1 version=20110815 copybook=cobol/maps/custmas1 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 001 120 124pns 001234567C 012 cm-thisyr-sales 004 135 139pns 000257300D 012 cm-thisyr-sales 005 140 144pns 000514600C 013 cm-lastyr-sales 001 180 184pns 001234567D 013 cm-lastyr-sales 003 190 194pns 000003457C 013 cm-lastyr-sales 004 195 199pns 000004567D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo 'group occurs' options using the following files:
| dat1/custran1 |
|
| cobol/cpys/custran1 |
|
#1. Login as uvadm --> /home/uvadm
#2. uvcopy cobmap1,fili1=cobol/cpys/custran1,filo1=cobol/maps/custran1
==================================================================
- generate cobmap for 1 copybook at a time
#2a. uvcopyx cobmap1 cobol/cpys cobol/maps uop=q0i7p0
================================================
- generate cobmaps for all files in directory
- easier (shorter command) than for 1 at a time
cobmap1 start-end bytes for cobol record fields 201108161840 pg# 0001
cobol/cpys/custran1 RCSZ=00256 bgn end lth typ
* custran1 - copybook for customer master & transaction file
* - with group occurs to test uvhdcob occurs option
* - also see custran2 with item occurs within group occurs
10 cmt-num pic 9(6). 0000 0005 006 n 6
10 cmt-delete pic x(4). 0006 0009 004
10 cmt-name pic x(25). 0010 0034 025
10 cmt-adrs pic x(25). 0035 0059 025
10 cmt-city pic x(16). 0060 0075 016
10 filler001 pic x. 0076 0076 001
10 cmt-prov pic x(2). 0077 0078 002
10 filler002 pic x. 0079 0079 001
10 cmt-postal pic x(10). 0080 0089 010
10 cmt-phone pic x(12). 0090 0101 012
10 cmt-contact pic x(18). 0102 0119 018
*BGNOCCURSM:c-p:00005*00010=00050:00120-00169:1:
10 cmt-trans occurs 5.
15 cmt-tran-type pic x. 0120 0120 001
15 cmt-tran-ref pic 9(4). 0121 0124 004 n 4
15 cmt-tran-amt pic s9(7)v99 comp-3. 0125 0129 005pns 9
*ENDOCCURSM:c-p:00005*00010=00050:00120-00169:1:
10 filler003 pic x(86). 0170 0255 086
*RCSZ=00256
| Note |
|
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custran1 cobol/maps/custran1 =========================================
now=20110817:1209 uvhdcob dat1/custran1 version=20110817 copybook=cobol/maps/custran1 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 130140 002 cmt-delete 6 9 003 cmt-name 10 34 EVERGREEN MOTORS LTD. 004 cmt-adrs 35 59 1815 BOWEN ROAD 005 cmt-city 60 75 NANAIMO 006 filler001 76 76 007 cmt-prov 77 78 BC 008 filler002 79 79 009 cmt-postal 80 89 V9S1H1 010 cmt-phone 90 101 250-754-5531 011 cmt-contact 102 119 LARRY WRENCH 013 cmt-tran-type 005 120 120 A 014 cmt-tran-ref 005 121 124 n 0101 015 cmt-tran-amt 005 125 129pns 001234567C 017 filler003 170 255 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custran1 cobol/maps/custran1 g99 <-- option g99 may be on cmd line ============================================= - OR use command g99 at prompts
--> g99 <-- command 'g99' at prompt (same as option g99 on command line)
now=20110817:1209 uvhdcob dat1/custran1 g99 version=20110817 copybook=cobol/maps/custran1 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 130140 002 cmt-delete 6 9 003 cmt-name 10 34 EVERGREEN MOTORS LTD. 004 cmt-adrs 35 59 1815 BOWEN ROAD 005 cmt-city 60 75 NANAIMO 006 filler001 76 76 007 cmt-prov 77 78 BC 008 filler002 79 79 009 cmt-postal 80 89 V9S1H1 010 cmt-phone 90 101 250-754-5531 011 cmt-contact 102 119 LARRY WRENCH 013 cmt-tran-type 001 120 120 A 014 cmt-tran-ref 001 121 124 n 0101 015 cmt-tran-amt 001 125 129pns 001234567C 013 cmt-tran-type 002 130 130 B 014 cmt-tran-ref 002 131 134 n 0102 015 cmt-tran-amt 002 135 139pns 000514600C 013 cmt-tran-type 003 140 140 C 014 cmt-tran-ref 003 141 144 n 0103 015 cmt-tran-amt 003 145 149pns 000404945C 013 cmt-tran-type 004 150 150 014 cmt-tran-ref 004 151 154 n 0000 015 cmt-tran-amt 004 155 159pns 000000000C 013 cmt-tran-type 005 160 160 E 014 cmt-tran-ref 005 161 164 n 0105 015 cmt-tran-amt 005 165 169pns 001234567D 017 filler003 170 255 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo 'group AND ITEM occurs' options using the following files:
| dat1/custran2 |
|
| cobol/cpys/custran2 |
|
#1. Login as uvadm --> /home/uvadm
#2. uvcopy cobmap1,fili1=cobol/cpys/custran2,filo1=cobol/maps/custran2
==================================================================
- generate cobmap for 1 copybook at a time
#2a. uvcopyx cobmap1 cobol/cpys cobol/maps uop=q0i7p0
================================================
- generate cobmaps for all files in directory
- easier (shorter command) than for 1 at a time
cobmap1 start-end bytes for cobol record fields 201108161840 pg# 0001
cobol/cpys/custran2 RCSZ=00256 bgn end lth typ
* custran2 - copybook for customer master & transaction file
* - alt version with item occurs within group occu
10 cmt-num pic 9(6). 0000 0005 006 n 6
10 cmt-delete pic x(4). 0006 0009 004
10 cmt-name pic x(25). 0010 0034 025
10 cmt-adrs pic x(25). 0035 0059 025
10 cmt-city pic x(16). 0060 0075 016
10 filler001 pic x. 0076 0076 001
10 cmt-prov pic x(2). 0077 0078 002
10 filler002 pic x. 0079 0079 001
10 cmt-postal pic x(10). 0080 0089 010
10 cmt-phone pic x(12). 0090 0101 012
10 cmt-contact pic x(18). 0102 0119 018
*BGNOCCURSM:c-p:00005*00025=00125:00120-00244:1:
10 cmt-trans occurs 5.
15 cmt-tran-type pic x. 0120 0120 001
15 cmt-tran-ref pic 9(4). 0121 0124 004 n 4
15 cmt-tran-amt pic s9(7)v99 comp-3 occurs 4. 0125 0129 005pns 9
*ENDOCCURSM:c-p:00005*00025=00125:00120-00244:1:
10 filler003 pic x(11). 0245 0255 011
*RCSZ=00256
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custran2 cobol/maps/custran2 =========================================
now=20110817:1215 uvhdcob dat1/custran2 version=20110817 copybook=cobol/maps/custran2 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 130140 002 cmt-delete 6 9 003 cmt-name 10 34 EVERGREEN MOTORS LTD. 004 cmt-adrs 35 59 1815 BOWEN ROAD 005 cmt-city 60 75 NANAIMO 006 filler001 76 76 007 cmt-prov 77 78 BC 008 filler002 79 79 009 cmt-postal 80 89 V9S1H1 010 cmt-phone 90 101 250-754-5531 011 cmt-contact 102 119 LARRY WRENCH 013 cmt-tran-type 005 120 120 A 014 cmt-tran-ref 005 121 124 n 0101 015 cmt-tran-amt 5/4 125 129pns 001234567C 017 filler003 245 255 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custran2 cobol/maps/custran2 g99o99 <-- option g99o99 on cmd line ============================================= - OR use g99o99 at prompts
now=20110817:1216 uvhdcob dat1/custran2 g99o99 version=20110817 copybook=cobol/maps/custran2 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 130140 002 cmt-delete 6 9 003 cmt-name 10 34 EVERGREEN MOTORS LTD. 004 cmt-adrs 35 59 1815 BOWEN ROAD 005 cmt-city 60 75 NANAIMO 006 filler001 76 76 007 cmt-prov 77 78 BC 008 filler002 79 79 009 cmt-postal 80 89 V9S1H1 010 cmt-phone 90 101 250-754-5531 011 cmt-contact 102 119 LARRY WRENCH 013 cmt-tran-type 001 120 120 A 014 cmt-tran-ref 001 121 124 n 0101 015 cmt-tran-amt 1/1 125 129pns 001234567C 015 cmt-tran-amt 1/2 130 134pns 000000000C 015 cmt-tran-amt 1/3 135 139pns 000000000C 015 cmt-tran-amt 1/4 140 144pns 000257300D 013 cmt-tran-type 002 145 145 B 014 cmt-tran-ref 002 146 149 n 0102 015 cmt-tran-amt 2/1 150 154pns 000514600C 015 cmt-tran-amt 2/2 155 159pns 000000000C 015 cmt-tran-amt 2/3 160 164pns 000029587D 015 cmt-tran-amt 2/4 165 169pns 000266331C 013 cmt-tran-type 003 170 170 C 014 cmt-tran-ref 003 171 174 n 0103 015 cmt-tran-amt 3/1 175 179pns 000404945C 015 cmt-tran-amt 3/2 180 184pns 000000000C 015 cmt-tran-amt 3/3 185 189pns 000000000C 015 cmt-tran-amt 3/4 190 194pns 000000000C 013 cmt-tran-type 004 195 195 D 014 cmt-tran-ref 004 196 199 n 0104 015 cmt-tran-amt 4/1 200 204pns 000000000C 015 cmt-tran-amt 4/2 205 209pns 000000000C 015 cmt-tran-amt 4/3 210 214pns 000003457C 015 cmt-tran-amt 4/4 215 219pns 000004567D 013 cmt-tran-type 005 220 220 E 014 cmt-tran-ref 005 221 224 n 0105 015 cmt-tran-amt 5/1 225 229pns 001234567D 015 cmt-tran-amt 5/2 230 234pns 000002838C 015 cmt-tran-amt 5/3 235 239pns 000000000C 015 cmt-tran-amt 5/4 240 244pns 000008138C 017 filler003 245 255 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Option 'i4' may be combined with group&item options to inhibit displaying zero/blank fields - most useful if you have large records with many blank/zero occurs fields.
uvhdcob dat1/custran2 cobol/maps/custran2 g99o99i4 <-- option g99o99i4 on cmd ============================================= - OR enter at prompts
--> g99o99i4 <-- command 'g99o99i4' (same as options g99o99i4 on uvhdcob)
now=20110817:1219 uvhdcob dat1/custran2 g99o99i4 version=20110817 copybook=cobol/maps/custran2 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 130140 003 cmt-name 10 34 EVERGREEN MOTORS LTD. 004 cmt-adrs 35 59 1815 BOWEN ROAD 005 cmt-city 60 75 NANAIMO 007 cmt-prov 77 78 BC 009 cmt-postal 80 89 V9S1H1 010 cmt-phone 90 101 250-754-5531 011 cmt-contact 102 119 LARRY WRENCH 013 cmt-tran-type 001 120 120 A 014 cmt-tran-ref 001 121 124 n 0101 015 cmt-tran-amt 1/1 125 129pns 001234567C 015 cmt-tran-amt 1/4 140 144pns 000257300D 013 cmt-tran-type 002 145 145 B 014 cmt-tran-ref 002 146 149 n 0102 015 cmt-tran-amt 2/1 150 154pns 000514600C 015 cmt-tran-amt 2/3 160 164pns 000029587D 015 cmt-tran-amt 2/4 165 169pns 000266331C 013 cmt-tran-type 003 170 170 C 014 cmt-tran-ref 003 171 174 n 0103 015 cmt-tran-amt 3/1 175 179pns 000404945C 013 cmt-tran-type 004 195 195 D 014 cmt-tran-ref 004 196 199 n 0104 015 cmt-tran-amt 4/3 210 214pns 000003457C 015 cmt-tran-amt 4/4 215 219pns 000004567D 013 cmt-tran-type 005 220 220 E 014 cmt-tran-ref 005 221 224 n 0105 015 cmt-tran-amt 5/1 225 229pns 001234567D 015 cmt-tran-amt 5/2 230 234pns 000002838C 015 cmt-tran-amt 5/4 240 244pns 000008138C rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens -->
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo occurs 'DEPENDING ON' using the following files:
| dat1/custran3 |
|
| cobol/cpys/custran3 |
|
#1. Login as uvadm --> /home/uvadm
#2. uvcopy cobmap1,fili1=cobol/cpys/custran3,filo1=cobol/maps/custran3
==================================================================
- generate cobmap (1 copybook at a time, or use uvcopyx for all)
cobmap1 start-end bytes for cobol record fields 201108261300 pg# 0001 cobol/cpys/custran3 RCSZ=00245 bgn end lth typ
* custran3 - copybook for customer master & transaction file
* - variable length 0 to 4 sets of group occurs fie
* - to test uvhdcob occurs depending on
10 cmt-num pic 9(6). 0000 0005 006 n 6
10 cmt-delete pic x(4). 0006 0009 004
10 cmt-name pic x(25). 0010 0034 025
10 cmt-adrs pic x(25). 0035 0059 025
10 cmt-city pic x(16). 0060 0075 016
10 filler001 pic x. 0076 0076 001
10 cmt-prov pic x(2). 0077 0078 002
10 filler002 pic x. 0079 0079 001
10 cmt-postal pic x(10). 0080 0089 010
10 cmt-phone pic x(12). 0090 0101 012
10 cmt-contact pic x(16). 0102 0117 016
10 cmt-count pic s9(3) comp-3. 0118 0119 002pns 3
*BGNOCCURSM:c-p:00005*00025=00125:00120-00244:1:00118:02pns:
10 cmt-trans occurs 0 to 5 depending on cmt-count.
15 cmt-tran-type pic x. 0120 0120 001
15 cmt-tran-ref pic 9(4). 0121 0124 004 n 4
15 cmt-tran-amt pic s9(7)v99 comp-3 occurs 4. 0125 0129 005pns 9
* min lth 120 if no transctns, max 245 if all 5 transctns
*ENDOCCURSM:c-p:00005*00025=00125:00120-00244:1:00118:02pns:
*RCSZ=00245
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custran3 cobol/maps/custran3 z4g99i4 =================================================
rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 130140 003 cmt-name 10 34 EVERGREEN MOTORS LTD. 004 cmt-adrs 35 59 1815 BOWEN ROAD 005 cmt-city 60 75 NANAIMO 007 cmt-prov 77 78 BC 009 cmt-postal 80 89 V9S1H1 010 cmt-phone 90 101 250-754-5531 011 cmt-contact 102 117 LARRY WRENCH 012 cmt-count 118 119pns 005C 014 cmt-tran-type 001 120 120 A 015 cmt-tran-ref 001 121 124 n 0101 016 cmt-tran-amt 1/4 125 129pns 001234567C 014 cmt-tran-type 002 145 145 B 015 cmt-tran-ref 002 146 149 n 0102 016 cmt-tran-amt 2/4 150 154pns 000514600C 014 cmt-tran-type 003 170 170 C 015 cmt-tran-ref 003 171 174 n 0103 016 cmt-tran-amt 3/4 175 179pns 000404945C 014 cmt-tran-type 004 195 195 D 015 cmt-tran-ref 004 196 199 n 0104 014 cmt-tran-type 005 220 220 E 015 cmt-tran-ref 005 221 224 n 0105 016 cmt-tran-amt 5/4 225 229pns 001234567D
rec# 4 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cmt-num 0 5 n 142175 003 cmt-name 10 34 LILLY ELECTRIC (1973) LTD 004 cmt-adrs 35 59 16809 - 24TH AVENUE 005 cmt-city 60 75 HOPE 007 cmt-prov 77 78 BC 009 cmt-postal 80 89 V4B5E7 010 cmt-phone 90 101 604-534-9787 011 cmt-contact 102 117 FRITZ BERNAUS 012 cmt-count 118 119pns 001C 014 cmt-tran-type 120 120 A 015 cmt-tran-ref 121 124 n 0401
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Here we will show you the actual data records (using uvhd vs uvhdcob), to illustrate the variable-length records & prove that the 'occurs depending on' field at byte 118(2p) does in fact control the length of each record.
uvhd dat1/custran3 z4 =====================
rec#=1 rsize=249 fptr=0 fsize=6068 rcount=32
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 ....130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD
0F00333333222245454544424454552454222223333244544254442222222222
0900130140000056527255E0DF4F230C44E0000181502F75E02F140000000000
64 NANAIMO BC V9S1H1 250-754-5531 LARRY WRENCH .\A010
4444444222222222244253534322223332333233332445552554444222054333
E1E19DF00000000002306931810000250D754D55310C12290725E380000C1010
128 1..4V|............W0.B0102...`........)X}..f3.C0103....\........
3013570000000000005304333300160000000025700631433330009500000000
10246C0000C0000C0270D201020540C0000C0098D0263C301030444C0000C000
192 .......D0104.............E|...V}E0105..4V}...............
000000043333000000000000047000574333301357000880000000018
0C0000C401040000C0000C0035C0046D501050246D0023C0000C0083C
rec#=4 rsize=149 fptr=697 fsize=6068 rcount=32
10 20 30 40 50 60
r# 4 0123456789012345678901234567890123456789012345678901234567890123
697 ....142175 LILLY ELECTRIC (1973) LTD16809 - 24TH AVENUE
0900333333222244445244445544223333224543333322233542454454222222
05001421750000C9CC905C53429308197390C44168090D024480165E55000000
64 HOPE BC V4B5E7 604-534-9787 FRITZ BERNAUS ..A040
4454222222222222244253434322223332333233332454552445445522014333
8F0500000000000002306425570000604D534D978706294A0252E153000C1040
128 1............v.......
300000000000171800000
10000C0000C0065C0000C
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob can handle multiple "occurs depending on". You can demo using datafile $UV/dat1/custran4 & copybook $UV/cobol/maps/custran4 which has 2 'ODO's.
#1. Login as uvadm --> /home/uvadm
#2. uvcopy cobmap1,fili1=cobol/cpys/custran4,filo1=cobol/maps/custran4
==================================================================
cobmap1 start-end bytes for cobol record fields 201111031456 pg# 0001
cobol/cpys/custran4 RCSZ=00370 bgn end lth typ
* custran4 - copybook for customer master & transaction file
* - variable length with 2 sets of group occurs fields
* - to test uvhdcob with multiple 'occurs depending on'
10 cmt-num pic 9(6). 0000 0005 006 n 6
10 cmt-delete pic x(4). 0006 0009 004
10 cmt-name pic x(25). 0010 0034 025
10 cmt-adrs pic x(25). 0035 0059 025
10 cmt-city pic x(16). 0060 0075 016
10 filler001 pic x. 0076 0076 001
10 cmt-prov pic x(2). 0077 0078 002
10 filler002 pic x. 0079 0079 001
10 cmt-postal pic x(10). 0080 0089 010
10 cmt-phone pic x(12). 0090 0101 012
10 cmt-contact pic x(14). 0102 0115 014
10 cmt-count1 pic s9(3) comp-3. 0116 0117 002pns 3
10 cmt-count2 pic s9(3) comp-3. 0118 0119 002pns 3
*BGNOCCURSM:c-p:00005*00025=00125:00120-00244:1:00116:02pns:
10 cmt-trans1 occurs 0 to 5 depending on cmt-count1.
15 cmt-tran1-type pic x. 0120 0120 001
15 cmt-tran1-ref pic 9(4). 0121 0124 004 n 4
15 cmt-tran1-amt pic s9(7)v99 comp-3 occurs 4. 0125 0129 005pns 9
*ENDOCCURSM:c-p:00005*00025=00125:00120-00244:1:00116:02pns:
*BGNOCCURSM:c-p:00005*00025=00125:00245-00369:1:00118:02pns:
10 cmt-trans2 occurs 0 to 5 depending on cmt-count2.
15 cmt-tran2-type pic x. 0245 0245 001
15 cmt-tran2-ref pic 9(4). 0246 0249 004 n 4
15 cmt-tran2-amt pic s9(7)v99 comp-3 occurs 4. 0250 0254 005pns 9
* min lth 120 no transctns, max 370 if all 5 transctns * 2 s
*ENDOCCURSM:c-p:00005*00025=00125:00245-00369:1:00118:02pns:
*RCSZ=00370
We will not show the outputs of uvhd & uvhdcob here, but you can see as follows:
uvhd /home/uvadm/dat1/custran4 z4 <-- inspect data file with uvhd =================================
uvhdcob dat1/custran4 cobol/maps/custran4 z4g99o99i4 ==================================================== - display uvhdcob with 2 ODO's
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob can handle 2 levels of group occurs. You can demo using datafile $UV/dat1/custran6 & copybook $UV/cobol/maps/custran6 with 2 levels of ODOs.
#1. Login as uvadm --> /home/uvadm
#2. uvcopy cobmap1,fili1=cobol/cpys/custran6,filo1=cobol/maps/custran6
==================================================================
cobmap1 start-end bytes for cobol record fields 201111031456 pg# 0001
cobol/cpys/custran6 RCSZ=00256 bgn end lth typ
* custran6 - copybook for customer master & transaction file
* - alt version of custran2 with nested group occur
10 cmt-num pic 9(6). 0000 0005 006 n 6
10 cmt-delete pic x(4). 0006 0009 004
10 cmt-name pic x(25). 0010 0034 025
10 cmt-adrs pic x(25). 0035 0059 025
10 cmt-city pic x(16). 0060 0075 016
10 filler001 pic x. 0076 0076 001
10 cmt-prov pic x(2). 0077 0078 002
10 filler002 pic x. 0079 0079 001
10 cmt-postal pic x(10). 0080 0089 010
10 cmt-phone pic x(12). 0090 0101 012
10 cmt-contact pic x(18). 0102 0119 018
*BGNOCCURSM:c-p:00005*00025=00125:00120-00244:1:
10 cmt-trans occurs 5.
15 cmt-tran-type pic x. 0120 0120 001
15 cmt-tran-ref pic 9(4). 0121 0124 004 n 4
*BGNOCCURSS:--p:00002*00010=00020:00125-00144:2:
15 cmt-tran-amt occurs 2.
20 cmt-tran-amt1 pic s9(7)v99 comp-3. 0125 0129 005pns 9
20 cmt-tran-amt2 pic s9(7)v99 comp-3. 0130 0134 005pns 9
*ENDOCCURSS:--p:00002*00010=00020:00125-00144:2:
*ENDOCCURSM:c-p:00005*00025=00125:00120-00244:1:
10 filler003 pic x(11). 0245 0255 011
*RCSZ=00256
We will not show the outputs of uvhd & uvhdcob here, but you can see as follows:
uvhd /home/uvadm/dat1/custran6 z4 <-- inspect data file with uvhd =================================
uvhdcob dat1/custran6 cobol/maps/custran6 g99o99i4 ==================================================== - display uvhdcob with 2 levels of group occurs
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob datafile cobmap(copybook-layout) [options] <-- format ==================================================
uvhdcob dat1/custmas1 cobol/maps/custmas1 <-- demo datafile & copybook =========================================
uvhdcob dat1/custmas1 cobol/maps/custmas1 r257 <-- option 'r' for Record size ============================================== - overrides RCSZ=... in cobmap
If the 'r' record-size option is omitted, the rcsz will be picked up from the 'RCSZ=value' in the cobmap file. If indexed, (datafile.idx present), then rcsz is incremented by 1, to allow for the x'0A' delete flag on end of ISAM records.
RCSZ override for ISAM records only required if indexed file naming conventions not followed (data suffix '.dat' & index suffix '.idx').
uvhdcob dat1/custmas0 cobol/maps/custmas1 r257am50 <-- example multiple options ==================================================
| option 'r257' |
|
| option 'a' |
|
| option 'm50' |
|
| Note |
|
cobmap may specify record types on *TYPE comment lines, to cause display screens to start with the first cobmap fieldname matching the fieldname on the *TYPE statements, for example:
*TYPE=0(1),='N','NAME-RECORD' <-- data records with 'N' in byte 0 *TYPE=0(1),='P','PAY-RECORD' <-- data records with 'P' in byte 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The exit command of uvhdcob allows you to easily switch from uvhdcob to uvhd. You will sometimes need to uvhd to display the entire record because:
uvhdcob dat1/custmas1 cobol/maps/custmas1 <-- start uvhdcob, then exit to uvhd =========================================
uvhdcob datafile=dat1/custmas1 20090222:0844 copybook=cobol/maps/custmas1 options= record#=1 totalrecs=32 recsize=256 filesize=8192 fileptr=0 rec# 1 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 012 120 124pns 001234567C 013 cm-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 dat1/custmas1 null=next,r#=rec,s=search,u=update,x=undo,p=print,i=iprint,w=write,t=tally ,v=verify,c=chkseq#,e=exit to uvhd,q=quit,?=help --> e <-- Exit to uvhd
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 130140 EVERGREEN MOTORS LTD. 1815 BOWEN ROAD NANA
3333332222454545444244545524542222233332445442544422222222224444
130140000056527255E0DF4F230C44E0000181502F75E02F140000000000E1E1
64 IMO BC V9S1H1 250-754-5531 LARRY WRENCH ..4V|...
4442222222222442535343222233323332333324455525544442222201357000
9DF00000000002306931810000250D754D55310C12290725E38000000246C000
128 .........W0....`........)X}..f3.....\.................4V}...f...
0000000005300016000000002570063100095000000000000000013570016000
0C0000C0270D0540C0000C0098D0263C0444C0000C0000C0000C0246D0056C00
192 .E|...V}.......................f.....<........f.C 19950531
0470005700000000880000000018000680001300000000694233333333222222
35C0046D0000C0023C0000C0083C0056D0012C0000C0016D3019950531000000
rec#=1 rcount=32 rsize=256 fsize=8192 tmp1/cm1
null=next,r#=rec,s=search,u=update,x=rollback,p=print,i=iprint,w=write,e=count
,g=genseq#,c=chkseq#,t=translate(ta=Asc,te=Ebc,tu=Upr,tl=Lwr,tc=Chars,tp=Pers)
,R#=Recsize,h1=char,h2=hex,q=quit,?=help --> q <-- quit uvhd, return to uvhdcob
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
2H01. Help Menu Summary (enter # to goto desired help screen) 2H02. uvhdob command format (datafile, copybook,& options) 2H03. command line options a - t 2H04. command line options u - z 2H05. Browsing, jump to rec# or byte# (fixed-lth), find by rec# (var-lth) 2H06. Searching by data strings with optional qualifiers 2H07. Update 1 or multiple records, with optional qualifiers 2H08. Update/Clear record areas to the 1 byte specified by op2 2H09. Accumulate(a) record field (zoned/packed/binary)(all or qualified) 2H10. print to a file (option 'i' to schedule lp if configured) 2H11. write records to subdir $UVTMPDIR/... (selected by qualifier patterns) 2H12. Write options (recsize, fixlth, text, RDW, etc) 2H13. sequence check & tally (count records) 2H14. Verify data: digits/signs in numeric/packed, unprintables chars 2H15. option z correct blanks in numeric/packed & unprintables in pic x 2H16. Move character (m) & move Numeric (n) 2H17. Move Application - create Telephone list from customer master 2H18. Exit to uvhd (hexdump of record, quit uvhd returns to uvhdcob) 2H19. set Item/Group Occurs display & Inhibit zero/blank fields 2H20. Multi Record *TYPE files (type control record in copybook maps) 2H21. Index file saved in $UVTMPDIR/..., saves for next uvhd same file&size uvhdcob version 20110815 - Copyright (C) UV Software Inc. 1993-2011 see complete documentation at: www.uvsoftware.ca/uvhdcob.htm
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob datafile copybook-map [options] <-- uvhdcob format ================================================
uvhdcob dat1/custmas1 cobol/maps/custmas1 r256m50u <-- example
==================================================
options 'r256m50u' - must be contiguous (alpha+digits+alpha+digits+...)
r256 - rec-size, omit to use RCSZ= in map, specify to override
m50 - max lines per screen, default 25, use 50 for PC terminal
u - allow Updates (specify on command line if update intent)
uvhdcob dat1/custmas1 cobol/maps/custmas1 <-- may omit reciord-size ========================================= if copybook/map correct R# - change Rec-size (Fixed-lth) vs option 'r' on command line ? - display help screens
uvhdc2 dat1/custmas1 <-- uvhdc2 format - uvhdc2 script omits copybook-map
==================== via ctlfile54I relating datafile to copybook-map
- may specify options as arg2 to override defaults
Note - uvhdc2 script needs to be setup & customized at each site
- see www.uvsoftware.ca/uvhdcob.htm#K1 - K6
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
a - Assume EBCDIC input, translate char fields to ASCII display
b# - Begin display with this record# (vs default #1)
c1 - show field begin/end 1 relative vs 0 rel (assumes copybook is 0 rel)
d1 - display Debug msgs for cobmaps with multi *TYPE defs
e1 - inhibit Errmsg when file-size not evenly divisible by record-size
f1 - build Index for Variable-Length files (BDW/RDW,IDXf8,text)
- build Index for Fixed-Length files NOT required, can calc fileptrs
f0 - inhibit Index build (save time if only need to see 1st few records)
f3 - force Index re-build even if existing & filesize unchanged
g# - Group occurs display desired, default 1st only, g99 for copybook max
- Group & Item occurs may also be set by commands g & o, see 2H19
i1/2/4 - inhibit display zero/blank entries, i1=Item occurs,i2=Group,i4=ALL
- inhibit 0/b entries may also be set by command i, see 2H19
j=..- command to execute & exit from uvhdcob
k1 - set command help prompts on (2 extra lines below data display)
m# - Max lines/screen (default 16) allow for hex/char, sp1/sp2
o# - Item Occurs display desired, default 1st only, o99 for copybook max
- may also enter desired group/item occurs g#/o# at the command prompt
p# - progress message interval (search,index) record count default 1000000
r# - Record size overrides RCSZ= in cobmap file default 256
s2 - Space 2 between headings & field names/data lines
t - Text records ended by LF=x'0A' (specify option r if recsize > 256)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| u |
|
| u2 |
|
| v |
|
| x1 |
|
| x2 |
|
| x4 |
|
| x7 |
|
| y_ |
|
| y1 |
|
| y2 |
|
| y4 |
|
| y1 |
|
| y2 |
|
| z# |
|
| z2 |
|
| z4 |
|
| z8 |
|
| z1 |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| null |
|
| b# |
|
| r# |
|
| f# |
|
| f# |
|
| f# |
|
| r1 |
|
| f99m123 |
|
| f99m50n90 |
|
| ff |
|
| ff |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1 cobol/maps/custmas1 <-- run uvhdcob on customer master ========================================= data-file & copybook-map
| s 'ABC' |
|
| s 40(40),'ABC' |
|
| s 20(3),!'000' |
|
| s 0(80),=x'0C' |
|
| s 0(80),>x'7F' |
|
| s 'ABC',,'XYZ' |
|
| s 'ABC',|,'XYZ' |
|
s 0(40),'AB',40(40),'CD' - search for 'AB' in cols 1-40 & 'CD' in cols 41-80 s 0(1),'1',|0(1),'9' - search for '1' OR '9' in byte 0 (col 1) s 0(1),'1',|,'9' - same as above, op3 start(lth) defaults to op1 s 0(1),>'0',,<'9' - search for records wwith 1-8 in the 1st byte
| ss |
|
| sss |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1 cobol/maps/custmas1 r256u <-- must specify option 'u' ==============================================* on command line u 0(3),'ABC' - update 1st 3 bytes of current record to 'ABC' u 78(2),x'0D0A' - update bytes 79 & 80 of current record to x'0D0A' uu - repeat last update (on current record)
u99 0(3),'ABC' - update until EOF ('99' is short for 999999999)
u99 10(1),'*',8(1),'D' - update byte 10 to '*', IF byte 8 is 'D'
u99 8(1),'X',8(1),'D' - change any 'D' in column 9 to 'X'
| x |
|
| X |
|
u99s 77(2),'AB',,'AL' - update bytes 77-78 with 'AB' if currently 'AL'
s <-- note option 's' on 'u99s' saves update args in search args
1 for subsequent reset to BOF (by goto record #1)
ss <-- and 'ss' to verify updates (without re-entering arguments)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/vendormas3 cobol/maps/vendormas z4u <-- options RDW & Update ================================================ - update may clear large areas to the 1 byte op2 constant - specify op1 length as (99) to clear entire variable length records
| u 0(99),x'00' |
|
| u 4(99),x'00' |
|
| uu |
|
| X |
|
| u99 0(99),'_' |
|
| X |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1 cobol/maps/custmas1 r256 - customer mstr sales history
==============================================
- see custmas1 demofile at www.uvsoftware.ca/uvhd.htm#4A2
a 120(5p) <-- accum 5 byte packed field from current record until EOF
=========
1 <-- return to begin file before next acum
a 120(5p),,77(2),'BC' <-- acum if 'BC' in bytes 77-78
a 120(5p),,77(2),'AB',|77(2),'YK' <-- acum if 'AB' or YuKon
a 120(5p),,77(2),'AB',|,'YK' <-- acum if 'AB' or 'YK', omit 2nd 77(2)
a 120(5p),,77(2),'BC',90(3),!'604' <-- acum if 'AB' and area code not=604
ax12 120(5p) <-- crossfoot & acum 12 x 5 byte packed fields (this yr sales)
uvhdcob dat1/sales2 cobol/maps/sales2 r64 - sales detail records
=========================================
- see sales2 demofile at www.uvsoftware.ca/uvhd.htm#4A3
a 53(9) <-- acum 9 bytes (assume unpacked Ascii, sign in zone or sep +/-)
======= - zone +sign x'3_', -sign x'7_' (Micro Focus COBOL compatible)
a 53(9ze) <-- acum 9 byte Zoned Ebcdic, +sign x'F_' or x'C_', -sign x'D_'
========= - do not need (_ze) if option 'a' on cmd line for EBCDIC input
a 53(9zx) <-- need (_zx) ASCII file with EBCDIC signs vs Micro Focus signs
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
|
p5 - print 5 recs from current position p 'ABC' - search for & print records with 'ABC' anywhere in record p5 0(40),'ABC' - search & print 5 max with ABC within 1st 40 bytes p 40(3),e'ABC' - print if EBCDIC 'ABC' 41-43 (use with cmdline a optn) p9f3 - print 9 records, formfeed after every 3rd record p <' ' - print records with any bytes < space char p5 0(40),<x'20' - print 5 max with any bytes < space in 1st 40 bytes p24f4 - print 24 records, formfeed after every 4th record pp - repeat last print command (from current position)
lp <-- may follow print command with 'lp' command to close file for separate
output files or omit for combined outputs from multi print commands
p5i <-- option 'i' Immediate print (Aug2011 change to option vs command 'i')
- calls script 'uvlp12' which schedules 'lp' to print the tmp/... file
'export UVLPDEST=-dPRINTERNAME' in profile defines printer near you
- see uvhd doc for more info on immediate printing
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
>>> write - write data records only for later use (test files,etc)
- write output is written to $UVTMPDIR/filename.yymmddhhmmW
- multiple write command outputs collected into 1 common file
- writes start at current position & end at EOF (or max count)
w5 - write (unformatted) 5 records from current position
w ' SMITH ' - write records with ' SMITH ' anywhere in record
w5 0(3),>'400' - write 5 max records whose 1st 3 bytes > 400
ww - repeat last write command (from current position)
w 77(2),'BC' - select province BC in bytes 77-78 (zero relative)
w 0(1),'2',0(64),'ABC' - write recs with '2' byte 0 & ABC anywhere in 0-64
wi - write entire file, dropping ISAM deleted records
(option 'i' drops records with x'00' in last byte)
| we10 |
|
| w100e5 |
|
| we10 77(2),'VA' |
|
| w100r64t2 |
|
| w99z2a1c1 |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| a1 |
|
| d# |
|
| c1 |
|
| n1 |
|
| n2 |
|
| r# |
|
| t1 |
|
| t2 |
|
| t3 |
|
| t4 |
|
| z# |
|
| z2 |
|
| z4 |
|
| z1 |
|
| w50d10r25t6 |
|
lw <-- may follow write command with 'lw' command to close file for separate
output files or omit for combined outputs from multi write commands
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
>>> check - check sequence in specified field - until EOF or SEQUENCE ERR c 0(6) - check sequence in columns 1-6, show 1st record out of sequence cd 0(6) - check sequence descending (vs ascending default) ce 0(6) - check seq equal not allowed (may use with ascending/descending) cc - repeat last sequence check (from current position to EOF)
>>> tally - count records from current point to EOF t - count records from current position to EOF t 'ABC' - count records with 'ABC' anywhere in record t500 10(3),'ABC' - count (within next 500 recs) recs with ABC in cols 11-13
t 10(1),'A',77(2),'BC' - count records with 'A' col 11 AND 'BC' col 78-79 t 8(1),'D',|8(1),'X' - count records with 'D' OR 'X' col 9 t 0(1),>'2',0(1),<'7' - count records with 1st byte 3,4,5,or 6 t 0(1),>'2',,<'7' - same op3 omitted (,,) defaults same as op1
ts 'ABC' - count records with 'ABC' anywhere in record s <-- note option 's' on 'ts' saves tally args in search args 1 for subsequent reset to BOF (by goto record #1) ss - and 'ss' to review selected records (w/o re-entering arguments)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| v99 |
|
| vv |
|
| v100 |
|
...x - option 'x' no-stop-on-error, count for display at EOF (or max# spcfd) v99x1 - nostop on errors in numeric fields v99x2 - nostop on errors in packed fields v99x4 - nostop on errors in character (pic x) fields v99x3 - nostop on errors in numeric + packed fields v99x7 - nostop on errors in numeric + packed + character fields
...y - option 'y' specify valid signs for numeric fields
v99y1 - Micro Focus COBOL negatives: -0123456789=pqrstuvwxy x'70' zones
v99y2 - EBCDIC signs: +0123456789={ABCDEFGHI, -0123456789=}JKLMNOPQR
v99y4 - separate +/- signs (leading or trailing)
y1 - default y1 if input file is ASCII (default)
y2 - default y2 if input file is EBCDIC (option 'a' on command line)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/sales0 cobol/maps/sales r64a <-- sales0 is EBCDIC (option'a')
========================================= - recsize 64 (option 'r64')
v99y2 - verify numeric fields with EBCDIC signs
- no need to specify option 'y2', will default when input file EBCDIC
(overriding default 'y1' when input file ASCII)
...z - option 'z' correct blank numeric/packed,& pic x with unprintable chars v99z1 - convert any all blank numeric fields to numeric zeros v99z2 - convert any all blank packed fields to packed zeros with x'_C' sign v99z4 - convert any any unprintable characters in pic x fields to '.' periods v99z7 - all of above
abcdef - options to inhibit verify in 3 areas ID by offset from/to
v99a120b239 - inhibit verify in all fields from dsplcmnt 120 to 239
- to bypass known bad fields (to search for unknown bad fields)
v99a100b120c200d220e300f320 - inhibit verify in 3 record areas max
| v99x7p99 |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1 cobol/maps/custmas1 r256u <-- must specify option 'u' ==============================================* on command line
m 35(12),90 <-- Move character (m), omit op2 lth assumes same as op1
m 35(30),90(12) <-- move 90-101 to 35-46, 47-64 extra op1 length blanked
n 64(9z),120(5p) <-- move Numeric (n), unpacks 5 bytes into 9 bytes Zoned
n 130(5p),64(9z) <-- move Numeric (n), 9 zoned bytes to 5 packed bytes)
n 51(4b),120(5p) <-- move Numeric, 5 bytes packed to 4 bytes binary
n 140(5p),123456 <-- move Numeric value (length omitted) to 5 bytes packed
n 64(9ze),120(5p) <-- move Numeric, unpacks 5 bytes into 9 bytes Zoned EBCDIC
- data type codes z/p/b (z default) 1st alpha after length
- Ascii/Ebcdic codes a/e (a default) 2nd alpha after length
n 120(5p),0,,77(2),='BC' <-- clear 5 bytes packed (move 0) if province 'BC'
- conditional moves via qualifiers in op3-op6
n99 120(5p),0 <-- clear this yr Jan sales in all records (99 means 999999999)
- use m99/n99 to move on all records until EOF reached
x <-- use 'x/X' to rollback (only for moves on 1 record)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Move Example - create Telephone-List from custmas1 demo file (layout follows)
00-05 cust, 10-34 cust-name, 35-89 address, 90-91 tel#, 120-240 packed fields
desired: move tel# after cust-name, blank fill,& write 64 byte text records
- see this example illustrated at www.uvsoftware.ca/uvhd.htm#4K1
cp dat1/custmas1 tmp/cm1 <-- 1st copy custmas1, rename (not final output) ========================
uvhdcob tmp/cm1 cobol/maps/custmas1 r256u <-- specify option 'u' ========================================*
m99 35(30),90(12) <-- Move tel# after cust-name & blank to 64 ================== - on all records (99 short for 999999999)
w99r64t6 <-- Write, max Recsize 64, Textfile option 't6' ========= - t6 appends LF after last nonblank
cp tmp/cm1_yymmdd_hhmmssW dat1/tellist <-- copy/rename date_time_stamped ====================================== tmp file output as desired
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
>>>Exit - exit to uvhd, to display data record without COBOL fieldnames
- to see fields longer than 36 bytes
- or all occurrences of occurs (uvhdcob can do, but more lines)
| e |
|
| eu |
|
| q |
|
lw <-- may follow write command with 'lw' command to close file for separate
output files or omit for combined outputs from multi write commands
lp <-- similar command close print files for separate or omit for combined
lvw <-- similar command close verify writes for separate or omit for combined
lvp <-- similar command close verify prints for separate or omit for combined
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| o1 |
|
| o99 |
|
| o3 |
|
| g1 |
|
| g99 |
|
| g3 |
|
| i1 |
|
| i2 |
|
| i4 |
|
| i4 |
|
o5i1 - may specify 0/b display inhibit options on 'o' or 'g' commands o5g5i3 - may specify occurs & inhibit display options on uvhdcob command line
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
cobmap may specify record types on *TYPE comment lines, for example: *TYPE=0(1),=C'P','PAY-RECORD' <-- 'P' 1st byte displays pay-record fields *TYPE=0(1),='T','TIME-RECORD' <-- 'T' 1st byte displays time-record fields *TYPE=0(1),='H','HDR-RECORD' <-- 'H' 1st byte displays hdr-record fields *TYPE=0(1),!'H','HDR-RECORD' <-- last entry !not= for EOF display short rec *TYPE=0(1),=X'FF','HEX-RECORD' <-- may code TYPE as HEX constant
*TYPE - starts display with 1st cobmap fieldname matching fieldname
- insert *TYPE control records at begin copybook with redefined records
- then rerun cobmap1 to convert copybooks to cobmap record layouts
- do not insert in cobmaps (would be lost when cobmap1 rerun)
- see details at www.uvsoftware.ca/uvhdcob.htm#J1 - J2
*TYPE=0:45,'VEN-NAME' <-- Alt format for variable length (RDW,IDXf3/8,text)
- identify type by record size range
*TYPE=46:99,'VEN-PAY' <-- ven-pay layout if size 46:99, ven-name if 0:45
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/vendormas3 cobol/maps/vendormas z4 <-- demo uvhd RDW testfile =============================================== vi $UVTMPDIR/uvhdindex_vendormas3 <-- investigate saved Index file ================================= - sample Index save file listed below
#01:uvhdindex_vendormas3 #02:filesize=249,options=z4 #03:IndexCreated=110429_075017,BuildTimeSeconds=0 #04:BDWmin=0,BDWmax=0,BDWavg=0,Blocks=0 #05:RCSZmin=23,RCSZmax=45,RCSZavg=31,Records=8 #06:1=0,2=23,3=53,4=98,5=129,6=158,7=185,8=219,8=249,
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 3A1. | Demo uvhdcob with various filetypes |
| - Fixed-EBCDIC, Fixed-ASCII, Variable-Text, Variable-RDW, | |
| Indexed-Fixed, Indexed-variable | |
| - Copybooks for the demo Data Files | |
| sample copybooks for vendormas & vendorpay |
| 3A2. | uvhdcob demo for vendorpaymas (multi record type file) |
| - vendor master records & vendor payment records | |
| - '*TYPE' control records inserted in copybook/cobmap |
| 3A3. | Alternate method to identify multi-record types |
| - by different record-sizes (vs record-ID fields) | |
| - demo for vendorpaymasa |
| 3B1. | demo Data-Files |
| - Fixed-EBCDIC, Fixed-ASCII, Variable-Text, Variable-RDW, Indexed | |
| - vendormas0, vendormas1, vendormas2, vendormas3, vendormas4, |
| 3B2. | Listings of demo Data-Files |
| (Text versions only, need uvhd/uvhdcob for other types) | |
| - dat1/vendormas2, dat1/vendorpay2 |
| 3B3. | dat1/vendorpaymas2 |
| multi-record-types (masters & payments) |
| 3C1. | preparation to demo uvhdcob for various filetypes |
| - login to your homedir & copy demo files |
| 3C2. | uvhdcob demo for EBCDIC fixed lengh (vendormas0) |
| 3C3. | uvhdcob demo for ASCII fixed length (vendormas1) |
| uvhdcob demo for Text variable length (vendormas2) |
| 3C4. | uvhdcob demo for RDW variable length (vendormas3) |
| - with binary record size in 4 byte record prefixes |
| 3C6. | use uvhd to show RDW record-prefixes with binary record-sizes |
| 3C7. | alternative way to list RDW file with record-prefixes |
| uvcopy listRDW1 - converts binary recsizes to decimal |
| 3C8. | uvhdcob demo for IDXFORMAT1/3/8 files |
| - Micro Focus COBOL Indexed files (fixed & variable) |
| 3D1. | Multi-Record-Type files (Redefined records) |
| '*TYPE' control records | |
| - inserted in copybooks/cobmaps to ID different types |
| 3D2. | sample multi-record-type display for vendorpaymas |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo uvhdcob for various filetypes (Fixed, Text, RDW, IDXFORMAT3/8) using the following data files & copybooks. We will list the copybooks first since they are common to the 4 different filetypes.
| dat1/vendormas |
|
| dat1/vendorpay |
|
| dat1/vendorpaymas |
|
| dat1/vendorpaymasa |
|
cobmap1 start-end bytes for cobol record fields 201006071317 pg# 0001 cobol/cpys/vendormas.cpy vendormas RCSZ=00064 bgn end lth typ
* vendormas - cobol copybook for vendormas1/2/3/4 data files
* - demo uvhdcob on 1=fixed, 2=text, 3=rdw, 4=idx3
* - by owen townsend, uv software, June 7/2010
01 vendormas.
10 venmas-num pic x(6). 0000 0005 006
10 venmas-type pic x(4). 0006 0009 004
10 venmas-name pic x(54). 0010 0063 054
*RCSZ=00064
cobmap1 start-end bytes for cobol record fields 201006071317 pg# 0001 cobol/cpys/vendorpay.cpy vendorpay RCSZ=00064 bgn end lth typ
* vendorpay - cobol copybook for vendorpay1/2/3/4 data file
* - demo uvhdcob on 1=fixed, 2=text, 3=rdw, 4=idx3
* - by owen townsend, uv software, june 7/2010
01 vendorpay.
10 venpay-num pic x(6). 0000 0005 006
10 venpay-type pic x(4). 0006 0009 004
10 venpay-date pic x(10). 0010 0019 010
10 venpay-inv pic x(10). 0020 0029 010
10 venpay-amt pic 9(9). 0030 0038 009 n 9
10 filler001 pic x(1). 0039 0039 001
10 venpay-item pic x(24). 0040 0063 024
*RCSZ=00064
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
cobmap1 start-end bytes for cobol record fields 201006071317 pg# 0001 cobol/cpys/vendorpaymas.cpy vendormas RCSZ=00064 bgn end lth typ
* vendorpaymas - cobol copybook for vendorpaymas1/2/3/4 data
* - demo uvhdcob on 1=fixed, 2=text, 3=rdw, 4=idx3
* - by owen townsend, uv software, june 7/2010
* - copybook stored at /home/uvadm/cobol/cpys/vendorpaymas.c
* to demo uvhdcob on multi-record-type files
* - identified by record-type m/p in col8 dat1/vendorpaymas1
* (also see alternate 'vendorpaymasa' identifies by record
*type=7(1),='M','vendormas'
*type=7(1),='P','vendorpay'
01 vendormas.
10 venmas-num pic x(6). 0000 0005 006
10 venmas-type pic x(4). 0006 0009 004
10 venmas-name pic x(54). 0010 0063 054
*RCSZ=00064
cobmap1 start-end bytes for cobol record fields 201006071317 pg# 0002
cobol/cpys/vendorpaymas.cpy vendorpay RCSZ=00064 bgn end lth typ
01 vendorpay.
10 venpay-num pic x(6). 0000 0005 006
10 recpay-type pic x(4). 0006 0009 004
10 venpay-date pic x(10). 0010 0019 010
10 venpay-inv pic x(10). 0020 0029 010
10 venpay-amt pic 9(9). 0030 0038 009 n 9
10 filler001 pic x(1). 0039 0039 001
10 venpay-item pic x(24). 0040 0063 024
*RCSZ=00064
*type=7(1),='M','vendormas'
*type=7(1),='P','vendorpay'
*type=00:45,'vendormas'
*type=46:99,'vendorpay'
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| Note |
|
cobmap1 start-end bytes for cobol record fields 201006071317 pg# 0001 cobol/cpys/vendorpaymasa.cpy vendormas RCSZ=00064 bgn end lth typ
* vendorpaymasa - cobol copybook for vendorpaymas1/2/3/4 dat
* - demo uvhdcob on 1=fixed, 2=text, 3=rdw, 4=idx3
* - by owen townsend, uv software, june 7/2010
* - copybook stored at /home/uvadm/cobol/cpys/vendorpaymas.c
* to demo uvhdcob on multi-record-type files
* - this 'vendorpaymasa' is alternate copybook to 'vendorpay
* with *type controls by record-size vs record-type-data
*type=00:45,'vendormas'
*type=46:99,'vendorpay'
01 vendormas.
10 venmas-num pic x(6). 0000 0005 006
10 venmas-type pic x(4). 0006 0009 004
10 venmas-name pic x(54). 0010 0063 054
*RCSZ=00064
cobmap1 start-end bytes for cobol record fields 201006071317 pg# 0002
cobol/cpys/vendorpaymasa.cpy vendorpay RCSZ=00064 bgn end lth typ
01 vendorpay.
10 venpay-num pic x(6). 0000 0005 006
10 recpay-type pic x(4). 0006 0009 004
10 venpay-date pic x(10). 0010 0019 010
10 venpay-inv pic x(10). 0020 0029 010
10 venpay-amt pic 9(9). 0030 0038 009 n 9
10 filler001 pic x(1). 0039 0039 001
10 venpay-item pic x(24). 0040 0063 024
*RCSZ=00064
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
There are 4 data-files for each copybook (listed above) to demo the 4 different types of data files. The data files are the same names as the copybooks with a digit appended to indicate the file-type (1=Fixed, 2=Text, 3=RDW, 4=IDX).
We will descibe the 4 types of files using vendormas1/2/3/4 as an example. I have added another type '0' for the Fixed-length file from a mainframe, which would be EBCDIC, with no LineFeeds.
| dat1/vendormas0 |
|
| dat1/vendormas1 |
|
| dat1/vendormas2 |
|
| dat1/vendormas3 |
|
| dat1/vendormas4 |
|
We will list only the Text files (suffix '2'), since only the text file could be listed with normal unix/linux utilities (require LineFeeds & no binary data). See copybook/maps (record layouts) listed on page '3A1' - 3A3
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
vendor# type vendor-name ========================================= DELL10 M Dell Inc. HP0010 M Hewlett Packard IBM010 M International Business Machines MFC010 M Micro Focus COBOL MS0010 M Microsoft Corp. REDH10 M Red Hat Linux SUN010 M Sun Microsystems Ltd UVSI10 M UV Software Inc.
vendor# RT date invoice amount item-description ============================================================ DELL10 P 20100131 INV00010 000195000 Dell server 2900 HP0010 P 20100215 INV00020 000350000 HP XW9400 Workstation HP0010 P 20100215 INV00020 000042500 HP LCD Monitor IBM010 P 20100321 INV00030 000750000 AIX server IBM010 P 20100322 INV00030 000750000 DB2 database software MFC010 P 20100420 INV00040 000320000 Micro Focus Developer MS0010 P 20100501 INV00050 000011600 Microsoft Windows 7 REDH10 P 20100620 INV00060 000034900 Red Hat Enterprise 5.4
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
vendor# RT name/date invoice amount item-description ============================================================ DELL10 M Dell Inc. DELL10 P 20100131 INV00010 000195000 Dell server 2900 HP0010 M Hewlett Packard HP0010 P 20100215 INV00020 000042500 HP LCD Monitor HP0010 P 20100215 INV00020 000350000 HP XW9400 Workstation IBM010 M International Business Machines IBM010 P 20100321 INV00030 000750000 AIX server IBM010 P 20100322 INV00030 000750000 DB2 database software MFC010 M Micro Focus COBOL MFC010 P 20100420 INV00040 000320000 Micro Focus Developer MS0010 M Microsoft Corp. MS0010 P 20100501 INV00050 000011600 Microsoft Windows 7 REDH10 M Red Hat Linux REDH10 P 20100620 INV00060 000034900 Red Hat Enterprise 5.4 SUN010 M Sun Microsystems Ltd UVSI10 M UV Software Inc.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo uvhdcob using the data files listed on pages '3A1' - '3B3', & using the copybook/maps listed on pages '3A1' - '3A3'. You can do these demos using the 'uvadm' login, or in your home directory if you copy the demo files.
#1. login uvadm --> /home/uvadm <-- can demo in uvadm homedir
===========================
#1. login yourself --> /home/yourhomedir <-- to copy demo files to your homedir
====================================
#2a. mkdir dat1 <-- make subdir for data files
==========
#2b. mkdir cobol <-- so instrns below same for uvadm or your login
===========
#2c. mkdir cobol/cpys <-- subdir for copybooks
================
#2d. mkdir cobol/maps <-- subdir for copybook/maps (record layouts)
================
#2e. mkdir tmp <-- subdir for output files from Print & Write commands
=========
#3a. cp /home/uvadm/dat1/vendor* dat1 <-- copy all vendor* files (15)
================================
(vendormas0,1,2,3,4, vendorpay0,1,2,3,4, vendorpaymas0,1,2,3,4)
#3b. cp /home/uvadm/cobol/cpys/vendor* cpys <-- copy all vendor* copybooks (3)
======================================
(vendormas, vendorpay, vendorpaymas)
#4. uvcopyx cobmap1 cobol/cpys cobol/maps uop=q0i7
==============================================
- convert COBOL copybooks to maps (record layouts) for uvhdcob
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#0. uvhdcob dat1/vendormas0 cobol/maps/vendormas a <-- note option 'a'
======================*=======================
- option 'a' translates EBCDIC to ASCII for display only
uvhdcob datafile=dat1/vendormas0 20100607:1405 copybook=cobol/maps/vendormas options=a rec#=1 rcount=8 rsize=64 fsize=512 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 DELL10 002 venmas-type 6 9 M 003 venmas-name 10 63 Dell Inc. rec#=1 rcount=8 rsize=64 fsize=512 fptr=0 ,k1=HelpPrompts,?=HelpScreens -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#1. uvhdcob dat1/vendormas1 cobol/maps/vendormas
======================*=====================
- no options are required for ASCII fixed length
- since record size is coded in the copybook/map
uvhdcob datafile=dat1/vendormas1 20100607:1432 copybook=cobol/maps/vendormas options= rec#=1 rcount=8 rsize=64 fsize=512 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 DELL10 002 venmas-type 6 9 M 003 venmas-name 10 63 Dell Inc. rec#=1 rcount=8 rsize=64 fsize=512 fptr=0 ,k1=HelpPrompts,?=HelpScreens -->
#2. uvhdcob dat1/vendormas2 cobol/maps/vendormas t <-- note option 't'
======================*=======================
- option 't' for Text files (variable length termianted by LineFeed)
uvhdcob datafile=dat1/vendormas2 20100607:1518 copybook=cobol/maps/vendormas options=t rec#=1 rcount=8 rsize=20 fsize=225 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 DELL10 002 venmas-type 6 9 M 003 venmas-name 10 63 Dell Inc. rec#=1 rcount=8 rsize=20 fsize=225 fptr=0 ,k1=HelpPrompts,?=HelpScreens -->
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#3. uvhdcob dat1/vendormas3 cobol/maps/vendormas z4 <-- note option 'z4'
======================*========================
- option 'z4' for RDW files with 4 byte record prefix
uvhdcob datafile=dat1/vendormas3 20100607:1523 copybook=cobol/maps/vendormas options=z4 rec#=1 rcount=8 rsize=23 fsize=249 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 DELL10 002 venmas-type 6 9 M 003 venmas-name 10 63 Dell Inc. rec#=1 rcount=8 rsize=23 fsize=249 fptr=0 ,k1=HelpPrompts,?=HelpScreens -->
rec#=2 rcount=8 rsize=30 fsize=249 fptr=23 rec# 2 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 HP0010 002 venmas-type 6 9 M 003 venmas-name 10 63 Hewlett Packard rec#=2 rcount=8 rsize=30 fsize=249 fptr=23 ,k1=HelpPrompts,?=HelpScreens -->
rec#=3 rcount=8 rsize=45 fsize=249 fptr=53 rec# 3 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 IBM010 002 venmas-type 6 9 M 003 venmas-name 10 63 International Business Machines rec#=3 rcount=8 rsize=45 fsize=249 fptr=53 ,k1=HelpPrompts,?=HelpScreens -->
rec#=4 rcount=8 rsize=31 fsize=249 fptr=98 rec# 4 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 MFC010 002 venmas-type 6 9 M 003 venmas-name 10 63 Micro Focus COBOL rec#=4 rcount=8 rsize=31 fsize=249 fptr=98 ,k1=HelpPrompts,?=HelpScreens -->
rec#=5 rcount=8 rsize=29 fsize=249 fptr=129 rec# 5 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 MS0010 002 venmas-type 6 9 M 003 venmas-name 10 63 Microsoft Corp. rec#=5 rcount=8 rsize=29 fsize=249 fptr=129 ,k1=HelpPrompts,?=HelpScreens -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
rec#=6 rcount=8 rsize=27 fsize=249 fptr=158 rec# 6 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 REDH10 002 venmas-type 6 9 M 003 venmas-name 10 63 Red Hat Linux rec#=6 rcount=8 rsize=27 fsize=249 fptr=158 ,k1=HelpPrompts,?=HelpScreens -->
rec#=7 rcount=8 rsize=34 fsize=249 fptr=185 rec# 7 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 SUN010 002 venmas-type 6 9 M 003 venmas-name 10 63 Sun Microsystems Ltd rec#=7 rcount=8 rsize=34 fsize=249 fptr=185 ,k1=HelpPrompts,?=HelpScreens -->
rec#=8 rcount=8 rsize=30 fsize=249 fptr=219 rec# 8 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 UVSI10 002 venmas-type 6 9 M 003 venmas-name 10 63 UV Software Inc. rec#=8 rcount=8 rsize=30 fsize=249 fptr=219 ,k1=HelpPrompts,?=HelpScreens --> EOF, -1 Last Record, or 1 return Begin File
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhd dat1/vendormas3 z4 <-- note 'uvhd' (vs uvhdcob) ======================= - option 'z4' for recsize in 4 byte binary prefix
--> p8 <-- print 8 records to tmp/vendormas1_yymmdd_hhmmssP
uvlp12 tmp/vendormas3_100607_160344P <-- list Print command output ====================================
uvhd filename=/home/uvadm/dat1/vendormas3
options=z4 lastmod=2010060708 today=20100607160344 print=p8
records=8 rsize=23 fsize=249 fsize%rsize(rmndr)=19
10 20 30 40 50 60
r# 1 0123456789012345678901234567890123456789012345678901234567890123
0 ....DELL10 M Dell Inc.
01004444332422466624662
070045CC100D0045CC09E3E
10 20 30 40 50 60
r# 2 0123456789012345678901234567890123456789012345678901234567890123
0 ....HP0010 M Hewlett Packard
010045333324224676677256666762
0E008000100D00857C5440013B1240
10 20 30 40 50 60
r# 3 0123456789012345678901234567890123456789012345678901234567890123
0 .-..IBM010 M International Business Machines
020044433324224676766766666247766677246666667
0D0092D0100D009E452E149FE1C02539E5330D1389E53
10 20 30 40 50 60
r# 4 0123456789012345678901234567890123456789012345678901234567890123
0 ....MFC010 M Micro Focus COBOL
0100444333242246676246677244444
0F00D630100D00D932F06F35303F2FC
10 20 30 40 50 60
r# 5 0123456789012345678901234567890123456789012345678901234567890123
0 ....MS0010 M Microsoft Corp.
01004533332422466767667246772
0D00D300100D00D932F3F6403F20E
10 20 30 40 50 60
r# 6 0123456789012345678901234567890123456789012345678901234567890123
0 ....REDH10 M Red Hat Linux
010054443324225662467246677
0B002548100D0025408140C9E58
10 20 30 40 50 60
r# 7 0123456789012345678901234567890123456789012345678901234567890123
0 ."..SUN010 M Sun Microsystems Ltd
0200554333242257624667677776672476
020035E0100D0035E0D932F39345D30C44
10 20 30 40 50 60
r# 8 0123456789012345678901234567890123456789012345678901234567890123
0 ....UVSI10 M UV Software Inc.
010055543324225525667767624662
0E005639100D005603F64712509E3E
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
When you want to list an RDW file, an alternative to 'uvhd' could be 'uvcopy listRDW1', which will provide a more compact listing & it shows the record-size converted to decimal (vs hexadecimal by uvhd/uvhdcob).
#1. uvcopy listRDW1,fili1=dat1/vendormas3 <-- list in vertical hexadecimal
=====================================
- by default writes output file to tmp/... (with same name as input)
#2. uvlp12 tmp/vendormas3 <-- list report file created by listRDW1
=====================
1 2 3 4 5 6 7
01234567890123456789012345678901234567890123456789012345678901234567890123456789
rec# rcsz <---------------- record data (1st 64 bytes) ------------------>
0001 0019 DELL10 M Dell Inc.
4444332422466624662
45CC100D0045CC09E3E
0002 0026 HP0010 M Hewlett Packard
4533332422467667725666676
8000100D00857C5440013B124
0003 0041 IBM010 M International Business Machines
44433324224676766766666247766677246666667
92D0100D009E452E149FE1C02539E5330D1389E53
0004 0027 MFC010 M Micro Focus COBOL
444333242246676246677244444
D630100D00D932F06F35303F2FC
0005 0025 MS0010 M Microsoft Corp.
4533332422466767667246772
D300100D00D932F3F6403F20E
0006 0023 REDH10 M Red Hat Linux
54443324225662467246677
2548100D0025408140C9E58
0007 0030 SUN010 M Sun Microsystems Ltd
554333242257624667677776672476
35E0100D0035E0D932F39345D30C44
0008 0026 UVSI10 M UV Software Inc.
55543324225525667767624662
5639100D005603F64712509E3E
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The pages above demonstrated uvhdcob using dat1/vendormas0,1,2,3,4. These files had only 1 record type. Now we will demo uvhdcob for files with multiple record types.
Please see 'dat1/vendorpaymas2' listed on page '3B3' with 2 record types (vendor names & vendor payments). Here are the 1st 4 records:
vendor# RT name/date invoice amount item-description ============================================================ DELL10 M Dell Inc. DELL10 P 20100131 INV00010 000195000 Dell server 2900 HP0010 M Hewlett Packard HP0010 P 20100215 INV00020 000042500 HP LCD Monitor
Also see the copybook/map listed on page 'G2' which defines both record types and has '*type' control records inserted at the begining (listed below).
*type=7(1),='M','vendormas'
*type=7(1),='P','vendorpay'
uvhdcob uses the 'type' control records to determine which copybook is to be used for the various record types. 'vendormas' records are identified by 'M' in byte 7 vs 'vendorpay' records which have 'P' in byte 7.
Also see the Alternate copybook/map 'vendorpaymasa' listed on page 'G3' which contains the following 'type' control recors:
*type=00:45,'vendormas'
*type=46:99,'vendorpay'
This Alternate format identifies record types by record length. From the vendorpaymas file listed above, you can see that the payment records are considerably longer than the vendor name records. We decided to use 45 as the boundary between the 2 types.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/vendorpaymas3 cobol/maps/vendorpaymas z4 =====================================================
*type=7(1),='M','vendormas': bgn=7,lth=1,typ=M,fnm=vendormas *type=7(1),='P','vendorpay': bgn=7,lth=1,typ=P,fnm=vendorpay uvhdcob datafile=dat1/vendorpaymas3 20100608:2330 copybook=cobol/maps/vendorpaymas options=z4 rec#=1 rcount=16 rsize=23 fsize=745 fptr=0 rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 DELL10 002 venmas-type 6 9 M 003 venmas-name 10 63 Dell Inc. rec#=1 rcount=16 rsize=23 fsize=745 fptr=0 ,k1=HelpPrompts,?=HelpScreens -->
rec#=2 rcount=16 rsize=60 fsize=745 fptr=23 rec# 2 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venpay-num 0 5 DELL10 002 recpay-type 6 9 P 003 venpay-date 10 19 20100131 004 venpay-inv 20 29 INV00010 005 venpay-amt 30 38 n 000195000 006 filler001 39 39 007 venpay-item 40 63 Dell server 2900 rec#=2 rcount=16 rsize=60 fsize=745 fptr=23 ,k1=HelpPrompts,?=HelpScreens -->
rec#=3 rcount=16 rsize=30 fsize=745 fptr=83 rec# 3 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venmas-num 0 5 HP0010 002 venmas-type 6 9 M 003 venmas-name 10 63 Hewlett Packard rec#=3 rcount=16 rsize=30 fsize=745 fptr=83 ,k1=HelpPrompts,?=HelpScreens -->
rec#=4 rcount=16 rsize=58 fsize=745 fptr=113 rec# 4 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 venpay-num 0 5 HP0010 002 recpay-type 6 9 P 003 venpay-date 10 19 20100215 004 venpay-inv 20 29 INV00020 005 venpay-amt 30 38 n 000042500 006 filler001 39 39 007 venpay-item 40 63 HP LCD Monitor rec#=4 rcount=16 rsize=58 fsize=745 fptr=113 ,k1=HelpPrompts,?=HelpScreens --> q <-- quit request - program ended **
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 4A1. | Verify data command (v) |
| - creating BAD data for demo |
| 4A2. | test/demo verify command |
| - sample display with BAD data fields indicated | |
| Bad-Numeric, Bad-Packed, Bad-Character |
| 4A3. | Notes re verify test/demo |
| - unprintable bytes in pic x fields converted to '.' periods flagged <-BadC | |
| - unpacked numeric fields with invalid digits/signs and flagged with <-BadN | |
| and the field is also shown in hexadecimal | |
| - packed numeric fields with invalid digits are flagged with <-BadP | |
| (packed fields are always shown in hexadecimal) |
| 4B1. | Options for Verify command |
| options a-b,c-d,e-f to inhibit Verify on up to 3 areas | |
| - identified by start & end byte displacements | |
| - allows you to search/Verify for other fields in record | |
| options x1,x2,x4 to inhibit stop-on-err for numeric/packed/character fields | |
| - continues to EOF & displays error counts & record#s of 1st & last error | |
| options y1,y2,y4 to specify signs: zoned ASCII, zoned EBCDIC, separate +/- | |
| options z1,z2,z4 to convert all blank numeric/packed fields to zeros | |
| - or convert unprintables in character fields to '.' periods | |
| - option 'p' to print formatted err records to tmp/filename_yymmdd_hhmmssVP | |
| - option 'w' to write original err records to tmp/filename_yymmdd_hhmmssVW | |
| - may follow with lvp/lvw to close files or omit to combine outputs |
| 4C1. | Create verify report for entire file --> v99p99x7 |
| - option p99 creates separate tmp/report with error records only | |
| - option x7 inhibits normal stop/display | |
| - quit uvhdcob & use vi/more/lp/uvlp12 on tmp/report | |
| See sample report for dat1/custmas1x with errs created on 4A1 |
| 4D1. | verify errors in occurs fields not shown if default option o1 |
| - but indicated with 'Bad@ 9999 ->' shown on right side of 1st occurs | |
| (where '9999' is the displacement of the error field) |
| 4D2. | verify errors in occurs fields with option o99 to show all occurs |
| - test/demo/illustration using dat1/custmas1 with bad packed field |
| 4E1. | Find command for Variable Length record files |
| - Index built on startup for Variable-Length files | |
| - find command examples |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'v' command will verify character, numeric,& packed data fields. Verify searches the file for unprintable characters in pic x fields & invalid digits or signs in unpacked or packed numeric fields.
We have provided a doctored version of dat1/custmas1 (dat1/custmas1x) to test/demo uvhdcob. dat1/custmas1x has been updated (using uvhdcob) to create errors in record#s 10 & 20.
Here are the 'update' commands we used to create the BAD data for the 'verify' command test/demo. We will omit the displays & list only the commands.
#1. login uvadm or cd /home/uvadm <-- change to uvadm
=============================
#2. cp dat1/custmas1 dat1/custmas1x <-- copy to alt file to make bad data
===============================
#3. uvhdcob dat1/custmas1x cobol/maps/custmas1 u <-- option 'u' for update
============================================
#4. --> 10 <-- goto record# 10
#5a. --> u 5(1),'*' <-- create non-numeric data in numeric field (cust#) #5b. --> u 78(1),x'EE' <-- create unprintable data in character field (prov) #5c. --> u 120(1),x'EE' <-- create invalid digits in packed field (thisyr sales)
#6. --> 20 <-- goto record# 20
#7a. --> u 5(2),'XX' <-- create non-num data in numeric field (cust#) #7b. --> u 83(3),x'EEEEEE' <-- create unprintables in char field (province) #7c. --> u 180(5),x'1E2E3E4E5E' <-- create BAD data in packed field (lastyr sls)
#1. cd /home/uvadm <-- change to uvadm
==============
#2. uvhdcob dat1/custmas1x cobol/maps/custmas1 <-- run on demo file
==========================================
- uvhdcob displays 1st record & prompts for command
- we are omitting 1st record display, see verify displays next page
--> v99 <-- search/verify until bad record found or EOF reached
- will display next bad record found & prompt for command
- if desired, could print(formatted) or write(raw) to tmp/...
--> vv <-- may then enter 'vv' to continue search/verify
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'v' verify command searches from the current record until it finds a record with at least 1 bad data field & displays that record. For our demo file (dat1/custmas1x) record# 10 is the 1st record with bad data fields.
--> v99 <-- Verify
rec# 10 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 15468* 31353436382A <-BadN 002 cm-delete 6 9 003 cm-name 10 34 FRANKLIN RESOUCES 004 cm-adrs 35 59 805 - 1199 HOWE STREET 005 cm-city 60 75 VANCOUVER 006 filler001 76 76 007 cm-prov 77 78 B. 42EE <-BadC 008 filler002 79 79 009 cm-postal 80 89 V6C2T6 010 cm-phone 90 101 604-666-5489 011 cm-contact 102 119 RON BENNETT 012 cm-thisyr-sales 012 120 124pns EE0123456C <-BadP 013 cm-lastyr-sales 012 180 184pns 000000000C 014 filler003 240 255 C 19980331
v99 --> 10 recs verified, 4 ERRs found in rec# 10, 1st at byte# 0
2 packed & 1 numeric bad signs/digits, 1 unprintables in char fields
--> vv <-- continue Verify
rec# 20 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 2343XX 323334335858 <-BadN 002 cm-delete 6 9 003 cm-name 10 34 TERRITORIAL REWIND 004 cm-adrs 35 59 BOX 1648 005 cm-city 60 75 WHITEHORSE 006 filler001 76 76 007 cm-prov 77 78 YK 008 filler002 79 79 009 cm-postal 80 89 Y1A... 593141EEEEEE <-BadC 010 cm-phone 90 101 403-512-3948 011 cm-contact 102 119 012 cm-thisyr-sales 012 120 124pns 000000000C 013 cm-lastyr-sales 012 180 184pns 1E2E3E4E5E <-BadP 014 filler003 240 255 20021130
vv --> 10 recs verified, 10 ERRs found in rec# 20, 1st at byte# 0
5 packed & 2 numeric bad signs/digits, 3 unprintables in char fields
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
--> v99p99x7 <-- create a verify report for the entire file
======= for separate investigation & printing.
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
abcdef - options to inhibit verify in 3 areas ID by offset from/to
v99a120b239 - inhibit verify in all fields from dsplcmnt 120 to 239
- to bypass known bad fields (to search for unknown bad fields)
v99a100b120c200d220e300f320 - inhibit verify in 3 record areas max
...x - option 'x' no-stop-on-error, count for display at EOF (or max# spcfd) v99x1 - nostop on errors in numeric fields v99x2 - nostop on errors in packed fields v99x4 - nostop on errors in character (pic x) fields v99x3 - nostop on errors in numeric + packed fields v99x7 - nostop on errors in numeric + packed + character fields
...y - option 'y' specify valid signs for numeric fields
v99y1 - (default) Micro Focus COBOL -0123456789=pqrstuvwxy x'70' zones
v99y2 - EBCDIC signs: +0123456789={ABCDEFGHI, -0123456789=}JKLMNOPQR
- defaults to y2 when input file EBCDIC (option 'a' on command line)
v99y4 - separate +/- signs (leading or trailing)
...z - option 'z' correct blank numeric/packed,& pic x with unprintable chars v99z1 - convert any all blank numeric fields to numeric zeros v99z2 - convert any all blank packed fields to packed zeros with x'_C' sign v99z4 - convert any any unprintable characters in pic x fields to '.' periods v99z7 - all of above
| v99x7p99 |
|
lw <-- may follow write command with 'lw' command to close file for separate
output files or omit for combined outputs from multi write commands
lp <-- similar command close print files for separate or omit for combined
lvw <-- similar command close verify writes for separate or omit for combined
lvp <-- similar command close verify prints for separate or omit for combined
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Use command --> v99p99x7 <-- to create a verify report for the entire file in the tmp/... subdir for separate investigation & printing. Option p99 writes only the error records into tmp/filename_yymmdd_hhmmssVP. Option x7 inhibits the default stop/display on each error record. You can then quit uvhd & use vi/more/lp/uvlp12/... on the tmp/report. Here is a demo using the dat1/custmas file with the 2 bad records created on page '4A1' & displayed on page '4A2'.
#1. uvhdcob dat1/custmas1x cobol/maps/custmas1 <-- run uvhdcob with demo files
==========================================
--> ........ <-- displays 1st record (display omitted to save space here)
#1a. --> v99p99x7 <-- enter command 'v99' with options 'p99' & 'x7
============
#1b. --> q <-- quit uvhdcob
#2. more tmp/custmas1x_110101_084059VP <-- display verify error records
==================================
rec# 10 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 15468* 31353436382A <-BadN 002 cm-delete 6 9 003 cm-name 10 34 FRANKLIN RESOUCES 004 cm-adrs 35 59 805 - 1199 HOWE STREET 005 cm-city 60 75 VANCOUVER 006 filler001 76 76 007 cm-prov 77 78 B. 42EE <-BadC 008 filler002 79 79 009 cm-postal 80 89 V6C2T6 010 cm-phone 90 101 604-666-5489 011 cm-contact 102 119 RON BENNETT 012 cm-thisyr-sales 012 120 124pns EE0123456C <-BadP 013 cm-lastyr-sales 012 180 184pns 000000000C 014 filler003 240 255 C 19980331
rec# 20 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 2343XX 323334335858 <-BadN 002 cm-delete 6 9 003 cm-name 10 34 TERRITORIAL REWIND 004 cm-adrs 35 59 BOX 1648 005 cm-city 60 75 WHITEHORSE 006 filler001 76 76 007 cm-prov 77 78 YK 008 filler002 79 79 009 cm-postal 80 89 Y1A... 593141EEEEEE20202 <-BadC 010 cm-phone 90 101 403-512-3948 011 cm-contact 102 119 012 cm-thisyr-sales 012 120 124pns 000000000C 013 cm-lastyr-sales 012 180 184pns 1E2E3E4E5E <-BadP 014 filler003 240 255 20021130
v99p99x7 --> 32 recs verified, 2 with errs, 1st at rec# 10, last at rec# 20 ERRs: 12 packed, 3 numeric signs/digits, 4 unprintable characters --> v99p99x7 closing: tmp/cm1_110102_093123VP
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
verify errors in occurs fields are not shown if default option o1 which shows only the 1st occurrence, but an error is indicated with 'Bad@ 9999 ->' shown on right side of 1st occurs ('9999' is displacement of error field).
Here is a demo using dat1/custmas1x with a bad packed field at byte 140 (in the 5th field of occurs 12). We will illustrate - 1st with default option 'o1' (show only 1st occurrence), then with option 'o99' to show all occurrences and see the error field.
uvhdcob dat1/custmas1x cobol/maps/custmas1 <-- uvhdcob will display 1st record
========================================== and prompt for command
see entry 'v99' below <======
rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 012 120 124pns 001234567C 013 cm-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 fptr=0 k1=HelpPrompts,?=HelpScreens --> v99 <======== enter 'verify' command <=====
rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 012 120 124pns 001234567C Bad@ 0140 -> 013 cm-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531
v --> 1 recs verified, 1 error recs, 4 this record, 1st at byte# 140 ERRs: 4 packed, 0 numeric signs/digits, 0 unprintable characters - vv99 continue, vv99h7 (x1=num,x2=pack,x4=char) count/nostop til EOF
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhdcob dat1/custmas1x cobol/maps/custmas1 o99 <-- rerun demo with option 'o99' ============================================== --> o99 <-- OR enter command 'o99' at prompt, note ERROR shown below '<-BadP'
rec# 1 occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 001 120 124pns 001234567C 012 cm-thisyr-sales 002 125 129pns 000000000C 012 cm-thisyr-sales 003 130 134pns 000000000C 012 cm-thisyr-sales 004 135 139pns 000257300D 012 cm-thisyr-sales 005 140 144pns EE051460EE <-BadP 012 cm-thisyr-sales 006 145 149pns 000000000C --- continue to EOR --> 012 cm-thisyr-sales 007 150 154pns 000029587D 012 cm-thisyr-sales 008 155 159pns 000266331C 012 cm-thisyr-sales 009 160 164pns 000404945C 012 cm-thisyr-sales 010 165 169pns 000000000C 012 cm-thisyr-sales 011 170 174pns 000000000C 012 cm-thisyr-sales 012 175 179pns 000000000C 013 cm-lastyr-sales 001 180 184pns 001234567D 013 cm-lastyr-sales 002 185 189pns 000015660C 013 cm-lastyr-sales 003 190 194pns 000003457C 013 cm-lastyr-sales 004 195 199pns 000004567D 013 cm-lastyr-sales 005 200 204pns 000000000C 013 cm-lastyr-sales 006 205 209pns 000002838C 013 cm-lastyr-sales 007 210 214pns 000000000C 013 cm-lastyr-sales 008 215 219pns 000008138C 013 cm-lastyr-sales 009 220 224pns 000005668D 013 cm-lastyr-sales 010 225 229pns 000001123C 013 cm-lastyr-sales 011 230 234pns 000000000C 013 cm-lastyr-sales 012 235 239pns 000001669D 014 filler003 240 255 C 19950531 v --> 1 recs verified, 1 error recs, 4 this record, 1st at byte# 140 ERRs: 4 packed, 0 numeric signs/digits, 0 unprintable characters - vv99 continue, vv99h7 (x1=num,x2=pack,x4=char) count/nostop til EOF
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
uvhd/uvhdcob can handle various filetypes - Text, RDW,& IDXFORMAT1/3/8 (Micro Focus COBOL compatible). It is easier to handle 'Fixed Length' records than the 'Variable Length' records.
For fixed length records, we can calculate the number of records in the file by diividing the file-size by the record-size. We can jump instantly to any record# in the file, because we can calculate & fileseek to its byte offset (record# * record-size).
For variable length records, you can jump to a record#, but it will not be correct, because the offset would be calculated using the current record-size. After the fileseek, it is unlikely we would be positioned at the begining of a record, but uvhd/uvhdcob will automatically scan to the begining of the next record depending on the filetype (using LineFeeds for text files & the unique binary record-prefixes in RDW & IDX files).
In May 2010, we added the 'f' find command to find records by their record#. This is slower than the 'b' (jump to byte#) or 'r' (jump to record#), because we have to read all records up to the desired record#.
For variable lth files, the record count would be wrong, without building an Index on startup, which uvhd now does since November 2010. Prior to the Index the record# was calculated at each record by dividing the file-size by the record-size.
Building the Index on startup speeds up subsequent finds by record#. Startup reads to EOF storing file-pointers & record#s at 1% filesize intervals. This also locks in the correct record count on all future screens headings.
Then use 'f#' to find records by their actual record# in Variable-Length files (vs r# for Fixed-length files).
Building the Index for a 2.2 gigabyte file (avg recsize 1000 bytes) takes 10 seconds on my HP xw9400 workstation.
uvhd dat1/vendormas <-- start uvhdc (or uvhdcob) =================== - displays record#1
--> f123456789 <-- find any desired record# (quickly using index)
--> 1 <-- return to BOF --> fm500 <-- find next record of an exact record-size (option 'm') --> fm500n600 <-- find next record in a size-range (options 'm' & 'n') --> ff <-- repeat prior find (saves recoding m & n options)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 5A1. | uvhdc1/uvhdc2 scripts make uvhdcob easier to use |
| - may omit specifying the copybook/map | |
| - uvhdc1/uvhdc2 retireves by looking up control file | |
| (indexed by datafilename) | |
| Environmental Variables for uvhdc1/uvhdc2 | |
| - CTLMAPDIR, CNVDATA, RUNLIBS, RUNDATA |
| 5A2. | uvhdc1 demo (may run in /home/uvadm) |
| - using dat1/vendormas0,1,2,3,4, vendorpay0,1,2,3,4 | |
| and cobol/maps/vendormas,vendorpay,vendorpaymas |
| 5A3. | Pre-Requisites for uvhdc1/uvhdc2 |
| - creating the Indexed file of datafilenames & copybooknames |
| 5A4. | test/demo uvhdc1 |
| - sample display dat1/vendormas0 |
| 5A5. | script uvhdc1 - listing |
| 5A6. | sample control file ctlfile_uvhdc1 |
| 5A7. | uvcopy job 'uvhdget2' called by 'uvhdc1/2' |
| 5B1. | uvhdc2 - intended for your site (vs uvadm demos) |
| 5B2. | Pre-Requisites for uvhdc2 |
| 5B3. | test/demo uvhdc2 |
| - sample display dat1/vendormas0 |
| 5B4. | ctlfile_uvhdc2 for script uvhdc2 |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
Scripts 'uvhdc1' & 'uvhdc2' make it easier to use 'uvhdcob' because:
This system depends on the following components (listed on following pages)
1a. uvhdc1 demo script - supplied in /home/uvadm/sf/demo/uvhdc1
1b. uvhdc2 alternative script - supplied in /home/uvadm/sf/util/uvhdc2
- embedded comments more relevant to mainframe conversion sites
2a. ctlfile_uvhdc1 control file demo for copybooks/datafiles described above:
- copybooks: vendormas, vendorpay, vendorpaymas
- datafiles: vendormas0/1/2/3/4, vendorpay0/1/2/3/4, vendorpaymas0/1/2/3/4
2b. ctlfile_uvhdc2 control file demo for conversion mainframe sites
- copybooks: custmas, salesdtl, acntmas
- datafiles: ar/customer.master, ar/sales.items, gl/account.master_ (GDG)
The script uses environmental variables CTLMAPDIR,CNVDATA,RUNLIBS,RUNDATA (the 1st 1 defined) to define the superdir for subdirs ctl/... & maps/... You can define your desired superdir in your profile:
export CTLMAPDIR=/home/mvstest/testlibs ======================================= - to be sure you get the desired superdir
export RUNLIBS=/home/mvstest/testlibs ===================================== - could omit CTLMAPDIR if you already have & want this
export CTLMAPDIR=$RUNLIBS ========================= - need to define CTLMAPDIR if you have both CNVDATA & RUNLIBS defined - since the script picks 1st of CTLMAPDIR,CNVDATA,RUNLIBS,RUNDATA
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will 1st demo the script using the copybooks & datafiles already listed above starting at '3A1' & '3B1'. You can run these demos in /home/uvadm/... or you can run in your homedir is you copy the demo files as shown on page '3C1'. Here are the directories relevant to demonstrating the uvhdc1 script.
/home/uvadm :----cobol <-- test/demo libraries : :----cpys/ - copybooks : : :----vendormas.cpy : : :----vendorpay.cpy : : :----vendorpaymas.cpy : : : : :----ctl/ - control files : : :----ctlfile_uvhdc1 <-- sequential ctlfile for editing : : :----ctlfile_uvhdc1I.dat <-- Indexed control for lookup by uvhdget2 : : :----ctlfile_uvhdc1.Iidx : : : : :----maps/ - maps (record layouts) generated from copybooks : : :----vendormas : : :----vendorpay : : :----vendorpaymas
:----dat1 <-- test/demo data files
: :----vendormas0 - Fixed length EBCDIC
: :----vendormas1 - Fixed length ASCII
: :----vendormas2 - text file (LineFeed after last nonblank)
: :----vendormas3 - RDW (4 byte prefix, binary recsize in 1st 2)
: :----vendormas4 - IDXFORMAT3 (Micro Focus variable lth)
: :
: :----vendorpay0/1/2/3/4 - payment records (same 5 formats as above)
: :
: :----vendorpaymas0/1/2/3/4 - multi-record-type file (payments + names)
- same 5 formats as above
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
I have already performed these pre-requisites for the demos in /home/uvadm using script 'uvhdc1' & control file 'ctlfile_uvhdc1'. You can repeat them if you wish & you would have to do similar commands to setup uvhdc1/2 for your own files (which might be closer to the uvhdc2 conventions).
#1. Login uvadm --> /home/uvadm
#2. uvcopyx cobmap1 cobol/cpys cobol/maps uop=q0i7
==============================================
- convert the 'copybooks' to 'cobmaps'
(record layouts with field start/end/length/type on right side)
#3. vi cobol/ctl/ctlfile_uvhdc1
===========================
- create the control file to relate datafiles to copybooks & filetypes
- here are a few sample records
- see complete control file listed on page '5A6'
dat1/custmas0 cpy=custmas1 rcs=00256
dat1/custmas1 cpy=custmas1 rcs=00256
dat1/vendormas0 cpy=vendormas rcs=00064
dat1/vendormas1 cpy=vendormas rcs=00064
dat1/vendormas2 cpy=vendormas rcs=00064
dat1/vendormas3 cpy=vendormas rcs=00064
dat1/vendorpay3 cpy=vendorpay rcs=00064
dat1/vendorpaymas3 cpy=vendorpaymas rcs=00064
#4. uvcopy loadctlI,fili1=ctl/ctlfile_uvhdc1,filo1=ctl/ctlfile_uvhdc1I
==================================================================
- load the control file into an indexed file for random access by uvhdget2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will 1st demo the script using the copybooks & datafiles already listed above starting at '3A1' & '3B1'. You can run demos in /home/uvadm/... as follows:
#1. Login uvadm --> /home/uvadm
#2a. ls -l dat1/vendor* <-- list demo data datafiles available
================== - listed above starting on page '3B1'
#2b. ls -l cobol/maps/vendor* <-- list demo copybook/maps available
======================== - listed above starting on page '3A1'
#2c. ls -l cobol/ctl/ctlfile* <-- list demo control files available
======================== - listed below starting on page '5A6'
#3. export CTLMAPDIR=/home/uvadm/cobol <-- define superdir for uvhdc1 to look
================================== for subdirs of maps/... & ctl/...
#4. uvhdc1 dat1/vendormas0 <-- run script to display EBCDIC version of file
======================
uvhdcob datafile=dat1/vendormas0
20100607:1405 copybook=cobol/maps/vendormas options=a
rec#=1 rcount=8 rsize=64 fsize=512 fptr=0
rec# 1 occurs bgn end typ<---- data (hex if typ=p/b) ---->
001 venmas-num 0 5 DELL10
002 venmas-type 6 9 M
003 venmas-name 10 63 Dell Inc.
rec#=1 rcount=8 rsize=64 fsize=512 fptr=0
,k1=HelpPrompts,?=HelpScreens -->
| Note |
|
#5a. uvhdcob dat1/vendormas0 $CTLMAPDIR/maps/vendormas fr64a
=======================================================
#5a. uvhdcob dat1/vendormas0 /home/uvadm/cobol/maps/vendormas fr64a
==============================================================
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# uvhdc1 - Korn shell script from UVSI stored in: /home/uvadm/sf/demo/
# uvhdc1 - script to run uvhdcob without specifying copybookname
# - see doc at www.uvsoftware.ca/uvhdcob.htm#5A1
# - using uvhdcob directly requires copybookname
# (awkward when datafile & copybook in different filesystems)
# uvhdc2 - also see uvhdc2 for production (example vsetest/testlibs,testdata)
# uvhdc1 - this script for demo in /home/uvadm/...
# uvhdc1 - datafiles in /home/uvadm/dat1/...
# - copybook/maps in /home/uvadm/cobol/maps/...
# - ctlfile_uvhdc1I in /home/uvadm/cobol/ctl/...
#
# export CTLMAPDIR=/home/uvadm/cobol
# ==================================
# - for demo documented at www.uvsoftware.ca/uvhdcob.htm#5A1
#
# uvhdc1 dat1.custmas1 <-- sample command for this script
# ====================
# - above script 'uvhdc1' generates following 'uvhdcob' command:
# (using control file entry matching datafilename spcfd)
#
# uvhdcob dat1/custmas1 $CTLMAPDIR/maps/custmas1 r256
# ===================================================
#
# - uvhdc1 looks for control-file & copybookmap in $CTLMAPDIR
# ($CTLMAPDIR/ctl/ctlfile_uvhdc1 & $CTLMAPDIR/maps/...)
# - if $CTLMAPDIR undefined, default to $CNVDATA, $RUNLIBS, or $RUNDATA
#
# ** sample control file **
#
# dat1/custmas0 cpy=custmas1 rcs=00256
# dat1/custmas1 cpy=custmas1 rcs=00256
# dat1/vendormas0 cpy=vendormas rcs=00064
# dat1/vendormas1 cpy=vendormas rcs=00064
# dat1/vendormas2 cpy=vendormas rcs=00064
# dat1/vendormas3 cpy=vendormas rcs=00064
# dat1/vendorpay3 cpy=vendorpay rcs=00064
# dat1/vendorpaymas3 cpy=vendorpaymas rcs=00064
#
# This script (uvhdc1) calls uvcopy job 'uvhdget2' to lookup the control file
# to get the copybookname & options (record-size & file-type), for example:
#
# uvhdc1 d2asc/custmas1 <-- script minimizes keystrokes required
# =====================
#
# uvcopy uvhdget2,filr1=$CTLMAPDIR/ctl/ctlfile_uvhdc1I,filo1=/tmp/$LOGNAME.cpy\
# =============================================================================
# ,arg1=custmas1
# ==============
#
# uvhdcob d2asc/custmas1 $CTLMAPDIR/maps/custmast
# ===============================================
# - long 'uvhdcob' command generated from short 'uvhdc1' script
#
# ** Pre-Requisites for uvhdc1 **
#
# 1. cd $CTLMAPDIR, or $CNVDATA, or $RUNLIBS, or $RUNDATA"
# =====================================================
# 2. uvcopyx cobmap1 cpys maps uop=q0i7p0 <-- create cobmaps
# =======================================
# 3. vi ctl/ctlfile_uvhdc1 <-- create control file
# =====================
# 4. uvcopy loadctlI,fili1=ctl/ctlfile_uvhdc1,filo1=ctl/ctlfile_uvhdc1I
# ==================================================================
# - load control file to Indexed file for use by uvhdget2
# keyed by datafilename to lookup copybook/map, recsize,& filetype options
#
file1="$1"; clops="$2" # give names to arg1(datafilename) & arg2(options)
file2="$1" # will append .dat if Indexed
file3=$(basename "$1") # basename (with subdir removed)
if [[ -z "$clops" ]]; then clops=m24; fi
#
# if CTLMAPDIR undefined, default to $CNVDATA or $RUNLIBS
if [[ -d "$CTLMAPDIR" ]]; then :
elif [[ -d "$CNVDATA" ]]; then export CTLMAPDIR=$CNVDATA;
elif [[ -d "$TESTLIBS" ]]; then export CTLMAPDIR=$TESTLIBS;
elif [[ -d "$TESTDATA" ]]; then export CTLMAPDIR=$TESTDATA;
else echo "none of $CTLMAPDIR,$CNVDATA,$RUNLIBS,$RUNDATA defined"
exit 99; fi
#
# filenames ending with '_' indicate generation files
# - get latest generation using exportgen0 function
if [[ "$file1" == *_ ]]; then exportgen0 file1 $file1; fi
#
# verify user filename is a valid file
# - check for Indexed file & set file2 = $file1.dat if indexed
if [[ -f "$file1.dat" ]]; then file2=$file1.dat; fi
if [[ ! -f "$file2" ]]
then echo "usage: uvhdc1 datafile [options]"
echo " ========================="
echo "example: uvhdc1 dat1/custmas1"
echo " ===================="
echo "arg1 - data file in $CTLMAPDIR/ctl/ctlfile_uvhdc1I"
echo " - ctlfile_uvhdc1I specifies cpy=copybookmap & rcs=recsize"
exit 1; fi
#
# use uvcopy job to get copybookname from datafilename
# - will write copybookname to: /tmp/${LOGNAME}.cpy
uvcopy uvhdget2,filr1=${CTLMAPDIR}/ctl/ctlfile_uvhdc1I\
,filo1=/tmp/${LOGNAME}.cpy,arg1=$file1
if (( $? != 0))
then echo "datafilename not in control file"; exit 2;fi
#
# open the file written by uvcopy & retrieve copyname & options into $variables
exec 3< /tmp/${LOGNAME}.cpy # open file written by uvcopy
read -u3 copyname rcsz cfops keys other # read file contents into variables
exec 3<&- # close file
#
uvhdcob $file2 $CTLMAPDIR/maps/$copyname $rcsz$cfops$clops
#=========================================================
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# ctlfile_uvhdc1 - sample control file for: 'uvhdcob' & uvhdc2/uvhdget2 # - see www.uvsoftware.ca/uvhdcob.htm#5A1 # - stored at /home/uvadm/cobol/ctl/ctlfile_uvhdc1 for demos # - using data files in /home/uvadm/dat1/... # (custmas1, vendormas0/1/2/3/4, vendorpay0/1/2/3/4, ...) # - using copybook/maps in /home/uvadm/cobol/maps/... # (custmas1,vendormas,vendorpay,vendorpaymas) # - saves having to specify copybook/map for uvhdcob & desired datafile # - using uvhdcob directly requires copybook/map # (awkward when datafile & copybook in different filesystems) # # uvhdcob dat1/custmas1 cobol/maps/custmas1 <-- sample uvhdcob # =============================================== # # uvhdc1 dat1/custmas1 <-- script 'uvhdc1' saves coding copybook/map # ==================== - looks-up ctlfile to get copybook # # ** Pre-Requisites for uvhdc1 ** # # 0. cd $CTLMAPDIR or $CNVDATA or $RUNLIBS or $RUNLIBS # # 1. uvcopyx cobmap1 cpys maps uop=q0i7p0 <-- create cobmaps # ==================================== # # 2. vi ctl/ctlfile_uvhdc1 <-- create ctlfile to relate datafiles to copybooks # ===================== # # 3. uvcopy loadctlI,fili1=ctl/ctlfile_uvhdc1,filo1=ctl/ctlfile_uvhdc1I # ================================================================== # - load indexed file # #--------datafile------- --copybook-- -recsize- -type- -options- dat1/custmas0 cpy=custmas1 rcs=00256 typ=RSF ops=fa dat1/custmas1 cpy=custmas1 rcs=00256 typ=RSF ops=f dat1/sales0 cpy=sales1 rcs=00064 typ=RSF ops=fa dat1/sales1 cpy=sales1 rcs=00064 typ=RSF ops=f dat1/sales2 cpy=sales1 rcs=00064 typ=RST ops=f dat1/sales4rdw cpy=sales1 rcs=00064 typ=RDW ops=z4 dat1/vendormas0 cpy=vendormas rcs=00064 typ=RSF ops=fa dat1/vendormas1 cpy=vendormas rcs=00064 typ=RSF ops=f dat1/vendormas2 cpy=vendormas rcs=00064 typ=LST ops=t dat1/vendormas3 cpy=vendormas rcs=00064 typ=RDW ops=z4 dat1/vendormas4 cpy=vendormas rcs=00064 typ=IDXf8 ops=v dat1/vendorpay0 cpy=vendorpay rcs=00064 typ=RSF ops=fa dat1/vendorpay1 cpy=vendorpay rcs=00064 typ=RSF ops=f dat1/vendorpay2 cpy=vendorpay rcs=00064 typ=LST ops=t dat1/vendorpay3 cpy=vendorpay rcs=00064 typ=RDW ops=z4 dat1/vendorpay4 cpy=vendorpay rcs=00064 typ=IDXf8 ops=v dat1/vendorpaymas0 cpy=vendorpaymas rcs=00064 typ=RSF ops=fa dat1/vendorpaymas1 cpy=vendorpaymas rcs=00064 typ=RSF ops=f dat1/vendorpaymas2 cpy=vendorpaymas rcs=00064 typ=LST ops=t dat1/vendorpaymas3 cpy=vendorpaymas rcs=00064 typ=RDW ops=z4 dat1/vendorpaymas4 cpy=vendorpaymas rcs=00064 typ=IDXf8 ops=v
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# uvhdget2 - uvcopy Parameter File from UVSI stored in: /home/uvadm/pf/util/
# uvhdget2 - get the copybookname using indexed control file
# of datafilenames & copybooknames
# - command format & examples follow below:
#Jan24/09 - ctlfile1 changed to ctlfile_uvhdc2
#
# uvcopy uvhdget2,filr1=Indexed-control-file,filo1=copyname,arg1=datafile
# =======================================================================
#
# uvcopy uvhdget2,filr1=$CTLMAPDIR/ctl/ctlfile_uvhdc2
# ,filo1=/tmp/$LOGNAME.cpy,arg1=ar/customer.master
# ===============================================================
#
# $CTLMAPDIR/ctl/ctlfile_uvhdc2 <-- datafilenames, cpy=copybookmap, rcs=recsize
# $CTLMAPDIR/maps/copybookmaps <-- record layouts created by uvcopy cobmap1
# if $CTLMAPDIR undefined, defaults to $CNVDATA, or $RUNLIBS, or $RUNDATA
#
# This uvcopy job is called by script 'uvhdc2' which allows you to run 'uvhdcob'
# without specifying the copybookname, or options for record-size
# - uses indexed control file to determine copyname from datafilename
#
# uvhdcob subdir/datafile copybook options <-- uvhdcob direct command
# ======================================== - must specify file,copybook,optns
#
# uvhdc2 subdir/datafile [r257m50a] <-- usually need no options
# ================================= - option 'r' recsize supplied by copybook
# - may override & specify other options
#
# uvhdc2 ar/customer.master
# =========================
#
# - above script 'uvhdc2' generates following 'uvhdcob' command:
# (using control file entry below matching datafilename spcfd)
#
# uvhdcob ar/customer.master $CTLMAPDIR/maps/custmas fr256
# ========================================================
#
# ** sample control file **
#
# ar/customer.master cpy=custmas rcs=00256 typ=RSF ops=f
# ar/sales.items cpy=custmas rcs=00256 typ=RSF ops=f
# gl/account.master_ cpy=custmas rcs=00256 typ=RSF ops=f
#
filr1=${CTLMAPDIR}/ctl/ctlfile_uvhdc2,typ=ISF,rcs=150
filo1=/tmp/${LOGNAME}.cpy,typ=LSTt,rcs=150
#
@run
opn all open files
mvc a0(40),$arg1 store datafilename as key
redm5 filr1,a0(150) random read by key to get copymapname
skp! err1
clr b0(300),' ' init arguments build area
#
# store copybookname as arg1
man20 scn a0(128),'cpy=' scan for copybook ID
skp! err2
mvum b0(40),ax4,'. ' store cpybknm til .ext or blank
#
# store rec-size as 1st option in arg2
# - but clear if recsize zero (for RDW files)
#Feb06/10 - allow alt rcs= ID at Everis
scn a0(128),'rcs=' scan for recsize ID
skp= man26
scn a0(128),'rcm=' scan for alternate recsize ID
skp! err3
man26 mvc b41(1),'r' prefix 'r' reqd for uvhdcob
mvn b42(5),ax4(5) store recsize & test zero ?
#
# If indexed - add 1 to record-size
man30 scn a0(128),'key=' scan for keys ID
skp! man40
mvum b200(5),ax8,') ' store key lth til ending ')'
cmn b200(5),1 any key length ?
skp< 1
add b42(5),1 add 1 to recsize in ctlfile
#
#Jun12/10 - scan for ops=...
man40 scn a0(128),'ops=' control file options ?
skp! 1
mvc b50(8),ax4
#
# squeeze arguments to 1 blank between
# - 1st squeeze options to no blanks (all options arg2)
man80 sqz b40(60),' ' squeeze all options into arg2
sqzc1 b0(100),' ' squeeze to 1 blank btwn words
put filo1,b0(128) write to output file
eoj
#
#--------------------------------------------------------------------
#
err1 msgv1 'datafilename NOT FOUND in ctlfile: $filr1'
mvfv3 c0(80),'datafile = $arg1 '
can c0(80)
#
err2 msgv1 'copybookmapname NOT FOUND in ctlfile: $filr1'
mvfv3 c0(80),'for datafile = $arg1 '
can c0(80)
#
err3 msgv1 'record-size not found in ctlfile: $filr1'
mvfv3 c0(80),'datafile = $arg1 '
can c0(80)
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will demo the script using the 'vsetest' files supplied to demo the JCL conversions. See the setup procedures at VSEJCL.htm#1P1 thru 1P4. All directories are shown at VSEJCL.htm#1A1 but here are the directories relevant to demonstrating the uvhdc2 script.
Rather than setting up /home/vsetest/..., you could run these demos directly in /home/uvadm/vsetest/... since the VSEJCL demos instruct you to copy /home/uvadm/vsetest/* to /home/vsetest/...
These demo files might be more relevant to mainframe conversions than the 'vendor' files used in the demos above '5A1' - '5A7'.
/home/vsetest :----testlibs <-- test/demo libraries : :----cpys/ - copybooks : : :----acntmas.cpy : : :----custmas.cpy : : :----saledtl.cpy : :----ctl/ - control files : : :----ctlfile_uvhdc2 <-- sequential ctlfile for editing : : :----ctlfile_uvhdc2.dat <-- Indexed control for lookup by uvhdget2 : : :----ctlfile_uvhdc2.idx : :----maps/ - record layouts generated from copybooks : : :----acntmas : : :----custmas : : :----saledtl
:----testdata <-- test/demo data files : :----ar/ - Accounts Receivable : : :----customer.master : : :----sales.items : :----gl/ - General Ledger : : :----account.master_
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#1. Login vsetest --> /home/vsetest
=============
`
Rather than setting up /home/vsetest/..., you could run these demos directly
in /home/uvadm/vsetest/... since the VSEJCL demos instruct you to copy
/home/uvadm/vsetest/* to /home/vsetest/...
#1a. Login uvadm --> /home/uvadm
===========
#2. cd vsetest/testlibs <-- change to /home/uvadm/vsetest/testlibs
===================
#3. uvcopyx cobmap1 cpys maps uop=q0i7
==================================
- convert the 'copybooks' to 'cobmaps'
(record layouts with field start/end/length/type on right side)
#4. vi ctl/ctlfile_uvhdc2
=====================
- create the control file to relate datafiles to copybooks & filetypes
- here are a few sample records
- see complete control file listed on page '5A6'
#5. uvcopy loadctlI,fili1=ctl/ctlfile_uvhdc2,filo1=ctl/ctlfile_uvhdc2I
==================================================================
- load the control file into an indexed file for random access by uvhdget2
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
We will 1st demo the script using the copybooks & datafiles already listed above starting at '3A1' & '3B1'. You can run demos in /home/uvadm/... as follows:
#1. Login uvadm --> /home/uvadm
#2. cd vsetest/testdata <-- change to /home/uvadm/vsetest/testdata
===================
#3a. l ar <-- list A/R data files (customer.master & sales.items) #3b. l gl <-- list G/L data files (account.master)
#4. export CTLMAPDIR=/home/uvadm/vsetest/testlibs
==================================
- define superdir for uvhdc2 to look for subdirs maps/... & ctl/...
#5. uvhdc2 ar/customer.master
=========================
| Note |
|
#5a. uvhdcob ar/customer.master $CTLMAPDIR/maps/custmas fr256
========================================================
#5b. uvhdcob ar/customer.master /home/mvstest/testlibs/maps/custmas fr256
====================================================================
uvhdcob datafile=ar/customer.master 20090222:0844 copybook=/home/mvstest/testlibs/maps/custmas options= record#=1 totalrecs=32 recsize=256 filesize=8192 fileptr=0 rec# 1 fieldname occurs bgn end typ<------ data (hex if typ=p/b) -----> 001 cm-num 0 5 n 130140 002 cm-delete 6 9 003 cm-name 10 34 EVERGREEN MOTORS LTD. 004 cm-adrs 35 59 1815 BOWEN ROAD 005 cm-city 60 75 NANAIMO 006 filler001 76 76 007 cm-prov 77 78 BC 008 filler002 79 79 009 cm-postal 80 89 V9S1H1 010 cm-phone 90 101 250-754-5531 011 cm-contact 102 119 LARRY WRENCH 012 cm-thisyr-sales 012 120 124pns 001234567C 013 cm-lastyr-sales 012 180 184pns 001234567D 014 filler003 240 255 C 19950531 rec#=1 rcount=32 rsize=256 fsize=8192 dat1/custmas1 null=next,r#=rec,s=search,u=update,x=undo,p=print,i=iprint,w=write,t=tally ,v=verify,c=chkseq#,e=exit to uvhd,q=quit,?=help -->
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
# ctlfile_uvhdc2 - sample control file for: 'uvhdcob' & uvhdc2/uvhdget2 # - see www.uvsoftware.ca/uvhdcob.htm#5A1 # # ctlfile_uvhdc2 - stored at /home/uvadm/vsetest/ctl/ctlfile_uvhdc2 for demos # - intended for demos after setting up /home/vsetest/... # - after copying files from /home/uvadm/vsetest/* to /home/vsetest/... # - using data files in /home/vsetest/testdata/ar/... # (ar/customer.master, etc) # - using copybook/maps in /home/vsetest/testlibs/maps/... # (ar/custmas1,etc) # # - uvhdc2 saves having to specify copybook/map for uvhdcob & desired datafile # - using uvhdcob directly requires copybook/map # (awkward when datafile & copybook in different filesystems) # # uvhdcob ar/customer.master custmas <-- sample uvhdcob # ================================== # # uvhdc2 ar/customer.master <-- script 'uvhdc2' saves coding copybook/map # =========================== - looks-up ctlfile to get copybook # # ** Pre-Requisites for uvhdc2 ** # # 0. cd $CTLMAPDIR or $CNVDATA or $RUNLIBS or $RUNLIBS # # 1. uvcopyx cobmap1 cpys maps uop=q0i7p0 <-- create cobmaps # ==================================== # # 2. vi ctl/ctlfile_uvhdc2 <-- create ctlfile # ===================== # # 3. uvcopy loadctlI,fili1=ctl/ctlfile_uvhdc2,filo1=ctl/ctlfile_uvhdc2I # ================================================================== # - load control file # #--------datafile------- --copybook-- -recsize- -type- -options- # ar/customer.master cpy=custmas rcs=00256 typ=RSF ops=f ar/sales.items cpy=saledtl rcs=00256 typ=RSF ops=f gl/account.master_ cpy=acntmas rcs=00256 typ=RSF ops=f #
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
| 6A1. | Customizing uvhd for each user via UVHDCOBROP |
| 6A2. | Environmental Variables for printing |
| - using the 'i' command (Immediate print) | |
| vs the 'p' command (print to a file) |
| 6B1. | uvhddiff2 - script to compare files |
| - using uvhdcob to show copybook fieldnames & datafield contents | |
| - sample output report |
| 6B2. | Listing of uvhddiff2 script |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
You may export variable UVHDCOBROP in the profile to specify the preferred options for each user. For example, users who prefer 50 lines per screen & space between headings could add the following to their profile:
50 lines per screen is possible for the Windows command screens using terminal emulators such as 'putty'.
export UVHDCOBROP=m50s2 <-- user options for 50 lines/screen ======================= & space after hdgs
| Note |
|
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'print' command 'p' does not print immediately, but writes the screen displays to a tmp/file, which can subsequently be printed manually after you quit the uvhdcob utility.
The immediate print 'i' uses the command stored in the variable 'iprtcmd' in the uvhdcob 'C' program. You could modify this command in the C program, & recompile the program.
char iprtcmd[30] = "uvlp12"; (original command)
'uvlp12' is a script, 1 of several supplied scripts using the 'uvlist' utility, which supplies page headings & page numbering. See uvlist.doc for instructions to modify the destination printer used by these scripts.
You could modify the script called by the 'i' command. For example to print at 14 chars per inch (vs default 10 cpi):
char iprtcmd[30] = "uvlp14"; (modified command)
A more convenient method of modifying Immediate printing is to use the environmental variables 'UVLPDEST' & 'UVHDCOBPRINT'. You could export them at your shell prompt before running uvhd or even better setup your normal choices in your .profile. Here are some examples:
export UVLPDEST=-dlaser2 <-- setup printer dest for all 'uvlp' scripts
export UVHDCOBPRINT=uvlp12 <-- the default script uvlp12 for 80 chars Portrait
export UVHDCOBPRINT=uvlp14 <-- uvlp14 would leave more space on right
The default scripts for printing on Windows are uvlpr12 & uvlpr12L. These are defined within the uvhd.c program & are used if no environmental variables are defined. These are equivalent to the following:
set UVHDCOBPRINT=uvlpr12 <-- specify DOS script for 64 chars Portrait
For windows 2000 you could define on the following screen:
ControlPanel --> System --> Advanced --> Environmental Variables
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
The 'uvhdcob' utility & 'uvhddiff2' script can be used to compare 2 datafiles & show the differences with the corresponding COBOL copybook names.
We will demo uvhddiff2, using the /home/uvadm/cobol/maps directory of cobmaps, already generated from the copybooks (/home/uvadm/cobol/cpys), as previously described on page '1B1'.
1a. cd $HOME - change to your homedir (or uvadm) 1b. mkdir tstdif - make subdir for test 1c. cd tstdir - change into subdir 1d. mkdir dat1 dat2 tmp - make sub-subdirs
2a. cp /home/uvadm/dat1/warmas1 dat1 - copy testfile to dat1 2b. cp /home/uvadm/dat1/warmas1 dat2 - copy testfile to dat2
4a. export UVDATA1=dat1 UVDATA2=dat2 - export dat1/dat2 for script 4b. export RUNLIBS=/home/uvadm/cobol - point to test/demo cobmaps
#5. uvhddiff2 warmas1 warmas1 - run script to create diff report
=========================
** sample output report **
1c1
< dat1/warmas1 fsz=576 rsz=64 totrecs=9 current=1
---
> dat2/warmas1 fsz=576 rsz=64 totrecs=9 current=1
34c34
< wm-descrip 12 29 dish washer
---
> wm-descrip 12 29 dish CRASHER
76c76
< wm-descrip 12 29 clothes dryer
---
> wm-descrip 12 29 clothes SHRINKER
Note that this method of comparing data-files is not as exact as the uvcmp1/2/3 jobs documented in CMPjobs.doc because:
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
#!/bin/ksh
# uvhddiff2 - Korn shell script from UVSI stored in: /home/uvadm/sf/util/
# uvhddiff2 - run uvhdcob & diff for 1 pair of data files
#
#usage: uvhddiff2 datafile cobmapname
# =============================
# export UVDATA1=directory of 1st set of data-files
# export UVDATA2=directory of 2nd set of data-files
# - datafiles must be named the same in both directories
# maps - directory of cobmaps (created by cobmap1 from copybooks)
# tmp - directory for interim work files & diff report
# - filename will be: datafilename.dif
# export COBMAPDIR=cobmaps - you must define subdir for cobmaps
# or specify path-name to cobmap as arg2
#
f="$1"; f1=$UVDATA1/"$1"; f2=$UVDATA2/"$1"; cmf=$COBMAPDIR/"$2"
if [[ "$2" = */* ]]
then cmf = $2
fi
# echo "debug: f1=$f1 f2=$f2 cmf=$cmf"
if [[ -f $f1 && -f $f2 && -f $cmf ]]; then :
else echo "#1. export UVDATA1=dir1 UVDATA2=dir2 <-- must export subdirs"
echo " ================================"
echo "#2. uvhddiff2 datafile cobmap <-- run script to diff files"
echo " ========================="
echo "#3. vi tmp/datafilename.dif <-- diff report in tmp/ subdir"
echo " ======================="
exit 9; fi
#
uvhdcob $f1 $cmf d1x=p99999999 >/dev/null
#========================================
mv -f tmp/$f tmp/$f.1
uvhdcob $f2 $cmf d1x=p99999999 >/dev/null
#========================================
mv -f tmp/$f tmp/$f.2
diff -b tmp/$f.1 tmp/$f.2 >tmp/$f.dif
#====================================
status=$?
if (($status == 0))
then echo "No Difference: $f1 & $f2"
else echo "diff report in: tmp/$f.dif, enter vi,uvlp12,etc"
read reply
if [[ -n "$reply" ]]; then
$reply tmp/$f.dif
fi
fi
exit 0
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 1I1 | *type: *TYPE control record |
| 3A2 | *type: Notes re *TYPE |
| 5A2 | ...: uvhdc1 demo in /home/uvadm/... |
| 5B1 | ...: uvhdc2 demo in /home/vsetest/... |
| 3C3 | Ascii: uvhdcob demo for ASCII Fixed Length |
| 4A1 | Bad: creating BAD data |
| 4A2 | Bad: sample display with BAD data fields |
| 3B1 | Below: notes re data-file listings (below) |
| 2H19 | Blank: set Inhibit zero/blank fields |
| 4E1 | Built: Index built on startup for Variable-Length files |
| 5A7 | Called: uvcopy job 'uvhdget2' called by 'uvhdc1/2' |
| 5A1 | Cnvdata: CTLMAPDIR, CNVDATA, RUNLIBS, RUNDATA |
| 1C1 | Cobmap: sample cobmap report |
| 1D1 | Cobmap: custran1 - cobmap to demo group occurs |
| 1E1 | Cobmap: custran2 - cobmap to demo GROUP & ITEM occurs |
| 1F1 | Cobmap: custran3 - cobmap to demo GROUP & ITEM occurs |
| 1G1 | Cobmap: custran4 - cobmap with 2 'ODO's |
| 3A1 | Cobol: cobol/maps/vendormas |
| 3A1 | Cobol: cobol/maps/vendorpay |
| 3A2 | Cobol: cobol/maps/vendorpaymas |
| 3A3 | Cobol: cobol/maps/vendorpaymasa |
| 2H18 | Combined: lw/lp/lvw/lvp separate or combined write/print files |
| 4B1 | Combined: lw/lp/lvw/lvp separate or combined write/print files |
| 1I1 | Command: uvhdcob command line & options |
| 4A1 | Command: 'v' verify data command |
| 4A1 | Command: test/demo verify command |
| 4E1 | Command: find command examples |
| 4E1 | Command: find command for Variable Length, N/R for Fixed-Lth |
| 6B1 | Compare: uvhddiff2 - script to compare files |
| 1I1 | Control: *TYPE control record |
| 5A6 | Control: sample control file ctlfile_uvhdc1 |
| 3C1 | Copy: OR login to your homedir & copy demo files |
| 3A1 | Copybooks: for the demo datafiles |
| 5A6 | Ctlfile_uvhdc1: sample control file ctlfile_uvhdc1 |
| 5B4 | Ctlfile_uvhdc2: for script uvhdc2 |
| 5A1 | Ctlmapdir: CTLMAPDIR, CNVDATA, RUNLIBS, RUNDATA |
| 1C2 | Custmas1: sample 'uvhdcob' display for demo file dat1/custmas1 |
| 6A1 | Customizing: Customizing uvhd for each user via UVHDCOBROP |
| 6A2 | Customizing: Customizing printing with Environmental Variables |
| 1D1 | Custran1: - cobmap to demo group occurs |
| 1E1 | Custran2: - cobmap to demo GROUP & ITEM occurs |
| 1F1 | Custran3: - cobmap to demo GROUP & ITEM occurs |
| 1G1 | Custran4: - cobmap with 2 'ODO's |
| 1G2 | Custran6: - 2 levels of group occurs |
| 1C2 | Dat1: sample 'uvhdcob' display for demo file dat1/custmas1 |
| 3B2 | Dat1: dat1/vendormas2 |
| 3B2 | Dat1: dat1/vendorpay2 |
| 3B3 | Dat1: dat1/vendorpaymas2 |
| 5A4 | Dat1: sample display dat1/vendormas0 |
| 5B3 | Dat1: sample display dat1/vendormas0 |
| 4A1 | Data: 'v' verify data command |
| 4A1 | Data: creating BAD data |
| 4A2 | Data: sample display with BAD data fields |
| 3B1 | Data-file: notes re data-file listings (below) |
| 3B1 | Data-files: demo Data-Files - Fixed,Text,RDW,IDX |
| 3A1 | Datafiles: copybooks for the demo datafiles |
| 1D2 | Default: demo group occurs options default g1 (1st only) |
| 1E2 | Default: demo group&item occurs options default g1o1 (1st only) |
| 1C2 | Demo: sample 'uvhdcob' display for demo file dat1/custmas1 |
| 1D1 | Demo: custran1 - cobmap to demo group occurs |
| 1D2 | Demo: group occurs options default g1 (1st only) |
| 1D3 | Demo: group occurs option g99 (show all occurs) |
| 1E1 | Demo: custran2 - cobmap to demo GROUP & ITEM occurs |
| 1E2 | Demo: group&item occurs options default g1o1 (1st only) |
| 1E3 | Demo: group&item occurs options g99o99 (show all occurs) |
| 1F1 | Demo: custran3 - cobmap to demo GROUP & ITEM occurs |
| 3A1 | Demo: copybooks for the demo datafiles |
| 3B1 | Demo: Data-Files - Fixed,Text,RDW,IDX |
| 3C1 | Demo: OR login to your homedir & copy demo files |
| 3C1 | Demo: preparation to demo various filetypes |
| 3C2 | Demo: uvhdcob demo for EBCDIC files |
| 3C2 | Demo: uvhdcob demo for various filetypes |
| 3C3 | Demo: uvhdcob demo for ASCII Fixed Length |
| 3C3 | Demo: uvhdcob demo for Text files |
| 3C4 | Demo: uvhdcob demo for RDW files |
| 3C5 | Demo: for RDW (continued) |
| 3C8 | Demo: uvhdcob demo for IDXf3/IDXf8 files |
| 4A1 | Demo: test/demo verify command |
| 4A3 | Demo: Notes re uvhdcob Verify demo above |
| 5A2 | Demo: uvhdc1 demo in /home/uvadm/... |
| 5A4 | Demo: test/demo uvhdc1 |
| 5B1 | Demo: uvhdc2 demo in /home/vsetest/... |
| 5B3 | Demo: test/demo uvhdc2 |
| 1F2 | Depending: occurs depending on with options z4g99i4 |
| 1F3 | Depending: uvhd display of occurs depending on records |
| 1A1 | Display: uvhdcob - sample display |
| 1C2 | Display: sample 'uvhdcob' display for demo file dat1/custmas1 |
| 1F3 | Display: uvhd display of occurs depending on records |
| 3D2 | Display: sample display for vendorpaymas |
| 4A2 | Display: sample display with BAD data fields |
| 5A4 | Display: sample display dat1/vendormas0 |
| 5B3 | Display: sample display dat1/vendormas0 |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 5A1 | Easier: scripts to make uvhdcob easier to use |
| 3C2 | Ebcdic: uvhdcob demo for EBCDIC files |
| 4C1 | Entire: create verify report for entire file |
| 6A2 | Env-vars: for printing on Windows |
| 6A2 | Environmental: Customizing printing with Environmental Variables |
| 6A2 | Environmental: variables for 'i' printing |
| 4D1 | Errors: verify errors in occurs fields |
| 4E1 | Examples: find command examples |
| 1C2 | Fields: notes re 'occurs' fields |
| 1C4 | Fields: options 'o99' all occurs & 'i4' inhibit 0/b fields |
| 1C5 | Fields: options 'o5' 5 occurs & 'i1' inhibit 0/b occurs fields |
| 1D2 | Fields: notes re 'group occurs' fields |
| 2H19 | Fields: set Inhibit zero/blank fields |
| 4A2 | Fields: sample display with BAD data fields |
| 4D1 | Fields: verify errors in occurs fields |
| 3C1 | Filetypes: preparation to demo various filetypes |
| 3C2 | Filetypes: uvhdcob demo for various filetypes |
| 4E1 | Find: command examples |
| 4E1 | Find: command for Variable Length, N/R for Fixed-Lth |
| 3B1 | Fixed: demo Data-Files - Fixed,Text,RDW,IDX |
| 3C3 | Fixed: uvhdcob demo for ASCII Fixed Length |
| 4E1 | Fixed-lth: find command for Variable Length, N/R for Fixed-Lth |
| 2H20 | Format: Alternate TYPE format for variable length records |
| 1A2 | Function: uvhdcob function summary |
| 1E2 | G1o1: demo group&item occurs options default g1o1 (1st only) |
| 1D3 | G99: demo group occurs option g99 (show all occurs) |
| 1E3 | G99o99: demo group&item occurs options g99o99 (show all occurs) |
| 1E4 | G99o99i4: group&item options g99o99i4 (all occurs, inhibit 0/b) |
| 1D1 | Group: custran1 - cobmap to demo group occurs |
| 1D2 | Group: demo group occurs options default g1 (1st only) |
| 1D2 | Group: notes re 'group occurs' fields |
| 1D3 | Group: demo group occurs option g99 (show all occurs) |
| 1E1 | Group: custran2 - cobmap to demo GROUP & ITEM occurs |
| 1E2 | Group: notes group & item occurs |
| 1F1 | Group: custran3 - cobmap to demo GROUP & ITEM occurs |
| 1G2 | Group: custran6 - 2 levels of group occurs |
| 1E2 | Group&item: demo group&item occurs options default g1o1 (1st only) |
| 1E3 | Group&item: demo group&item occurs options g99o99 (show all occurs) |
| 1E4 | Group&item: options g99o99i4 (all occurs, inhibit 0/b) |
| 5A2 | Home: uvhdc1 demo in /home/uvadm/... |
| 5B1 | Home: uvhdc2 demo in /home/vsetest/... |
| 3C1 | Homedir: OR login to your homedir & copy demo files |
| 3B1 | Idx: demo Data-Files - Fixed,Text,RDW,IDX |
| 3C5 | Idx: Variable Length files (text,RDW,IDX) |
| 3C8 | Idxf3: uvhdcob demo for IDXf3/IDXf8 files |
| 3C8 | Idxf8: uvhdcob demo for IDXf3/IDXf8 files |
| 1C4 | Inhibit: options 'o99' all occurs & 'i4' inhibit 0/b fields |
| 1C5 | Inhibit: options 'o5' 5 occurs & 'i1' inhibit 0/b occurs fields |
| 1E4 | Inhibit: group&item options g99o99i4 (all occurs, inhibit 0/b) |
| 2H19 | Inhibit: set Inhibit zero/blank fields |
| 1E1 | Item: custran2 - cobmap to demo GROUP & ITEM occurs |
| 1E2 | Item: notes group & item occurs |
| 1F1 | Item: custran3 - cobmap to demo GROUP & ITEM occurs |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 1G2 | Levels: custran6 - 2 levels of group occurs |
| 1I1 | Line: uvhdcob command line & options |
| 5A5 | Listing: script uvhdc1 - listing |
| 6B2 | Listing: uvhddiff2 - script listing |
| 3B1 | Listings: notes re data-file listings (below) |
| 3C7 | Listrdw1: listRDW1 alternative to uvhd above |
| 3C1 | Login: OR login to your homedir & copy demo files |
| 2H18 | Lvp: lw/lp/lvw/lvp separate or combined write/print files |
| 4B1 | Lvp: lw/lp/lvw/lvp separate or combined write/print files |
| 2H18 | Lvw: lw/lp/lvw/lvp separate or combined write/print files |
| 4B1 | Lvw: lw/lp/lvw/lvp separate or combined write/print files |
| 3A1 | Maps: cobol/maps/vendormas |
| 3A1 | Maps: cobol/maps/vendorpay |
| 3A2 | Maps: cobol/maps/vendorpaymas |
| 3A3 | Maps: cobol/maps/vendorpaymasa |
| 3D1 | Multi-record-types: Multi-Record-Types (Redefined records) |
| 1C3 | O99: sample with option 'o99' show all occurrences |
| 1C4 | O99: options 'o99' all occurs & 'i4' inhibit 0/b fields |
| 4D2 | O99: rerun with option 'o99' (show all occurrences) |
| 1C3 | Occurrences: sample with option 'o99' show all occurrences |
| 4D2 | Occurrences: rerun with option 'o99' (show all occurrences) |
| 1C2 | Occurs: notes re 'occurs' fields |
| 1C4 | Occurs: options 'o99' all occurs & 'i4' inhibit 0/b fields |
| 1C5 | Occurs: options 'o5' 5 occurs & 'i1' inhibit 0/b occurs fields |
| 1C5 | Occurs: options 'o5' 5 occurs & 'i1' inhibit 0/b occurs fields |
| 1D1 | Occurs: custran1 - cobmap to demo group occurs |
| 1D2 | Occurs: demo group occurs options default g1 (1st only) |
| 1D2 | Occurs: notes re 'group occurs' fields |
| 1D3 | Occurs: demo group occurs option g99 (show all occurs) |
| 1D3 | Occurs: demo group occurs option g99 (show all occurs) |
| 1E1 | Occurs: custran2 - cobmap to demo GROUP & ITEM occurs |
| 1E2 | Occurs: demo group&item occurs options default g1o1 (1st only) |
| 1E2 | Occurs: notes group & item occurs |
| 1E3 | Occurs: demo group&item occurs options g99o99 (show all occurs) |
| 1E3 | Occurs: demo group&item occurs options g99o99 (show all occurs) |
| 1E4 | Occurs: group&item options g99o99i4 (all occurs, inhibit 0/b) |
| 1F1 | Occurs: custran3 - cobmap to demo GROUP & ITEM occurs |
| 1F2 | Occurs: depending on with options z4g99i4 |
| 1F3 | Occurs: uvhd display of occurs depending on records |
| 1G2 | Occurs: custran6 - 2 levels of group occurs |
| 4D1 | Occurs: verify errors in occurs fields |
| 1G1 | Odo: custran4 - cobmap with 2 'ODO's |
| 1C3 | Option: sample with option 'o99' show all occurrences |
| 1D3 | Option: demo group occurs option g99 (show all occurs) |
| 4D2 | Option: rerun with option 'o99' (show all occurrences) |
| 1C4 | Options: 'o99' all occurs & 'i4' inhibit 0/b fields |
| 1C5 | Options: 'o5' 5 occurs & 'i1' inhibit 0/b occurs fields |
| 1D2 | Options: demo group occurs options default g1 (1st only) |
| 1E2 | Options: demo group&item occurs options default g1o1 (1st only) |
| 1E3 | Options: demo group&item occurs options g99o99 (show all occurs) |
| 1E4 | Options: group&item options g99o99i4 (all occurs, inhibit 0/b) |
| 1F2 | Options: occurs depending on with options z4g99i4 |
| 1I1 | Options: uvhdcob command line & options |
| 4B1 | Options: for Verify |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 5A3 | Pre-requisites: Pre-Requisites for uvhdc1/uvhdc2 |
| 5B2 | Pre-requisites: Pre-Requisites for uvhdc2 |
| 1B1 | Preparation: to use uvhdcob |
| 3C1 | Preparation: to demo various filetypes |
| 2H18 | Print: lw/lp/lvw/lvp separate or combined write/print files |
| 4B1 | Print: lw/lp/lvw/lvp separate or combined write/print files |
| 6A2 | Printing: Customizing printing with Environmental Variables |
| 6A2 | Printing: env-vars for printing on Windows |
| 6A2 | Printing: environmental variables for 'i' printing |
| 3B1 | Rdw: demo Data-Files - Fixed,Text,RDW,IDX |
| 3C4 | Rdw: uvhdcob demo for RDW files |
| 3C5 | Rdw: Variable Length files (text,RDW,IDX) |
| 3C5 | Rdw: demo for RDW (continued) |
| 3C6 | Rdw: use uvhd to show RDW record-sizes |
| 1I1 | Record: *TYPE control record |
| 3C6 | Record-sizes: use uvhd to show RDW record-sizes |
| 1F3 | Records: uvhd display of occurs depending on records |
| 2H20 | Records: Alternate TYPE format for variable length records |
| 3D1 | Records: Multi-Record-Types (Redefined records) |
| 3D1 | Redefined: Multi-Record-Types (Redefined records) |
| 4D2 | Rerun: with option 'o99' (show all occurrences) |
| 5A1 | Rundata: CTLMAPDIR, CNVDATA, RUNLIBS, RUNDATA |
| 5A1 | Runlibs: CTLMAPDIR, CNVDATA, RUNLIBS, RUNDATA |
| 1A1 | Sample: uvhdcob - sample display |
| 1C1 | Sample: cobmap report |
| 1C2 | Sample: 'uvhdcob' display for demo file dat1/custmas1 |
| 1C3 | Sample: with option 'o99' show all occurrences |
| 3D2 | Sample: display for vendorpaymas |
| 4A2 | Sample: display with BAD data fields |
| 5A4 | Sample: display dat1/vendormas0 |
| 5A6 | Sample: control file ctlfile_uvhdc1 |
| 5B3 | Sample: display dat1/vendormas0 |
| 2H18 | Separate: lw/lp/lvw/lvp separate or combined write/print files |
| 4B1 | Separate: lw/lp/lvw/lvp separate or combined write/print files |
| 2H19 | Set: Inhibit zero/blank fields |
| 1C3 | Show: sample with option 'o99' show all occurrences |
| 1D3 | Show: demo group occurs option g99 (show all occurs) |
| 1E3 | Show: demo group&item occurs options g99o99 (show all occurs) |
| 3C6 | Show: use uvhd to show RDW record-sizes |
| 4D2 | Show: rerun with option 'o99' (show all occurrences) |
| 4E1 | Startup: Index built on startup for Variable-Length files |
| 1A2 | Summary: uvhdcob function summary |
| 4A1 | Test: test/demo verify command |
| 5A4 | Test: test/demo uvhdc1 |
| 5B3 | Test: test/demo uvhdc2 |
| 3B1 | Text: demo Data-Files - Fixed,Text,RDW,IDX |
| 3C3 | Text: uvhdcob demo for Text files |
| 3C5 | Text: Variable Length files (text,RDW,IDX) |
| 2H20 | Type: Alternate TYPE format for variable length records |
| 6A1 | User: Customizing uvhd for each user via UVHDCOBROP |
| 5A2 | Uvadm: uvhdc1 demo in /home/uvadm/... |
| 5A7 | Uvcopy: job 'uvhdget2' called by 'uvhdc1/2' |
| 1A1 | Uvhd: |
| 1F3 | Uvhd: display of occurs depending on records |
| 3C6 | Uvhd: use uvhd to show RDW record-sizes |
| 3C7 | Uvhd: listRDW1 alternative to uvhd above |
| 6A1 | Uvhd: Customizing uvhd for each user via UVHDCOBROP |
| 5A2 | Uvhdc1: demo in /home/uvadm/... |
| 5A3 | Uvhdc1: Pre-Requisites for uvhdc1/uvhdc2 |
| 5A4 | Uvhdc1: test/demo uvhdc1 |
| 5A5 | Uvhdc1: script uvhdc1 - listing |
| 5A7 | Uvhdc1: uvcopy job 'uvhdget2' called by 'uvhdc1/2' |
| 5A3 | Uvhdc2: Pre-Requisites for uvhdc1/uvhdc2 |
| 5B1 | Uvhdc2: demo in /home/vsetest/... |
| 5B2 | Uvhdc2: Pre-Requisites for uvhdc2 |
| 5B3 | Uvhdc2: test/demo uvhdc2 |
| 5B4 | Uvhdc2: ctlfile_uvhdc2 for script uvhdc2 |
| 1A1 | Uvhdcob: |
| 1A1 | Uvhdcob: - sample display |
| 1A2 | Uvhdcob: function summary |
| 1B1 | Uvhdcob: preparation to use uvhdcob |
| 1C2 | Uvhdcob: sample 'uvhdcob' display for demo file dat1/custmas1 |
| 1I1 | Uvhdcob: command line & options |
| 3C2 | Uvhdcob: demo for EBCDIC files |
| 3C2 | Uvhdcob: demo for various filetypes |
| 3C3 | Uvhdcob: demo for ASCII Fixed Length |
| 3C3 | Uvhdcob: demo for Text files |
| 3C4 | Uvhdcob: demo for RDW files |
| 3C8 | Uvhdcob: demo for IDXf3/IDXf8 files |
| 4A3 | Uvhdcob: Notes re uvhdcob Verify demo above |
| 5A1 | Uvhdcob: scripts to make uvhdcob easier to use |
| 6A1 | Uvhdcobrop: Customizing uvhd for each user via UVHDCOBROP |
| 6B1 | Uvhddiff2: - script to compare files |
| 6B2 | Uvhddiff2: - script listing |
| 5A7 | Uvhdget2: uvcopy job 'uvhdget2' called by 'uvhdc1/2' |
Goto: Begin this doc , End this doc , Index this doc , Contents this library , UVSI Home-Page
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
| 2H20 | Variable: Alternate TYPE format for variable length records |
| 3C5 | Variable: Variable Length files (text,RDW,IDX) |
| 4E1 | Variable: find command for Variable Length, N/R for Fixed-Lth |
| 4E1 | Variable-length: Index built on startup for Variable-Length files |
| 6A2 | Variables: Customizing printing with Environmental Variables |
| 6A2 | Variables: environmental variables for 'i' printing |
| 3C1 | Various: preparation to demo various filetypes |
| 3C2 | Various: uvhdcob demo for various filetypes |
| 3A1 | Vendormas: cobol/maps/vendormas |
| 5A4 | Vendormas0: sample display dat1/vendormas0 |
| 5B3 | Vendormas0: sample display dat1/vendormas0 |
| 3B2 | Vendormas2: dat1/vendormas2 |
| 3A1 | Vendorpay: cobol/maps/vendorpay |
| 3B2 | Vendorpay2: dat1/vendorpay2 |
| 3A2 | Vendorpaymas: cobol/maps/vendorpaymas |
| 3D2 | Vendorpaymas: sample display for vendorpaymas |
| 3B3 | Vendorpaymas2: dat1/vendorpaymas2 |
| 3A3 | Vendorpaymasa: cobol/maps/vendorpaymasa |
| 4A1 | Verify: 'v' verify data command |
| 4A1 | Verify: test/demo verify command |
| 4A3 | Verify: Notes re uvhdcob Verify demo above |
| 4B1 | Verify: options for Verify |
| 4C1 | Verify: create verify report for entire file |
| 4D1 | Verify: errors in occurs fields |
| 5B1 | Vsetest: uvhdc2 demo in /home/vsetest/... |
| 6A2 | Windows: env-vars for printing on Windows |
| 2H18 | Write: lw/lp/lvw/lvp separate or combined write/print files |
| 4B1 | Write: lw/lp/lvw/lvp separate or combined write/print files |
| 1F2 | Z4g99i4: occurs depending on with options z4g99i4 |
| 2H19 | Zero: set Inhibit zero/blank fields |
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