SORT - Multiple Records



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

SORT - Multiple Records

Postby Vineet » Thu Jan 06, 2011 6:28 pm

I have a Sequential File having Length = 80, RECFM=FB. File has only One Record. My Requirement is using SORT I want to have Same Record (Input File Record) To be written 100 Times in the Output File & with Each Record there should be an Associated Sequence Number. Below is Format of I/P File & O/P File.

Input File:
00000000166100012003-03-31-14.08.04.740000A2010-10-11Y

Output File:
00000000166100012003-03-31-14.08.04.740000A2010-10-11Y 0001
00000000166100012003-03-31-14.08.04.740000A2010-10-11Y 0002
00000000166100012003-03-31-14.08.04.740000A2010-10-11Y 0003
00000000166100012003-03-31-14.08.04.740000A2010-10-11Y 0004
.....
.....
.....
.....
00000000166100012003-03-31-14.08.04.740000A2010-10-11Y 0100

Here In O/P File 0001,0002,0003,0004 ............. 0100 is SEQUENCE NUMBER.

Note: O/P File has Same Attribute as I/P File I.e. LRECL = 80, RECFM = FB.

Vineet Anand
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT - Multiple Records

Postby NicC » Thu Jan 06, 2011 8:03 pm

And if DFSORT cannot do it (it most likely can - all you need to do is look up the manual) what then with your requirement? That is...WHY does it HAVE to be SORT?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: SORT - Multiple Records

Postby Vineet » Thu Jan 06, 2011 8:10 pm

Hi NicC,

Same Activity I can do by writing a Program. I am specifically looking for SORT to do the required activity. can U provide me URL or the manual or any sample JCL.

Thanks.
Vineet
 
Posts: 86
Joined: Tue Jun 19, 2007 11:38 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT - Multiple Records

Postby Frank Yaeger » Thu Jan 06, 2011 11:30 pm

Here's a DFSORT job that will do what you asked for:

//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
  OUTFIL REPEAT=100,OVERLAY=(56:SEQNUM,4,ZD)
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080

Please don't both post a question on a help board and send me the same question via e-mail. Do one or the other, but not both.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post