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



This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
Stop looking in the RPGLE manuals.  Look in the RPG/400 manuals.

11.20.36 FREE (Deactivate a Program)


    __________ _________________ ____________________ ___________
__________
   |   Code   |     Factor 1    |      Factor 2      |   Result  |
Indicator|
   |          |                 |                    |   Field   |  |

|__________|_________________|____________________|___________|__________|
   | FREE     |                 | Program name       |           |  _ ER _
 |

|__________|_________________|____________________|___________|__________|


   The FREE operation removes a program from the list of activated
programs,
   frees static storage, and ensures program initialization (first cycle
   processing) the next time the program is called.  It does not close
files
   or unlock data areas.

   Factor 2 contains the name of the program to be deactivated.  It must
   contain the name of a field, named constant, literal, or array element
   that contains the name of the program to be deactivated.  The entry in
   factor 2 must be character data; it can include a qualified name such
as
   LIB/PGM.  The name preceding the slash is the library that contains the
   program to be freed from the activated program list.  Specify only the
   program name if you want to search the library list.  The RPG/400
language
   uses the program name exactly as specified in the literal, field, or
array
   element to determine the program to be called.  (Lowercase characters
are
   not shifted to uppercase, and a name enclosed in quotation marks (for
   example 'ABC') always includes the quotation marks as part of the name
of
   the program to be freed.)  *LIBL and *CURLIB are not supported (for
   example, '*LIBL/PROG').

   You can specify any valid resulting indicator in positions 56 and 57 to
be
   set on if FREE is not completed successfully.  No error occurs if the
   program to be freed is not active (for example, the program does not
   exist).

   For programs that are to run under System/38 Environment, if you
specify
   the library name, the program name must be immediately followed by a
   period and then the library name.

   See the "CALL (Call a Program)" operation for details on how program
   references are grouped.

   Note:  Issuing a FREE operation and then a CALL operation to the same
   program reopens the program's files and may use additional temporary
   storage.  Repeatedly issuing FREE and CALL operations to a program,
   without closing the program's files in between, may use enough
temporary
   storage to degrade the system's performance, and ultimately cause an
   AS/400 machine check.  This problem can be avoided if the files have
   shared open data paths SHARE(*YES).  However, using SHARE(*YES) can
cause
   other problems.  Read the section on "Sharing an Open Data Path" in the
   RPG/400 User's Guide for complete details.

   Figure 61 shows the FREE operation being used with the CALL operation.


     *...1....+....2....+....3....+....4....+....5....+....6....+....7...
     CL0N01N02N03Factor1+++OpcdeFactor2+++ResultLenDHHiLoEqComments++++++
     C*
     C*  When the CALL operation is processed, the data in the result
     C*  fields of the parameter list can be accessed by PROGA.  The
     C*  parameter list ends when the first calculation operation other
     C*  than a PARM operation is encountered.
     C                     CALL 'PROGA'
     C                     PARM          FLDA    30
     C                     PARM          FLDB    30
     C                     PARM          FLDC    50
     C*
     C*  When the FREE operation is processed, PROGA is removed from the
     C*  list of activated programs.  Removing it from the list ensures
     C*  a fresh copy of all fields in PROGA the next time the program is
     C*  called.  Indicator 55 is set on if the FREE operation is not
     C*  completed successfully.
     C*
     C                     FREE 'PROGA'                55  55 = NO SUCCESS




Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin




"Feador, Jerry" <JFeador@Kiausa.com>
Sent by: rpg400-l-admin@midrange.com
08/26/2002 10:14 AM
Please respond to rpg400-l


        To:     "'rpg400-l@midrange.com'" <rpg400-l@midrange.com>
        cc:
        Fax to:
        Subject:        FREE Op Code?



Don't mean to send anybody on nostalgia trip but we have just encountered
MCH4421 "Invalid Operation for program" on a line that does a FREE
'program_name' (FREE is the op code)

I've never used this op code but I remember reading about back in the days
of Merlin. However I don't seem to be able to look it up any more. It's
just
not in the manuals?

Any clues?

TIA, Captain J
_______________________________________________
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 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.