Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Can I declare S9(19) in cobol
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
prashant_mq

New User


Joined: 29 Aug 2006
Posts: 25

PostPosted: Tue Jun 10, 2008 7:39 pm    Post subject:
Reply with quote

I have tried with this:

//EDCCPL EXEC IGYWCL,PARM.COBOL='OBJECT,LIB,APOST,LIST,
// ARITH(EXTEND)',


as well as this:

CBL ARITH(EXTEND)
IDENTIFICATION DIVISION.


but still no success.
Back to top
View user's profile Send private message
References
PostPosted: Tue Jun 10, 2008 7:39 pm    Post subject: Re: Reply with quote

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2565
Location: italy

PostPosted: Tue Jun 10, 2008 7:46 pm    Post subject: Reply to: Can I declare S9(19) in cobol
Reply with quote

Ok so now we have zillions of confirmation that it does not work,
it will keep on not working until You post an excerpt of the sysout
showing the active options for Your compile step.

But I would say that this is more an issue for Your support rather than a forum

COBOL is not my friend, but thinking in parallel with PL/I

when the defaults options are being setup at installation time
the options are divided in two section
the overridable ones ( the ones that can be changed by parm or process )
the not-overridable ( the ones that cannot be changed )
check with Your support if this is the case
giving as evidence what has been requested a few times,
and You still did not provide
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 962
Location: Virginia, USA

PostPosted: Tue Jun 10, 2008 8:07 pm    Post subject:
Reply with quote

The compiler is installed and set up with default compiler options. While installing the compiler, the system programmers for a site can fix compiler option settings to, for example, ensure better performance or maintain certain standards. You cannot override any compiler options that your site has set as fixed. For options that are not fixed, you can override the default settings by specifying compiler options in either of these ways:


The first page of your compile listing should look something like this
Code:
PP 5655-G53 IBM Enterprise COBOL for z/OS  3.4.1             Invocation parameters:                                                   
AR(E),MAP,OPT,NOSEQ,XREF,LIST,SSR,CICS,TRUNC(BIN),,NOADV,LIB,RENT,NODYNAM
PROCESS (CBL) Statements:                                                 
CBL NORW LINECOUNT(57)                                                   
CBL SQL("APOSTSQL STDSQL(NO)") NORW LINECOUNT(57)                         
Compiler options in effect:       
    NOADATA                         
    NOADV                         


You can look at this and see if 'ARITH(EXTEND)' is being used or not. In this listing AR(E) is being passed as a compile time option for ARITH(EXTEND).
Back to top
View user's profile Send private message
prashant_mq

New User


Joined: 29 Aug 2006
Posts: 25

PostPosted: Tue Jun 10, 2008 9:14 pm    Post subject:
Reply with quote

Craq Giegerich wrote:
The compiler is installed and set up with default compiler options. While installing the compiler, the system programmers for a site can fix compiler option settings to, for example, ensure better performance or maintain certain standards. You cannot override any compiler options that your site has set as fixed. For options that are not fixed, you can override the default settings by specifying compiler options in either of these ways:


The first page of your compile listing should look something like this
Code:
PP 5655-G53 IBM Enterprise COBOL for z/OS  3.4.1             Invocation parameters:                                                   
AR(E),MAP,OPT,NOSEQ,XREF,LIST,SSR,CICS,TRUNC(BIN),,NOADV,LIB,RENT,NODYNAM
PROCESS (CBL) Statements:                                                 
CBL NORW LINECOUNT(57)                                                   
CBL SQL("APOSTSQL STDSQL(NO)") NORW LINECOUNT(57)                         
Compiler options in effect:       
    NOADATA                         
    NOADV                         


You can look at this and see if 'ARITH(EXTEND)' is being used or not. In this listing AR(E) is being passed as a compile time option for ARITH(EXTEND).


Attached herewith the listings, the listing1 (top) is showing ARITH(EXTEND) is in effect but on the listing2 (bottom) is giving error.
Back to top
View user's profile Send private message
prashant_mq

New User


Joined: 29 Aug 2006
Posts: 25

PostPosted: Tue Jun 10, 2008 9:20 pm    Post subject:
Reply with quote

Hi Craq, I'm getting the AR(E) on the listing, could it be the option cannot be overridable?
Back to top
View user's profile Send private message
prashant_mq

New User


Joined: 29 Aug 2006
Posts: 25

