Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 INVALID RECFM FOR DDNAME SYSLIN AND C... sandeep kumar302 All Other Mainframe Topics 7 Fri Apr 27, 2018 6:07 pm
No new posts Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts PARSE GDG name to separate generation... Abid Hasan SYNCSORT 2 Sun Feb 11, 2018 3:40 pm
No new posts Logic to skip Maximum time-stamp and ... vickey_dw DB2 2 Thu Feb 01, 2018 11:15 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us