View previous topic :: View next topic
|
Author |
Message |
Niki
Active User
Joined: 20 Sep 2008 Posts: 106 Location: Bangalore
|
|
|
|
Hi all.
I am having an input file of LRECL = 80,
Code: |
----+----1----+----2----+----3----+----4----+--
12354 asdasdasd5 a asdasdad
123453 dfadasd
sdaadadsdada
|
I want to add a line "I am a Good Girl" at the top ( First line of the PS FILE ), irrespective of any condition.
So my output will come as below,
Code: |
----+----1----+----2----+----3----+----4----+--
I am a Good Girl
12354 asdasdasd5 a asdasdad
123453 dfadasd
sdaadadsdada
|
Could you guys please provide some Sort card to do the Same.
Thanks in advance. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
You don't really even need SORT -- a simple concatenation and copy will do it:
Code: |
//STEP1 EXEC PGM=IEBGENER,REGION=6M
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *,DCB=BLKSIZE=????
I AM A GOOD GIRL
/*
// DD DISP=SHR,DSN=<old file name>
//SYSUT2 DD DSN=<new file name> ... |
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Quote: |
Could you guys please provide some Sort card to do the Same. |
A simple sort copy with a HEADER1 should do the trick. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Niki,
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
OUTFILE REMOVECC,
HEADER1=('I am a Good Girl')
/*
|
|
|
Back to top |
|
|
|