Using BARR/TRAN

BARR/RJE
BARR/NJE

You can transfer files between a personal computer (PC) and a mainframe by using BARR/TRAN and either BARR/RJE or BARR/NJE. The file transfer process involves physically sending and receiving the file as well as reconciling differences between the PC file structure and IBM MVS/JES2 mainframe file structure.

What do you want to do?

See also:


Overview

The BARR/TRAN product provides extended file transfer capabilities for BARR/RJE and BARR/NJE. BARR/TRAN is a mainframe program for the IBM MVS/JES2 operating system that works with advanced features of the Barr software. Although the Barr software manages basic file transfer operations, BARR/TRAN manages all file transfer operations.

Before installing BARR/TRAN, you will need to be familiar with the operation of your Barr software. Refer to the Getting started with BARR/RJE or Getting started with BARR/NJE topics for more information on operating instructions and PC-to-PC file transfer that does not require BARR/TRAN.

BARR/RJE or BARR/NJE software

BARR/RJE and BARR/NJE software already contain file transfer software required for the PC. Without the BARR/TRAN software, you can:

BARR/TRAN software

BARR/TRAN extended file transfer software contains the BARR/TRAN mainframe program that handles specialized file transfer applications. BARR/TRAN reads and writes JES2 files and converts the files for transmission. In other words, BARR/TRAN can manage all file transfer operations on the mainframe.

File transfer applications requiring BARR/TRAN are when you need to:

Installing BARR/TRAN

BARR/TRAN, which runs under the MVS or OS/390 mainframe operating system, manages the mainframe side of file transfer. You can call the BARR/TRAN mainframe program using a JCL just as you would other mainframe utilities.

INSTALL.JOB

The BARR/TRAN software files are located in the \\Program Files\Barr\Spooler\Tran folder. Use the INSTALL.JOB and BARRTRAN.OBJ files to install BARR/TRAN on the mainframe.

You must install BARR/TRAN in a mainframe library. You can create a new mainframe library or use an existing library. Consult a mainframe systems programmer to set up an authorized library and add a cataloged procedure. The file INSTALL.JOB contains the JCL you need to create a library on the mainframe and store the BARR/TRAN program. Follow these steps:

  1. Use an ASCII program editor to edit INSTALL.JOB and add your computing centers accounting and file-naming conventions. See the Edit INSTALL.JOB section for more information.

  2. Send the job to the RJE or NJE host.

Edit INSTALL.JOB

The line numbers in the left column of the file listing refer to the explanations on the following pages. Do not include them in your JCL.

1   //INSTALL JOB (1234,5678,2,1,0),your name
2   //*
3   //* INSTALL BARRTRAN ON MAINFRAME
4   //*
5   //* UPLOAD OBJECT DECK FROM PC AND LINK INTO
6   //* A LOAD LIBRARY.
7   //*
8   //LINK    EXEC PGM=LINKEDIT,PARM=LIST,MAP
9   //SYSPRINT  DD SYSOUT=A
10  //SYSUT1    DD UNIT=SYSDA,SPACE=(1024,(200,20))
11  //SYSLMOD   DD UNIT=SYSDA,DSN=user.barrlib,DISP=(NEW,CATLG),
12  //            SPACE=(1024,(50,20,1),RLSE)
13  //SYSLIN    DD *
14  ##c:\program files\barr\spooler\tran\BARRTRAN.OBJ/B
15           SETCODE AC(1)
16           ENTRY   NOAUTH
17           NAME    BARRTRAN(R)
18  //*
19  //* TRY TO ACCESS BARRTRAN
20  //*
21  //TEST    EXEC PGM=BARRTRAN,COND=(0,LT)
22  //STEPLIB   DD DSN=user.barrlib,DISP=SHR
23  //SYSPRINT  DD SYSOUT=A
24  //FILEIN    DD DSN=user.barrlib(BARRTRAN),DISP=SHR
25  //SYSOUT    DD DUMMY,DCB=(RECFM=FB,BLKSIZE=800,LRECL=80)
26  //*
27  //* INSTALL A CATALOGED PROCEDURE FOR BARRTRAN. YOU MUST BE
28  //* AUTHORIZED TO ADD A CATALOGED PROCEDURE TO A SYSTEM LIBRARY.
29  //*

