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



Many years ago that added a field type of varying length.  With that, if 
the field wasn't "filled" it would take up less space on disk.  Also, it 
would not have the trailing spaces on the CPYTOIMPF.  It was really great 
for fields that may be many characters but often it was only a few.  I 
used it for an application that previously used OV/400 to store comments. 
The only problem was if someone filled it wrong.  To help explain that:

Bad technique:
eval MyVaryingLengthField = MyFixedLengthDisplayField;  // Blank fills at 
the end

Better technique:
eval MyVaryingLengthField = %trimr(MyFixedLengthDisplayField);  // Remove 
blanks on the right

See:
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzakb/rzakbmst82.htm#HDRTDVARLE
or
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/db2/rbafzmstch2data.htm#HDRCHARSTRG

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 





"John Cunha" <John.Cunha@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/17/2003 01:57 PM
Please respond to RPG programming on the AS400 / iSeries
 
        To:     "RPG programming on the AS400 / iSeries" 
<rpg400-l@xxxxxxxxxxxx>
        cc: 
        Fax to: 
        Subject:        RE: Tab delimited... again


Sorry Eric,
What do you mean?
John Cunha

-----Original Message-----
From: DeLong, Eric [mailto:EDeLong@xxxxxxxxxxxxxxx] 
Sent: July 17, 2003 1:59 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Tab delimited... again

Adoption of varying length fields in the database would resolve this
problem.....

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: John Cunha [mailto:John.Cunha@xxxxxxxxxxxx]
Sent: Thursday, July 17, 2003 11:01 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Tab delimited... again


Hi Matt,
Thanks for answering...
Yes, CPYTOIMPF works... but it does not remove blank space in the
fields. It uses the original field length as the delimiter.
e.g.

Record#
....5...10...15...20...25...30...35...40...45...50...55...60...65 
      1  RS|A|450100010           |45-01-999           |3  |3  |SECONDS

      2  RS|A|450101563           |45-01-999           |3  |3  |NT
T-NECK 
      3  RS|A|450102719           |45-01-999           |3  |4  |LADIES'
W. 
      4  RS|A|450102729           |45-01-999           |3  |3  |NR PRT
MOC 
      5  RS|A|450102784           |45-01-999           |3  |3  |C.E
NATURA 
                       |___  _____|

                           \/ 
                        DEAD SPACE
Should look like this

      1  RS|A|450100010|45-01-999|3|3|SECONDS 
      2  RS|A|450101563|45-01-999|3|3|NT T-NECK 
      3  RS|A|450102719|45-01-999|3|4|LADIES' W. 
      4  RS|A|450102729|45-01-999|3|3|NR PRT MOC 
      5  RS|A|450102784|45-01-999|3|3|C.E NATURA

Regards,
John

-----Original Message-----
From: Haas, Matt [mailto:Matt.Haas@xxxxxxxxxxxxxxxxxxx] 
Sent: July 17, 2003 11:02 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Tab delimited... again

Doesn't CPYTOIMPF do this?

Matt

-----Original Message-----
From: John Cunha [mailto:John.Cunha@xxxxxxxxxxxx]
Sent: Thursday, July 17, 2003 10:34 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Tab delimited... again


Hello.

I would like to thank Scott Klement [klemscot@xxxxxxxxxxxx] for the
great help he gave me.

Once again... Thanks Scott!

 

Now my challenge:

We have to send files which "MUST" be tab delimited to a third party
vendor.

We have a way of doing that; however it entails writing separate RPG
programs for every file,

since they all have different record layouts/fields/lengths.

 

Does anyone have or know of a generic utility that can do this for any
file?

 

Thanks for the help!

 

John Cunha

Northern Group Retail Ltd

 


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


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


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


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



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.