mainframe file issue

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sdfasih
Participant
Posts: 39
Joined: Wed May 24, 2006 7:22 pm

mainframe file issue

Post by sdfasih »

Hi,
I have an issue reading mainframe file whose format is
H,date(2006-07-07).....
D,.............................
D,....................
.
.
T,1234,..................

H-header record
D-data record
T-trailer record

I am using same metadata to read all the records using CFF stage to convert ebcidic to ascii.
I have an issue with the second column its datatype is integer.So date cannot be loaded into this datatype.After conversion its giving me junk values for data column of header record.
Please suggest some strategy to deal with this issue as it may happen for any file.
Thanx in advance
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Since the file is in Ebcidic formate, you canot use unix command readily.
Check whether you can count the number of lines of the file using wc -l command. If it succeed, it proves the file has the end of line as new line character. So you can wipe out the first and last in unix command in the filter option using tail/head command.
Or once Trailer record is removed, give the first line as column name to get rid of Header.
Else, Read the whole as varchar chuck and using a transformer wipe out the header and trailer using the first column 'H' and 'T' check. and formulate back to the given metadata.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Can you delete the other dulicate post create on the same topic by you, before any one reply to that.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply