Header & Footer is missing
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
Header & Footer is missing
All,
I have designed a simple job as below
Seq File --> Transformer --> FTP Stage (Plug in)
Sample file :
UHDR|2011087
1234|201101|2.67565
1234|201101|2.67565
1234|201101|2.67565
UTRL|5
when i run the job, i see only
1234|201101|2.67565
1234|201101|2.67565
1234|201101|2.67565
in the remote machine.
i.e. Header & Trailer is missing in the file (once the file FTP'ed) . why?
I don't see any info in the log. i.e. The job ran successfully.
I have designed a simple job as below
Seq File --> Transformer --> FTP Stage (Plug in)
Sample file :
UHDR|2011087
1234|201101|2.67565
1234|201101|2.67565
1234|201101|2.67565
UTRL|5
when i run the job, i see only
1234|201101|2.67565
1234|201101|2.67565
1234|201101|2.67565
in the remote machine.
i.e. Header & Trailer is missing in the file (once the file FTP'ed) . why?
I don't see any info in the log. i.e. The job ran successfully.
Karthik
I deal primarily with COBOL datasets that have multiple record types in addition to header and trailer, so I've given some thought to what would be either easiest or least confusing.
Ideally, your header and trailer records would have as many delimiters as your detail records. That is usually unlikely, so the compromise is towards Craig's suggestion: first column identifies how much of the beginning of each record you need to identify what type it is, then have one more column for the rest of the record. Use the transformer to parse by type (substrings, usually, but index() works well with delimiters), branch off the header and trailer records and sequential-funnel them back just before the FTP stage.
Edit: The above assumes you have derivation or other editing to do on individual columns in the detail rows. Of course, if you are just passing data through, you don't have to have separate process branches.
Ideally, your header and trailer records would have as many delimiters as your detail records. That is usually unlikely, so the compromise is towards Craig's suggestion: first column identifies how much of the beginning of each record you need to identify what type it is, then have one more column for the rest of the record. Use the transformer to parse by type (substrings, usually, but index() works well with delimiters), branch off the header and trailer records and sequential-funnel them back just before the FTP stage.
Edit: The above assumes you have derivation or other editing to do on individual columns in the detail rows. Of course, if you are just passing data through, you don't have to have separate process branches.
Last edited by FranklinE on Mon Mar 28, 2011 10:05 am, edited 1 time in total.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
I think i dindn't give the complete information. As you said, I just stored all the values in a single column only.chulett wrote:Doesn't even need to be that 'complex', just read and send it as a varchar with no quotes and all of the records should be transferred intact.
i.e.
report varchar(500)
this columns will have all the values.
reports
UHDR|2011087
1234|201101|2.67565
1234|201101|2.67565
1234|201101|2.67565
UTRL|5
i used the same column in the ftp stage also. i.e. reports varchar(500).
Karthik
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Go back to your orignal design and add a Reject link to the Sequential File stage that reads the file. This will capture the header and trailer rows and begin a stream of processing in which you can do what you like, for example re-parse with a Column Import stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 729
- Joined: Tue Apr 28, 2009 10:49 pm