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



The thing is, this report file has all of our customers in it.
It looks like I'll have to come up with some multiple file handling stuff.

-----Original Message-----
From: Jim Langston [mailto:jlangston@celsinc.com]
Sent: Wednesday, October 24, 2001 12:34 PM
To: 'rpg400-l@midrange.com'
Subject: RE: Insert a record


Have you considered...
Put a blank line in, or even the fax number, before you copy the spool
file.  A quick and dirty example:

CPYF FROMFILE(FAXHEADER)
     TOFILE(SPOOLFILE)
     FROMMBR(CUST1234)
     TOMBR(NEWFAX)
     MBROPT(*NONE)

CPYSPLF FILE(QSYSPRT)
        TOFILE(SPOOLFILE)
        JOB(123456/QPGMR/FAXITDUDE)
        SPLNBR(3)
        TOMBR(NEWFAX)
        MBROPT(*ADD)

Basically, copying the header information into the member first,
then copying the spool file, adding the records.

A CL solution to an RPG question, but if you wanted you could
add the Fax number line in RPG instead of copying a member.
Myself, I would probably copy a member based on the customer
number so it would be easy to edit this to include any specific
information they wanted.

HTH

Regards,

Jim Langston

-----Original Message-----
From: Condon, Mike [mailto:M1C@ingersoll-imc.com]
Sent: Wednesday, October 24, 2001 8:40 AM
To: 'rpg400-l@midrange.com'
Subject: RE: Insert a record


Ok, here's the application:
I have a report spool file (from a 3rd party application) that I copy to a
physical file.
The customer number is 14-10-00-01. We are faxing the statements to the
customer, and I need
to add some text before the 1st line of the report for each customer, as in:

>>>fax number here<<<
                                                       Date:  10/12/01

       BRYLI                                         14-10-00-01

       105 SCOTT LANE

       WEATHERFORD, TX

                                      76085

 Invoice       Date       Due Date                        Balance  Due

 --------    ---------    --------                  -------------------

 00400788     07/09/01    08/09/01                             101.00  ***

 400002       07/02/01    11/03/01                             104.41

 406515       08/06/01    09/06/01                             113.80  **

 8000208      07/28/01    08/29/01                            -104.41  **

                                                    -------------------

                                        Total                  214.80

                                                    ===================

  *     1 - 30 days overdue


-----Original Message-----
From: Joep Beckeringh [mailto:joep@beckeringh.myweb.nl]
Sent: Tuesday, October 23, 2001 5:10 PM
To: rpg400-l@midrange.com
Subject: Re: Insert a record


Mike,

Would you care to explain why you want this?  Although it might be possible,
but definitely not easy, to do what you describe, I can't help thinking
there should be an easier to accomplish whatever you want to accomplish,

Joep Beckeringh

----- Original Message -----
From: "Condon, Mike" <M1C@ingersoll-imc.com>
To: <rpg400-l@midrange.com>
Sent: Monday, October 22, 2001 4:26 PM
Subject: RE: Insert a record


> Here's an example:
>
> File with records
>
> (RRN1) AAAA
> (RRN2) BBBB
> (RRN3) CCCC
> (RRN4) DDDD
>
> I would like to insert record 1234 using RRN3 so the file looks like:
> (RRN1) AAAA
> (RRN2) BBBB
> (RRN3) 1234
> (RRN4) CCCC
> (RRN5) DDDD

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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 ...

Follow-Ups:

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.