ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

*inlr in free

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

  • *inlr in free

    I have a program that is written in free with a procedural file.

    I want to check *inlr so that I can exsr whatever, but during debugging it never seems to come on.



    the program does end, so RPG is getting through the file and stopping without an issues, but why can't test against if *inlr = *on;?

    Thanks for the help,

    Adein

  • #2
    Re: *inlr in free

    Hi Adein:

    I'm not sure I know what you mean by procedural file.

    I think you mean
    Code:
    Fmyfile     IPE  E           k dISK
    in that case LR only comes on at total time or if you set it on .

    Code:
     /end-free                               
    clr                 exsr      lesubrtn
    Best of Luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: *inlr in free

      If it's a procedural file, *INLR must be set on manually. It will only be set on automatically if there's:
      1) An Input (or Update) Primary file with one or more Secondary Files
      2) An Input (or Update) Secondary file with no Primary File. (Never understood why somebody would do this.)
      http://www.linkedin.com/in/chippermiller

      Comment


      • #4
        Re: *inlr in free

        Another caveat if you are using a PRIMARY file is that you can not test for LR at detail time. It's only set on for total time calcs. For example:

        Code:
        fInventory ip   e             disk       
         
         /free                                   
         
          if *inlr = *on;                        
            dsply 'Detail Time';                 
          endif;                                 
         
         /end-free                               
        cLR   'Total Time'  dsply
        If this program is run (against your file of choice), you'll see that only the total time DSPLY is processed. Because total time calcs are cycle based, you cant access them in free format. You would have to hop out of free format and code a total time calc like I did. (Which just caused me to have a minor convulsion ) Ideally, you would want to use full-procedural files and get away from the cycle altogether.
        Michael Catalani
        IS Director, eCommerce & Web Development
        Acceptance Insurance Corporation
        www.AcceptanceInsurance.com
        www.ProvatoSys.com

        Comment

        Working...
        X