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

Move S9(07) to S9(07)V99


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

New User


Joined: 20 Oct 2006
Posts: 29

PostPosted: Thu Feb 13, 2014 2:24 am
Reply with quote

Hi

I have a requirement where I need to move S9(07) to S9(07)V99.
The receiving should have interger value get from sending variable and two decimal places as zeros.

S9(07) value 00001234
S9(07)V99 value 00001234.00

Please let me know how to do this
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Thu Feb 13, 2014 2:40 am
Reply with quote

Note that V is an implied decimal point; whilst it will align properly, it will not display a decimal point glyph. To do so, define your second variable a PICTURE of S9(8).99, and simply move the first variable to the second.
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: Thu Feb 13, 2014 8:47 pm
Reply with quote

Hello,

What does redefining 2 different length fields accomplish?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Feb 13, 2014 9:48 pm
Reply with quote

Why do you not think the MOVE statement will do what you want?
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 How to move the first field of each r... DFSORT/ICETOOL 5
No new posts How to move DB2 Installation HLQ DB2 4
No new posts How to move values from single dimens... COBOL Programming 1
No new posts Reading the CSV data in COBOL and mov... COBOL Programming 4
Search our Forums:

Back to Top