Re: sequential file formats



Here is the test program that I am asking people with access to the
above machines to run and report a hex dump of the output file. This
was compiled on open-cobol, so there may be different compile errors
that would have to be fixed on your platform. thx.

IDENTIFICATION DIVISION.
PROGRAM-ID. test1.

environment division.
input-output section.
file-control.
select AFILE assign to "output.dat"
organization is relative sequential
record key is big-record.

DATA DIVISION.
FILE SECTION.

fd AFILE
label records are standard
record varying from 1 to 50
depending on a-length
data record is a-file.

01 a-file.
05 big-record pic x(50).
WORKING-STORAGE SECTION.

01 A-GRP.
05 A-ELE PIC X(50).

01 A-LENGTH COMP PIC S9(4).

PROCEDURE DIVISION.

OPEN OUTPUT AFILE.
MOVE ALL HIGH-VALUES to a-grp.
MOVE 20 TO A-LENGTH.
WRITE A-FILE FROM A-GRP.
MOVE ALL LOW-VALUES to a-grp.
MOVE 30 TO A-LENGTH.
WRITE A-FILE FROM A-GRP.
CLOSE AFILE.

STOP RUN.

.