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



Yeah,

The new functionality lets you open the file in one place, pass it to
some procedure that does a i/o and then pass it to another prodcedure
that could also do i/o.

Kinda of like a file descriptor in C.

Honestly, can't say that I've had a need for this. But Jon Paris
seems happy! :)

-Charles

On Wed, Sep 30, 2009 at 9:56 AM, <rob@xxxxxxxxx> wrote:
I'll have to RTM on that one to see the use.  I was thinking of passing a
parameter to a subprocedure that was the file name.  Then the subprocedure
could USROPN the file based on that name.  You must be talking something
different.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
Charles Wilt <charles.wilt@xxxxxxxxx>
To:
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Date:
09/30/2009 09:17 AM
Subject:
Re: declaring a file local to a sub-procedure
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



I don't think so Rob.  This is new in 6.1

Files passed as parameters
A prototyped parameter can be defined as a File parameter using the
LIKEFILE keyword. Any file related through the same LIKEFILE
definition may be passed as a parameter to the procedure. Within the
called procedure or program, all supported operations can be done on
the file; I/O can only be done through data structures.

Charles

On Wed, Sep 30, 2009 at 8:59 AM,  <rob@xxxxxxxxx> wrote:
If they are the same format id then that's been support for quite
awhile.

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
Bryce Martin <BMartin@xxxxxxxxxxxx>
To:
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date:
09/30/2009 08:07 AM
Subject:
Re: declaring a file local to a sub-procedure
Sent by:
rpg400-l-bounces@xxxxxxxxxxxx



Yes, as discussed a lot of times, being able to pass the file would be
hugely beneficial to "simplify" a lot of code.  Anybody heard anything
about this being supported any time in the near future?


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Jon Paris <jon.paris@xxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/29/2009 06:00 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
rpg400-l@xxxxxxxxxxxx
cc

Subject
Re: declaring a file local to a sub-procedure






Nope - nothing special.  Which is why using STATIC for the file is
probably a good idea if the recursive capabilities are not needed.

In many cases I think the ability to pass a file in as a parm to a
subprocedure or program will be more useful for generic routines than
being able to have the file local to the subproc.


Jon Paris

www.Partner400.com
www.SystemiDeveloper.com



On 29-Sep-09, at 2:19 PM, rpg400-l-request@xxxxxxxxxxxx wrote:

This now brings up an additional question, since this works along
the same
way as a USROPN, how much additional overhead does this generate?  I
mean,
if you include a file locally to a procedure and that procedure is
invoked
for every order, the overhead for opening and closing that file
could be
huge.....

Or does IBM preload the file so the overhead is lower on subsequent
opens?

--
This is the RPG programming on the IBM i / System i (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 message (including any attachments) is intended only for the
use
of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential,
and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited.
If
you have received this communication in error, please notify us and
destroy this message immediately. ---
--
This is the RPG programming on the IBM i / System i (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 IBM i / System i (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 IBM i / System i (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 IBM i / System i (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.