View previous topic :: View next topic
|
Author |
Message |
FWY Currently Banned New User
Joined: 23 Oct 2006 Posts: 10
|
|
|
|
01 CTLRMTFL-SERIALNO.
49 CTLRMTFL-SERIALNO-LEN
PIC S9(4) USAGE COMP.
49 CTLRMTFL-SERIALNO-TEXT
PIC X(15).
01 CTLRMTFL-PAGESERIAL PIC S9(12)V USAGE COMP-3.
Now we
MOVE CTLRMTFL-SERIALNO-TEXT(4:CTLRMTFL-SERIALNO-LEN - 3)
TO CTLRMTFL-PAGESERIAL.
Will we meet problem on this? |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi FWY
If the data contained in the variable CTLRMTFL-SERIALNO-TEXT is always of length = 15,it wont create any problem.
Thanks
Arun |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Quote: |
01 CTLRMTFL-PAGESERIAL PIC S9(12)V USAGE COMP-3. |
You declared this variable as numeric
Quote: |
MOVE CTLRMTFL-SERIALNO-TEXT(4:CTLRMTFL-SERIALNO-LEN - 3)
TO CTLRMTFL-PAGESERIAL. |
and moving a alphanumeric variable
The compilation of the program will be sucessfull but i dont think you will get the result that you expected at the runtime |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Hi
It will surely give the desired result presuming CTLRMTFL-SERIALNO-TEXT is having numeric data from posn 4 to 15.
Thanks
Arun |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
Yes, With that assumption it is a working one |
|
Back to top |
|
|
sankar_MF
New User
Joined: 19 Sep 2006 Posts: 29
|
|
|
|
Hi,
The code will work fine. It will give result without any abend. |
|
Back to top |
|
|
|