ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Free opcode

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Free opcode

    What is the equalent opcode in ILE for

    FREE in RPG 400 ?

    Muthu
    Miles to Go, Before I sleep.

  • #2
    Re: Free opcode

    /Free is a compiler directive that allows you to use free format c-specs.

    Do not understand what you mean when you say you want to know the equivalent op-code? Could you explain further
    You don't stop playing games because you get old, You get old because you stop playing games!

    Comment


    • #3
      Re: Free opcode

      Free is an opcode. We are using it in RPG400.
      I need the opcode in RPGLE which is having same
      functionality as same as Free in RPG400.


      Muthu
      Miles to Go, Before I sleep.

      Comment


      • #4
        Re: Free opcode

        Oops Sorry, still half asleep.

        Im not sure there is an equivalent to FREE.
        You don't stop playing games because you get old, You get old because you stop playing games!

        Comment


        • #5
          Re: Free opcode (found this)

          Code:
          To handle the re-resolve aspect of FREE in ILE RPG:
          First, create a fast-running do-nothing program called something like FREEDUMMY. A 1-line ILE RPG program with just a RETURN works ok.
          
          Then change this code:
          
          
          c          call  'PGM1'
          c          parms      
          ...
          c          free  'PGM1'
          ...
          c          call  'PGM1'
          c          parms      
          
          To this code:
          
          D pgm1Var    s          21A  INZ('PGM1')
          c          call  pgm1Var
          c          parms      
          ...
           * FREE PGM1
          c          eval  pgm1Var = 'FREEDUMMY'
          c          call  pgm1Var
          c          eval  pgm1Var = 'PGM1'
          ...
          c          call  pgm1Var
          c          parms
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: Free opcode

            Jamie,

            I don't understand. What good does it do to call a program that does nothing but return?

            Michael
            "Time passes, but sometimes it beats the <crap> out of you as it goes."

            Comment


            • #7
              Re: Free opcode

              Originally posted by mksamy_99
              Free is an opcode. We are using it in RPG400.
              I need the opcode in RPGLE which is having same
              functionality as same as Free in RPG400.


              Muthu
              With the introduction of activation groups into the program model, the FREE opcode is no longer allowed. There is no replacement for it. The recommended method for releasing held program objects is to end or reclaim the activation group. (IMHO, it would be better if you wrote your programs so that you didn't need to "free" them when you were done.)

              Michael
              Last edited by littlepd; December 6, 2005, 08:36 PM.
              "Time passes, but sometimes it beats the <crap> out of you as it goes."

              Comment


              • #8
                Re: Free opcode

                Originally posted by mksamy_99 View Post
                What is the equalent opcode in ILE for

                FREE in RPG 400 ?

                Muthu
                hi muthu
                how r u? this is sabarish from india at tamilnadu. may i know your living place please

                Comment

                Working...
                X