View previous topic :: View next topic
|
Author |
Message |
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Appu
New User
Joined: 26 Apr 2010 Posts: 73 Location: India
|
|
|
|
Many thanks :-) |
|
Back to top |
|
|
|