Build Operator Example Per Record Tab

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
darrreever
Participant
Posts: 19
Joined: Tue Feb 23, 2010 11:15 am
Location: Los Angeles

Build Operator Example Per Record Tab

Post by darrreever »

Hello DataStagers!

Would someone please post an example from their working Custom Stage (Build Type) Build tab> Logic> Definitions and Per-Record sub tabs.

My objective is to use this stage and I cannot find a single example to determine syntax, usage, etc. All of the Advanced Developers Guides from 8.0 to 8.7 all have an "Example Build Stage" section that references "The following screen shots.." and not one actually has a screenshot of anything. :roll: Specifically I am looking for an equivalent to Step 5 mentioned in that documentation. Any insights would be appreciated.
Darryl
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I have written some build-ops but I can't post customer code. What I can do is remove most of the operative code to give you an idea of what happens. In the code posted, the build-op does it's own record processing, i.e. it takes over from DataStage and does all reads and writes by itself; normally the per-record code only processes one record and puts it to the output link.

Code: Select all

/********************************************/
/* In0 - input stream, Out0 - output stream */
/********************************************/
for (;;){
   if ( ProcessGroupChange && RowNumber != 0) {
	/* Lots of code */
      if (!ErrorFound) {
         j = 0;
         for (i=0;i<RefRecords;i++){
            if (RefTable[i].HistAktion == "I" ) {
               j                     += 1;
               Out0.HIST_TIK          = RefTable[i].Schluessel; 
				/* more code */
               writeRecord(0); 
            }
         }
         if (DebugSwitch){
			/* more code */
         }
      }
   } /* end if Group change */

   if (!inputDone(0)){
		/* more code */
      readRecord(0);
      if (inputDone(0)) CurrentKey = "DummyValue"; else CurrentKey = In0.HIST_TIK;
   } else break; /* Leave main loop, since In0 has been read completely */
   RowNumber++;
} /* end of infinite for-loop */
darrreever
Participant
Posts: 19
Joined: Tue Feb 23, 2010 11:15 am
Location: Los Angeles

Post by darrreever »

Hello DataStagers!

Thank you ArndW for your info.

For those of you who want more info, the best insight that I can give is to read the Orchestrate 7.0 User Guide and the Orchestrate 7.0 Developer's Guide. Specifically, on page 14.29 of the user guide will give the information on the example.

I highly recommend reading the old Ascential Software/Torrent guides. They are very helpful in explaining the PXEngine and all of its features. I have noticed much of the DataStage 8.0 - 8.7 Parallel Advanced documentation is taken almost cut and paste from these guides without the very good graphics and notes from the original.

Once again, thanks for all your support!

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

Post by ray.wurlod »

There are also good examples in the IBM training class Advanced DataStage.
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