Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

MOVE SPACES TO variable-what does it mean

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: MOVE SPACES TO variable-what does it mean
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    Post subject: Re: MOVE SPACES TO variable-what does it mean
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: 1187
Location: Bangalore,India

PostPosted: Fri Oct 20, 2006 10:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us