How to Learn Routines?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
thanush9sep
Premium Member
Premium Member
Posts: 54
Joined: Thu Oct 18, 2007 4:20 am
Location: Chennai

How to Learn Routines?

Post by thanush9sep »

Recently moved to a new Organization and learning lot of things....

I was always eager to learn Routines, however was running away from it, thinking it would not fit into my brain...

This post is about my recent experience in this organization. I have been told to write small description of already existing Routines, and I have no knowledge about it..

I came across a Routine called rtSetParamsFromFile. Below are the few line that I encountered and seriously I have no clue about these things

Code: Select all

$INCLUDE DSINCLUDE DSD_STAGE.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$INCLUDE DSINCLUDE DSD.H
$INCLUDE DSINCLUDE DSD_RTSTATUS.H

      Equ Me To 'SetParamsFromFile'

*  Diags added briefly 19/01-2011
      TODAY = OCONV(DATE(),"D-YMD[4,2,2]")
      TIMET = OCONV(TIME(),"MTS")
      TIMESTAMP = TODAY:" ":TIMET
      TXT = "After job started at:  ":TIMESTAMP
      Call DSLogInfo(TXT, Me)
* End of diags

      If Not(DSJobName) Then Return(0)

! Do nothing if the Job has no parameters

      JobName = Field(STAGECOM.NAME,'.',1,2)
      ParamList = STAGECOM.JOB.CONFIG<CONTAINER.PARAM.NAMES>
It would be better if somebody could give their opinion about writing Routines... and clarify the below

a) what is the use of DSD_STAGE.H
b) what is STAGECOM.NAME,
STAGECOM.JOB.CONFIG<CONTAINER.PARAM.NAMES>

My concern is that I have no clue where to start learning Routines, However i know what are the usage of DSLogInfo etc etc
Regards
LakshmiNarayanan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The DSXchange Learning Center has a DVD called "Programming with DataStage BASIC" which is mainly about routines (and expressions) written in that language.

DSD_STAGE.H is a header file containing constant and variable definitions such as STAGECOM.NAME, CONTAINER.PARAM.NAMES and STAGECOM.JOB.CONFIG.

The angle brackets are "dynamic array notation"; an alternate syntax to the Field() function for extracting elements from dynamic arrays.
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