PostPosted: Tue Jun 10, 2008 9:21 pm    Post subject:
Reply with quote

prashant_mq wrote:
Hi Craq, I'm getting the AR(E) on the listing, could it be the option cannot be overridable?


Sorry I mean I'm NOT getting the AR(E)
Back to top
View user's profile Send private message
stodolas

Senior Member


Joined: 13 Jun 2007
Posts: 646
Location: Wisconsin

PostPosted: Tue Jun 10, 2008 9:23 pm    Post subject:
Reply with quote

Odd that it shows that the ARITH(EXTEND) option is in effect already.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2565
Location: italy

PostPosted: Tue Jun 10, 2008 9:54 pm    Post subject: Reply to: Can I declare S9(19) in cobol
Reply with quote

just a hint... long binary up to pic s9(18) are stored as dublewords ( 8 bytes )
I could not find anything on binry with more than 18 digits

number theory
a pic s9(19) will allow a number like 9.999.999.999.999.999.999
and it will definitely not fit in 8 bytes signed

here is a table of 2 powers

Code:

  /09876543210987654321
 1/                   2
 2/                   4
 3/                   8
 4/                  16
 5/                  32
 6/                  64
 7/                 128
 8/                 256
 9/                 512
10/                1024
11/                2048
12/                4096
13/                8192
14/               16384
15/               32768
16/               65536
17/              131072
18/              262144
19/              524288
20/             1048576
21/             2097152
22/             4194304
23/             8388608
24/            16777216
25/            33554432
26/            67108864
27/           134217728
28/           268435456
29/           536870912
30/          1073741824
31/          2147483648
32/          4294967296
33/          8589934592
34/         17179869184
35/         34359738368
36/         68719476736
37/        137438953472
38/        274877906944
39/        549755813888
40/       1099511627776
41/       2199023255552
42/       4398046511104
43/       8796093022208
44/      17592186044416
45/      35184372088832
46/      70368744177664
47/     140737488355328
48/     281474976710656
49/     562949953421312
50/    1125899906842624
51/    2251799813685248
52/    4503599627370496
53/    9007199254740992
54/   18014398509481984
55/   36028797018963968
56/   72057594037927936
57/  144115188075855872
58/  288230376151711744
59/  576460752303423488
60/ 1152921504606846976
61/ 2305843009213693952
62/ 4611686018427387904
63/ 9223372036854775808
64/18446744073709551616


also by looking a bit around seems like pic s9(xx) with xx greater than 18
might work only for not binary

it would be worth trying with an usigned representation
pic 9(19) binary, since in this case it is a binary handle the sign would be irrelevant
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2565
Location: italy

PostPosted: Tue Jun 10, 2008 10:03 pm    Post subject: Reply to: Can I declare S9(19) in cobol
Reply with quote

just to sum up things, the answer to the O/P ( original post) seems to be,
YES, but not for BINARY

as I said before since the sign is irrelevant I would try with "PIC 9(19)"

but, it would have been nicer on Your side to say from the beginning that
You were also specifying BINARY without us having to click around icon_smile.gif
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 962
Location: Virginia, USA

PostPosted: Tue Jun 10, 2008 11:11 pm    Post subject: Re: Reply to: Can I declare S9(19) in cobol
Reply with quote

enrico-sorichetti wrote:
just to sum up things, the answer to the O/P ( original post) seems to be,
YES, but not for BINARY

as I said before since the sign is irrelevant I would try with "PIC 9(19)"

but, it would have been nicer on Your side to say from the beginning that
You were also specifying BINARY without us having to click around icon_smile.gif


I told him that earlier
Quote:
For Enterprise COBOL

For binary items, the number of digit positions must range from 1 through 18 inclusive. For packed decimal and zoned decimal items the number of digit positions must range from 1 through 18, inclusive, when the ARITH(COMPAT) compiler option is in effect, or from 1 through 31, inclusive, when the ARITH(EXTEND) compiler option is in effect.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2565
Location: italy

PostPosted: Wed Jun 11, 2008 12:03 am    Post subject: Reply to: Can I declare S9(19) in cobol
Reply with quote

Hi Craq

I had missed Your quote from the manual ,
repeat things does not hurt anyway

and at the time of Your post the TS had not posted the link to the declaration
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 HoursGoto page Previous  1, 2
Page 2 of 2