COPYFILE - Copying files off-line

The COPYFILE command is used to copy a sequential file performing the following operations:

  • Compression/decompression: the compressed file must always have a variable format
  • ASCII/EBCDIC translation and vice versa: the translation is performed with Transfer CFT’s internal tables
  • Record format or file type modification

The COPYFILE command enables a file to compressed offline, before being sent by Transfer CFT and a file to be decompressed after being received.

Syntax

OFN AME = filename

[ CREATE = { ‘ ‘ | YES | NO } ]

[ IBLKSIZE = { 0 | n } ]

[ ICODE = { ASCII | EBCDIC } ]

[ ICOMP = { 0 | 15 } ]

[ ICT =  { H | C } ]

[ ILRECL = { 0 | n } ]

[ IRECFM = { F | V | U } ]

[ ITYPE = { ‘ ‘ | character } ]

[ OBLKSIZE = { 0 |n  } ]

[ OCODE = { ASCII | EBCDIC } ]

[ OCOMP = { 0 | 15 } ]

[ OCT = { H | C } ]

[ OLRECL = { 0 |n } ]

[ ORECFM = { IRECFM value | F | V| U } ]

[ OSPACE = { 0 | n } ]

[ OTYPE = { ‘ ‘ | character } ]

Description

Use the COPYFILE command to copy a sequential file.

Parameters

CREATE

Output file creation option.

IBLKSIZE 

Defines the block size of the input file, in bytes.

 

ICODE 

Codes the input file data. Internal code managed by the system, either ASCII, or EBCDIC.

ICOMP 

Compresses the input file data.

The value 0 means that there is no compression. The possible values (cpr) are indicated in Compression.

ICT 

Type of input file data compression. The value of ICOMP must be compatible with the compression type.

IFNAME 

Name of the input file to be copied.

ILRECL

see comments

 

For records of:

  • Fixed format (IFRECFM = F): input file record size
  • Variable format (IFRECFM = V): maximum record size

IRECFM

see the specific Operations Guide

Input file record format:

  • F: fixed
  • V: variable
  • U: undefined

ITYPE

Input file type.

Refer to the Operations Guide corresponding to your OS.  

OBLKSIZE    OS

Output file block size (in bytes). The value indicated must be greater than the value of the OLRECL parameter.

OCODE

Codes the output file data.

OCOMP 

Compresses the output file data.

OCT

Type of output file data compression. The value of OCOMP must be compatible with the compression type.

OFNAME 

Output filename.

OLRECL

Record formats, expressed in bytes.

ORECFM 

Output record format.

OSPACE

Space to be reserved for the output file, in K-bytes (1 K-byte = 1024 bytes).

OTYPE        

Output file type.

Example

COPYFILE

ICODE = ASCII,

 

 

IFNAME = filename1,

 

 

ILRECL = 45,

 

 

IRECFM = V,

OS

 

ICOMP = 0,

 

 

OFNAME = filename2,

OS

 

OCODE = ASCII,

 

 

OLRECL = 45,

 

 

ORECFM = V,

OS

 

OCOMP = 15,

 

 

OCT = C

OS

 

OFNAME = filename,

 

 

[OSPACE = {0 | n},]

OS

 

[OTYPE = c,]

 

 

[OBLKSIZE = {value of IBLKSIZE | n},]

 

 

[OLRECL = {see the comment | n},]

 

 

[ORECFM = { value of IRECFM | F | V | U },]

OS

This command compresses and copies a sequential file with records of variable length (15: all compressions available). The compression performed is of the "CFT" type.

Input and output parameter categories

Parameters beginning with I refer to input files.

Parameters beginning with O refer to the output files.

These two parameters may be classified into 5 sub-categories, as shown in the following table.

Parameter category Parameter concerned

Execution control parameters 

CREATE 

Input data processing parameters 

ICT, ICOMP, ICODE 

Parameters associated with the input file:

  • physical name
  • physical characteristics (global file)
  • physical characteristics (records)

 

 

IFNAME

ITYPE

IRECFM, ILRECL, IBLKSIZE 

Output data processing parameters 

OCT, OCOMP, OCODE 

Parameters associated with the output file:

  • physical name
  • physical characteristics (global file)
  • physical characteristics (records)

 

 

OFNAME

OSPACE, OTYPE

ORECFM, OLRECL, OBLKSIZE 

Statistics

The utility prints out execution statistics.

The following table indicates the heading contents.

Heading number Contents

Complete name of the input file 

Coding of the input file data 

Input file compression type:

  • EXT (PeSIT non-SIT)
  • CFT (PeSIT CFT to CFT)

Input file compression value 

Number of records to be copied (input file) 

Input file size in K bytes (1) 

6b 

Input file size in K bytes, if ILRECL is less than the actual size of the record (2) 

Complete name of the output file 

Coding of the output file data 

Compression type:

  • EXT (PeSIT non-SIT)
  • CFT (PeSIT CFT to CFT)

10 

Output file compression value 

11 

Output file size in K bytes 

11b 

Output file size in K bytes, if padding (OLRECL > ILRECL) 

12 

Compression rate performed when copying the file 

12b 

Expansion rate performed when copying the file 

(1) (2): Headings 6 and 6b are mutually exclusive. If heading 6b is displayed, heading 6 is not and vice versa.

Related Links