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

PIC S99V9 USAGE COMP-3 VS PIC -ZZ.9.


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

New User


Joined: 25 Aug 2008
Posts: 25
Location: china

PostPosted: Tue Sep 23, 2008 9:08 am
Reply with quote

Hi guys:
I have one easy question.
Code:

01 w-rec.
        05 W-REC-1 PIC S99V9 USAGE COMP-3.
        05 FILLER  PIC X(03).
01 W-OUT.
     05 W-OUT-1 PIC -ZZ.9.
     05 FILLER PIC X(03).


How many bytes does S99V9 and -ZZ.9 occupy?
Can I move w-rec to w-out directly?

Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Sep 23, 2008 10:39 am
Reply with quote

Hello,

This is basically the same thing you asked about here:
ibmmainframes.com/viewtopic.php?p=154673&highlight=#154673

Quote:
Can I move w-rec to w-out directly?
The compiler will allow the move. It will not do the move that you want (similar to the display that did not do what you wanted in the linked topic).

Quote:
How many bytes does S99V9 and -ZZ.9 occupy?
I suspect you really mean s99v9 comp-3 icon_confused.gif The first should take 2 bytes (if comp-3) and the second 5 bytes. If you run a compile, you will see the lengths in the compile output.
Back to top
View user's profile Send private message
linc

New User


Joined: 25 Aug 2008
Posts: 25
Location: china

PostPosted: Tue Sep 23, 2008 10:43 am
Reply with quote

thanks.It's very useful.
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 COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts STEM usage in REXX CLIST & REXX 14
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
Search our Forums:

Back to Top