How to understand the routines in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
abha.kalra
Participant
Posts: 37
Joined: Fri Oct 21, 2005 4:09 am

How to understand the routines in datastage

Post by abha.kalra »

give some information how to write datastage routine and how to understand the already written code.

here is the some sample code.

$INCLUDE DSINCLUDE JOBCONTROL.H

Equate RoutineName To 'CoEGetLinkCounts'
Equate RunIntfName to Arg_IntfName
Equate RunJobName to Arg_JobName
Equate AuditPath To @PATH:'/seqfiles/auditfiles/'
Equate JobRunId To '100'
Equate CurrLinkName To ''
Equate PrevLinkName To ''

Deffun DSRMessage(A1, A2, A3) Calling "*DataStage*DSR_MESSAGE"
Deffun DSRTimestamp Calling "DSR_TIMESTAMP"

JobHandle = ''
Info = ''
AuditRow = ''
AuditRow1 = ''
ReturnArray = Arg_PrevArray

JobHandle = DSAttachJob(RunJobName, DSJ.ERRFATAL)
Thanks and Regards
Abha
manojmathai
Participant
Posts: 23
Joined: Mon Jul 04, 2005 6:25 am

Post by manojmathai »

Hi

I think the routine you have given is not complete.
Pls give the complete routine to infer something from it.

Regards
Manoj.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Abha,

as Manoj has already pointed out, the code portion you added to your post is just the initial header portion of a job. It sets the values to some constant and variables and attaches, or opens, a job for use.

The programming language is called BASIC and the complete manual is on your DataStage client PC as a .pdf file. If you look at some of the builtin and SDK routines in the Manager client you will see how the language works. If you come from a well-founded programming background in any structured programming language it is just a matter of learning the syntax and finding out what functions are available to you in DataStage BASIC.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A training class Programming with DataStage BASIC is available.
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