line continuation for DS routine

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
msigal
Participant
Posts: 31
Joined: Tue Nov 26, 2002 3:19 pm
Location: Denver Metro

line continuation for DS routine

Post by msigal »

Can anyone tell me if there is a line continuation charactar when writing DS Routines? I want to split up long lines across multiple lines. Or does the statement have to be all on the same line?

Thanks,
Myles

Example from Visual Basic, one can do the following with the underscore:

If this = true And that = true And _
theOtherThing = true Then
Do something
Else
Do nothing
End If
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Post by jseclen »

Hi Myles...

All statements must be in one line, if you break the statement will have a compilation error..

Miguel Seclen
Lima - Peru
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Miguel's answer is correct, except for the exceptions! :)

Statements with multiple clauses (such as IF, READ, and so on) can have their clauses spread over multiple lines; though still one statement per line. If the clause-introducing keyword (ON ERROR, LOCKED, THEN or ELSE) is the final word on its line, there must be a corresponding END statement; this is known as multi-line format. If the clause-introducing keyword is not the last token on its line, then there must not be a corresponding END statement; this is known as single-line format.

Some statements that include comma-delimited lists, such as DIMENSION, COMMON, ON .. GOSUB, etc., can break to a new line at each comma.

But there is no line-continuation character per se.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply