Is it Possible to Call DataStage Basic in Custom 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
jonathanhale
Premium Member
Premium Member
Posts: 33
Joined: Tue Nov 06, 2007 1:09 pm

Is it Possible to Call DataStage Basic in Custom Routine?

Post by jonathanhale »

e.g. Ans = Ebcdic(FileContent)

to convert ascii Filecontent to Ebcdic code set
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, as long as you include the appropriate ".h" file and add a DEFFUN statement. Search for DEFFUN in the forums for discussions on and examples of this.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jonathanhale
Premium Member
Premium Member
Posts: 33
Joined: Tue Nov 06, 2007 1:09 pm

Post by jonathanhale »

Hi Craig,

In testing, this:

Ans = Ebcdic(FileContent)

does work without any DEFFUN

(I was confused by the WRITESEQ problem that Ray explained in the other post, as I didn't get my EBCIDIC.)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

EBCDIC() is an internal function in the language, doesn't need DEFFUN.

WRITEBLK is a statement, not a function. You write precisely the byte values that are in the variable. No line terminator character is written; you must organize that yourself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah... sorry - the DEFFUN is not needed for internal functions, but for other routines, yes. And depending on the function, you may or may not need to 'include' anything.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply