Page 1 of 1

How can I read DataSet from Job Control ?

Posted: Fri Mar 25, 2005 7:54 am
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 ?

Posted: Fri Mar 25, 2005 12:55 pm
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

Posted: Sat Mar 26, 2005 7:14 am
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.

Posted: Sat Mar 26, 2005 3:25 pm
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.

Posted: Sun Mar 27, 2005 4:05 am
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?,

Posted: Sun Mar 27, 2005 8:02 am
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.

Posted: Sun Mar 27, 2005 8:18 am
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,

Posted: Sun Mar 27, 2005 8:28 am
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 :)

Posted: Sun Mar 27, 2005 8:35 am
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).

Posted: Sun Mar 27, 2005 1:07 pm
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.