Delimiters and MFF stage in Mainframe canvas

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sankarsadasivan
Premium Member
Premium Member
Posts: 39
Joined: Tue Dec 23, 2003 3:47 am
Location: India

Delimiters and MFF stage in Mainframe canvas

Post by sankarsadasivan »

I am developing mainframe jobs in DS 390.
I have a requirement to read an input file which has the format

1)Header - Data - Trailer
2) Data record delimited by ASCII 168


Q1: Since the record has multiple formats, I decided to use MFF Stage, but then it doesnt support delimited files, only fixed width files.
Wondering what stage can be used in my case...

Q2: Also how do I specify ASCII168 delimiter in the file stages.

Any ideas....

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There's a Delimited Flat File stage. You can specify the delimiter as a three-digit decimal ASCII code or as a two digit hexadecimal ASCII code preceded by "&H". See page 6-5 of the Mainframe Job Developer's Guide for full information.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sankarsadasivan
Premium Member
Premium Member
Posts: 39
Joined: Tue Dec 23, 2003 3:47 am
Location: India

Post by sankarsadasivan »

Thank you , Ray.

Delimited flat file stage , doesnt allow multiple formats - header, data and trailer records and MFF doesnt allow delimiters!!

Thanks for pointing out the documentation, I tried ASCII delimiter 168 in the delimiter column of the delimited flat file stage , it says its invalid ..
and gives the error message, we can use spl characters, ASCII three digit decimal code or hexa 2 digit with &h.. confusing!

Any ideas?

Much appreciated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

sankarsadasivan wrote:Thanks for pointing out the documentation, I tried ASCII delimiter 168 in the delimiter column of the delimited flat file stage , it says its invalid ..
So what exactly did you try? Hopefully not literally 'ASCII delimiter 168' but rather just 168 in the field, as long as that is the decimal value of your delimiter. Or is that number what it declared 'invalid'? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

According to the Mainframe Job Reference Guide (page 6-5) any three digit ASCII code value can be used for the delimiter (on the Format tab). You can also use &hA8 instead of 168.

If the Delimited Flat File stage won't allow 168 you probably need to read the entire row as a single VarChar (string) and parse it yourself using POSITION, CHARACTER_LENGTH and SUBSTRING functions. Which would be messy, to say the least. There is no FIELD function in mainframe jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply