Viewing/Writing Contents of a DataSet from a OS

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
sidharth
Participant
Posts: 19
Joined: Mon Nov 07, 2005 1:47 am

Viewing/Writing Contents of a DataSet from a OS

Post by sidharth »

Hi All,

If i fire a unix command,
say, "cat file.ds" (where file.ds is a dataset) , it shows junk data. I understand that contents in Data Set are in orchestrate format.

Is there a way i can view the contents of a DataSet from the DS Server Operating System (example : AIX Unix) using any command?

Is there a way i can write to a dataset from a DS Server Operating System ? I know, its quite ambitious, but couldnt resist asking this question.

Thanks,
Sidharth
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Check out Roy's reply in this post.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"file.ds" is not the Data Set. It is the Data Set control file. (And it's definitely not junk!)

The data in the Data Set are in separate files in the directories identified as disk resource in your configuration file. These, too, are in DataStage internal form (binary numbers, for example), so you would interpret them also as "junk".

There are utilities for viewing the contents of Data Sets; there is a GUI available from the manager, or the orchadmin command available from the operating system.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

orchadmin -dump should be more appropriate for your requirment.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
sidharth
Participant
Posts: 19
Joined: Mon Nov 07, 2005 1:47 am

Post by sidharth »

Hi all,
Thank you all for the explanation. Now i have a better idea of things.But I am not still out of the woods.

I try to execute the orchadmin commands from the command prompt, but i am facing the below errors.

Code: Select all

C:\Ascential\DataStage\PXEngine\bin>orchadmin dump -name test.ds
The environment variable APT_ORCHHOME can not be empty.
Please assign it to the proper directory in the DataStage PX install area.

C:\Ascential\DataStage\PXEngine\bin>dsrecords
The environment variable APT_ORCHHOME can not be empty.
Please assign it to the proper directory in the DataStage PX install area.

C:\Ascential\DataStage\PXEngine\bin>osh
The environment variable APT_ORCHHOME can not be empty.
Please assign it to the proper directory in the DataStage PX install area.
I tried to call these functions from the shell command too, but am not successfull.

Code: Select all

C:\Ascential\DataStage\PXEngine\bin>sh
$ pwd
C:/Ascential/DataStage/PXEngine/bin
$  orchadmin.exe
orchadmin.exe: not found
$ dsrecords
dsrecords: not found
$ exit
C:\Ascential\DataStage\PXEngine\bin>
I checked the environment varaiables(APT_ORCHHOME) in the Admiistrator module, its set.
Project > Environment Button > Parallel Area > APT_ORCHHOME > "C:\Ascential\DataStage\PXEngine"


My Environment
--------------
Data Stage Engine : 7.5x2
OS : Windows 2000 Server with SP4 with .NET 2003

Thanks for the helping hand.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That APT_ORCHHOME is set in the Administrator module does not necessarily mean that it's set for you, the interactive user. You must make sure that it is explicitly set. You can prove that it's set using a set command.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Include an entry in dsenv which points to "..Ascential/DataStage/PXEngine"
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's only useful if you source dsenv prior to executing DS commands. It may be better to edit the .profile file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thompsonp
Premium Member
Premium Member
Posts: 205
Joined: Tue Mar 01, 2005 8:41 am

Post by thompsonp »

Did you manage to solve this?

I have the same problem. I know what to do on a Unix install but is there an equivalent to the dsenv script for a Windows installation of PX that I can run to setup the environment when logging in as someone other than the dsadm user?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can set environment variables using Control Panel > System. Choose the Advanced tab and, from there, the Environment command button. You may need to re-boot (Microsoft's solution to everything) for the changes to take effect.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thompsonp
Premium Member
Premium Member
Posts: 205
Joined: Tue Mar 01, 2005 8:41 am

Post by thompsonp »

Thanks Ray.

I set APT_ORCHHOME as an environment variable for my user. There was no need to reboot for it to take effect.

I then set APT_CONFIG_FILE from the command prompt and was able to run the orchadmin command.
Post Reply