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

Inserting a line of text along with appending 2 datasets


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Fri Sep 10, 2010 2:02 pm
Reply with quote

Hello,

I am trying to append one dataset to another using IEBGENER.

Code:
//STEP020  EXEC PGM=IEBGENER                             
//SYSUT1   DD DSN=&&TEMPOUT,DISP=SHR                       
//         DD DSN=&&TEMPERR,DISP=SHR                       
//SYSUT2   DD DISP=(,PASS),DSN=&&FINALOUT,           
//            UNIT=SYSDA,                               
//            LABEL=RETPD=1,                           
//            SPACE=(80,(1,1),RLSE,,ROUND),AVGREC=K,   
//            LRECL=80,RECFM=FB,DSORG=PS               
//SYSPRINT DD SYSOUT=*                                   
//SYSIN    DD DUMMY


But I want to insert a line of text before this appending happens. Is it possible ?

eg:-
FIle 1 contents
Inserted line of text
File 2 contents
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Sep 10, 2010 2:06 pm
Reply with quote

Yes, of course it is

Please learn to use the code tags, as shown below. Your post has been amended.
Code:
 [code] your post goes here [/code]
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Fri Sep 10, 2010 3:22 pm
Reply with quote

hi,

thanks i will take care of this..but how to a text line between file1 content and file2 content ?

eg:
File 1
-------
abcd

File 2
-------
defg

Text line - ghij

The output dataset should look like
abcd
ghij
defg
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Sep 10, 2010 3:34 pm
Reply with quote

Appu wrote:
hi,

thanks i will take care of this..but how to a text line between file1 content and file2 content ?

eg:
File 1
-------
abcd

File 2
-------
defg

Text line - ghij

The output dataset should look like
abcd
ghij
defg


The concept is known as concatenation:
Code:

//SYSUT1 DD DSN=FILE1,DISP=...
//       DD *
GHIJ
/*
//       DD DSN=FILE2,DISP=...
Back to top
View user's profile Send private message
Appu

New User


Joined: 26 Apr 2010
Posts: 73
Location: India

PostPosted: Fri Sep 10, 2010 4:26 pm
Reply with quote

Many thanks :-)
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts TEXT-TO-PDF Compuware & Other Tools 1
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
Search our Forums:

Back to Top