HP3000-L Archives

June 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jim Phillips <[log in to unmask]>
Reply To:
Jim Phillips <[log in to unmask]>
Date:
Thu, 12 Jun 1997 08:26:11 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
Michael:

I've worked with Cobol for a number of years, and C for lesser years
(although not on the HP).  The "X" items in the linkage area are
probably handled as byte arrays in C, but the COMP item in Cobol
must be defined as a short (16 bit) integer in C.  Another thing
to check is to see if the Cobol program expects four arguments or
one.  The "}" is the sign overpunch, but you should never see it
in a binary number (like COMP is), unless you (or the code/compiler)
converts it to a display-type number (which is what happens when you
do a DISPLAY DATA-ITEM-3 in Cobol).

   COBOL Definition                      C Definition
   --------------------------            ----------------------
   02 DATA-ITEM-1  PIC X(20). ---------> char data_item_1 [20]
   02 DATA-ITEM-2  PIC X(80). ---------> char data_item_2 [80]
   02 DATA-ITEM-3  PIC S9(4) COMP.-----> short int data_item_3
   02 DATA-ITEM-4  PIC XX. ------------> char data_item_4 [2]

Hope this helps.

Jim Phillips                            Manager of Information Systems
E-Mail: [log in to unmask]      Therm-O-Link, Inc.
Phone: (330) 527-2124                   P. O. Box 285
  Fax: (330) 527-2123                   Garrettsville, Ohio  44231

ATOM RSS1 RSS2