Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 4650
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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us