<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: COBOL REDEFINE question in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347678#M45129</link>
    <description>&lt;!--!*#--&gt;So the size of the new group item  does not have to be the same as the size of the group item being redefined?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I had already modified the RD of the file (in development, of course) adding filler pic x(12) while waiting for a response.&lt;BR /&gt;&lt;BR /&gt;The sample.txt attachement is a portion of the listing produced by compiling the way you said.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 29 Jan 2009 20:18:45 GMT</pubDate>
    <dc:creator>Homer Shoemaker</dc:creator>
    <dc:date>2009-01-29T20:18:45Z</dc:date>
    <item>
      <title>COBOL REDEFINE question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347674#M45125</link>
      <description>&lt;!--!*#--&gt;15  ORDER-OVRCHG-FIELDS.&lt;BR /&gt;    20  ORDER-OVRCHG-ITEM-SW     PIC X.&lt;BR /&gt;        88  ORDER-OVRCHG-ITEM      VALUE "O".&lt;BR /&gt;    20  ORDER-OVRCHG-OFFSET-CUST PIC X(06).&lt;BR /&gt;    20  ORDER-OVRCHG-OFFSET-NO   PIC X(08).&lt;BR /&gt;    20  ORDER-OVRCHG-CUST-ID     PIC X(06).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;15  ORDER-DROP-SHIP-ITEM-PO-STATUS REDEFINES&lt;BR /&gt;    ORDER-OVRCHG-FIELDS.&lt;BR /&gt;    20  ORDER-PO-LN-ITM-ADDED-SW   PIC X.&lt;BR /&gt;        88 PO-LN-ITM-ADDED     VALUE "Y".&lt;BR /&gt;        88 PO-LN-ITM-NOT-ADDED VALUE "N".&lt;BR /&gt;    20  ORDER-PO-LN-ITM-PO-QTY     PIC S9(6)V9(2) COMP-3&lt;BR /&gt;    20  FILLER  (here is the question)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;These fields are in the middle of a record.&lt;BR /&gt;&lt;BR /&gt;1) Do I even need to fill out the rest of the NEW field to equal the space taken up by the original field?&lt;BR /&gt;&lt;BR /&gt;2) If so, how many PIC X's do I need?&lt;BR /&gt;&lt;BR /&gt;I think the answers are Yes, and eight.  Is that right?</description>
      <pubDate>Thu, 29 Jan 2009 16:44:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347674#M45125</guid>
      <dc:creator>Homer Shoemaker</dc:creator>
      <dc:date>2009-01-29T16:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL REDEFINE question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347675#M45126</link>
      <description>Actually, eight is how many bytes I think the order-po-ln-itm-qty field takes up.  That would leave pic x(12) to fill up the group.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And it takes up eight because all comp-3's take up eight bytes (IA64).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Correct??</description>
      <pubDate>Thu, 29 Jan 2009 17:36:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347675#M45126</guid>
      <dc:creator>Homer Shoemaker</dc:creator>
      <dc:date>2009-01-29T17:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL REDEFINE question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347676#M45127</link>
      <description>&lt;!--!*#--&gt;Hello Homer,&lt;BR /&gt;&lt;BR /&gt;Yuck. Ugly file.&lt;BR /&gt;&lt;BR /&gt;Anyway, just ask the compiler nicely!&lt;BR /&gt;&lt;BR /&gt;COBO/LIST/MAP=[ALPH|DECL] /OBJ=NL:&lt;BR /&gt;&lt;BR /&gt;If I add a little 01 in front of your structure, and added pic X after each, it shows exactly where you are, and how you do not have to fill out the re-define.&lt;BR /&gt;&lt;BR /&gt;What you may want to do is put a 7-byte filler BEFORE to COMP-3 field to align that, although there is little point as it is ODD sized itself. Unless you have 10 billion instances of this, why not change that COMP-3 to a simple COMP!&lt;BR /&gt;"waste" a nibble in storage, gain performance and reduce executable size.&lt;BR /&gt;&lt;BR /&gt;You may even want to add an other 15 redefine to set an 'outer boundary' for either flavor.&lt;BR /&gt;&lt;BR /&gt;For the record source included below, here is what I get, re-arranged in an attempt to humor ITRC forum formatting:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Lvl Pos  Siz Byt      Name                      &lt;BR /&gt;---  ---  --- ---  -----------------------------&lt;BR /&gt;01  000  023 023  TEST_RECORD                   &lt;BR /&gt;15  000  022 022  ORDER-OVRCHG-FIELDS           &lt;BR /&gt;20  000  001 001  ORDER-OVRCHG-ITEM-SW          &lt;BR /&gt;20  001  006 006  ORDER-OVRCHG-OFFSET-CUST      &lt;BR /&gt;20  007  008 008  ORDER-OVRCHG-OFFSET-NO        &lt;BR /&gt;20  00F  006 006  ORDER-OVRCHG-CUST-ID          &lt;BR /&gt;20  015  001 001  THE-END-A                     &lt;BR /&gt;15  000  007 007  ORDER-DROP-SHIP-ITEM-PO-STATUS&lt;BR /&gt;20  000  001 001  ORDER-PO-LN-ITM-ADDED-SW      &lt;BR /&gt;20  001  008 005  ORDER-PO-LN-ITM-PO-QTY        &lt;BR /&gt;20  006  001 001  THE-END-B                     &lt;BR /&gt;15  016  001 001  THE-END                       &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;01 test_record.&lt;BR /&gt;  15  ORDER-OVRCHG-FIELDS.&lt;BR /&gt;    20  ORDER-OVRCHG-ITEM-SW     PIC X.&lt;BR /&gt;        88  ORDER-OVRCHG-ITEM      VALUE "O".&lt;BR /&gt;    20  ORDER-OVRCHG-OFFSET-CUST PIC X(06).&lt;BR /&gt;    20  ORDER-OVRCHG-OFFSET-NO   PIC X(08).&lt;BR /&gt;    20  ORDER-OVRCHG-CUST-ID     PIC X(06).&lt;BR /&gt;    20  the-end-a  pic x.&lt;BR /&gt;&lt;BR /&gt;  15  ORDER-DROP-SHIP-ITEM-PO-STATUS REDEFINES&lt;BR /&gt;    ORDER-OVRCHG-FIELDS.&lt;BR /&gt;    20  ORDER-PO-LN-ITM-ADDED-SW   PIC X.&lt;BR /&gt;        88 PO-LN-ITM-ADDED     VALUE "Y".&lt;BR /&gt;        88 PO-LN-ITM-NOT-ADDED VALUE "N".&lt;BR /&gt;    20  ORDER-PO-LN-ITM-PO-QTY     PIC S9(6)V9(2) COMP.&lt;BR /&gt;    20  the-end-b  pic x.&lt;BR /&gt;  15 the-end pic x.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 18:17:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347676#M45127</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-01-29T18:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL REDEFINE question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347677#M45128</link>
      <description>&lt;BR /&gt;Argh, not my day...&lt;BR /&gt;&lt;BR /&gt;I posted the source for a record modified to use a simple COMP, but hte MAP is for a COMP-3. Sorry.&lt;BR /&gt;&lt;BR /&gt;Also, the record layout is exactly the same on Alpha and Itanium.&lt;BR /&gt;&lt;BR /&gt;You would not want to have to convert/re-arrange fields when porting to itanium. Well, maybe you should, but you should not _have_ to.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 18:24:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347677#M45128</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2009-01-29T18:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL REDEFINE question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347678#M45129</link>
      <description>&lt;!--!*#--&gt;So the size of the new group item  does not have to be the same as the size of the group item being redefined?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I had already modified the RD of the file (in development, of course) adding filler pic x(12) while waiting for a response.&lt;BR /&gt;&lt;BR /&gt;The sample.txt attachement is a portion of the listing produced by compiling the way you said.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 20:18:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347678#M45129</guid>
      <dc:creator>Homer Shoemaker</dc:creator>
      <dc:date>2009-01-29T20:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: COBOL REDEFINE question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347679#M45130</link>
      <description>You know, I thought about this after I sent it.  &lt;BR /&gt;&lt;BR /&gt;Duh.  Of course not.&lt;BR /&gt;&lt;BR /&gt;Just so I don't make the new group so large that it starts to cover data in the next item in the record that I really need.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks, Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2009 20:29:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/cobol-redefine-question/m-p/4347679#M45130</guid>
      <dc:creator>Homer Shoemaker</dc:creator>
      <dc:date>2009-01-29T20:29:05Z</dc:date>
    </item>
  </channel>
</rss>

