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

how to join two lines using rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top