dsrecords command error

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Narayana
Participant
Posts: 16
Joined: Fri Mar 30, 2007 9:25 am

dsrecords command error

Post by Narayana »

tried to know the total count of records in unix for the .ds file at unix command prompt. I am getting the following error.

How can i solve this problem :)

"ld.so.1: dsrecords: fatal: liborchsun4.so: open failed: No such file or directory"
Killed

I can see the file physically present in the directory
siva.k82
Participant
Posts: 7
Joined: Thu Sep 14, 2006 10:57 pm
Location: marthalli
Contact:

Re: dsrecords command error

Post by siva.k82 »

ANS : as per your query error message says there is no file such directory. when you looking in to that path that file it is there.....


can you check in unix this command .......wc file name.
you can get total number of records.
sivaram
Narayana
Participant
Posts: 16
Joined: Fri Mar 30, 2007 9:25 am

Post by Narayana »

that will not give the records. It will give the word count i believe

thanks siva for your quick respose
koolnitz
Participant
Posts: 138
Joined: Wed Sep 07, 2005 5:39 am

Post by koolnitz »

To run this (dsrecords) command on Unix prompt, you need to set the environment as following:

1> PATH=$PATH:$APT_ORCHHOME/bin:$DSHOME/bin:$DSHOME/lib
2> export PATH
3> . $DSHOME/dsenv
4> LIBPATH=$APT_ORCHHOME/lib:$LIBPATH;
5> export LIBPATH
6> $dsrecords <dataset dir/>dataset_name
Nitin Jain | India

If everything seems to be going well, you have obviously overlooked something.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

And that, in turn, implies that you must have APT_ORCHHOME and DSHOME set. You also need APT_CONFIG_FILE set to point to the configuration file that was in use when the Data Set was created, or to a compatible configuration file.

The dsrecords executable, as koolnitz implies without being specific, is in the $APT_ORCHHOME/bin directory.

However, you do not need $DSHOME/lib in your command search path (PATH) - but you do need it in your shared library search path (LIBPATH, LD_LIBRARY_PATH or SHLIB_PATH, depending on your 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: dsrecords command error

Post by chulett »

siva.k82 wrote:can you check in unix this command .......wc file name.
you can get total number of records.
Narayana wrote:that will not give the records. It will give the word count i believe
Actually, it will. While "wc" does mean "word count", without a specific modifier it will return all counts: bytes, words and lines where "lines" equates to records. To restrict the command to only checking "lines", use the following format:

Code: Select all

wc -l <filename>
Stick with the Orchestrate command in this case, just wanted to clear up these statements.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Undocumented feature

Post by ray.wurlod »

The dsrecords executable, properly executed, returns the number of records in the Data Set followed by the word "records".

Code: Select all

dsrecords MyProject/Controls/Engagements.ds

277381 records
You can use a -n option to suppress display of the word "records".

Code: Select all

dsrecords -n MyProject/Controls/Engagements.ds

277381
This is particularly useful in scripted applications, such as an interface with a third party scheduler.
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