Mainframe file transfer

Top  Previous  Next

The files conversion process operates on the target system (UNIX, Linux or Windows), therefore to convert you must transfer them to the target system. This section explains the procedure to obtain an EBCDIC file suitable for a correct conversion.

Sequential files

Sequential files must be transferred on the target system using a BINARY file transfer. For variable record length file, please refer to the section below.

VSAM files

VSAM files cannot be directly transferred to the target system, therefore their content must be exported on a sequential one using the REPRO feature of IDCAMS.

Then, the obtained sequential file must be transferred on the target system using a BINARY file transfer. For variable record length file, please refer to the section below.

Variable record length files

In order to avoid the truncation of the 4 bytes header of the records, files with variable record length must be preprocessed through the VARUNIX program to obtain a variable record length file with an additional 4 bytes header.

Variable-file -> VARUNIX -> variable-file+4 -> FTP -> variable-file

 

This task may be achieved with the following procedure on the mainframe.

1.compile the assembler program VARUNIX.asm (included in the XFRAME distribution in $XFRAMEHOME/tools)
2.customize the JCL VARUNIX.jcl (included in the XFRAME distribution in $XFRAMEHOME/tools), setting:
correct execution libraries
add an EXEC VARIA call providing the correct parameters:
       RLI = input file record length
       BLI = input file block length
       AI = input file name
       RLO = output file record length (RLI+4)

The output file will have the same name of the input one suffixed by .XFTP.

I.e

//A1 EXEC VARIA,RLI=2400,BLI=28000,AI=SEQ.FILE.01,RLO=2404

Please note the program cannot be run on VSAM file, so, to download a variable length VSAM file, it must be exported on a sequential file (IDCAMS REPRO), to be supplied as input to VARUNIX.

Variable-VSAM -> REPRO -> variable-file -> VARUNIX -> variable-file+4 -> FTP -> variable-file