|
On Nov 14, 2025, at 2:54 PM, Thomas Burrows <thomas.burrows.1957@xxxxxxxxx> wrote:
Would like to see a copy of the program.
On Thu, Nov 13, 2025 at 3:52 PM Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
If I were going to use RPG to trim the file, I'd use an Open Access--
handler to actually write the file in the first place and forget the CPY...
stiudd completely. Just write it the way you want. A simple approach would
be to put the LF out as the first character of each new record except the
first.
If anyone wants one, this article and others it references have examples
and all the code is downloadable.
Jon Paris
Jon.Paris@xxxxxxxxxxxxxx
On Nov 13, 2025, at 3:04 PM, Roger Harman <roger.harman@xxxxxxxxxxx>wrote:
exist in PASE.
"truncate" was my first thought but, from what I can see, it doesn't
out to another file could be cobbled together.
A combination of "wc -m" and "head" to cat all but the last character
it with a command and use that.
Personally, I'd just put together an RPG version of truncate, frontend
cesco via MIDRANGE-L
Roger Harman
COMMON Certified Application Developer - ILE RPG on IBM i on Power
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Sent: Thursday, November 13, 2025 4:35 AM"truncate -1" to remove last byte...but man, ain't ugly eh?, close your
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx
Cc: cesco <emaxt6@xxxxxxxxx>
Subject: Re: creating ifs fixed length text file with unusual requirement
well.... for a quick fix you can PASE your way out with a shell
eyes while doing it
btw in the RFC for CSV the last one is specified as optional, so areceiving parser should be obliged to recon..
franz9000@xxxxxxxxx> wrote:
On Wednesday, November 12, 2025 at 04:43:52 PM GMT+1, Jim Franz <
way
Creating fixed length (801) ascii txt file with LF in 802 but requiring
last row to have no LF.
This is not a written requirement but their workaround after state
government agency I'll not name implemented a new web portal (old portal
upload worked for 10+ years, New portal breaks as its failing looking for
next record that does not exist.
I'm only assisting to fix issue.
File created CPYTOSTMF UTF-8 and rows added with CPYTOIMPF
I could build a RPGLE pgm to remove last row LF, but is there a script
of doing this that can execute from clle? Not too familiar with scriptlist
except sftp processing. V7R5
Thx
Jim Franz...
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxxrelated questions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
list
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxxrelated questions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
list
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxxrelated questions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
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.