Outrec fields and date



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

Outrec fields and date

Postby xcspg3 » Wed Mar 07, 2012 5:00 pm

Hi,
this is my question:
how to write for each output record the system date of the first record processed and not the date calculated for each record.
When I use
OUTREC FIELDS=(DATE=(DM4/),.....
I think that ICEMAN writes the system date for each record but I would like to find the date of the first record produced.

Thanks
Max.
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Outrec fields and date

 

Re: Outrec fields and date

Postby skolusu » Wed Mar 07, 2012 10:31 pm

xcspg3,

If your intention is push the date on the very first record on to the other records then you need to use WHEN=GROUP. Check this

//STEP0100 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                           
----+----1----+----2----+----3----+----4----+----5----+---
2012-03-07         APPLE IPAD3                           
RECORD-1                                                 
RECORD-2                                                 
RECORD-3                                                 
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                       
  INREC IFOUTLEN=80,                                     
  IFTHEN=(WHEN=INIT,OVERLAY=(81:SEQNUM,8,ZD,20,10)),     
  IFTHEN=(WHEN=GROUP,BEGIN=(81,8,ZD,EQ,1),PUSH=(20:1,10)),
  IFTHEN=(WHEN=(81,8,ZD,EQ,1),OVERLAY=(20:89,10))         
//*


The output of this is
2012-03-07         APPLE IPAD3
RECORD-1           2012-03-07 
RECORD-2           2012-03-07 
RECORD-3           2012-03-07 
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Outrec fields and date

Postby Frank Yaeger » Thu Mar 08, 2012 12:18 am

Max,

It's not really clear to me what you're asking. Maybe Kolusu has interpreted correctly. However, ...

   OUTREC FIELDS=(DATE=(DM4/),.....


will put the SAME date in EVERY record. DFSORT's date functions use the start date for the run - DFSORT does not calculate a "new" date for each record. for example, if the job starts on 03/07/2012 and runs past midnight (=03/08/2012), the date used will still be 03/07/2012 (the date when the run started).

If Kolusu and/or I have not answered your question, then you need to state it more clearly.
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: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: Outrec fields and date

Postby xcspg3 » Sun Mar 11, 2012 11:19 pm

Frank your answer is what I asked: I thought the date was variable during outrec fields...

Thanks

Max
xcspg3
 
Posts: 29
Joined: Tue Sep 25, 2007 6:34 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post