IIS 8.0.1 Wrapped Stage for UNIX

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
cundyp
Premium Member
Premium Member
Posts: 53
Joined: Tue Feb 06, 2007 10:57 am

IIS 8.0.1 Wrapped Stage for UNIX

Post by cundyp »

IIS 8.0.1 Wrapped Stage for UNIX

I have a unix command that works in a server routine and returns a timestamp:

Call DSExecute("UNIX",'echo `date "+%Y%j%H%M%S%M"`', Output, SystemReturnCode)

This needs to be converted to our IIS 8.0.1 unix parallel environment (same functionality).

The best option seems to be the Wrapped Stage. Is this the best choice?

My first question is on the General tab and the command line what is the syntax of the unix command?

DSExecute("UNIX",'echo `date "+%Y%j%H%M%S%M"`', Output, SystemReturnCode) ????
Pete Cundy
Leawood, Kansas
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSExecute is a BASIC function, and therefore not available in a Wrapped stage. The UNIX command you use in a Wrapped stage is just the command itself (the second argument of your DSExecute call).

Read about the Wrapped stage (there's even an example) in the Parallel Job Advanced Developer's Guide (advpx.pdf). This stage normally reads its input to produce its output, which does not appear to be what you require.

Do you need the date separately for each row processed? If so, why not just use the CurrentTimestamp() function in a Transformer stage, encased in appropriate reformatting functions? Use stage variables for the intermediate results. If not, why not call your existing server routine from a Routine activity in a job sequence, and use the result to supply the value to a job parameter for your parallel job?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
cundyp
Premium Member
Premium Member
Posts: 53
Joined: Tue Feb 06, 2007 10:57 am

timestamp with julian date

Post by cundyp »

Roy: DSExecute is a BASIC function, and therefore not available in a Wrapped stage. The UNIX command you use in a Wrapped stage is just the command itself (the second argument of your DSExecute call).
Command: ('echo `date "+%Y%j%H%M%S%M"`', Output, SystemReturnCode)

Roy: Read about the Wrapped stage (there's even an example) in the Parallel Job Advanced Developer's Guide (advpx.pdf). This stage normally reads its input to produce its output, which does not appear to be what you require.
Do you need the date separately for each row processed?
Answer: I need the data applied to each row processed (have the advpx.pdf example printed out for ref) .
Roy: If so, why not just use the CurrentTimestamp() function in a Transformer stage, encased in appropriate reformatting functions? Use stage variables for the intermediate results.
Answer: This was taken as my initial approach, using stage variables and worked fine the problem being that i needed julian date. We use this date along with a randomizing algorythm for our db2 partitioning. I then wrote a unix routine which also worked but couldn't be called from a parallel transformer.
Roy: If not, why not call your existing server routine from a Routine activity in a job sequence, and use the result to supply the value to a job parameter for your parallel job?
Answer: I needed the data applied to each row processed.
Comment: With the installation of IIS 8.0.1 i'm trying to get familiar with the Build, Custom, Wrapped and Transform stages, how to call unix commands, C++ etc.
Pete Cundy
Leawood, Kansas
Post Reply