View previous topic :: View next topic |
Author |
Message |
hc_family Beginner
Joined: 09 Feb 2016 Posts: 3 Topics: 1
|
Posted: Tue Feb 09, 2016 3:39 pm Post subject: Need add one record on the top of file |
|
|
Hi,
I need add one below record start record 1 column 1 in a file:
PatientReport02092016
The 02092016 is current date, the format is mmddyyyy.
Would you please help me to do this task?
Thank you so much! I appreciate it very much!
Helen |
|
Back to top |
|
|
hc_family Beginner
Joined: 09 Feb 2016 Posts: 3 Topics: 1
|
Posted: Tue Feb 09, 2016 3:44 pm Post subject: |
|
|
Add more detail:
The file has already has data:
xxxxxxxxx
xxxxxxxxx
.....
Need add one record above the first original record:
PatientReport02092016
xxxxxxxxx
xxxxxxxxx
...
...
Should I use SYNSNCSORT or IEBGENER, or other Utilities?
Thank you so much!!!
Helen |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12359 Topics: 75 Location: San Jose
|
Posted: Tue Feb 09, 2016 3:45 pm Post subject: |
|
|
hc_family,
Use the following DFSORT JCL which will give you the desired results
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
----+----1----+----2----+----3----+----4----
A
B
C
D
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
HEADER1=('PatientReport',DATENS=(MD4))
//* |
The output from the above job is
Code: |
PatientReport02092016
A
B
C
D
|
_________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
hc_family Beginner
Joined: 09 Feb 2016 Posts: 3 Topics: 1
|
Posted: Tue Feb 09, 2016 4:21 pm Post subject: |
|
|
YEAH!!! It worked. Thank you so much!!!
Helen |
|
Back to top |
|
|
|
|