View previous topic :: View next topic
|
Author |
Message |
seenivasakan Currently Banned New User
Joined: 13 May 2007 Posts: 13 Location: Karnataka
|
|
|
|
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 |
|
|
surya anem
New User
Joined: 20 Dec 2007 Posts: 54 Location: Hyderabad
|
|
|
|
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 |
|
|
seenivasakan Currently Banned New User
Joined: 13 May 2007 Posts: 13 Location: Karnataka
|
|
|
|
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 |
|
|
karthikraman_m
New User
Joined: 10 Jun 2005 Posts: 12 Location: India
|
|
|
|
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 |
|
|
|