BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Streamline and extend SAP BusinessObjects software 
Streamline and extend SAP BusinessObjects software (Opens a new window)  

General Notice: No events within the next 45 days.

Row Count for flat file


 
Search this topic... | Search DI: Designer and Job Design... | Search Box
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Author Message
p.sree
Senior Member
Senior Member



Joined: 15 Jun 2009

Posts: 45



PostPosted: Thu Jan 14, 2010 2:27 am 
Post subject: Row Count for flat file

HI,

I am using exec function to calculate the number of rows in my souce file.

$count = exec('home/etldev/POC','-c "wc -l < poc_source.txt "', 0);

But, am getting this error -
15045 4252878368 SYS-050612 1/14/2010 12:21:53 AM |Session JOB_POC|Work flow WF_POC
15045 4252878368 SYS-050612 1/14/2010 12:21:53 AM Cannot create process with image file <home/etldev/POC> and command line <home/etldev/POC-cwc -l < poc_source.txt>, due to
15045 4252878368 SYS-050612 1/14/2010 12:21:53 AM error <No such file or directory>.
15041 4252878368 RUN-050306 1/14/2010 12:21:53 AM |Session JOB_POC|Work flow WF_POC|Function exec
15041 4252878368 RUN-050306 1/14/2010 12:21:53 AM Function <exec> failed to execute program <home/etldev/POC home/etldev/POC -c wc -l < poc_source.txt>. Program terminated with
15041 4252878368 RUN-050306 1/14/2010 12:21:53 AM exit code <1>.
15041 4252878368 RUN-050304 1/14/2010 12:21:54 AM |Session JOB_POC|Work flow WF_POC
15041 4252878368 RUN-050304 1/14/2010 12:21:54 AM Function call <exec ( home/etldev/POC, -c "wc -l < poc_source.txt ", 0 ) > failed, due to error <50306>: <Function <exec>
15041 4252878368 RUN-050304 1/14/2010 12:21:54 AM failed to execute program <home/etldev/POC home/etldev/POC -c wc -l < poc_source.txt>. Program terminated with exit code <1>.>.
15041 4252878368 RUN-053008 1/14/2010 12:21:54 AM |Session JOB_POC|Work flow WF_POC
15041 4252878368 RUN-053008 1/14/2010 12:21:54 AM INFO: The above error occurs in the context <|Session JOB_POC|Work flow WF_POC|$count=...|exec(...) Function Body|>.
15041 4252878368 RUN-050306 1/14/2010 12:21:54 AM |Session JOB_POC|Work flow WF_POC|Function exec
15041 4252878368 RUN-050306 1/14/2010 12:21:54 AM Function <exec> failed to execute program <home/etldev/POC home/etldev/POC -c wc -l < poc_source.txt>. Program terminated with
15041 4252878368 RUN-050306 1/14/2010 12:21:54 AM exit code <1>.

If , am taking 2 instead of 0 there, then am getting all NULL values . This command works in Unix for me.

Please help.

Sree
Back to top
manoj_d
Forum Addict
Forum Addict



Joined: 01 Jan 2009

Posts: 2760



PostPosted: Thu Jan 14, 2010 12:40 pm 
Post subject: Re: Row Count for flat file

the path of the program is not complete a / is missing from the begining check if that is causing the issue

home/etldev/POC home/etldev/POC

it should be

/home/etldev/POC home/etldev/POC
Back to top
Werner Daehn
Forum Devotee
Forum Devotee



Joined: 17 Dec 2004

speaker.gif*6
Posts: 10590
Location: Germany


flag
PostPosted: Fri Jan 15, 2010 3:52 am 
Post subject: Re: Row Count for flat file

http://www.forumtopics.com/busobj/viewtopic.php?p=403861
_________________
Werner Daehn
Product Manager Data Services
SAP AG
“The opinions expressed in this post are my own views and not those of SAP.”

PLEASE SUPPORT THIS: Run one ATL job and tell us the benchmark result. Details to be found here.
Back to top
p.sree
Senior Member
Senior Member



Joined: 15 Jun 2009

Posts: 45



PostPosted: Mon Jan 18, 2010 4:37 am 
Post subject: Re: Row Count for flat file

Hi,

I tried with all options, but still am getting a NULL for it. Kindly help. icon_sad.gif


Sree
Back to top
Werner Daehn
Forum Devotee
Forum Devotee



Joined: 17 Dec 2004

speaker.gif*6
Posts: 10590
Location: Germany


flag
PostPosted: Mon Jan 18, 2010 8:15 am 
Post subject: Re: Row Count for flat file

Please use this code:

Code:
print(exec('/usr/bin/ksh', '-c "wc -l < /home/etldev/poc_source.txt" ', 8));


and let us know what the trace log says.

Under which user is the jobserver running (" ps -ef | grep al_ ")? Is it the same user you are logged in?

_________________
Werner Daehn
Product Manager Data Services
SAP AG
“The opinions expressed in this post are my own views and not those of SAP.”

PLEASE SUPPORT THIS: Run one ATL job and tell us the benchmark result. Details to be found here.
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0472 seconds using 17 queries. (SQL 0.0025 Parse 0.0352 Other 0.0095)
CCBot/2.0 (http://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo