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

How to create output file using DFSORT ?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Mon May 14, 2007 5:05 pm
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon May 14, 2007 5:36 pm
Reply with quote

Have you looked at the REPEAT parameter, it can be used to repeat each output record a specified number of times.
Back to top
View user's profile Send private message
ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Mon May 14, 2007 6:00 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon May 14, 2007 8:43 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top