System Date - Datastage PX

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
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Post by bigpoppa »

I'd like to help, but please clarify the following:

1. Is there a system date in every record in your Teradata data?
2. Is there a creation date in every record in your comparison data?

Thanks,
BP
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Post by bigpoppa »

Well, could you enter today's date into a parameter and check against it? Or perhaps you can enter today's date into an environment var?

Also, there's an APT function called today() that assigns the System Date to a field that is an APT_Date. You can use this function in the PX buildop stage. There's also a compare(APT_Date1, APT_Date2) function that can be used within buildop.

If you haven't already, you might want to check out using PX buildop in place of PX transform.

:)
BP
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think what was being sought was the Teradata equivalent to Oracle's SYSDATE or UniVerse's CURRENT_DATE.
Unfortunately, I don't know what the answer is.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Post by bigpoppa »

I think buildop is now called Custom Parallel Stage. Let us know if you have trouble using it.
Creo
Participant
Posts: 34
Joined: Wed Mar 19, 2003 1:12 pm
Location: Canada

Post by Creo »

Are you kidding? The @DATE doesn't exist on the PX side?? We are planning on starting to develop with it pretty soon and I only had training yet (no practical experience) so I didn't know. Sorry to have mislead you on that one! [xx(]

Creo
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Server jobs generate DataStage BASIC code and, therefore, have available to them all of the DataStage BASIC system variables, such as @DATE, and DataStage BASIC functions.
Parallel jobs generate C code and, therefore, do not have DataStage BASIC system variables available to them. They have a rich set of functions available (see Parallel Job Developer's Guide) but these are not the same as the DataStage BASIC functions in server jobs, though there are overlaps.
Server jobs may be encapsulated in shared containers - subject to certain conditions - and incorporated into parallel jobs.
A paper on this will shortly be published on www.DataStageXChange.com.

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Post by bigpoppa »

Yes. :)
Post Reply