View previous topic :: View next topic
|
Author |
Message |
narasimha.g
New User
Joined: 10 Sep 2009 Posts: 68 Location: Liverpool
|
|
|
|
Hi
I have a string which is of cretain length with embedded spaces. I have to take the first 11 characters.
Eg. Input - Program Analysis --> output should be - Program Ana
Can u pls suggest how to do this |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
See reference modification in the Language Reference Manual. |
|
Back to top |
|
|
narasimha.g
New User
Joined: 10 Sep 2009 Posts: 68 Location: Liverpool
|
|
|
|
Hi
Im very new to this forum.. can u please give me the link of the manual |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Click IBM Manuals at the top of the screen. |
|
Back to top |
|
|
narasimha.g
New User
Joined: 10 Sep 2009 Posts: 68 Location: Liverpool
|
|
|
|
I used referance modification as shown below.
MOVE WS-STRING (1:11) TO WS-SUB-STRING
where WS-STRING = program mn454
but the o/p was WS-SUB-STRING = MN4
can u pls help me in solving this. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
In order for us to help, you need to copy/paste the exact field definitions and all relevant code. Add a display statement to show the contents of WS-SUB-STRING after the MOVE. |
|
Back to top |
|
|
|