30  //ADD     EXEC PGM=IEBGENER,COND=(0,LT)
31  //SYSPRINT  DD SYSOUT=A
32  //SYSIN     DD DUMMY
33  //SYSUT2    DD DSN=SYS1.PROCLIB(BARRTRAN),DISP=SHR
34  //SYSUT1    DD DATA
35  //BARRTRAN PROC
36  //*
37  //* BARRTRAN IS BARR SYSTEMS FILE TRANSFER PROGRAM BETWEEN
38  //* MAINFRAME AND PC.
39  //*
40  //         EXEC PGM=BARRTRAN
41  //STEPLIB    DD DSN=user.barrlib,DISP=SHR
42  //SYSPRINT   DD SYSOUT=A
43  //SYSOUT     DD SYSOUT=B
44  /*

All text in the JCL file must be uppercase. Text in lowercase indicates information you need to supply. Remember to use uppercase text when you substitute correct values.

Line number explanations

The following table describes selected lines, including all lines you must edit.

Line

Explanation

1

The job accounting parameters in parentheses vary from system to system. This example uses the account number 1234,5678 and requests 2 seconds of central processing unit (CPU) time (2), up to 1,000 lines of printed output (1), and no punch output (0).

8-17

The first job step edits the object modules that BARR/TRAN sends as card images from the PC into a program library.

11-12

The //SYSLMOD DD statement defines the program library that contains the programs. Replace user.barrlib with your library name. According to the statement coded here, the JCL will create a new program library on any available disk volume with a block size assigned by the linkage editor. The library will be cataloged. Any unused space in the library will be released when the job step finishes.

To install the BARR/TRAN program in an existing library, code the //SYSLMOD DD statement as follows:

//SYSLMOD DD DSN=BTRAN.LIBRARY,DISP=SHR

14

##c:\program files\barr\spooler\tran\BARRTRAN.OBJ/B is an embedded Send Files command. When Barr sends the JCL file, it replaces this line with the contents of the BARRTRAN.OBJ file. The /B option tells the software to convert the file to binary mode.

21-25

The second job step tests that you properly installed BARR/TRAN. It invokes the BARR/TRAN program to read itself as input and it throws away the card output. If the BARR/TRAN log shows no errors, you correctly installed the program.

22

The //STEPLIB DD statement tells JES2 to look in the library you just created for the BARR/TRAN program. Replace user.barrlib with the name for your system.

24

Replace user.barrlib with the correct name, but leave BARRTRAN in parentheses.

30-44

The third job step installs the cataloged procedure BARRTRAN.

33

Replace SYS1.PROCLIB with the name of the procedure library storing the BARRTRAN cataloged procedure. You must be authorized to modify procedure libraries.

41

Replace user.barrlib with the correct name.

Examples for sending files to the host

This section describes how to send files from the PC to the mainframe, using either BARR/RJE or BARR/NJE software on the PC and BARR/TRAN software on the mainframe.

File transfer from the PC to the mainframe is started by reading in a JCL (SYSIN) file with Print Utility. The JCL will contain a ## statement that specifies the PC file name and record format. You also need to specify the mainframe file name and record format with the mainframe JCL.

To send a file to the host

Complete the following steps to send a file to the host.

  1. Use an ASCII program editor to write the mainframe JCL statements for your program in a file on the PC. For example, assume you want to send a file named filename.ext with one of the record formats to the mainframe. The following is a JCL example:

//jobname JOB (1234,5678,2,1,9999),your name
//       EXEC BARRTRAN
//FILEOUT  DD DSNAME=data_set_name,DCB=(RECFM=r,LRECL=l,BLKSIZE=b),
//            UNIT=SYSDA,SPACE=(8000,(10,10),RLSE),DISP=(,CATLG)
//SYSIN    DD *
##c:\program files\barr\spooler\tran\filename.ext/format

Parameter

Description

DSNAME=data_set_name

Output file name on the mainframe.

DCB=(RECFM=r,LRECL=l,BLKSIZE=b)

Output record format on the mainframe.

filename.ext/format

Input file name and format (that is, TP, TA, TFn, TDFn, TV, TB, TBFn, or TBV).

  1. Connect to the mainframe with BARR/RJE or BARR/NJE (SNA or CTC).

  2. Send the JCL file to the RJE or NJE host. The ## statement will cause the Barr software to send the data file with the JCL.

BARR/TRAN converts the file from the PC file structure to the MVS/JES2 file structure you specified in the JCL. You will be notified whether or not the file has been successfully received.

The job will run on the mainframe, and the BARR/TRAN job log will return to the PC. If the condition code on the JES2 job log is 0000, your file was received correctly.

This is a sample BARR/TRAN job log:

* * * * B A R R / T R A N  J O B  L O G * * * *

BARR/TRAN Release 89

OPTIONS IN EFFECT FOR THIS RUN:
FFILE= 0 FRECORD= 0 LFILE= 0 LRECORD=0 BUFLEN=32,760
IFORMAT=AUTO OFORMAT=AUTO SKIP= 100 CONVERT=
RECFM= RECLEN= 0 BLKSIZE=0 FILENAME=

BARR/TRAN INPUT IS SYSIN:
CARD DECK IN FILE-80 FORMAT, ENCODING:
ASCII FILE filename.ext  (OPENED IN RECORD MODE)
WITH FORMAT=TP, A MAXIMUM RECORD LENGTH OF 32,760 BYTES, AND
RECORDS WITH ASA CARRIAGE CONTROL.

BARR/TRAN OUTPUT IS FILEOUT:
EBCDIC FILE JES2.JOB03556.SO000103  (OPENED IN RECORD MODE)
WITH FORMAT=FBA, A MAXIMUM RECORD LENGTH OF 132 BYTES, AND RECORDS
WITH ASA CARRIAGE CONTROL.
THE FILE HAS AN OS BLOCK SIZE OF 5,320 BYTES.

FINISHED READING INPUT. INPUT STATISTICS:
40 CARDS WERE READ; OF THESE, 0 WERE BAD CARDS SKIPPED AT THE
START; 25 RECORDS OR BLOCKS WERE READ, AND 0 FILE MARKS WERE READ.
THE LARGEST RECORD OR BLOCK WAS 78 BYTES LONG; THE SMALLEST RECORD
OR BLOCK WAS 0 BYTES LONG.

FINISHED WRITING OUTPUT. OUTPUT STATISTICS:
25 RECORDS OR BLOCKS WERE WRITTEN, AND 0 FILE MARKS WERE WRITTEN.

THE LARGEST RECORD OR BLOCK WAS 132 BYTES LONG; THE SMALLEST RECORD
OR BLOCK WAS 132 BYTES LONG.

**** NOTE **** RECORDS WERE PADDED TO MAKE FIXED-LENGTH OUTPUT RECORDS.

* * * * E N D  O F  B A R R / T R A N  L O G * * * *

Print a file on a mainframe printer

You can send a text file (including form feeds and overstruck lines) from the PC to the mainframe and print it on a mainframe printer. You need to specify the TP format using the ## statement in an embedded command. The ## statement will be included in the following JCL.

//PC1     JOB (1234,5678,2,1,9999),your name
/*ROUTE PRINT LOCAL
//       EXEC BARRTRAN
//FILEOUT  DD SYSOUT=A,DCB=(RECFM=FBA,LRECL=133)
//SYSIN    DD *
##c:\program files\barr\spooler\tran\filename.ext/TP

BARR/TRAN reads from SYSIN, which contains the file, and writes to FILEOUT. Because FILEOUT is defined as a SYSOUT data set, the data is printed. The /*ROUTE statement sends the data to the local printer at the mainframe (instead of sending it back to the Barr software).

Send a print file to a JES2 data set with variable-length records

You can send a print file (including form feeds and overstruck lines) from the PC to a JES2 data set with variable-length records. You need to specify the TP format using the ## statement in an embedded command. The ## statement will be included in the following JCL.

//PC2    JOB (1234,5678,2,1,9999),your name
//      EXEC BARRTRAN
//FILEOUT DD UNIT=SYSDA,DSNAME=data_set_name,DISP=(NEW,CATLG),
//           SPACE=(8000,(10,10),RLSE),
//           DCB=(RECFM=VBA,LRECL=137,BLKSIZE=13704)
//SYSIN   DD *
##c:\program files\barr\spooler\tran\filename.ext/TP

BARR/TRAN reads input from SYSIN and writes to the FILEOUT data set name.

Send a print file to a JES2 data set with fixed-length records

You can send a print file from the PC to a JES2 data set with fixed-length records. This example is similar to the previous example, except that all records written to the output data set are automatically padded with EBCDIC spaces to the record length of the output data set.

You need to specify the TP format using the ## statement in an embedded command. The ## statement will be included in the following JCL.

//PC3    JOB (1234,5678,2,1,9999),your name
//      EXEC BARRTRAN
//FILEOUT DD UNIT=SYSDA,DSNAME=data_set_name,DISP=(NEW,CATLG),
//           SPACE=(8000,(10,10),RLSE),
//           DCB=(RECFM=FBA,LRECL=133,BLKSIZE=13300)
//SYSIN   DD *
##c:\program files\barr\spooler\tran\filename.ext/TP

BARR/TRAN reads input from SYSIN and writes to the FILEOUT data set name.

Send a binary file to a JES2 data set

You can send a binary file from the PC to a JES2 data set with undefined-format records. You need to specify the TB format using the ## statement in an embedded command. The ## statement will be included in the following JCL.

//PC4    JOB (1234,5678,2,1,9999),your name
//      EXEC BARRTRAN
//FILEOUT DD UNIT=SYSDA,DSNAME=data_set_name,DISP=(NEW,CATLG),
//           DCB=(RECFM=U,BLKSIZE=2000),SPACE=(8000,(10,10),RLSE)
//SYSIN   DD *
##c:\program files\barr\spooler\tran\filename.ext/TB

RECFM=U indicates that the data sets record format is undefined. Because the file format is binary, ASCII-to-EBCDIC translation is not performed. This file is written as 2000-byte output records with a final short block.

Send a mainframe object module from the PC to the mainframe

You can send a mainframe object module stored as a binary PC file back to the mainframe. For example, the BARR/TRAN program is stored as an object module in the \\Program Files\Barr\Spooler\Tran folder.

You need to specify the TBF80 format using the ## statement in an embedded command. The ## statement will be included in the following JCL.

//PC5    JOB (1234,5678,2,1,9999),your name
//      EXEC BARRTRAN
//FILEOUT DD UNIT=SYSDA,DSNAME=&&TEMP,DISP=(NEW,PASS),
//           DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200),
//           SPACE=(8000,(10,10),RLSE)
//SYSIN   DD *
##c:\program files\barr\spooler\tran\filename.ext/TBF80

FILEOUT defines a temporary disk data set that could later be used for input to the linkage editor.

Examples for receiving files from the host

This section describes how to receive a file from the mainframe to the PC using BARR/TRAN on the mainframe and either BARR/RJE or BARR/NJE software on the PC.

Files are transferred from the mainframe to the PC when a job is sent to JES2. This job can be send from anywhere on the mainframe or it can be sent using an ASCII editor with BARR/RJE or BARR/NJE. The JCL is the same regardless of how it is sent.

To receive a file from the host

Complete the following steps to receive a file from the host.

  1. Configure Barr to write to disk.

On the Barr File port's File Format tab, you must select Barr file transfer as the file format.

  1. Edit your JCL with an ASCII program editor and send your JCL to the RJE or NJE host. The following is a JCL example:

//jobname JOB (1234,5678,2,1,9999),your name
//       EXEC BARRTRAN,PARM=RECFM=pc_format,FILENAME=filename.ext
//FILEIN   DD DSNAME=data_set_name,DISP=SHR

Parameter

Description

pc_format

Output format on the PC (that is, TP, TA, TFn, TDFn, TV, TB, TBFn, and TBV).

filename.ext

Output file name on the PC.

data_set_name

The file that you are receiving from the mainframe.

Receive a JES2 printer data set

You can send a variable-length JES2 data set with the format DCB=(RECFM=VBA, LRECL=137,BLKSIZE=8000) and write it to a print file with form feeds and overstruck lines.

You need the following JCL:

//MF1   JOB (1234,5678,2,1,9999),your name
//     EXEC BARRTRAN,PARM=RECFM=TP,FILENAME=filename.ext
//FILEIN DD DSNAME=data_set_name,DISP=SHR

In the EXEC BARRTRAN statement, RECFM=TP specifies that the PC file format will be ASCII with variable-length records, CR LF delimiters, and printer carriage control characters. FILENAME=filename.ext specifies the name of the PC file that will be created. BARR/TRAN reads input from FILEIN. The Barr software writes the file in TP format and names it filename.ext.

Receive a JES2 data set with variable-length records

You can send a variable-length JES2 data set created with the format DCB=(RECFM=VBA, LRECL=137,BLKSIZE=8000) and write it to a text file without form feeds or overstruck lines.

You need the following JCL:

//MF2   JOB (1234,5678,2,1,9999),your name
//     EXEC BARRTRAN,PARM=RECFM=TV,FILENAME=filename.ext
//FILEIN DD DSNAME=data_set_name,DISP=SHR

In the EXEC BARRTRAN statement, RECFM=TV specifies that the PC file format will be ASCII with variable-length records, CR LF delimiters, and no printer carriage control characters. FILENAME=filename.ext specifies the name of the PC file that will be created. BARR/TRAN reads input from FILEIN. The Barr software writes the file in TV format and names it filename.ext.

Receive a variable-length JES2 data set with fixed-length records

You can send a variable-length JES2 data set created with the format DCB=(RECFM=VBA, LRECL=137,BLKSIZE=8000) and write it to a PC file with fixed-length records. This example is similar to the previous example, except that the PC file has fixed-length records 70 bytes long.

You need the following JCL:

//MF3   JOB (1234,5678,2,1,9999),your name
//     EXEC BARRTRAN,PARM=RECFM=TDF70,FILENAME=filename.ext
//FILEIN DD DSNAME=data_set_name,DISP=SHR

In the EXEC BARRTRAN statement, RECFM=TDF70 specifies that the PC file format will be ASCII with fixed-length records, CR LF delimiters (for editing and printing), no printer carriage control characters, and a record length of 70. If the trailing number was not specified, the record length of the source, 132 bytes, would have been used.

Barr software pads records shorter than 70 bytes with ASCII blanks and truncates records longer than 70 bytes.

Receive a JES2 binary file to a PC binary file

You can send a binary file from the mainframe and write it as a PC file with binary format.

You need the following JCL:

//MF4   JOB (1234,5678,2,1,9999),your name
//     EXEC BARRTRAN,PARM=RECFM=TB,FILENAME=filename.ext
//FILEIN DD DSNAME=data_set_name,DISP=SHR

In the EXEC BARRTRAN statement, RECFM=TB specifies that the PC file format will be a binary file with no record structure.

Receive a JES2 object deck to a binary file

You can send an object deck from the mainframe to the PC, and write it to a binary file with fixed-length records. (Programs on the mainframe are stored in object deck format.)

You need the following JCL:

//MF5   JOB (1234,5678,2,1,9999),your name
///    EXEC BARRTRAN,PARM=RECFM=TBF,FILENAME=filename.ext
//FILEIN DD DSNAME=data_set_name(member),DISP=SHR

In the EXEC BARRTRAN statement, RECFM=TBF specifies that the PC file format is binary with fixed-length records containing no delimiters. FILEIN specifies the member of the object library. Because the PC record length was not specified, the JES2 record length is used.

File structure

This section defines the file structures used when you transfer files between the PC and the mainframe JES2 operating system.

File formats

BARR/TRAN file transfer actually involves three different file structures or formats, (that is, PC, IBM MVS/JES2, and Barr File Transfer format). The following table describes the different file formats.

File Structure

Description

PC

File structure used on the PC.

IBM MVS/JES2

File structure used on the JES2 mainframe.

Barr File Transfer (BFT)

A general file structure, which is easily converted into PC DOS or JES2 file structure. This intermediate format is used when any file is sent or received.

Record formats

Within each file structure, different methods are used to represent records. The term record format (RECFM) describes these different methods. Each record format is defined by character set, length format, and carriage control. The following table describes the record format attributes.

Attributes

Description

Character set

Representation of graphic symbols as binary bits.

Length format

Fixed, variable, undefined length.

Carriage control

Vertical spacing control.

Kinds of file structures

File structures for PC, IBM MVS/JES2, and BFT formats are shown in the following table.

Attributes

PC

IBM MVS/JES2

BFT

Character set

ASCII, binary

EBCDIC, binary

ASCII, EBCDIC, binary

Length format

Loosely defined by ASCII carriage return characters

Data Control Block fixed, variable, or undefined

Fixed, variable, undefined

Carriage control

ASCII form feed and line feed

ASA carriage control

ASA carriage control

Because PC and mainframe file structures are very different, a files structure must be changed when it moves between the two types of computers. BARR/TRAN converts and transfers the file at the same time.

Barr software converts from PC file structure to BFT format when it sends a file and converts from BFT format to PC when it receives a file. The BARR/TRAN mainframe program converts from MVS/JES2 file structure to BFT format when it sends a file and converts from BFT format to MVS/JES2 file structure when it receives a file.

PC file formats

The PC file format uses the ASCII standard for coding character data. Unfortunately, the PC format does not define file structures or record formats. In this section, we name and describe commonly used PC record formats. You can use these eight record formats with BARR/TRAN.

Mode

File Type

Description

TP

Printer data in ASCII

TP record format describes a print file. It contains printable characters of varying length lines. Each line is terminated by a carriage return (CR), which can be followed by line feed (LF) and form feed (FF) characters. This popular format is used by all microcomputer and minicomputer operating systems.

TA

ASCII file with no record structure

This file does not contain any record delimiters such as LF and FF characters.

TFn

Fixed-length ASCII records

TFn records contain ASCII printable characters and have a fixed length of n. There are no delimiters between the records. This file might not be printable because there are no CR or LF characters to advance the printer to a new line.

TDFn

Fixed-length ASCII records with delimiters

TDFn records contain ASCII printable characters and have a fixed length of n. Each record is terminated with a CR LF. A file in TDFn format can be printed, provided that the length of the record n is not greater than the printers carriage width.

TV

Variable-length ASCII records with delimiters

Each record is terminated with a CR LF. A file in TV format can be printed, provided that the maximum length of the record is not greater than the printers carriage width.

TB

Binary data with no record structure

TB format is an unstructured file without ASCII or EBCDIC code structure or record structure. The only attribute transferred with the file is the file length.

TBFn

Fixed-length binary records

TBFn contains binary records without ASCII or EBCDIC code structure that have a fixed length of n.

TBV

Variable-length binary records

A file in TBV format begins with a four-byte header of 76 1A LSB MSB, where LSB and MSB represent the maximum record length expressed in binary with the least significant byte first. Additionally, each record in the file must begin and end with its binary length count. If the maximum record length in the header is less than 255, the record length code is one byte. Otherwise, it is two bytes, with the least significant byte given first.

IBM MVS/JES2 file structure

IBM MVS/JES2 file structure is completely described in the JCL Data Control Block (DCB) specification, which has the general form:

DCB=(RECFM=r,LRECL=l,BLKSIZE=b)

Refer to the following table for a description of these parameters.

Parameter

Description

RECFM=r

The record format (RECFM) is determined by three characteristics record type, blocking, and carriage control which are specified in your JCL after the RECFM= keyword.

F – Fixed-length records.

V – Variable-length records.

U – Undefined-length records.

B – Blocking combines records into blocks before reading or writing.

A – The first character of a record contains an ASA carriage control character.

S – Spanning allows variable-length records to exceed the length of the block.

LRECL=l

Logical Record Length is a number computed by: l= d + a + v

d – Data length.

a – If ASA carriage control is used it equals 1, otherwise 0.

v – If the records are variable length it equals 4, otherwise 0.

BLKSIZE=b

Block size is the length of the maximum block of data that will be read or written at one time. For fixed-length records, BLKSIZE is a multiple of the logical record size LRECL.

This is a common format for a mainframe print file: DCB=(RECFM=FBA,LRECL=133,BLKSIZE=1330). This statement indicates that the record format is fixed with 10 records to a block (1330 divided by 133) and contains ASA carriage control characters. The logical record length is 133, indicating that there are 132 data characters preceded by an ASA carriage control character. For more information about these parameters, refer to your MVS JCL reference manual.

Barr File Transfer (BFT) format

When you transfer a file from PC to mainframe, mainframe to PC, or PC to PC, your Barr software converts the file to an intermediate format the Barr File Transfer (BFT) format. On the mainframe the BARR/TRAN program reads and writes JES2 data sets and transforms them into BFT format.

The BFT format represents a file as a series of 80-byte records. BFT format also includes some information about the source and/or the destination file an operating system code, a record format, a maximum record length, and a system-specific area. When a file is represented in BFT format, the source system uses these fields to describe the source files format or to describe the format of the file to create at the destination. When a file is reconstituted from BFT format, the destination system can create a new file in the format suggested by these fields or can ignore them. This section refers to the format described by these fields as the files native format.

The RECFM field in the Start-of-File record must be specified for the Barr File port to correctly rebuild the job or file from the BFT format.

A BFT format file contains the four types of records described in this section.

Start-of-File (SOF)

The first record in a BFT format file is a Start-of-File (SOF) record.

Field

Column

Length

Type

Contents

TYPE

1

1

number

0 = SOF record.

RECNO

4

4

number

Record number of first record.

LENGTH

6

2

number

Maximum logical record length. 0 = files native record length is unknown but must be less than 32,760 bytes. 1 to 32,760 = native record length for the file not including ASA carriage control. Records might be longer or shorter than this length because of deferred format conversions. A file without record structure must be partitioned into BFT format records for sending. For example, partitioning can be arbitrary to maximize packing efficiency.

CHARSET

8

1

number

1 = binary; 2 = ASCII; 3 = EBCDIC ASCII and EBCDIC data contain only printable characters and can be converted from one character set to another. Binary data cannot be converted without losing information.

FORMAT

9

1

number

1 = no ASA; 2 = ASA; 3 = no record structure. A file with record structure may or may not contain ASA carriage control. The first byte of ASCII or EBCDIC data may contain a valid ASA carriage control character in the same character set as the rest of the record; binary data may not have carriage control. This ASA byte is counted in the physical record length specified in the LENGTH field of an SOR record; however, the ASA byte is not counted in the logical record length specified in the LENGTH field of an SOF record or in user messages

SYSTEM

10

1

number

The files native operating system. 0 = unknown operating system. 1 = PC DOS & family. 2 = MVS & family. This field describes the native operating system of the file; its value determines the format of the other system-specific fields.

RECFM

11

1

...

The format of the file on its native system. Possible values are given as bit patterns (with the high-order bit on the left), decimal numbers, and JCL mnemonics.

 

If SYSTEM=PC DOS, valid values for RECFM are as follows:

Binary

Decimal

JCL

Description

0000 1000

8

TB

Binary file with no record structure

0000 1100

12

TBF

Fixed-length binary records with no delimiters

0001 0000

16

TV

Variable-length ASCII records, terminated by CR LF (formerly TD)

0001 0001

17

TP

Variable-length ASCII records, terminated by CR LF; may include FF and some records with only a CR

0001 0100

20

TDF

Fixed-length ASCII records, terminated by CR LF

0001 1000

24

TA

ASCII file with no record structure (formerly T)

0001 1100

28

TF

Fixed-length ASCII records with no delimiters

 

If SYSTEM=MVS, valid values for RECFM are as follows (same as RECFM field in DCB). The following MVS record formats use EBCDIC character set and record structure. Barr software inputs, but does not output, machine carriage control. In the following table, spanned refers to spanned records; blocked refers to blocked records; ASA refers to ASA carriage control. Other features are self-explanatory.

Binary

Decimal

JCL

Description

0010 0000

32

D

Variable-length on an ANSI tape

0010 0100

6

DA

ASA

0010 1000

40

DS

spanned

0010 1100

44

DSA

spanned, ASA

0011 0000

48

DB

blocked

0011 0100

52

DBA

blocked, ASA

0011 1000

56

DBS

blocked, spanned

0011 1100

60

DBSA

blocked, spanned, ASA

0100 0000

64

V

Variable-length

0100 0010

66

VM

VM machine carriage control

0100 0100

68

VA

ASA

0100 1000

72

VS

spanned

0100 1010

74

VSM

spanned, machine carriage control

0100 1100

76

VSA

spanned, ASA

0101 0000

80

VB

blocked

0101 0010

82

VBM

blocked, machine carriage control

0101 0100

84

VBA

blocked, ASA

0101 1000

88

VBS

blocked, spanned

0101 1010

90

VBSM

blocked, spanned, machine carriage control

0101 1100

92

VBSA

blocked, spanned, ASA

0110 0000

96

VT

track overflow

0110 0010

98

VTM

track overflow, machine carriage control

0110 0100

100

VTA

track overflow, ASA

0111 0000

112

VBT

blocked, track overflow

0111 0010

114

VBTM

blocked, track overflow, machine carriage control

0111 0100

116

VBTA

blocked, track overflow, ASA

1000 0000

128

F

Fixed-length

1000 0010

130

FM

machine carriage control

1000 0100

132

FA

ASA

1000 1000

136

FS

standard format blocks

1000 1010

138

FSM

standard, machine carriage control

1000 1100

140

FSA

standard, ASA

1001 0000

144

FB

blocked

1001 0010

146

FBM

blocked, machine carriage control

1001 0100

148

FBA

blocked, ASA

1001 1000

152

FBS

blocked, standard

1001 1010

154

FBSM

blocked, standard, machine carriage control

1001 1100

156

FBSA

blocked, standard, ASA

1010 0000

160

FT

track overflow

1010 0010

162

FTM

track overflow, machine carriage control

1010 0100

164

FTA

track overflow, ASA

1011 0000

176

FBT

blocked, track overflow

1011 0010

178

FBTM

blocked, track overflow, machine carriage control

1011 0100

180

FBTA

blocked, track overflow, ASA

1100 0000

192

U

Undefined-format (variable length)

1100 0010

194

UM

machine carriage control

1100 0100

196

UA

ASA

1110 0000

224

UT

track overflow

1110 0010

226

UTM

track overflow, machine carriage control

1110 0100

228

UTA

track overflow, ASA

 

 

 

 

NAME

12

50

ASCII

The file name, left justified and padded with blanks on the right.

MISC

62

5

...

System-specific information; this areas format depends on the value of SYSTEM. Binary zeros here will be interpreted as default values for all operating systems.

ATTR

62

1

...

The DOS directory attribute byte for PC users.

 

 0 0 a d v s h r

 

  where:

 

  a

is archive; set if file was changed since back-up

  d

is directory

  v

is volume label

  s

is a system file

  h

is a hidden file

  r

is a read-only file

TIME

63

 

 

 

 

 ( column 64 )

( column 63 )

 h h h h h m m m

m m m x x x x x

  where:

 

  h h h h h

is the number of hours (0-23)

  m m m m m m

is the number of minutes (0-59)

  x x x x x

is the number of 2-second increments

DATE

65

2

 

 

 

 ( column 66 )

( column 65 )

 y y y y y y y m

m m m d d d d d

  where:

 

  y y y y y y y

is the year (0-119 = 1980-2099)

  m m m m

is the month (1-31)

  d d d d d

is the day (1-31)

BLKSIZE

62

 

 

 

ID

73

 

 

 

Start-of-Record (SOR)

The SOR record contains descriptor information and data. Continue additional data on Continuation-of-Record (COR) records.

Field

Column

Length

Type

Contents

TYPE

1

1

number

1 = (SOR) Start of record.

RECNO

2

4

number

Record number of this record.

LENGTH

6

2

number

Physical record length or number of bytes of data including any ASA carriage control.

When a mainframe file with variable-length records is represented in BFT format, the record descriptor words are not included in the logical records.

STEXT

8

73

...

The first 73 bytes of data from the record, padded with ASCII blanks if necessary.

All the numeric fields contain unsigned binary integers, with the most significant byte first. Any columns in a record not used by fields will contain ASCII spaces (blanks).

Continuation-of-Record (COR)

As many COR records as needed are used to hold all data that do not fit on the SOR record.

Field

Column

Length

Type

Contents

TYPE

1

1

number

2 = Continuation-of-Record record (COR).

SEQ

2

1

number

Sequence number of this data record.

The first one has sequence = 2 (the SOR record has implied sequence 1), and the numbers roll over to 0 after they reach 255.

CTEXT

3

78

 

The next 78 bytes of data from the record, padded with ASCII blanks if necessary.

End-of-File (EOF)

The last record in the stream is the EOF record, which contains checksums for the data sent.

Field

Column

Length

Type

Contents

TYPE

1

1

number

3 = End-of-File record (EOF).

RECNO

2

4

number

Total number of records sent.

LINES

6

4

number

Total number of BFT format records sent, including the SOF and EOF records.

LAST

10

1

number

1 (other values reserved).