|
--
[ Picked text/plain from multipart/alternative ]
Dan
One last shot -
CPYTOIMPF FROMFILE(VERN/TESTCPY)
TOSTMF(dbldio.txt)
STMFCODPAG(*STDASCII)
RCDDLM(*CRLF)
DTAFMT(*FIXED)
does the job with two caveats - the number is left-justified, and trailing
blanks of the final field are stripped.
0041KThis is text
FFFFDE88A48A4A8AA44444444
0041238920920357300000000
becomes
-4.12 This is text<crlf>
232332256672672767700
D4E1200489309304584DA
At 08:20 AM 11/6/2002 -0800, you wrote:
>A followup: The representation of negative numbers is a problem. The
>negative sign must float on the left of the number. I.e.:
>
>AS/400 file (CODE=4A, AMOUNT=8,2S, DESC=20A)
>CODE AMOUNT DESC
><--><------><------------------>
>AAAA00012378just a test
>BBBB0000987Rthis has a neg amt.
>CCCC00000001just a penny
>
>Required resulting pc text file:
>AAAA 123.78just a test <crlf>
>BBBB -98.79this has a neg amt. <crlf>
>CCCC .01just a penny <crlf>
>
>Note that the <crlf> is fixed after the entire description field.
>
>Unless someone has an idea, it's looking more like an RPG program and
>using John Carr's "write-to-IFS" RPG solution.
>
>Still hoping, Dan
>
>--- Dan <dbcemid@yahoo.com> wrote:
> > Well, hallelujah!
> >
> > Now, tell me where you got the REPLACE parameter from. This wasn't
> > allowed on my v4r5 box. Is there a PTF for it? This isn't a killer;
> > I
> > can attempt to delete the file before I run CPY to it.
> >
> > Now I just need to find out what they want me to do with negative
> > numbers. <sigh>
> >
> > Thanks, Dan
> >
> > --- Vern Hamberg <vhamberg@centerfieldtechnology.com> wrote:
> > > Dan
> > >
> > > Try the CPY command, as in
> > >
> > > CPY OBJ('/qsys.lib/kielbasa.lib/smtrdbio.file/dbldio.mbr')
> > > TOOBJ('dbldio.txt') TOCCSID(*JOBCCSID) REPLACE(*YES)
> > >
> > > That created an exact copy for me, not even a record delimiter. You
> > > could
> > > change the TOCCSID to *PCASCII or *STDASCII, if needed.
> > >
> > > Vern
--
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.