IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Difference between 9(9) and s9(9) ??


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri May 14, 2010 10:11 am
Reply with quote

Dear Experts,

Can you please let me know the actual difference between the picture clauses 9(9) and S9(9)
How many bytes each will occupy ?
How will the sample data in each case ?
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri May 14, 2010 11:13 am
Reply with quote

icon_rolleyes.gif

Hi MKK,

Am sure you will get the necessary details from the Manuals icon_exclaim.gif icon_exclaim.gif
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri May 14, 2010 3:14 pm
Reply with quote

Hi Binop B,

I didn't find any from the manual. Can you please explain.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri May 14, 2010 3:26 pm
Reply with quote

Hi MKK,

Where all did u search in the manual ... icon_evil.gif

Hope this link will help you ....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Fri May 14, 2010 4:20 pm
Reply with quote

You are not specifying nearly enough information to answer your question. Are you looking at USAGE DISPLAY variables? USAGE COMP? USAGE COMP-3? Each of these will store a 9-digit numeric variable in a different number of bytes and the sign storage varies as well.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri May 14, 2010 7:09 pm
Reply with quote

Robert,

I'm talking about 9(9) and S9(9) USAGE DISPLAY
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri May 14, 2010 7:14 pm
Reply with quote

hoping you got the information you were after from the link provided ... icon_confused.gif
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Fri May 14, 2010 7:22 pm
Reply with quote

mkk157 wrote:
Robert,

I'm talking about 9(9) and S9(9) USAGE DISPLAY


After many hours of studying the RTFM I have concluded that 9(9) will always be treated as a positive number and s9(9) may be either positive or negative.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri May 14, 2010 8:14 pm
Reply with quote

Will S9(9) occupy 9 bytes or 10 bytes ??
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri May 14, 2010 8:22 pm
Reply with quote

lvl-num reference-name pic s9(9) usage display.

will occupy 9 bytes.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri May 14, 2010 8:25 pm
Reply with quote

mkk157 wrote:
Will S9(9) occupy 9 bytes or 10 bytes ??


I think you're thinking of SIGN LEADING SEPARATE.

The last byte will contain a value in the range of X'C0' through X'C9' (Positive) or in the range of X'D1' through X'D9' (Negative).

If it were unsigned, the last byte would contain a value in the range of X'F0' through X'F9'.

Please make an effort and review the manuals beforehand as you seem to be struggling with this and it irritates most of us that you expect the answer as some sort of entitlement.

Bill
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Fri May 14, 2010 9:28 pm
Reply with quote

Thanks everyone and sorry for inconvenience caused.
Back to top
View user's profile Send private message
anshuljain26

New User


Joined: 04 Apr 2010
Posts: 37
Location: Chandigarh

PostPosted: Sat May 15, 2010 11:49 pm
Reply with quote

[confused]
I enquire, are you clear with usage of s over here?

s is used to store the sign bit.
Therefore, as Craq Giegerich has posted its absolutely correct.

[wink]

One more addition to that reply is that if you display s9(9) the last bit will get corrupted where as in 9(9) it won't because to display s9(9) you need edited picture clause.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Sun May 16, 2010 12:04 am
Reply with quote

Hello,

Quote:
if you display s9(9) the last bit will get corrupted
There is no corruption - that is the displayable value of the signed digit. . .
Back to top
View user's profile Send private message
anshuljain26

New User


Joined: 04 Apr 2010
Posts: 37
Location: Chandigarh

PostPosted: Sun May 16, 2010 12:07 am
Reply with quote

[apologies]

Wrong word used!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Difference between joblib and steplib JCL & VSAM 2
No new posts Pull data using date difference betwe... DB2 6
No new posts Difference between PLT txn and schedu... CICS 3
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
Search our Forums:

Back to Top