IDMS

  • 1.  Changes to Schema vs. IDD-owned Records

    Posted Mar 06, 2017 11:28 AM

    I am confused. I have a record that is 'owned' by the SCHEMA compiler. I need to change the record - it has enough filler so I am going to add an element via IDD and then add the element to the record (and correspondingly shorten the filler). Problem is that the SCHEMA compiler doesn't even seem to take ELEMENTs in its syntax. (When I display as SYN it shows all the elements as comments.) How do I add ELEMENTs to a record that is owned by the SCHEMA compiler? Must I change ownership via an SQL statement? I don't want to have to use SQL capabilities for this type of change.



  • 2.  Re: Changes to Schema vs. IDD-owned Records

    Posted Mar 06, 2017 11:41 AM

    I’m going to assume you have IDD defined records and then use the SHARE STRUCTURE clause to use the IDD record in the schema.

     

    So, MODIFY the record specifying the NEW VERSION clause.

    For example, RECORD-A VERSION 1 is defined in the IDD and is currently used in a schema.

    MODIFY RECORD RECORD-A NEW VERSION 0.

    (I am assuming version 0 does not exist. If it does, you will need to delete it or use a different version number).

     

    Then, display the version of the record you just modified.

    For instance, DISPLAY RECORD RECORD-A VERSION 0 AS SYNTAX.

     

    Now, edit the version 0 definition to reflect what you want version 1 to look like.

    Be sure to change all references to version 0 to be version 1.

     

    Now, go back into the schema compiler and change the schema to use version 1 instead of version 0.

    Now, regenerate all of the affected subschemas. You can find that out by DISPLAY SCHEMA *** WITH SUBSCHEMAS, where *** is your schema name.

     

    Have fun!

     

     

    Charles (Chuck) Hardee<mailto:Chuck.Hardee@ThermoFisher.com>

    Senior Systems Engineer/Database Administration

    EAS Information Technology<mailto:DBA%20Engineering%20-%20DB2_IDMS>

     

    Thermo Fisher Scientific

    300 Industry Drive | Pittsburgh, PA 15275

    Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230

    Chuck.Hardee@ThermoFisher.com<mailto:Chuck.Hardee@ThermoFisher.com>  | www.thermofisher.com

     

    WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent of a system responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies.



  • 3.  Re: Changes to Schema vs. IDD-owned Records

    Posted Mar 06, 2017 12:05 PM

    As long as you have available filler you do not need to do anything in the schema compiler. This can be done using IDD.

     

    All of our schema owned records are v 9999.

     

    As an example you have a record named REC1 with 20 bytes of filler at line 001800 and you want to redefine the first 2 bytes with a new element called ELE1 v 1.

     

    In IDD…

     

    MOD

    RECORD NAME IS REC1 VERSION IS 9999

        .

    REPLACE

        RECORD ELEMENT IS ELE1 VERSION 1

        LINE IS 001800

        .

        RECORD ELEMENT IS 'FIL 0018' VERSION 1

        LINE IS 001810

        .

     

    Bob Nardin

    Database Architect

    Edward Jones

    Work: 314-515-8682

    Cell: 314-223-3874

    'One Ring to Rule Them All…'

     

     

     

    If you are not the intended recipient of this message (including attachments) or if you have received this message in error, immediately notify us and delete it and any attachments.

     

    If you do not wish to receive any email messages from Edward Jones, excluding administrative communications, please email this request to Opt-Out@edwardjones.com<mailto:Opt-Out@edwardjones.com> from the email address you wish to unsubscribe.

     

    For important additional information related to this email, visit www.edwardjones.com/disclosures/email.html.<http://www.edwardjones.com/disclosures/email.html> Edward D. Jones & Co., L.P. d/b/a Edward Jones, 12555 Manchester Road, St. Louis, MO 63131 © Edward Jones. All rights reserved.



  • 4.  Re: Changes to Schema vs. IDD-owned Records

    Broadcom Employee
    Posted Mar 06, 2017 12:03 PM

    Typically this is the procedure many have used for making a record layout change to a Schema-owned record, usually as part of a RESTRUCTURE operation but it would also be valid if just changing existing FILLER to new fields.

     

    Let's say your current Schema-owned record in IDD is Version 10.                                                                    
     Schema record definition currently says SHARE STRUCTURE OF RECORD recname VERSION 10.        

     

    do the following:

    1.  In IDD DISPLAY RECORD recname V 10 WITH COBOL AS SYNTAX.                                   
     Change Version to 20 (or whatever you want), change element pictures as desired and hit
    the enter key to add the new version of the record with the change you want.

    2.  Get into Schema compiler and Modify the record to SHARE STRUCTURE of your  
    new record version (in this example you change 10 to 20).  

    3.  Validate the schema.     

    4.  In IDD delete the original V 10 record or change it to another unused version if you want to keep it for history.

    5.  MOD RECORD recname V 20 NEW VERSION IS 10. 

      This will automatically change the Schema to share V 10.  You now have the new record def and it is the Version number that was originally used                                       
     Gen subschemas and recompile any programs that want to make use of the new 
    picture of the elements.                                                       



  • 5.  Re: Changes to Schema vs. IDD-owned Records

    Posted Mar 06, 2017 12:50 PM

    What I have always done is close to what Bob Nardin has, but I don't use line numbers.  I follow what is in the IDD reference guide which instructs you to issue a replace on the record element just before the the filler (or first element) you want to remove.  Then you follow with a remove(or removes as needed) and then insert your new element(s) followed by the reduced filler.  This can only be done if you are modifying part of the record that is outside of the control length (after the last key).  Monkeying around with versions and the schema is much more cumbersome, but I also test the change on a copy of the record first and then start the live change process in a DBA system.

     

    Here is a real world example:

    MOD  RECORD NAME IS ASSOCNAM-5503.                  
     REPLACE RECORD ELEMENT IS DATA-ASSOCNAM VERSION 1.
     REMOVE  RECORD ELEMENT IS 'FIL 0006' VERSION 1.    
             RECORD ELEMENT IS CD-ROLE-STATUS.          
             RECORD ELEMENT IS 'FIL 0005' VERSION 1     
             ELEMENT NAME SYNONYM IS FILLER             
             .                                         

     

    HTH, John



  • 6.  Re: Changes to Schema vs. IDD-owned Records

    Posted Mar 06, 2017 01:18 PM

    Here's the manual reference:

     

       Records that participate in schemas require special consideration when they are deleted or replaced.  Records that participate in schemas cannot be deleted by the DDDL
        compiler; documentation entries can, however, be submitted.
     
        Within records that participate in schemas, record elements can be replaced by one or more record elements; optionally, one or more record elements that follow the replaced record
        elements in the record structure can be removed.  The following considerations apply:
     
        -   To modify record elements, use the RECORD ELEMENT substatement, described later in this chapter.  It is recommended that the LINE option be used to accurately position the
            record element.
     
        -   The primary replacement record element must have the same RECORD ELEMENT NAME as the original record element; however, a different version number is valid.
     
        -   After issuing the REPLACE command for a particular record element, the user can insert or remove record elements immediately following the replaced record element, subject to
            the length restrictions described below.
     
        -   Record elements to be inserted into the record structure following the replacement record elements must be previously defined in the dictionary.
     
        -   The record elements to be replaced cannot be defined as the schema control field (CALC-key, sorted set key, or index set key), nor can they contain a subordinate element
            defined as the schema control field.
     
        -   The total length of the replacement record elements must equal the length of the element being replaced.  The logical position of the elements following the replaced element cannot
            be altered; the overall record length cannot be changed.  When the DDDL compiler detects a change in the replacement record length, it rejects the request; the compiler restores
            the original elements in the record, removes replacement elements, and displays an error message.
     
        -   A filler field (RECORD ELEMENT IS 'FIL nnnn') can be replaced by any element previously defined in the dictionary.
     
        -   Elements defined as COBOL level-88 items (USAGE IS CONDITION-NAME) can be inserted, replaced, or removed from the record structure without restriction.