Page 1 of 1

How to understand the routines in datastage

Posted: Fri Dec 16, 2005 12:33 am
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)

Posted: Fri Dec 16, 2005 2:00 am
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.

Posted: Fri Dec 16, 2005 2:17 am
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.

Posted: Fri Dec 16, 2005 2:31 pm
by ray.wurlod
A training class Programming with DataStage BASIC is available.