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


  • Subject: RE: Squash a file
  • From: "Art Tostaine, Jr." <Art@xxxxxxxxxxx>
  • Date: Wed, 21 Jun 2000 12:03:35 -0400
  • Importance: Normal

That works except the CR/LF isn't in my data, it's added by the translation to 
PC file format,
either CPYTOSTMF or whatever.

Both Patrick Townsend and Tim McCarthy have sent me code or objects that will 
strip out the trailing
blanks nicely.

Tim's command will use QASCII table to convert the file on the 400, then you 
FTP it, and there are
no CR/LF's.  My only problem now is that the EOR character "^" is being 
translated into a slashed
zero.  I can figure this out.

Thanks to all.

Art Tostaine, Jr.
CCA, Inc.
Jackson, NJ 08527


-----Original Message-----
From: owner-midrange-l@midrange.com
[mailto:owner-midrange-l@midrange.com]On Behalf Of Dave Miller
Sent: Wednesday, June 21, 2000 11:24 AM
To: MIDRANGE-L@midrange.com
Subject: RE: Squash a file


You can strip the CR LF pretty easily.

I have an application where I have to remove a non-disply hex-character for
a RPG-CGI program for a web server.

Have your program do its normal processing and write out all the records to
the file in the way that it normally does.

Then run another program over the file, sequentially but this time define
the file internally and have the record that is read defined as a single
field.

find the hex equivelent of whatever it is you want to remove.  Define it in
your program as a hex constant.

read the file one record at a time.  Do an eval statement with the %scan
opcode.  have it scan for the hex constant you have defined in the D specs.
When it finds one have it replace it with a blank.

Write the record back out.

I have examples of this if you are interested.

Dave Miller
Virtual400.com
email: dlmiller@virtual400.com

> -----Original Message-----
> From: owner-midrange-l@midrange.com
> [mailto:owner-midrange-l@midrange.com]On Behalf Of booth@martinvt.com
> Sent: Tuesday, June 20, 2000 5:51 PM
> To: MIDRANGE-L@midrange.com
> Subject: Re: Squash a file
>
>
> Art, I am curious.  Don't they want trailing blanks stripped, and if they
> do, don't they want some marker at record end?  Either a line feed or a
> carriage return since they don't want CR/LF or LF/CR?
>
> _______________________
> Booth Martin
> Booth@MartinVT.com
> http://www.MartinVT.com
> _______________________
>
>
>
>
> "Art Tostaine, Jr." <Art@link400.com>
> Sent by: owner-midrange-l@midrange.com
> 06/20/2000 12:43 PM
> Please respond to MIDRANGE-L
>
>
>         To:     <midrange-l@midrange.com>
>         cc:
>         Subject:        Squash a file
>
> I have a EDI transaction file that I am sending to someone and they have
> requested that I strip the
> <LF><CR> out of the text file before I send it to them.
>
> I am not using a translator, so I write out a record for each record type
> to my flat file.
>
> Anyone know of a utility that will squash it down?  I know that
> Trailblazer systems does this in
> their Zmodem product (Hey Tim McCarthy).
>
> How can I write some AS/400 code to read the record based file and write
> it out like a stream file?
> CPYTOSMTF doesn't strip the stuff as far as I can see, even with
> ENDLINFMT(*FIXED)
>
> Art Tostaine, Jr.
> CCA, Inc.
> Jackson, NJ 08527
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
>
>
>
>
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
>

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.