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

Move s9(5) to 9(5) in COBOL


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

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Sat May 24, 2008 5:00 pm
Reply with quote

Hi,

i have declaration like

Var1 pic s9(5) value +12345
Var2 pic 9(5).

move var1 to var2.

What will be the value in Var2. I have a doubt whether s9(5) occupies 5 bytes or 6 bytes. pls help
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat May 24, 2008 5:47 pm
Reply with quote

Prabha wrote:
What will be the value in Var2.
The same value except the sign nibble will be forced to "F" instead of the original "C"...
Quote:
I have a doubt whether s9(5) occupies 5 bytes or 6 bytes. pls help
Why, because of the "+"?
The sign is stored in the front nibble of the last digit.
var1 is X'F1F2F3F4C5'
var2 is X'F1F2F3F4F5' after the move
Back to top
View user's profile Send private message
Prabha
Warnings : 2

New User


Joined: 05 Dec 2005
Posts: 79

PostPosted: Sun May 25, 2008 7:38 pm
Reply with quote

Thank for yr help!!

IF it - (minus) also, C will b changed to F??

Pls let me know s9(5) occupies how many bytes??
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun May 25, 2008 7:56 pm
Reply with quote

Prabha wrote:
IF it - (minus) also, C will b changed to F??
If it is negative, the D will be changed to F.
X'F1F2F3F4D5' to X'F1F2F3F4F5'
Quote:
Pls let me know s9(5) occupies how many bytes??

s9(5) is five bytes.
9(5) is five bytes.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top