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
 

 

How to combine data in a Group variable?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Mon Aug 06, 2007 10:05 am    Post subject: How to combine data in a Group variable?
Reply with quote

Hi,

I have a group item like this,

01 NAMES
05 NAME1 PIC X(20) VALUE 'BOBY'
05 NAME2 PIC X(20) VALUE 'JOHN'
05 NAME3 PIC X(30) VALUE 'DAVE'

Now if I display NAMES it will be 'BOBY<16spaces>JOHN<16spaces>DAVE<26spaces>'

I want this to be displayed as 'BOBY<1space>JOHN<1space>DAVE<1space>

How to do this? please help me out in this,

Thanks in advance,
Sakthivel

icon_smile.gif

Please don't use urgent ******* in the title.
Back to top
View user's profile Send private message

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Aug 06, 2007 10:06 am    Post subject:
Reply with quote

Sakthi,

Use string handling commands.
Back to top
View user's profile Send private message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Mon Aug 06, 2007 10:41 am    Post subject: Re: How to combine data in a Group variable? Urgenttt*******
Reply with quote

Murali,

I have few commands like 'STRING' in my mind. But I dont know how to code for this requirement icon_sad.gif . Could you please help me out in this with the actual code?? icon_question.gif

Thanks,
Sakthivel.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Mon Aug 06, 2007 10:48 am    Post subject:
Reply with quote

Sakthi,

I suggest go through the manual -

http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/IGYLR205/6.2.37?DT=20000927030801
Back to top
View user's profile Send private message
Santoshdorge

New User


Joined: 27 Jun 2006
Posts: 48
Location: Pune

PostPosted: Mon Aug 06, 2007 11:08 am    Post subject:
Reply with quote

Hi
Try using

String Name1 delimitted by spaces
ws-space delimitted by size
Name2 delimitted by spaces
ws-space delimitted by size
Name3 delimitted by spaces
into ws-name
end-string.


Thanx,
Santosh.
Back to top
View user's profile Send private message
sakthi_ksv

New User


Joined: 20 Jul 2006
Posts: 48
Location: Chennai

PostPosted: Mon Aug 06, 2007 11:11 am    Post subject: Re: How to combine data in a Group variable? Urgenttt*******
Reply with quote

Thanks Murali/Santhosh.

Thanks a Ton.


Thanks and Regards,
Sakthivel
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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