Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
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    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

hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

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
Escapa

Senior Member


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

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

Global Moderator


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

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

Global Moderator


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

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts GETMAIN / FREEMAIN versus STORAGE OBT... steve-myers PL/I & Assembler 8 Wed Feb 01, 2017 1:45 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us