Problem:
What option can we use in the rebuild to pad with spaces when converting a line sequential file to a fixed length record sequential file. It appears that the records in the record sequential file are filled with low-values instead of spaces.
rebuild command:
REBUILD file1.txt, file2.dat /o:lseq,seq /r:f80
Resolution:
There is an optional padding character suboption for the /r option that designates the padding character used to fill the fixed length record.
If you use /r:f80pd32 for the output file then this tells Rebuild to create a file with fixed length records of 80 bytes and to space fill the record. i.e. the padding character is specified as a decimal value (32) which represents the ASCII space character " ".
This is documented in the Net Express Help ( Help>Contents>Programming>File Handling>Reference>Rebuild>Options )under the /r option you will see that there is an optional padding character suboption that can be used to specify the padding character.
From the docs:
ppad-character|[ddecimal-value] specifies the padding character where the output record length is greater than the input record length. The default is spaces for line sequential files and NULLs for all other file organizations. d indicates that the padding character is supplied as a decimal value in the range 0 through 255, indicating the ANSI character to be used .
#RMCOBOL
#netexpress
#ServerExpress
#COBOL
#AcuCobol