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
 

 

Insert a line into a dataset using EXECIO

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

Active User


Joined: 02 Jan 2009
Posts: 114
Location: Hyderabad

PostPosted: Wed Mar 03, 2010 5:14 pm    Post subject: Insert a line into a dataset using EXECIO
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: 8593
Location: Back in jolly old England

PostPosted: Wed Mar 03, 2010 5:16 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Mar 03, 2010 5:36 pm    Post subject: Reply to: Insert a line into a dataset using EXECIO
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: 114
Location: Hyderabad

PostPosted: Wed Mar 03, 2010 8:37 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Mar 03, 2010 8:48 pm    Post subject:
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    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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm


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