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