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



One thought, what if someone WANTED the trailing blanks?  I would think it 
would have to be a command option.  Then someone would argue that what if 
they wanted the trailing blanks on one field but not on another? CPYTOIMPF 
does not have individual field options.

I thought of creating a view:

CREATE VIEW QTEMP/PAULVIEW  (myvarchar, myvardec)
AS SELECT varchar(TRIM (TRAILING FROM mychar)), 
          varchar(mydec) 
FROM qtemp/paul  

Then instead of:
select * from qtemp/paul
....+....1....+....2....
MYCHAR            MYDEC 
DUH                5.00 
test               3.50-
********  End of data  *
CPYTOIMPF FROMFILE(QTEMP/PAUL) 
          TOSTMF('/QTEMP/PAUL.TXT')
          STMFCODPAG(*PCASCII) 
          RCDDLM(*CRLF) 
....+....1....+....2....+
 ************Beginning of
"DUH            ",5.00 
"test           ",-3.50 
 ************End of Data*

I'd get:
select * from qtemp/paulview 
....+....1....+....2....+
MYVARCHAR        MYVARDEC
DUH              5.00 
test             -3.50 
********  End of data  **
CPYTOIMPF FROMFILE(QTEMP/PAULVIEW) 
          TOSTMF('/QTEMP/PAULVIEW.TXT')
          STMFCODPAG(*PCASCII) 
          RCDDLM(*CRLF) 
....+....1....+....2....+
 ************Beginning of
"DUH","5.00" 
"test","-3.50" 
 ************End of Data*

Then, to test ftp I moved it all from QTEMP to ROB.

The ftp of the view itself looked like garbage.
 DUH             Å5.00
 Åtest                  -3.50

The ftp of the results of the CPYTOIMPF looks good:
"DUH","5.00"
"test","-3.50"
I guess if you are going to use CPYTOIMPF, I wouldn't bother having the 
view change the decimal to character.  But the view does a dandy job of 
stripping trailing blanks.

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





rob@xxxxxxxxx 
Sent by: midrange-l-bounces@xxxxxxxxxxxx
01/11/2005 08:27 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc

Subject
Re: PTF to fix CPYTOIMPF & trailing blanks?






Paul,

Did you search the ptf cover letters for CPYTOIMPF?
http://www-912.ibm.com/a_dir/as4ptf.nsf/as4ptfhome
Nothing sticks out to me.  Tried it here and evidently, if there is, 
either I don't have it or didn't follow some setup directions:
....+....1....+....2....+....3
 ************Beginning of data
"DUH            ",5.00 
 ************End of Data******

Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Paul Stagnoli" <stagnolip@xxxxxxxxxxxxxxxx> 
Sent by: midrange-l-bounces+rob=dekko.com@xxxxxxxxxxxx
01/10/2005 04:36 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
<midrange-l@xxxxxxxxxxxx>
cc
Paul Stagnoli <stagnolip@xxxxxxxxxxxxxxxx>
Subject
RE: MIDRANGE-L Digest, Vol 4, Issue 48






Hi Rob!

The DB2 file is fixed length.  I saw the discussion about creating a file 
with variable length fields as a workaround. I was hoping IBM had fixed 
the original problem...

Thanks,

Paul 

> 
> message: 3
> date: Mon, 10 Jan 2005 15:40:35 -0500
> from: rob@xxxxxxxxx
> subject: Re: PTF to fix CPYTOIMPF & trailing blanks?
> 
> Is your DB2 file using variable length fields, or fixed length fields?
> 
> Rob Berendt
> -- 
> Group Dekko Services, LLC
> Dept 01.073
> PO Box 2000
> Dock 108
> 6928N 400E
> Kendallville, IN 46755
> http://www.dekko.com
> 
> 
> 
> 
> 
> "Paul Stagnoli" <stagnolip@xxxxxxxxxxxxxxxx> 
> Sent by: midrange-l-bounces@xxxxxxxxxxxx
> 01/10/2005 03:08 PM
> Please respond to
> Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
> 
> 
> To
> <midrange-l@xxxxxxxxxxxx>
> cc
> Paul Stagnoli <stagnolip@xxxxxxxxxxxxxxxx>
> Subject
> PTF to fix CPYTOIMPF & trailing blanks?
> 
> 
> 
> 
> 
> 
> I want to use CPYTOIMPF to create a CSV file on a V5R2M0 box. 
> This mailing 
> list's archive reports that CPYTOIMPF leaves trailing blanks in the 
> fields. 
> 
> Has IBM created a PTF for V5R2M0 to fix this issue, or do I 
> have to wait 
> until V5R3M0 is installed on our box? My search for a PTF 
> came up zero.
> 
> Thanks,
> 
> Paul Stagnoli
> 
> 
> -- 
> 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.
> 
> 
> 
> 
> ------------------------------
> 


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


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

Replies:

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.