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

MOVE SPACES TO variable-what does it mean


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

New User


Joined: 16 Jul 2006
Posts: 21
Location: delhi

PostPosted: Fri Oct 20, 2006 8:45 pm
Reply with quote

MOVE SPACES TO variable-what is actually happenning here
Back to top
View user's profile Send private message
mkarmegam

New User


Joined: 28 May 2006
Posts: 13
Location: USA

PostPosted: Fri Oct 20, 2006 8:57 pm
Reply with quote

Let us say you have declared a variable WS-COUNTRY PIC X(25).
The WS-COUNTRY has value 'CHINA' in it. You just want to flush out and replace with spaces. Then you just do MOVE SPACES TO WS-COUNTRY. Now the value of WS-COUNTRY is SPACES. I am thinking the question may not be as simple as I answered here.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Oct 20, 2006 10:27 pm
Reply with quote

Hi There,

To initialize the variable we used to move spaces to the variable otherwise it will contain junk value.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top