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



It's too bad F specs are not allowed in a RPG sub procedure. If that were
true then more level break programs would exist. I've always thought it was
one of the most useful RPG features, once understood.

<grin>Having such encapsulation of file I/O would certainly be valuable in
an object oriented language.</grin> 

On your issue...

Can't u simply compile a logical CRTLF FILE(ADSF) MAINT(*DLY)? Use the same
DDS as the existing logical -OR- CRTDUPOBJ of the existing logical and
follow with CHGLF FILE(ADSF) MAINT(*DLY).

Then you have another file to open in the RPG program. You actually don't
need the new file once the compile has completed because you can use the
OVRDBF command to open the existing file instead.

HTH,

Ken Slaugh (707) 795-1512 x118
Chouinard & Myhre, Inc.
http://www.cm-inc.com/


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of simafrog
Sent: Wednesday, February 25, 2004 6:27 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Chain to same file

Walter, I would have to create a new logical for this. Since the process is
that there are 2 programs involved, one gathers the other prints, I could do
my second read in the second program. 
Thanks,
Rob
> -----Original Message-----
> From: MWalter@xxxxxxxxxxxxxxx [mailto:MWalter@xxxxxxxxxxxxxxx]
> Sent: Wednesday, February 25, 2004, 1:32 PM
> To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
> Subject: Re: Chain to same file
> 
> 
> Yes you will, if it's the same file. A chain is the same as a SETLL 
> and READE, so you would be repositioning your file pointer. You could 
> define a logical over the Item Master file and chain to that. I'd use 
> the prefix keyword on the F Spec to keep from corrupting the rest of 
> your data. Or just define the fields in the logical that you need. 
> That way you wouldn't have to use the RENAME keyword. Lots of ways 
> around this. I use a sub-procedure in a service program to do this type of
thing.
> 
> Thanks,
> 
> Mark
> 
> Mark D. Walter
> Senior Programmer/Analyst
> CCX, Inc.
> mwalter@xxxxxxxxxx
> http://www.ccxinc.com
> 
> 
> |---------+----------------------------->
> |         |           simafrog          |
> |         |           <SimaFrog@xxxxxxxx|
> |         |           om>               |
> |         |           Sent by:          |
> |         |           rpg400-l-bounces@m|
> |         |           idrange.com       |
> |         |                             |
> |         |                             |
> |         |           02/25/2004 03:53  |
> |         |           PM                |
> |         |           Please respond to |
> |         |           RPG programming on|
> |         |           the AS400 /       |
> |         |           iSeries           |
> |         |                             |
> |---------+----------------------------->
> 
> >---------------------------------------------------------------------
> >--------
> -------------------------------------------------|
>   |
> |
>   |       To:       RPG programming on the AS400 / iSeries
> <rpg400-l@xxxxxxxxxxxx>                                               |
>   |       cc:
> |
>   |       Subject:  Chain to same file
> |
> 
> >---------------------------------------------------------------------
> >--------
> -------------------------------------------------|
> 
> 
> 
> 
> HI I have a Item master file that is being read as READE for Company #.
> This READE is the basis of the program. The file structure is such 
> that one company, in this case 550, contains the cost of the item. The 
> report I am doing requires the ext cost. I am processing the records 
> based on a passed company of the user requestor. I am concerned that 
> if I go and get the 550 record on a separate CHAIN am I changing my 
> order of the READE, IOW, when I go back to the READE was there a 
> change there because I went out and chained to another record?
> Thanks,
> Rob
> _______________________________________________
> 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 ...

Follow-Ups:
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.