IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to combine data in a Group variable?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

PostPosted: Mon Aug 06, 2007 10:06 am
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
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: 1436
Location: Bangalore,India

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

Sakthi,

I suggest go through the manual -

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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top