Command stage output

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
k.prashanthi
Participant
Posts: 18
Joined: Thu Dec 08, 2016 11:42 am

Command stage output

Post by k.prashanthi »

Hello,

I have the below command in the execute command stage:

Code: Select all

c:\windows\system32\find /c "," D:\IBM\Data\Files\WorkingData\Proj\File.txt
When I have tried the same command in the server's command prompt it was returning the correct output value but when I run the datastage job,it is not returning any output.

Code: Select all

CopyOfCopyOfCopyOfCopyOfCopyOfCopyOfSeq_RoutesheetTotalMiles2..JobControl (@Execute_Command_16): Executed: c:\windows\system32\find /c "," D:\IBM\Data\Files\WorkingData\Proj\File.txt
Reply=1
Output from command ====>

I appreciate your help on this. TIA!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Both times executed by the same user?
-craig

"You can never have too many knives" -- Logan Nine Fingers
k.prashanthi
Participant
Posts: 18
Joined: Thu Dec 08, 2016 11:42 am

Post by k.prashanthi »

Yes! Executed by the same user both times.
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post by PaulVL »

Default path will be different. (CWD)
Environment variables will be different ($PATH, LIB, etc...)

Add debug statements to echo that stuff out.

Does your environment do credential mapping? (yes you indicated that you ran the job with the same ID, but ... never hurts to double check.) Look in the director log to see which ID ran the job.

Does it work for someone else?

Did that file exist at the time of job execution?

Is "D" drive mapped in the engine environment?
k.prashanthi
Participant
Posts: 18
Joined: Thu Dec 08, 2016 11:42 am

Post by k.prashanthi »

Paul, All the above were verified and looks good, not sure why this command stage is not returning output.
k.prashanthi
Participant
Posts: 18
Joined: Thu Dec 08, 2016 11:42 am

Post by k.prashanthi »

Any other ideas on this issue?
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Since you seem to be out of ideas...

I wouldn't be running Windows commands even on a Windows installation. Take advantage of the MKS toolkit and run a unix-style find command inside a unix shell.

Mike
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

can you do anything else like

dir filename

with the same setup?
Post Reply