× 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.



El Fri, 26 Dec 2014 10:22:29 -0500
rob@xxxxxxxxx escribió:
duh. I forgot that.


Rob Berendt

I tried this and it worked:

1) File TST:

*************** Beginning of data *************************************
0001.00 A*----------------------------------------------------------------
0002.00 A R TSTF
0003.00 A*----------------------------------------------------------------
0004.00 A NBRRCDS 15S 0 EDTCDE(Z)
****************** End of data ****************************************

2) crtpf QTEMP/TST size(1 0 0) /* only one record is needed */

3) ovrdbf stdout qtemp/tst
strqsh cmd('wc -l ~/termcap | awk ''{printf("%015d",$1)}''')
dltovr stdout

... now QTEMP/TST contains the number of records in the ifs stream file
~/termcap [termcap in my home directory]:

4) To visually check the contents of TST:
runqry *n TST
Line ....+....1....+
NBRRCDS
000001 4666
****** ******** End of report ********

You can read the file now using RCVF in the CLP.

You need to make the first parm in printf equal
to the field in the file, preceded with a '0' so it is zero-filled
(in this case %015d) in order to avoid numeric field errors.

printf("%015d") <----> A NBRRCDS 15S 0



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.