|
Hi Bill, Are you sure those trailing blanks are blanks (x'40')? Perhaps they're x'00', or some other non-displayable character. CPYTOIMPF only trims blanks. Peter Dow Dow Software Services, Inc. 909 793-9050 voice 909 793-4480 fax 909 522-3214 cell ----- Original Message ----- From: "Bill Hopkins" <BHopkins@xxxxxxxxxxxxxxxxxxx> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Sent: Wednesday, September 24, 2003 9:44 AM Subject: Re: Trailing Blanks with CPYTOIMPF v5r1 > Thanks Rob and list, > > To much at one time going on. > > "1)" is the one I have the question on. > > 1)"Will VARLEN get rid of the trailing spaces? Yes." > > This is what I have at v5r1. > > Here is PF = FXC > > A R FXCR > A* > A FXABAN8 60 VARLEN > A FXABALPH 60 VARLEN > > A* > A K FXABAN8 > > The above fields get their data like so: > > C Eval FXABAN8 = %trim(ABAN8) > C Eval FXABALPH = %trim(ABALPH) > > > This is my CPYTOIMPF command in RPGIV: > > * > C Eval Qcmd = 'CPYTOIMPF FROMFILE('+ > C %trim(DRKY) + > C ') TOSTMF(''QOpenSys/forcastx/'+ > C %trim(DRKY) + > C '.txt'') MBROPT(*REPLACE) STMFC'+ > C 'ODPAG(*PCASCII) RCDDLM(*CR) D'+ > C 'TAFMT(*DLM) STRDLM(*NONE) FLD'+ > C 'DLM(X''A1'')' > * > > Sub in FXC for DRKY variable. > > ***** Problem is that FXC still carries over the 60A with trailing blanks > on CPYTOIMPF. > ***** What am I missing? > > > > 2)"Will CPYTOIMPF give you the column headings? No. But I suppose you > could > fake that by doing a CPYTOIMPF of just a heading file, then do a CPYTOIMPF > > with *ADD for the data." > > Written as first record of file. > > 3)"Will CPYTOIMPF give you tilde's? Yes." > > Already had see code above on VARLEN question. > > 4)"Will CPYTOIMPF give you a < at the end of a record? No, but you can > choose from CR, LF, CRLF, LFCR" > > Already had see code above on VARLEN question. > > > > Thanks again > Bill Hopkins > > Questions,Comments,"Knocks in the Head" welcomed. > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.518 / Virus Database: 316 - Release Date: 9/12/2003
As an Amazon Associate we earn from qualifying purchases.
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.