AnsweredAssumed Answered

OLQ Batch How to format COUNT(*) or other derived/functions for OUTFILE

Question asked by cak on Mar 30, 2015
Latest reply on Jul 20, 2015 by Lenn Thompson

Found a discussion here on formatting and OUTFILE   but I couldn't quite see how to use that info to answer my question...

https://communities.ca.com/message/60728418#60728418

 

I wrote a query in OLQ, saved the qfile.  I decided that what I want it just to save the COUNT(*) of the number of rows to a file so I changed the SELECT to SELECT COUNT(*).

If I change SYSLIST to  a file, even with headers turned out I am getting other information I do not want but I do get the COUNT displayed as a DECIMAL NUMBER.   

 

I tried to use OUTPUT OUTFILE in order to JUST get the value in a file and That is working except. . 

The problem is the COUNT is in HEX and I want a decimal.   Now in Oracle I can use a TO_NUM or TO_CHAR function to manipulate the field.

  But I can't seem to see how to format the COUNT to a decimal,  I even tried adding an EDIT for SQLCOL00001  which seemed to be the alias for the column.

(I also cannot do SELECT 'RESULT=', count(*) from. . ,  in OLQBatch).

 

Maybe this is simple but for some reason I am not seeing it. 

Any Ideas?

 

Thanks!

 

Cindy Kline

Outcomes