CFF Output Files with Occurs

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
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

CFF Output Files with Occurs

Post by Griffin07 »

Hi, we have a requirement to create a CFF files that needs to go up to the MF, and in the file there needs to be an ODO. We are able to read MF files with ODO's on the inputs but now we need to create them on the output. I had read that this is not supported in the CFF stage. Does anyone know if this can be done either thru the CFF stage or another way?

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

Post by ray.wurlod »

Parallel job (as marked) or server job (as posted)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Based on previous postings, let's go with Parallel. :wink:

Moved to the PX forum, easy enough to move back if needed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

Post by Griffin07 »

yes, parallel jobs
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

As you've found, writing to an occurs-depending-on using CFF isn't supported. While you could use a transform stage to "build" your variable-length Output record or perhaps use the make-vector stage, I think it might be easiest to define a fixed-occurrence OCCURS and fill the unused elements with a character value that cannot appear the file, then post-process the line (using sed or perl or awk or tr) and removing all occurrences of that character. That will effectively give you the same Thing as you would have gotten with a real occurs-depending-on.
Griffin07
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 17, 2007 6:55 am

Post by Griffin07 »

Hi ArndW, the sed/pearl option sounds promising, we would need to run it on the file after it comes out of the CFF stage and has been converted to EBCDIC?
Post Reply