cobol vs. PL/1 
Author Message
 cobol vs. PL/1

Quote:

> according to Accredited Standards Committee last revision of COBOL :

> "The USAGE COMPUTATIONAL clause specifies that a radix and format specified by
> the implementor is used to
> represent a numeric item in the storage of the computer. Each implementor
> specifies the precise effect of the
> USAGE COMPUTATIONAL clause upon the alignment and representation of the data
> item in the storage of the
> computer, including the representation of any algebraic sign, and upon the
> range of values that the data item may hold." This implies that this may vary
> between COBOL implementors.

> My question is  what is the the equivalent of PIC S9(4)  COMP  IN PL/1 ? That
> is how do you declare this in Pl/1?

Naturally, if the COBOL encoding is implementation-defined, the answer
would depend on what implementation of COBOL you're talking about ;-)
In the last COBOL I worked with, s9(1) to s9(4) comp would generate a
binary halfword (=fixed bin(15,0) ).  To be exact, it should be fixed
bin(14,0): 4 decimal digits, ceil(4*3.32)=14.


Sat, 29 Sep 2001 03:00:00 GMT  
 cobol vs. PL/1


Quote:

> > ...
> > My question is  what is the the equivalent of PIC S9(4)  COMP  IN PL/1
? That
> > is how do you declare this in Pl/1?

> Naturally, if the COBOL encoding is implementation-defined, the answer
> would depend on what implementation of COBOL you're talking about ;-)
> In the last COBOL I worked with, s9(1) to s9(4) comp would generate a
> binary halfword (=fixed bin(15,0) ).  To be exact, it should be fixed
> bin(14,0): 4 decimal digits, ceil(4*3.32)=14.

COBOL PIC S9(4) is guarantied equivalent to PL/I FIXED BIN(15,0) only if
compiled with the TRUNC(BIN) option.  With TRUNC(STD) the value is
truncated to the number of digits (decimal) in the PIC clause.  PL/I does
not perform such truncation.

Gunnar.



Sat, 29 Sep 2001 03:00:00 GMT  
 cobol vs. PL/1
Depending on which Cobol compiler options are chosen as to truncation, the
full 2-byte signed 15-bit field is available.

Robert M. Pritchett, President - RMP Consulting Partners LLC

"Quality means doing it right the first time!"
See http://www.headhunter.net/jobstv/0j/j04651mjxt8trch80j.htm?ShowJob
Contractors: tired of hearing "W-2 only"? Join us and let us help you get
that same contract on a 1099 as a self-employed independent contractor!

Quote:

>In the last COBOL I worked with, s9(1) to s9(4) comp would generate a
>binary halfword (=fixed bin(15,0) ).  To be exact, it should be fixed
>bin(14,0): 4 decimal digits, ceil(4*3.32)=14.



Sat, 29 Sep 2001 03:00:00 GMT  
 cobol vs. PL/1

Quote:

>My question is      what is the the equivalent of PIC S9(4)  COMP  IN PL/1 ? That
>is how do you declare this in Pl/1?

PIC S9(1) to PIC S9(4) COMP:  BIN FIXED(15)
PIC S9(5) COMP and above: BIN FIXED(31)

PIC S9(n) COMP-3: DEC FIXED(n)

(on any IBM-Mainframes)

CUL8R!

Ing. Michael Fitz
A-2410 Hainburg; Carnuntumstr. 21

=== PGP-Key on request ===



Mon, 01 Oct 2001 03:00:00 GMT  
 cobol vs. PL/1
FItz,

This is not 100% correct

In COBOL (At least on IBM MF):

PIC S9(10) COMP through PIC S9(18) COMP variables are held on 64 bits (=8
bytes).

I do not know the quivalent of this in PL/I

Quote:


>>My question is what is the the equivalent of PIC S9(4)  COMP  IN PL/1 ?
That
>>is how do you declare this in Pl/1?

>PIC S9(1) to PIC S9(4) COMP:  BIN FIXED(15)
>PIC S9(5) COMP and above: BIN FIXED(31)

>PIC S9(n) COMP-3: DEC FIXED(n)

>(on any IBM-Mainframes)

>CUL8R!

>Ing. Michael Fitz
>A-2410 Hainburg; Carnuntumstr. 21

>=== PGP-Key on request ===



Tue, 02 Oct 2001 03:00:00 GMT  
 cobol vs. PL/1

Quote:

>In COBOL (At least on IBM MF):

>PIC S9(10) COMP through PIC S9(18) COMP variables are held on 64 bits (=8
>bytes).

>I do not know the quivalent of this in PL/I

You are right. And there is no standard PLI-equivalent.

CUL8R!

Ing. Michael Fitz
A-2410 Hainburg; Carnuntumstr. 21

=== PGP-Key on request ===



Wed, 03 Oct 2001 03:00:00 GMT  
 cobol vs. PL/1
On VA PL/I V2.1 with CSD#1 or above, the equivalent is:
  fixed bin (63)
You will need to specify the compiler options limits(fixedbin(63)).
(Warning: there are quite a few bugs in the CSD#1 support. CSD#2 or above is
recommended)

This feature should be available on OS/390 when the VA PL/I compiler is
released on OS/390 in 9/1999, but not for OS PL/I or PL/I for MVS.

Quote:


>>In COBOL (At least on IBM MF):

>>PIC S9(10) COMP through PIC S9(18) COMP variables are held on 64 bits (=8
>>bytes).

>>I do not know the quivalent of this in PL/I

>You are right. And there is no standard PLI-equivalent.

>CUL8R!

>Ing. Michael Fitz
>A-2410 Hainburg; Carnuntumstr. 21

>=== PGP-Key on request ===



Thu, 04 Oct 2001 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. COBOL vs. PL/I

2. Cobol vs. Pl/1

3. Cobol vs PL/1

4. PL/1 VS COBOL

5. Migrating from OS/VS PL/I to VA PL/I

6. pl/1 vs. PL/I

7. PL/I vs. PL/1

8. VS COBOL II vs. COBOL/370

9. os/vs cobol vs cobol II

10. Q: COBOLII vs COBOL LE vs COBOL

11. New CICS removes Translator support for VS COBOL II (and OS/VS COBOL)

12. OS390/VM Cobol vs VS Cobol?

 

 
Powered by phpBB® Forum Software