How can I read DataSet from Job Control ?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Nana
Participant
Posts: 1
Joined: Fri Mar 25, 2005 7:26 am

How can I read DataSet from Job Control ?

Post by Nana »

I have to read a DataSet in DataStage Basic, and I don't want to used a sequential file, How can I do ?
gh_amitava
Participant
Posts: 75
Joined: Tue May 13, 2003 4:14 am
Location: California
Contact:

Post by gh_amitava »

Hi,

You can't do this because Basic language does not support PX functions. You can read a dataset file in Unix prompt by ORCHADMIN command.

Regards
Amitava
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Amitva,

nana doesn't want to do this from a Px job. Nana has a Dataset that was generated for some other purpose and needs to use a Uv/Basic function or routine code to work on the data - so the question is whether there is some (documented and hopefully) easy way for a Basic program to parse the dataset description to access the underlying sequential files.

I'd love to know the answer as well.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I think the only way to do it would be to call DSExecute to invoke the appropriate OrchAdmin command. DSExecute captures the output of the command, or the command could redirect output to a text file and the BASIC program read that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
I can't help wondering what or why this need pops up?!
perhaps my 6th scense is trying to say hey if you use hash files you won't have it as read-able and won't have any problems reading from UV/basic.

So can you please state what you want/need to acomplish?
and why is it important you do not use sequential files?

is my shot in the dark on the money?,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Roy,

suffice it to say that the dataset is used and written for one Px process but also needs to be processed through some Uv/Basic code; so instead of making a copy of the file into a sequential file (the data amount is large) nana wishes to read the dataset. I suppose one could write the dataset using a Px job into a pipe, which is read from another (this time Server) job and processed - but it does not invalidate the original question.

Once I get back to a pc with documentation on it I'll see what the Orchadmin commands are to get the information.

-Arnd.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
to dump a DataSet file to the standard output:

Code: Select all

orchadmin dump -name fname.ds
you could invoke orchadmin from command line to get all options
or search in the docs.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

ArndW,
I just feel in some posts that the poster would benefit more if they state the whole scenrio instead of giving a 1 or 2 liner post.
we all seen it before when the xth reply nailed the answer simply since not enough info was specified in the original post and the actuall answer was in a new direction all together.

Some how when I read this post every inch of my beeing screamed if you need to read it in basic what is stopping you from writing it in a form you can read it using basic?
Server jobs though not implicitly run a parallel job can be bilt to run in parallel.

in the original post there are no volumes mentioned just a simplified question that might be or may not be a must question since no scenario was givven by the poster on the 1st post ever I'd like to know a bit more before I throw an answer.

and all this is said with a big :)
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Roy,

in this case I can answer for the poster - this person is sitting in the same office as I am and asked me the question; but as I didn't know the answer it was posted here... Remember that not all people here are as proficient with English as you are and you do have to make some allowances for language (heck, English isn't my mother tongue, either).
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Wild idea: Create a server shared container that invokes the routine. Encapsule it within a Parallel job. Read from dataset and pass data to shared container.
Post Reply