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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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