View previous topic :: View next topic
|
Author |
Message |
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi ALL,
I want to create an output file which contains a single record repeated n no of times. Also the record to be repeated is known.
eg. The output file should look like
This is a record
This is a record
This is a record
.
.
N no of times.
Can this be achieved by DFSORT or ICETOOL?
--Parag |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Have you looked at the REPEAT parameter, it can be used to repeat each output record a specified number of times. |
|
Back to top |
|
|
ParagChouguley
Active User
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
|
|
|
|
Hi William,
Thanks for your reply.
Got the soln. Is there any better way to this ?
Code: |
//ABCD EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
/*
//OUT1 DD DSN=Output file name
//SYSIN DD *
OPTION COPY
OUTFIL FNAMES=OUT1,
REPEAT=10,
BUILD=(C'THIS IS MY RECORD')
/*
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Is there any better way to this ? |
Better how? What's wrong with that way of doing it?
You could put a THIS IS MY RECORD record in SORTIN and just do REPEAT=10 without the BUILD but I'm not sure whether or why you would consider that a better way. |
|
Back to top |
|
|
|