Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Maximum number digits in COMP-3

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
fayum

New User


Joined: 27 Feb 2004
Posts: 2
Location: chennai

PostPosted: Fri Feb 27, 2004 8:46 pm    Post subject: Maximum number digits in COMP-3
Reply with quote

in comp3 what is the maximum number digits that can be decalred like s9(?)comp3[/b]
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 28, 2004 5:28 am    Post subject:
Reply with quote

Hi Fayum,

Ignoring the remainder:

The # of bytes = ? / 2 + 1

For example: # of bytes in S9(5) = 5 / 2 = 2 remainder 1
= 2 +1
= 3

For example: # of bytes in S9(4) = 4 / 2 = 2 remainder 0
= 2 +1
= 3

What this tells us is to use an odd # of 9s in the PIC. It gives you more bang for the byte and its more efficient too.

HTH, Jack.
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1203
Location: India

PostPosted: Sat Feb 28, 2004 9:59 am    Post subject: Re
Reply with quote

Hai,

Great jack! I will summarize your post...

Quote:
s9(?)comp3


The answer for your ? is 18 in VS COBOL II*
* (It's depending on the compiler)
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 29, 2004 10:14 am    Post subject:
Reply with quote

Oops, looks like I misread the question. icon_redface.gif

Jack
Back to top
View user's profile Send private message
badal_mainframe

New User


Joined: 10 Aug 2004
Posts: 7

PostPosted: Wed Aug 11, 2004 4:14 pm    Post subject:
Reply with quote

COMP-3 CAN BE DEFINED AS 77 A PIC S9(18) COMP-3 BUT IT AGAIN DEPENDS UPON COMPILERS INSTALLATION
Back to top
View user's profile Send private message
sandip_datta

Active User


Joined: 02 Dec 2003
Posts: 151
Location: Tokyo, Japan

PostPosted: Wed Aug 11, 2004 7:58 pm    Post subject:
Reply with quote

In addition to Macmillan, if you consider compiler option ARTITH then -
ARITH(compressed) - Default - Max length of numeric item is 18
ARITH(Extend) - Max length of numeric item is 32

Regards,
Sandip.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts what is meaning of the number in dcl Martylin PL/I & Assembler 2 Thu Mar 09, 2017 7:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts GDG version number PANDU1 JCL & VSAM 4 Sat Mar 04, 2017 8:28 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us