Subject: | |
From: | |
Reply To: | |
Date: | Wed, 15 Oct 1997 07:22:23 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
At 02:44 PM 10/14/97 -0400, you wrote:
>>Cynthia Redick ([log in to unmask]) wrote:
>>: We are looking for a "C" language routine that would format a c data ty=
>>: pe in
>>: such a way that it could be used to update a cobol comp-3 field, or an =
>>: image
>>: P(x) field. Thanks in advance!
>>
>
And Bary kindly supplied a lot of C code (snipped)
and I repeat my ealier (private) reply to Cynthia:
Why not a COBOL routine?
LINKAGE SECTION
01 C-PARM PIC S9(9) COMP. ;Putatively an integer
01 COBOL-PARM PIC S9(9) COMP-3. ;A packed variable
PROCEDURE DIVISION
<stuff>
MOVE C-PARM TO COBOL-PARM.
My point being that this is EXACTLY what COBOL does best, and a perfect
example of using the right tool for the right purpose! Obviously this
doesn't work with structs etc, but then I hope you wouldn't expect it to.
For fundamental data types (int, bool, etc) COBOL is the easiest way to
manage data type conversions.
Tony
Semper COBOL!
|
|
|