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

Insert a line into a dataset using EXECIO


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Wed Mar 03, 2010 5:14 pm
Reply with quote

Hi,

I've searched the forum for such similar posts but couldn't find anything that matches my requirement.


I have a dataset as shown below
Code:

TABLE1
FIELD1   FIELD2
--------------
JOHN     123
MATHEW   234
..
..
..
TABLE2
FIELD1   FIELD2
--------------
PETER    123
ANNA    234


How can I insert a blankline just above the line TABLE2. The dataset contains data from two different tables, i need to insert a blank line between the two table's data using EXECIO (Macros not allowed).

Please suggest me a way out

Many thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 03, 2010 5:16 pm
Reply with quote

Read the file in.
Process each record.
When the required literal is found in the current line EXECIO a blank line before the EXECIO of the current line.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Mar 03, 2010 5:36 pm
Reply with quote

There's a similar example here.
Back to top
View user's profile Send private message
kranthikumarb

Active User


Joined: 02 Jan 2009
Posts: 115
Location: Hyderabad

PostPosted: Wed Mar 03, 2010 8:37 pm
Reply with quote

Hi Expat,

I can do it if the line to be inserted is next tothe literal that we are searching. But how do i insert a line before the literal. Can you please gimme some idea to proceed.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Mar 03, 2010 8:48 pm
Reply with quote

Did you click on the link given to you by Kevin.
If you read the code that he has posted there, 95% of your task is completed.
You will only need to change a line or two to get the desired result.
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top