View previous topic :: View next topic
|
Author |
Message |
rsm_deepak
New User
Joined: 06 Apr 2005 Posts: 30 Location: visakhapatnam
|
|
|
|
************************************************
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|