CFF Multiple Record Types

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
rstemphowski
Premium Member
Premium Member
Posts: 27
Joined: Wed May 21, 2008 7:57 am

CFF Multiple Record Types

Post by rstemphowski »

If you use the Px CFF stage to define multiple record types, you have to specify the record ID for each with the only option being '='. Is there any way to define the record IDs for all but one type and have something like an otherwise or all others record layout. I have a source file that has over 40 record types and am not prepared to define each possibility at this point. I need to define as many as I want and have the others, that don't match the record IDs defined, fall into an "other" record layout. Is there any way to accomplish this in the PX CFF stage?
Robert Stemphowski
Senior DataStage Consultant
rstemphowski
Premium Member
Premium Member
Posts: 27
Joined: Wed May 21, 2008 7:57 am

Re: CFF Multiple Record Types

Post by rstemphowski »

I still haven't figured this out so if anyone has any answers on this, they would be greatly appreciated. At this point, I'm reading in all records with the CFF stage but one layout then filtering them by type (with the remaining going to an "other" bucket) out to individual CFF files. In a separate job, I read the individual file with a CFF stage but this time applying the complex record layout.
Robert Stemphowski
Senior DataStage Consultant
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Hello Robert !

I am not sure whether this is very old topic for you but this is the first time I saw this post. I had the same issue which I resolved not through CFF stage options but by eliminating unwanted record types from the source file itself ( I created a JCL with a Sort to extract only valid record types on the Mainframe side ).

If you already found a solution to this I would appreciate if you can share it so that I can eliminate creating an extra Mainframe job.

Many Thanks,

Aruna.
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Hello Robert !

I am not sure whether this is very old topic for you but this is the first time I saw this post. I had the same issue which I resolved not through CFF stage options but by eliminating unwanted record types from the source file itself ( I created a JCL with a Sort to extract only valid record types on the Mainframe side ).

If you already found a solution to this I would appreciate if you can share it so that I can eliminate creating an extra Mainframe job.

Many Thanks,

Aruna.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You can use the filter to pick only the record types you need and ignore the rest.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You can use the filter to pick only the record types you need and ignore the rest.
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Hi Sainath,

Could you please give an example of how to use a filter. I have around 35 record types with redefinitions at the record level ( all the records have several packed data with redefines). I am picking 15 types of records basing on the record type.

Is there any way to define a filter for the first two characters only instead using record definition ?

Appreciate your help,

Aruna.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

CFF stage picks only the record IDs you defne. So if you skip those you do not wish to extract, it will automatically drop it during import.
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

No it doesn't.

I am getting a initial warning :

Cff_Mar_balo,0: Tag value: NS does not match any tagcase for tagged field "cff_mar_balo_record_type"

'NS' is the record_type for the very first record of the file and want to skip that record.

Then the job fails with a error message subsequently :

Cff_Mar_balo,0: Import error at record 1.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What is the datatype?

It worked for me in ASCII
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

My data format is binary and character set is EBCDIC. My record type is first two characters of the record defined as string (CHAR).

Thanks,

Aruna.
devo
Premium Member
Premium Member
Posts: 18
Joined: Fri Sep 22, 2006 1:22 pm

Re: CFF Multiple Record Types

Post by devo »

Here is what I found. In the CFF stage on the File Options tab, change the reject mode to "Save." You will then need to add a reject to the stage. (add a link, right click link, convert to reject) Now any record that does not flow to the criteria you have established will be sent to the reject link. A warning will be logged for each reject sent.
Grant Dever
Programmer Analyst Sr
devo
Premium Member
Premium Member
Posts: 18
Joined: Fri Sep 22, 2006 1:22 pm

Re: CFF Multiple Record Types

Post by devo »

Here is what I found. In the CFF stage on the File Options tab, change the reject mode to "Save." You will then need to add a reject to the stage. (add a link, right click link, convert to reject) Now any record that does not flow to the criteria you have established will be sent to the reject link. A warning will be logged for each reject sent.
Grant Dever
Programmer Analyst Sr
Aruna Gutti
Premium Member
Premium Member
Posts: 145
Joined: Fri Sep 21, 2007 9:35 am
Location: Boston

Post by Aruna Gutti »

Hi Devo,

No it won't work. The reject mode only works for CFF stage with single record definition. For Multiple record definition you get the following error:

Record format type=implicit: cannot save rejected records

In fact we opened a PMR with IBM and an enhancement request was created for this issue.

Aruna.
Post Reply