CFF stage

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
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

CFF stage

Post by allavivek »

Hi All,

Does CFF Stage in 7.x is used to seperate records from file having different record types?

I couldnt find any options for seperating records...

Is there any difference between CFF stage in 7.x and 8.x?

Thank you...
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

CFF is used for reading sequential files with "structures". Good examples are multi-level COBOL generated files (you'll need the copybook to set it up easily) or files that have different types of record layouts indicated by a flag field in the first column (typically Header / Detail / Trailer).

Yes - it can be used to route the different record-types down different links - but each "type" must be identifiable via a particular string in the first column (like "H" for header or "D" for Detail).

The only difference I can recall between 7 and 8 is that the 8 version has a "Fast Path" selector at the bottom that walks you through the tabs you need to use to setup the stage. Not quite a wizard, but it helps.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Nowadays (8.1.2) the CFF stage can output different record types on different output links, not sure if this could be done in version 7.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

Post by allavivek »

asorrell wrote:CFF is used for reading sequential files with "structures". Good examples are multi-level COBOL generated files (you'll need the copybook to set it up easily) or files that have different types of record layouts indicated by a flag field in the first column (typically Header / Detail / Trailer).

Yes - it can be used to route the different record-types down different links - but each "type" must be identifiable via a particular string in the first column (like "H" for header or "D" for Detail).

The only difference I can recall between 7 and 8 is that the 8 version has a "Fast Path" selector at the bottom that walks you through the tabs you need to use to setup the stage. Not quite a wizard, but it helps.

Iam using V7.x and i have input records of types starting with 'H' and 'D' ..

i was trying to divide using CFF stage but couldnt find any option and also referred guide but didnt not mention any thing about dividing variable record types in 7.x .....can we do it in 7.x??can you tell me how to do it , if we can ?


And while viewind data from stage iam getting following error ..

##E TOIX 000001 10:01:30(000) <Complex_Flat_File_0,0> Failure during execution of operator logic. [api/operator_rep.C:330]
##F TUXX 000001 10:01:32(000) <APT_CombinedOperatorController,0> Internal Error: (stype == eFull): impexp/recordstream.C: 2710
Traceback: pureAssertion__13APT_FatalPathFPCcPCci() at 0xd5b3c654
readBlockWord__23APT_VaryingRecordStreamFRiPUsR12APT_ErrorLog() at 0xd55b9f14
readSegment__23APT_VaryingRecordStreamFRiPPCcPiPUiPQ2_23APT_VaryingRecordStream11SegmentTypeR12APT_ErrorLog() at 0xd55b9fa4
readRecord___23APT_VaryingRecordStreamFPPCvPUiR12APT_ErrorLogb() at 0xd55ba2fc
writeOutputRecord__22APT_FileImportOperatorFv() at 0xd69487b4
runLocally__30APT_CombinedOperatorControllerFv() at 0xd54c1c28
run__15APT_OperatorRepFv() at 0xd53ff20c
runLocally__14APT_OperatorSCFv() at 0xd53ebbbc
runLocally__Q2_6APT_SC8OperatorFUi() at 0xd5476a44
runLocally__Q2_6APT_IR7ProcessFv() at 0xd54f98c8

couldnt figure out wht this is about??

thanks...
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

ray.wurlod wrote:Nowadays (8.1.2) the CFF stage can output different record types on different output links, not sure if this could be done in version 7.
You are entirely correct Ray! I assumed since he was asking about differences between 7 and 8 that he had access to 8.

I went and found a release 7 system to login and check, and confirmed that the ability to sort output based on a record id is only available in release 8. The "Records id" tab is what is used to provide that functionality and it doesn't exist on 7.


Allavivek - you'll have to either put a filter stage on after your input file or use a transformer stage with constraints. Both of these options will allow you to route data down links based on data values. If you have multiple record layouts then you'll have to read the records using a sequential file and use a large varchar to hold the record until you can determine the layout (via the record type indicator) and manually parse the fields out.

This is MUCH easier at 8 where you can let the tool do the parsing using the CFF.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

Cant we simply use the constrain tab in the CFF? I dont have access to parallel jobs in 7.5. But I believe that should definetly be there. I'm sure we have it in 7.5 server.

Also, If we can use a filer or a transformer, we can do the same in the constrains tab as well.

Am I missing something here?
Arun
Post Reply