|
Scott, So do you think really CPYFRMSTMF is the right tool? <grin> As turns out, all Peter wants to do is find out what's in the first couple of bytes. He could have downloaded your IFS service program and had this working perfectly in a couple of minutes. Peter, Though you've got this working now. I'd highly recommend redoing it. As I understand it, there's an article on iSeries network with the latest version of Scott's code or you can get an older version here: http://www.scottklement.com/rpg/ifs.html The only benefit right now is that the process would be cleaner. But the experience will pay off later. HTH, Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121
-----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Thursday, August 17, 2006 12:46 PM To: Midrange Systems Technical Discussion Subject: Re: Copy just the first record with CPYFRMIMPFb) CPYFRMSTMFFROMSTMF('/TEST/2006_08_04_pay[1].20060804.013057.txt')TOMBR('qsys.lib/qtemp.lib/temporary.file/temporary.mbr') MBROPT(*REPLACE) CVTDTA(*AUTO) STMFCODPAG(*STMF) DBFCCSID(*FILE) ENDLINFMT(*ALL) TABEXPN(*YES)This code will only work if your current directory is /. PLEASE DON'T BE A FOOL, it only takes a second to fix the problem, why do iSeries people INSIST on doing this wrong? This is the correct syntax: TOMBR('/qsys.lib/qtemp.lib/temporary.file/temporary.mbr') See this message for more details: http://archive.midrange.com/midrange-l/200608/msg00549.htmlThe data was perfectly copied to QTEMP/TEMPORARY. Thanks to all who helped me!Except that you said you only wanted the first record of the file!!!! If you had told me you wanted the whole file, I would've suggested CPYFRMSTMF in the first place -- but you only wanted one record, and as far as I know you can't do that with CPYFRMSTMF. There was no question in my mind that CPYFRMIMPF was the wrong tool for the job :) -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.