Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6970
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: 6970
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 Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts sharing PLI storage Pedro PL/I & Assembler 2 Mon Oct 16, 2017 10:11 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us