Hi ,
I want to store the output of the following command at TCL prompt to a file
(bascially an excel)
SELECT DS_JOBS.NAME AS JOB_NAME, DS_JOBS.CATEGORY, DS_JOBOBJECTS.NAME AS OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, EVAL DS_JOBOBJECTS."if index(upcase(@RECORD),'TERRITORY_AMOUNT_FACTOR',1) > 0 then 'FOUND' else ''" AS FOUND FMT '5L' FROM DS_JOBS, DS_JOBOBJECTS WHERE DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO and FOUND = 'FOUND' GROUP BY JOB_NAME, DS_JOBS.CATEGORY, OBJECT_NAME, DS_JOBOBJECTS.OLETYPE, FOUND ;
Is there any way to achieve this?
Storing the output of Coomands in TCL prompt to a file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, but first are the column widths adequate? You may need additional FMT specifiers.
Research the commands COMO and DIVERT.OUT in your UniVerse documentation.
Another way is to redirect stdout of your DataStage shell. For example
Research the commands COMO and DIVERT.OUT in your UniVerse documentation.
Another way is to redirect stdout of your DataStage shell. For example
Code: Select all
cd $ProjectDir
. $DSHOME/dsenv
$DSHOME/bin/dssh "SELECT NAME FMT '30L', CATEGORY FMT '30L' FROM DS_JOBS WHERE NAME = '<<Job Name>>';" > /tmp/job_category.rpt
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
This won't help; I include it for interest only.
UniVerse version 10 (the first after the split from DataStage) introduced a TO.XML keyword that dumps the result of the query as an XML document. Further options allow this to be attribute-centric or element-centric, and to include DTD or to exclude it. It's a pretty neat interface. It's also available in UniData version 7.
UniVerse version 10 (the first after the split from DataStage) introduced a TO.XML keyword that dumps the result of the query as an XML document. Further options allow this to be attribute-centric or element-centric, and to include DTD or to exclude it. It's a pretty neat interface. It's also available in UniData version 7.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.