IDMS

  • 1.  Suffixes on elements dont' show in COBOL program after COPY IDMS

    Posted Feb 28, 2017 10:54 AM

    I have added a couple elements in IDD. I am ready to add those elements to a record and in practice I cloned the record to a version 99 and have added the elements (and swapped to a shorter filler element which I also created.) I have not made changes to the version 1 record but somehow now when the developer tries to compile their program the COPY IDMS statement in their cobol brings in a record that does not have the suffixes on the element names. I have no idea how or why this is happeneing. When I DISPLAY the RECORD in IDD the record itself has not changed.



  • 2.  Re: Suffixes on elements dont' show in COBOL program after COPY IDMS

    Posted Feb 28, 2017 11:32 AM

    Have you checked the layout of the record that was copied in, is that what is in the version 1 record?

    Verify that the developers are specifying version 1 after the record name in the copy idms statement, the Cobol precompiler appears to take the highest version by default.

    Check the synonym, does it include language cobol?  If you have multiple records with the same name do any of them include language cobol on the synonym?



  • 3.  Re: Suffixes on elements dont' show in COBOL program after COPY IDMS

    Posted Feb 28, 2017 02:42 PM

    I use version 0 for things I want to monkey around with to avoid them being picked up.



  • 4.  Re: Suffixes on elements dont' show in COBOL program after COPY IDMS

    Posted Mar 01, 2017 10:35 AM

    Wouldn't it be nice if the pre-compiler would tell us what record and synonym version it actually picked?

     

    In the original post you mentioned version 99.

     

    I suggest that you do:

    DIS ALL REC SYN WHERE NAME = 'yourrecordname' AS SYN.

    Then display all the occurrences and go through the records to verify the synonym version, language and prefix. 

     

    The pre-compiler will pick up the SYNONYM version given on the COPY IDMS statement, if no version is given, it will first look for the highest version SYNONYM with LANGUAGE COBOL, and if none is found it will pick up the highest version SYNONYM.  It does not care about the record's version just the synonym's version, nor does it care about the language of the record itself, again it is the synonym.

     

    You probably are aware, but I will state it as a refresher, that a record will always have a primary synonym that is the same name and version as the record, it can additionally have synonyms with the same name but different versions, as well as synonyms with any name and any version as long as that record synonym does not already exist.



  • 5.  Re: Suffixes on elements dont' show in COBOL program after COPY IDMS

    Posted Mar 01, 2017 11:48 AM

    Tommy,

    When the pre-compiler is running in update mode you could at least check IDD after the fact and see what it did, but the typical development pre-compile, in most environments I have been in, are run in retrieval mode, so you have a point about generating the diagnostic output, maybe it could even be optional via an execution parm.

     

    Paul,

    In case it hasn't occurred to you, you can get your V99 rec out of the way with a MOD REC ur-name V 99 NEW NAME ur-name V 0.  - assuming V 0 isn't currently defined.  You could also change the name subtly.

     

    John