COBOL

COBOL

COBOL

COBOL is responsible for the efficient, reliable, secure, and unseen day-to-day operations of the world's economy.

 View Only
  • 1.  PFD, NOPFD, ZONEDATA and Cobol V6.3

    Posted Wed April 14, 2021 04:08 PM
    we are migrating from Cobol 4.2 to Cobol 6.3.   we have run into a situation that I could use some help with.   We had NUMPROC(MIG) set in Cobol 4.2.  when we went to COBOL 6.3 we  set NUMPROC to NOPFD.  then one of our users was testing a program that gets invalid data and would abend with a S0C7 under 4.2, but ran just fine under 6.3.   after investigating we determined it was NOPFD so we changed NUMPROC to PFD and the program started abending again with a S0C7.   Then they ran into another problem with a different program.  the program was executing an IF ..... NOT NUMERIC.   It also had invalid data and now under 6.3 it failed.   So after more investigation we set NUMPROC to NOPFD and ZONEDATA to MIG.   that allows the IF .... NOT NUMERIC to perform as it did under 4.2.    So we now have one program compiled with NUMPROC(NOPFD) and another program compiled with NUMPROC(PFD).    any idea if there is a way to get to one setting for the compile parms.   Also, what do we do if we get to one program that needs both conditions of having the IF .... NOT NUMERIC work with invalid data and abend with a S0C7 for invalid data?     any ideas and discussion are welcome.

    Thanks

    ------------------------------
    Brad Wissink
    ------------------------------


  • 2.  RE: PFD, NOPFD, ZONEDATA and Cobol V6.3

    Posted Wed April 14, 2021 04:29 PM

    Hi Brad,

    Without details about what exact invalid data problem you're running into (what the data is, what the COBOL code is doing, what other compiler options are - such as ARCH and OPT - and what instruction is failing), there's not really much we can say.

    Generally, you have two choices with invalid data:
    - Use NUMCHECK to detect and correct it

    - Use ZONEDATA to tolerate it, with ZONEDATA and NUMPROC suboptions matching what you used in COBOL 4.

    In your case, you used NUMPROC(MIG) in COBOL 4, so NUMPROC(NOPFD) is the only correct choice in COBOL 6 unless you've already tested and can guarantee that you will ALWAYS have preferred sign codes. ZONEDATA(MIG) is the correct ZONEDATA option to use with NUMPROC(MIG).

    No one should ever use NUMPROC or ZONEDATA settings that don't correspond to IBM recommendations as given in the migration webinar; doing otherwise may solve one immediate problem but cause others.


    If ZONEDATA(MIG) and NUMPROC(NOPFD) doesn't solve the problem, there are two further possibilities:
    - You've identified a new invalid data problem that IBM is not yet aware of. You'll need to open a Case and let us look into whether we can provide compatibility with COBOL 4 in your case. (The answer is usually yes, but we can't promise compatibility for any invalid data issue that may occur without knowing what the issue is)

    - Depending on your PTF version of COBOL 6.3, you may have run into an issue we're addressing in the next (May 2021) 6.3 PTF (and in April 2021 on 6.2). NUMPROC(MIG) had two main behaviours in COBOL 4: guaranteeing that all comparisons of USAGE DISPLAY data items were numeric, and avoiding cleaning the sign code for senders in arithmetic expressions or comparisons. ZONEDATA(MIG) has been doing the former since we first released it, and last summer, we released a PTF to do part of the latter. As this latter change was new for many clients, they'd gotten used to the previous behaviour for sign code cleaning in COBOL 6 (where we'd clean the sign codes even under ZONEDATA(MIG)), even though cleaning sign codes under ZONEDATA(MIG) didn't match NUMPROC(MIG) in COBOL 4.  As such, we're deprecating ZONEDATA and replacing it with INVDATA - indicating that data is or may be invalid - which will now have suboptions controlling the behaviour for comparisons (numeric or not) separately from cleaning sign codes. Depending on your issue, it may be fixed when INVDATA is released.

    I talked more about INVDATA in the Enterprise COBOL 6 Migration Webinar; as it's a new change for us, yesterday's webinar was the first time I've talked about it. You can get the slides and recording here: https://ibm.ent.box.com/folder/7185639733?v=COBOLMigrationWebinars




    ------------------------------
    Mike Chase
    Enterprise COBOL Developer
    mike.chase@ca.ibm.com
    ------------------------------