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

Difference between pic 9(4)v99 and pic s9(4)v99 comp-3


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shivani97

New User


Joined: 01 Aug 2009
Posts: 1
Location: bangalore

PostPosted: Tue Aug 04, 2009 10:00 am
Reply with quote

Hi I have some question on comp-3.plz answer me.
1) what is difference between pic 9(4)v99 and pic s9(4)v99 comp-3.
2) what are valid moves to pic s9(4)v99 comp-3 variable.
for example: 1)if A is containing 4578.99,then MOVE A TO B.Is is correct or give error where B is pic s9(4)v99 comp-3.
2)Also MOVE 4578.99 TO B will give what value(same value or incorrect)
3)What will be answers of above if B is pic 9(4)v99.
I will be thankful if you answer my question.
SHIVANI
Back to top
View user's profile Send private message
Binop B

Active User


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

PostPosted: Tue Aug 04, 2009 10:16 am
Reply with quote

Hi Sivani,

What did the Manuals tell you... Did you have a look ??
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Aug 04, 2009 10:24 am
Reply with quote

As Binop suggests, see the COBOL Language Reference Manual.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 04, 2009 10:59 am
Reply with quote

Check below links...
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IGY3LR10/5.3.16.1?SHELF=&DT=20020920180651&CASE=

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IGY3PG20/1.3.4.7?SHELF=&DT=20040220035836&CASE=
Back to top
View user's profile Send private message
rexzone1

New User


Joined: 16 Dec 2006
Posts: 14
Location: Halifax, Canada

PostPosted: Tue Dec 15, 2009 12:26 am
Reply with quote

Hi Shivani,

Please find below the answers to your questions if you are not sure after reading the manuals above.

1) The difference between PIC 9(4)v99 and PIC S9(4)v99 comp-3 is only the memory occupied by both the fields. Your first field occupies 6 bytes where as the second field occupies 4 bytes.

2) You can move a normal decimal field PIC 9(4)V99 to COMP-3 field as well as PIC 9(4)V99 COMP to the COMP-3 field. You will get same value if you move 4578.99 to 9(4)V99 field.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Tue Dec 15, 2009 1:47 am
Reply with quote

rexzone1 wrote:
1) The difference between PIC 9(4)v99 and PIC S9(4)v99 comp-3 is only the memory occupied by both the fields. Your first field occupies 6 bytes where as the second field occupies 4 bytes.

Now obviously, that's wrong. What're two other differences?
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Dec 15, 2009 2:24 am
Reply with quote

Hint: The COBOL Language Reference Manual has the answer.
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top