× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<snip>
DCL &NBRRCDS *DEC (11 00)
CRTDTAARA myLib/myDecDta *DEC TYPE(*DEC) LEN(11) VALUE(-1)
QSH CMD('cat theFile | wc -l | datarea -w -l myDecDta.dtaara')
RTVDTAARA DTAARA(myDecDta *ALL) RTNVAR(&NBRRCDS)
DLTDTAARA myLib/myDecDta
CHGPF &OUTPUTFILE SIZE(&NBRRCDS 0 0)
</snip>

Trying that datarea pipe.

First of all I had to correct one line
CRTDTAARA myLib/myDecDta *DEC TYPE(*DEC) LEN(11) VALUE(-1)
becomes
CRTDTAARA myLib/myDecDta TYPE(*DEC) LEN(11) VALUE(-1)
or in my case
CRTDTAARA rob/myDecDta TYPE(*DEC) LEN(11) VALUE(-1)

qsh cmd('cat /rob/test.txt | wc -l | datarea -w -l mydecdta.dtaara')
and if I don't want to rely upon library list I can run
h cmd('cat /rob/test.txt | wc -l | datarea -w -l
/qsys.lib/rob.lib/mydecdta.dtaara')

Is datarea some extension to qsHell that IBM came out with? Forget that,
I'll research that...
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i_72/rzahz/rzahzutility.htm?lang=en-us
Cool stuff, that.




Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.