IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SPLIT up of owrking storage variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
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
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
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Fri Sep 26, 2008 6:04 pm
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
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

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

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 26, 2008 6:13 pm
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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Sep 26, 2008 6:16 pm
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
Reply with quote

Thanks dbzTHEdinosauer
I got the idea. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts CICS vs LE: STORAGE option CICS 0
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top