Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. leewest

    and/or relational checks in cobol

    phv Well, I guess I need to start over. First of all, the code is NOT my code. Were it my code it would be written correctly using the parens for clarity. That said, the code resides in a program I have been assigned to make changes in and the statement is not one appearing on my specs...
  2. leewest

    and/or relational checks in cobol

    k5tm Your input so far seems most reasonable. We agree that unless SW-PRINT = 1 then no evaluation of HLD-REC-TYPE is done. However, you say since the expression by standard must be evaluated left-to-right, if HLD-REC-TYPE not = '5' the value of the expression remains unknown, causing the...
  3. leewest

    and/or relational checks in cobol

    ph you say the IF condition is true if ANY of the following is true: 1) SW-PRINT = 1 AND HLD-REC-TYPE = '5' 2) HLD-REC-TYPE = '4' (even if SW-PRINT NOT = 1) 3) HLD-REC-TYPE = '6' (even if SW-PRINT NOT = 1) The was this statement is currently written, not using parens, you may be right. But, I...
  4. leewest

    and/or relational checks in cobol

    PH Thanks for your input. You say to always use the parens, but you did not use parens in your second example. any reason why? Years ago I though I recalled to always use parens in the AND/OR relation when either the AND or the OR contained multiples, that control whould stop when the first not...
  5. leewest

    and/or relational checks in cobol

    Thank you, you stated what I have known for years. However, for the remainder of the question. If the first check is not true, will the second and third check be made? Or does control pass to the next statement ending the IF statement too soon and distorting expected output? thanks
  6. leewest

    and/or relational checks in cobol

    I have the following COBOL statement. 004250 IF SW-PRINT = 1 AND HLD-REC-TYPE = '5' OR '4' OR '6' R11725 MOVE PRT-LINE TO HD-LINE R11725* MOVE STAA-PRT-LINE TO HD-LINE 004270 PERFORM...

Part and Inventory Search

Back
Top