Page 1 of 1

dsrecords command error

Posted: Tue Nov 27, 2007 12:46 am
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

Re: dsrecords command error

Posted: Tue Nov 27, 2007 1:36 am
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.

Posted: Tue Nov 27, 2007 1:44 am
by Narayana
that will not give the records. It will give the word count i believe

thanks siva for your quick respose

Posted: Tue Nov 27, 2007 3:19 am
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

Posted: Tue Nov 27, 2007 5:37 am
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).

Re: dsrecords command error

Posted: Tue Nov 27, 2007 7:38 am
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.

Undocumented feature

Posted: Tue Nov 27, 2007 4:29 pm
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.