xvsamrepro

Top  Previous  Next

The xvsamRepro command copies VSAM and non-VSAM data sets.

Syntax

xvsamRepro <defines input file> <defines output file>

can use contract parameter

xvsamRepro --ic=<inpu catalog> --iu=<input cluster> --of=<output file> --v

or extended

xvsamRepro --input_catalog=<input catalog> --input_cluster=<input cluster> --output_file=<output file> --verbose

Defines input and ouput files is  mandatory. Input and output options depends on files type (VSAM or flat) . All parameter are list below. If parameter has a corresponding value in second column means parameter have to be followed by equals sign and the  required value

--ic=<inpu catalog>

else use it alone

--debug

Parameters

VSAM input file

--ic|input_catalog

<input catalog>

is the name of the cluster to be deleted

--iu|input_cluster

<input cluster>

input xvsam cluster

--fk|from_key

<char...>

from key in input xvsam file

--tk|to_key

<char...>

to key in input xvsam file

--fkh|from_key_hex

<hh...>

from key hexadecimal in input xvsam file

--tkh|to_key_hex

<hh...>

to key hexadecimal in input xvsam file

FLAT input file

--if|input_file

<input path>

input flat file path

--si|stdin

 

read stdin in input

--im|input_mode

<B|T>

input flat file mode

--ifo|input_format

<V|F>

input flat file format

--il|input_len

<number>

input flat file length

VSAM output file

--oc|output_catalog

<output catalog>

output xvsam catalog

--ou|output_cluster

<output cluster>

output xvsam cluster

FLAT output file

--of|output_file

<output path>

output flat file path

--r|replace

 

replace records in output xvsam file

--so|stdout

 

write stdout in output

--om|output_mode

<B|T>

output flat file mode

--ofo|output_format

<V|F>

output flat file format

--ol|output_len

<number>

output flat file length

--a|append

 

open output flat file in append mode

Options

--s|skip

<n>

skip n records in input

--c|count

<n>

stop after n records in output

--i|init

[char|0xhh]

write one initialized record

--h|help

 

print help

--v|verbose

 

print accepted parameters and values

--dl|debug_level

<0-15>

set debug level

--d|debug

 

produce debug file: xvsamRepro.log

Examples

Copy vsam file to flat file

xvsamRepro --ic=TEST --iu=VSAMTEST --of=$HOME/tmp/reprofile
Warning: undefined output format: fixed forced
xvsamRepro: Records read[6] written[6] duplicated[0] replaced[0]

 

Copy vsam file to flat file formatted with newline at end of each record:

xvsamRepro --ic=TEST --iu=VSAMTEST --of=$HOME/tmp/reprofile --om=T
Warning: undefined output format: fixed forced
xvsamRepro: Records read[6] written[6] duplicated[0] replaced[0]

 

Copy flat formatted file in vsam file

xvsamRepro --if=$HOME/tmp/reprofile --im=T --oc=TEST --ou=VSAMTEST
Warning: undefined input format: fixed forced
xvsamRepro: Records read[6] written[6] duplicated[0] replaced[0]

 

Copy VSAM file to flat, skipping first n record.

xvsamRepro --ic=TEST --iu=VSAMTEST --of=$HOME/tmp/reprofile --om=T --s=3
Warning: undefined output format: fixed forced
xvsamRepro: Records read[6] written[3] duplicated[0] replaced[0]

 

Copy first n record of VSAM file to flat file

xvsamRepro --ic=TEST --iu=VSAMTEST --of=$HOME/tmp/reprofile --om=T --c=3
Warning: undefined output format: fixed forced
xvsamRepro: Records read[3] written[3] duplicated[0] replaced[0]

 

Debug & Logs

You can force command --v to enable verbose mode, to obtain print of all input parameters.

xvsamRepro --ic=TEST --iu=VSAMTEST --of=$HOME/tmp/reprofile --v

 

You can produce log file (xvsamRepro.log) forcing --d options. Yuo can also defines debugging level from 0 to 15. Default is 15, if you want to suppress area dump you can force debug level to 5.

xvsamRepro --ic=TEST --iu=VSAMTEST --of=$HOME/tmp/reprofile --d

 

Return codes

0

Function correctly executed

12

error(s) trapped