What does *IN70 IFEQ ‘9’ mean?

2900 pts.
Tags:
AS/400
RPG
Hi all,
What does this statement means? Indicator 70 is resultant indicator of CHAIN operation and after chain statement this indicator is compared with value '9'. Can an indicator hold this value?
Regards,
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 12  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • BigKat
    Because it is '9', the IFEQ is never satisfied and you will not run the code nested inside.  

    If I had to guess, I would say that was a typo and was supposed to be *IN70 IFEQ '0'.

    This may also have been someones "clever" (not) way to disable a section of code. 

    The compiler allows it because it is valid to test an indicator with a 1A value. 
    9,460 pointsBadges:
    report
  • philpl1jb

    Big Kitty is right.  The indicators are single character fields.  The system uses them as binary .. putting a '1' or '0' in them.  The system would never put a '9' into an indicator value. 



    54,090 pointsBadges:
    report
  • ToddN2000
    Also the indicator can be accessed from the *IN array which has them a 1 position fields. Like already mentioned you can put a value in it that is not valid. A true chain test result will set the value to *ON = 1 or *OFF = 0.
    133,750 pointsBadges:
    report
  • hunshabbir7
    Thanks all of you, I got it, I was reviewing an old piece of code written in RPG2. Updated by about dozen people since (85 I think).
    2,900 pointsBadges:
    report
  • Yorkshireman
    RTFM would (have been) quicker than posting here..
    6,085 pointsBadges:
    report
  • aceofdelts

    Cool - I never thought to try putting other values into *IN

    Curious if that'd also work for L0 - L9, *ON, *OFF, *LR

    Even if doable, I see no benefit from this


    2,550 pointsBadges:
    report
  • ToddN2000
    Maintaining legacy code I see... If the code is that old (RPG2) you may even run across some "H" indicators. In your case it's most likely a typo but it will still pass the compiler check and function, although it might not work as you intended.
    133,750 pointsBadges:
    report
  • CharlieBrowne
    And if you have an original RPG code, you have 'M1 to M9' indicators
    62,385 pointsBadges:
    report
  • ToddN2000
    Forgot about those "M" indicators. Started my RPG career in 1982 right out of college. Boy has the code changed over the years.. You still may run in to the old dinosaur piece of code here and there but hopefully they have been upgraded to take advantage of BIF's and other modern features.
    133,750 pointsBadges:
    report
  • azohawk

    Reminds me of some code we found years ago by a contractor who worked 1/2 day and quit.

    *ON DOUEQ  *OFF

    I have have found code snippits of this ilk (mostly RPGII and old RPGIII) that was put in to bypass a segment of code or for testing and forgotten to be removed. but at least they documented that was what they were doing.

     

    4,055 pointsBadges:
    report
  • CharlieBrowne

    To Todd

    I coded my first RPG program in 1970 or 1971 on a IBM 360/20

    62,385 pointsBadges:
    report
  • TheRealRaven
    *ON DOUEQ  *OFF

    That wouldn't "bypass" code. It's actually a DO-forever loop construct that always executes. It requires some code inside the loop to break out.
    35,650 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: