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 join two lines using rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
seenivasakan
Currently Banned

New User


Joined: 13 May 2007
Posts: 13
Location: Karnataka

PostPosted: Thu Mar 27, 2008 11:20 am    Post subject: how to join two lines using rexx
Reply with quote

HI All,

i have a requirement to join two lines using rexx. if we view the copybook in File aid then it is displayed in below format when variable name is large. please refer the code below.

3 WST-EBH-AMEX-AREA GROUP 52 38 47 10
4 WST-EBH-AMEX-FORMAT-CODE
XX 53 38 39 2

My rexx code should trace third line(Split line) and place the split line data in the original line (second line) in some PDS. I dont know how to trace the split lines. Any idea regarding this matter would be appreicated.
Back to top
View user's profile Send private message

surya anem

New User


Joined: 20 Dec 2007
Posts: 54
Location: Hyderabad

PostPosted: Thu Mar 27, 2008 11:48 am    Post subject:
Reply with quote

Hi,
In general every copy book line ends with a period. So just check for a period in the current line and if u dont find a period in the current line then read the next line and use concatenation operator to append the next line to the current line.
Repeat this process till u get a period

Thanks
surya
Back to top
View user's profile Send private message
seenivasakan
Currently Banned

New User


Joined: 13 May 2007
Posts: 13
Location: Karnataka

PostPosted: Thu Mar 27, 2008 12:52 pm    Post subject: Reply to: how to join two lines using rexx
Reply with quote

thanks surya anem for your suggestion.

But the copybook in file aid doesnot end with any period or something. So i have decided to check each line for STARTING SPACES(upto some predefined bytes). if i found that then i can decide that as Split line. But i am confused how to check for the starting spaces.

Any suggestions?....
Back to top
View user's profile Send private message
karthikraman_m

New User


Joined: 10 Jun 2005
Posts: 12
Location: India

PostPosted: Tue Apr 01, 2008 7:24 pm    Post subject:
Reply with quote

If 'XX' is going to be displayed in all the split lines, parse the line and check for the occurrence of 'XX' in the first word.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


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