future dating, not based on rundate



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

future dating, not based on rundate

Postby elpique » Tue Dec 02, 2008 10:05 pm

Hi.

I'd like to know how to use dsort/icetool future date based on a date in the record, not on the rundate. Specifically, I'd like to add 13 days to the date I receive on a given record. the input date is always in the same position, the output date (input + 13 days) will be in the same position as the input date. In this example, the date starts in position 4, format is YYYYMMDD.

e.g. input looks like

REC120081201DATAX
REC220081204DATAY
REC320081230DATAZ

output should be

REC120081214DATAX
REC220081217DATAY
REC320090112DATAZ

thanks!

Appreciate any help you can give.
elpique
 
Posts: 2
Joined: Fri Nov 14, 2008 10:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: future dating, not based on rundate

Postby Frank Yaeger » Tue Dec 02, 2008 11:52 pm

DFSORT does NOT have any built-in functions for doing that kind of date arithmetic.
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

Re: future dating, not based on rundate

Postby skolusu » Tue Oct 26, 2010 4:54 am

elpique,

With PTF UK90025 for z/OS DFSORT V1R10 and PTF UK90026 for z/OS DFSORT V1R12(Oct, 2010), DFSORT now supports date arithmetic which can add/subtract days, months or years to a given date like shown below.

//STEP0100 EXEC PGM=SORT                           
//SYSOUT   DD SYSOUT=*                             
//SORTIN   DD *                                   
----+----1----+----2----+----3----+----4----+----5-
REC120081201DATAX                                 
REC220081204DATAY                                 
REC320081230DATAZ                                 
//SORTOUT  DD SYSOUT=*                             
//SYSIN    DD *                                   
  SORT FIELDS=COPY                                 
  INREC OVERLAY=(5:5,8,Y4T,ADDDAYS,+13,TOGREG=Y4T)
//*


The output from the above is
REC120081214DATAX
REC220081217DATAY
REC320090112DATAZ



For complete details of date arithmetic functions and other new functions see "User Guide for DFSORT PTFs UK90025 and UK90026" paper (sortugph.pdf) at:

http://www.ibm.com/support/docview.wss? ... g3T7000242
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: future dating, not based on rundate

Postby elpique » Tue Oct 26, 2010 8:56 pm

Thank you!
elpique
 
Posts: 2
Joined: Fri Nov 14, 2008 10:03 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post