RecRef - Record Reformatter
Record Reformatter is used when incoming records layout-wise do not correspond to what you need.
This will often be the case when you get a file from a mainframe, and you need to convert it to
a mailing list or a file for use in a spread sheet, which normally expects a comma-separated input file,
which even is supposed to be character-only.
When we look at an imagined input record, we have to check for at least 3 possible problems :
- is the data written in EBCDIC(eksempel : 0xD489A3409581A596 = 'Mit navn')
- do we see packed fields (COMP-3) (eksempel : 0x00009184950C) = '+00009184950')
- are there any other non-character fields, e.g. non-standard formats for a date?
If you converted these fields straight through an EBCDIC-ASCII table, you would get
gibberish, something like '<00>jdn<ff>', instead of 000009184950, which obviously
What is to be done, is
(1) convert the readable data throug a EBCDIC-ASCII table, while
(2) everything else is converted through appropriate tables/routines.
A packed field like 0x00009184950C must be converted to 0xF0F0F0F0F9F1F8F4F9F5C0.
When you then also need to convert a Julian-formatted date (5 figures) to DD.MM.YY or even YYYY.MM.DD, it's going to be
Tasks like these should be left to a specialist.
In total, there are some 40 predefined routines in the Record Reformatter.