DSJOBS - Command Line

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
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

DSJOBS - Command Line

Post by Raftsman »

When issuing the following command in administrator;

SELECT NAME FROM DS_JOBS WHERE CATEGORY = '\Jobs\EDW\ICMS'

I would like to write the results into a file for future reference. Is there a way.


Thanks in advance
Jim Stewart
dspxguy
Participant
Posts: 156
Joined: Thu May 24, 2007 4:09 pm
Location: Simi Valley, CA

Post by dspxguy »

You need to set COMO on in administrator

In Admin command line:

COMO ON filename

Then execute your query and output will be written to file in Projects/ProjectName/'&COMO&'/ path

Dont forget to turn off COMO.

COMO OFF

Thanks
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

The output column seems to be fixed. The output is wrapped. How do I expand the column length?

Thanks
Jim Stewart
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Add FMT 'xxL' after the column name, replacing xx with the output size you want to use. So, for example to make it a 30 character string, use SELECT NAME FMT '30L' FROM etc.
-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:

Post by ray.wurlod »

You can use standard redirection operator. For example:

Code: Select all

cd $ProjectDir
$DSHOME/bin/dssh "SELECT NAME FMT '60L' FROM DS_JOBS WHERE CATEGORY = '\Jobs\EDW\ICMS';" > filepath
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