can any one tell me how can i get list of system variables

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
him121
Premium Member
Premium Member
Posts: 55
Joined: Sat Aug 07, 2004 1:50 am

can any one tell me how can i get list of system variables

Post by him121 »

hi..
all.
i want to know where i can get help of getting list of
different system variables like

%CurrentDateIn,%DateTimeIn(?) ,%DateTimeOut..
this are the variables..i am firign in DRS with User defined SQL query....

but i am not able to get the help topics on this..
please let me knw if some help there
thanx
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Write SQL appropriate to the database you are using.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For example, what is SYSDATE for one database's SQL might be CURRENT_DATE in another. If you're writing user-defined SQL it must be correct for the database/driver with which you're communicating.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
him121
Premium Member
Premium Member
Posts: 55
Joined: Sat Aug 07, 2004 1:50 am

Post by him121 »

ok..
the syntax is depend upon the Database,,,
but my question is whther all the above sys variables related to date..will be provided by...
ascential..?

bcoz the job i am creating is goin to run on Oracle,DB2,OS/390 and MS-SQL server databases...

so syntax in DRS stage i am not going to change..
so can any one tell me..

are any other sysvariables are there..
if then ..tell the document...also..
thanx
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The stage does not rewrite your query to take advantage of SQL extensions specific to the database. So, make sure you use portable SQL that works across all platforms. If you need values like a system date, you will need to use job parameters and feed them into your job/query. You will NOT be able to write an Oracle query using Oracle functions/hints/SQL-extensions and DataStage 'figures' out the SQL-Server equivalents when pointing the job at SQL-Server.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage system variables are documented in the DataStage BASIC manual. Some of them are documented in on-line help (the topic System Variables will get you started).

Values generated by these can not, in general, be inserted directly into SQL. You use the system variables in a Transformer stage to generate the appropriate format for your target database. For example:

Code: Select all

Oconv(@DATE, "D-YMD[4,2,2]") 
will generate an ISO 8601 format version of the date that the job started.
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