Row count in Dataset

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
anujgarg
Participant
Posts: 38
Joined: Sun Jun 26, 2005 11:17 pm

Row count in Dataset

Post by anujgarg »

Hi,

I have to do read the Row count in Datasets and also delete the dataset from PX.
For that i have created the script
!#/bin/ksh
set -vx
cd /home/apps/GES/GESDev/seqfiles/workfiles/mh
DSHOME=/opt/Ascential/DataStage/DSEngine
. $DSHOME/dsenv
DSBIN=$DSHOME/bin

export APT_CONFIG_FILE=/opt/Ascential/DataStage/Configurations/default.apt
export APT_ORCHHOME=/opt/Ascential/DataStage/PXEngine.751.1

export PATH=$PATH:$APT_ORCHHOME/bin
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$APT_ORCHHOME/lib
export ORCHBIN=$APT_ORCHHOME/bin

export LIBPATH=$LIBPATH:$APT_ORCHHOME/lib
no=`dsrecords GpsExt.ds`
set +vx


for deleting dataset i can use 'orchadmin delete datasetname'

But it's not working

Error i am getting is:-

Could not load program dsrecords:
Could not load module /opt/Ascential/DataStage/PXEngine.751.1/lib/liborchaix3.a(
libtemp.o).
Dependent module /home/apps/db2c/ddb2018/sqllib/lib/librwtool.a(librwtoo
l.o) could not be loaded.
Member librwtool.o is not found in archive
Could not load module dsrecords.
Dependent module /opt/Ascential/DataStage/PXEngine.751.1/lib/liborchaix3
.a(libtemp.o) could not be loaded.
Could not load module .

I have checked .a files are there but .o files are not.

What's wrong can anyone guide me.

And also for deleting dataset can i go for deleting pointer and data files directly.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Make sure your .profile have the following.

Code: Select all

DSHOME=/opt/Ascential/DataStage/DSEngine; export DSHOME
PATH=$PATH:$APT_ORCHHOME/bin:$DSHOME/bin:$DSHOME/lib; export PATH
. $DSHOME/dsenv
LIBPATH=$APT_ORCHHOME/lib:$LIBPATH; export LIBPATH
If not, add it. Exit. Open a new session, and try.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
anujgarg
Participant
Posts: 38
Joined: Sun Jun 26, 2005 11:17 pm

Post by anujgarg »

kumar_s wrote:Make sure your .profile have the following.

Code: Select all

DSHOME=/opt/Ascential/DataStage/DSEngine; export DSHOME
PATH=$PATH:$APT_ORCHHOME/bin:$DSHOME/bin:$DSHOME/lib; export PATH
. $DSHOME/dsenv
LIBPATH=$APT_ORCHHOME/lib:$LIBPATH; export LIBPATH
If not, add it. Exit. Open a new session, and try.
Hi kumar,

I have already added those commands in the script itself.then what's the need to add in .profile.I think prob;em is somewhere else.You can note that it could locate the required object files but couldn't load that.
I have tried from dataset mgmt. It is working fine.

So may be i am making some mistake.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Have you check with the permission of those files.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
anujgarg
Participant
Posts: 38
Joined: Sun Jun 26, 2005 11:17 pm

Post by anujgarg »

kumar_s wrote:Have you check with the permission of those files.
It is having only read permission for all groups and users.Will it work??
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Basically it should work.
What is the user id you use?
Try with dsadm. If that works, issue is sure with the permissions.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
anujgarg
Participant
Posts: 38
Joined: Sun Jun 26, 2005 11:17 pm

Post by anujgarg »

kumar_s wrote:Basically it should work.
What is the user id you use?
Try with dsadm. If that works, issue is sure with the permissions.
Is it possible that these files doesn't have object files attached to that.

Another thing Whatever may be the problem then how the dataset managment tool is able to do all the activities on Datasets.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Have you tried with dsadm?
It is not necessary for datastage to use the same aproach we use to access the dataset.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
anujgarg
Participant
Posts: 38
Joined: Sun Jun 26, 2005 11:17 pm

Post by anujgarg »

kumar_s wrote:Have you tried with dsadm?
It is not necessary for datastage to use the same aproach we use to access the dataset.
I don't have access to tha.Client hasn't provided us the dsam id.Any other thing problem is there in script??

Can i delete the datset file by deleting both descriptor and datafiles directly.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Yes this is the odd way of deleting it. But get deleted.
Try to give permission as 775 to all the file available under the datastage installation.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply