MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how many bytes did S99V999 COMP-3 will take?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
sivaraj.ramaraj
Beginner


Joined: 05 Sep 2007
Posts: 5
Topics: 3

PostPosted: Wed Aug 13, 2008 12:03 pm    Post subject: how many bytes did S99V999 COMP-3 will take? Reply with quote

how many bytes did S99V999 COMP-3 will take?
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Wed Aug 13, 2008 12:23 pm    Post subject: Reply with quote

Have you tried looking in the COBOL manual? 3 Bytes.
Back to top
View user's profile Send private message
sivaraj.ramaraj
Beginner


Joined: 05 Sep 2007
Posts: 5
Topics: 3

PostPosted: Wed Aug 13, 2008 1:20 pm    Post subject: Reply with quote

yah , i looked into the manuls but i thought it will count 'S' also so 6/2+1=4 bytes
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 13, 2008 1:28 pm    Post subject: Reply with quote

sivaraj.ramaraj,

how did you count 6 in 99V999 ? The decimal point is NOT stored

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sivaraj.ramaraj
Beginner


Joined: 05 Sep 2007
Posts: 5
Topics: 3

PostPosted: Wed Aug 13, 2008 1:33 pm    Post subject: Reply with quote

Hi Kolusu,
i didn't count the decimal part ,but i hve counted the 'S' bit
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Thu Aug 14, 2008 12:57 am    Post subject: Reply with quote

S99V999 gives 6 hex characters, 5 digits, 1 sign, which in turn gives a total of 3 bytes.
Back to top
View user's profile Send private message Visit poster's website
sivarao
Beginner


Joined: 21 Aug 2008
Posts: 6
Topics: 1

PostPosted: Mon Aug 25, 2008 11:55 pm    Post subject: Reply with quote

S99V999-it will occupy 3 bytes.
S99V999- 5 digits and 'V' is a suumed decimal point it will not occupy any memory.

Let me know if you have any doubt.
Back to top
View user's profile Send private message
Santlou
Beginner


Joined: 18 Apr 2007
Posts: 21
Topics: 4
Location: sw florida

PostPosted: Mon Sep 01, 2008 9:23 pm    Post subject: Reply with quote

An easy way to remember is to take the number of digits (not including the sign or implied decimal), then divide that number by 2, drop the remainder (if any) and add 1.

Example:

s9(2)V999

there are 5 digits here, so 5 / 2 = 2.5
drop the remainder (.5) = 2
Add 1 (2 + 1) = 3

This is for Packed (COMP-3) fields.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group