Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
SPLIT up of owrking storage variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
Mukesh.py
Currently Banned

New User


Joined: 22 Sep 2008
Posts: 17
Location: Chennai, India.

PostPosted: Fri Sep 26, 2008 5:46 pm    Post subject: SPLIT up of owrking storage variable
Reply with quote

Hi All, can anyone tell me how to split the following :

01 WS-1
02 ALPHANM PIC X(6) VALUES '123ABC'.
02 NUMBR PIC A(3).
02 CHCTR PIC 9(3).


NUMBR <- 123
CHCTR <- ABC

if the code is changed as , then will it make any difference for the
solution?
01 WS-1
02 ALPHANM PIC X(6) VALUES 'ABC123'.
02 NUMBR PIC A(3).
02 CHCTR PIC 9(3).
Requirement being the same.
NUMBR <- 123
CHCTR <- ABC
Regards,
Back to top
View user's profile Send private message
References
hchinnam

Active User


Joined: 18 Oct 2006
Posts: 68

PostPosted: Fri Sep 26, 2008 6:04 pm    Post subject:
Reply with quote

Do you know what your asking.

If yes, can explain us what you want to do? icon_question.gif icon_question.gif icon_question.gif
Back to top
View user's profile Send private message
Sambhaji
Warnings : 1

Active User


Joined: 16 Feb 2007
Posts: 268
Location: Pune, India

PostPosted: Fri Sep 26, 2008 6:04 pm    Post subject:
Reply with quote

Please try on your system and let us know too...
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1618
Location: germany

PostPosted: Fri Sep 26, 2008 6:13 pm    Post subject:
Reply with quote

Code:

01 WS-1
     02 ALPHANM PIC X(6) VALUES 'ABC123'.
     02 FILLER1 REDEFINES ALPHANM.
         03 NUMBR PIC X(3).           
         03 CHCTR PIC 9(3).
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1618
Location: germany

PostPosted: Fri Sep 26, 2008 6:16 pm    Post subject:
Reply with quote

sorry, did not realize you were as confused as your are.

this would be correct:
Code:

01 WS-1
     02 ALPHANM PIC X(6) VALUES 'ABC123'.
     02 FILLER1 REDEFINES ALPHANM.
         03 CHCTR PIC X(3).
         03 NUMBR PIC 9(3).           


CHCTR will contain ABC
NUMBR will contain 123.
Back to top
View user's profile Send private message
Mukesh.py
Currently Banned

New User


Joined: 22 Sep 2008
Posts: 17
Location: Chennai, India.

PostPosted: Fri Sep 26, 2008 6:56 pm    Post subject:
Reply with quote

Thanks dbzTHEdinosauer
I got the idea. icon_smile.gif
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1