Page 1 of 1

create a multiple record structured mainframe file

Posted: Fri Apr 14, 2017 7:50 am
by sarathchandrakt
The Hex data file needs to have different records and different data types same positions of the record.
source is a list of affiliates ,For every Affiliate we need to create 2 records of different lengths and that the data type of the field at pos 26 of header record is character but the data type of the field at pos 26 in tailer record is numberic, possibly a packed decimal.

In the below example for every key value-Affiliate, there has to be a header record and a trailer record created in Hexa format. The position 26 is character in the header, while the same position 26 is a packed decimal in the trailer.

Example:
............HEADER RECORD5/3 DDA07/13/09...
000000000000CCCCCD4DCCDDCF6F4CCCFF6FF6FF000
000000000000851459095369451304410711310922C
--------------------------------------------
............TRAILER RECRD....................
FFFFFFFFFFF0EDCCDCD4DCCDC00000000000000000000
FFFFFFFFFFF43919359095394000C0000000C0000000C


............HEADER RECORDFTCNDDA07/13/09...
000000000000CCCCCD4DCCDDCF6F4CCCFF6FF6FF000
000000000000851459095149552304410711310922C
--------------------------------------------
............TRAILER RECRD....................
FFFFFFFFFFF0EDCCDCD4DCCDC00000000000000000000
FFFFFFFFFFF43919359095394000C0000000C0000000C

Posted: Fri Apr 14, 2017 8:06 am
by chulett
Someone else asked a very similar question recently, let's see... ah, here it is. Not about an EBCDIC file but the basics still apply.