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 Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 2 Wed Mar 22, 2017 7:46 am
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm


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