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 a X(56) to b X(75) will the last 19 bytes have spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rsm_deepak

New User


Joined: 06 Apr 2005
Posts: 31
Location: visakhapatnam

PostPosted: Tue Jul 21, 2009 12:12 pm    Post subject: move a X(56) to b X(75) will the last 19 bytes have spaces
Reply with quote

************************************************

There is a field from database which is
ABC-250 PIC X(75).
and having the value 'XXXXXXXXXXXXXXXXXX' in the last 19 bytes.


Now I doesn't want to have 'XXXXXXXXXXXXXXXXXX' in the last 19 bytes.

************************************************


So I declare

01 WS-ABC-250.
05 WS-ABC-250-ACTUAL PIC X(56) VALUE SPACES.
05 WS-ABC-250-ABND-MSG PIC X(19) VALUE
'XXXXXXXXXXXXXXXXXX'.


MOVE ABC-250 TO WS-ABC-250.
MOVE WS-ABC-250-ACTUAL TO ABC-250.

Surprisingly I didn't get 'XXXXXXXXXXXXXXXXXX' in ABC-250.

So even without moving spaces to WS-ABC-250-ABND-MSG
I am not getting 'XXXXXXXXXXXXXXXXXX' . This was tested many a times.

My question is when moving a 56 byte to 75 byte(as stated from the above situation) will the last 19 byte will be overidden as spaces or not?
Back to top
View user's profile Send private message

dick scherrer

Site Director


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

PostPosted: Tue Jul 21, 2009 9:17 pm    Post subject:
Reply with quote

Hello,

At the top of the page is a link to "IBM Manuals". Among them are multiple COBOL Language Reference manuals. Pick the one your system uses.

Suggest you look up the operation of a MOVE statement.

Quote:
Surprisingly I didn't get 'XXXXXXXXXXXXXXXXXX' in ABC-250.
Should be No Surprise.

The spaces are correct. . . .
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 Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
This topic is locked: you cannot edit posts or make replies. Alphanumeric to Numeric move on UNIX mistah kurtz COBOL Programming 16 Wed Jul 27, 2016 8:47 pm


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