Skip to main content

Problem:

If mfosrt is used to try and create one file from another, with a greater record length in the output file, then the result is not as expected.

The scenario:

Input file indata:

01234567890123456789012345678901234567890123456789

Desired output file outdata:

012345678901234567890123456785678900      0       0        4567890123456789

mfsort_directives, the directives file:

USE indata ORG LS RECORD F,50 sort fields=copy OUTFIL GIVE outdata

ORG LS RECORD F,75

OUTREC=(1,25,26,4,26,6,C'0',6X,C'0',7X,C'0',8X,35,2,37,7,44,7)

The command line:

mfsort take mfsort_directives

The actual output:

012345678901234567890123456785678900      0

viz. the output is being truncated.

Resolution:

This is a bug, which will be fixed in due course. There are a couple of workarounds. both which entail changing the directives file:

(1) USE indata ORG LS RECORD F,50 sort fields=copy GIVE outdata

ORG LS RECORD F,75

OUTREC FIELDS=(1,25,26,4,26,6,C'0',6X,C'0',7X,C'0',8X,35,2,37,7,44,7)

(2) Add another input file of the right length, e.g. 'USE /dev/null RECORD F,75'.

Old KB# 2132

#AcuCobol
#RMCOBOL
#COBOL
#netexpress
#ServerExpress