sort card for gaetting date in yymm format



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

sort card for gaetting date in yymm format

Postby cbhargavi » Thu Feb 21, 2013 5:00 pm

Hi,
can any body knows how to get a current month date using sort card in jcl..format should be yymm..
cbhargavi
 
Posts: 20
Joined: Mon Oct 15, 2012 5:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: sort card for gaetting date in yymm format

 

Re: sort card for gaetting date in yymm format

Postby Robert Sample » Thu Feb 21, 2013 6:51 pm

Do you use CA-SORT, SYNCSORT, DFSORT, or some other sort package? What have you tried so far and what problems have you experienced? What manual(s) have you used for your research to date?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: sort card for gaetting date in yymm format

Postby cbhargavi » Thu Feb 21, 2013 11:14 pm

I used DFSORT and i searched for different date formats but still didnt find anything for yymm format..is there any possibility to use substring of dates...
i tried for DATE,DATE1,DATE2 etc.,
cbhargavi
 
Posts: 20
Joined: Mon Oct 15, 2012 5:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: sort card for gaetting date in yymm format

Postby skolusu » Fri Feb 22, 2013 5:13 am

cbhargavi ,

Assuming you want date in position 30 in a RECFM=FB and LRECL=80 byte , use the following DFSORT JCL. If your input is VB we may need to do it differently.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
----+----1----+----2----+----3----+----4----+----5----+----6----+
WANT YYMM IN POSITION 30
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  OPTION COPY
  INREC IFOUTLEN=80,
        IFTHEN=(WHEN=INIT,OVERLAY=(81:DATE2,30:83,4))
//*


The output of the above job is
----+----1----+----2----+----3----+
WANT YYMM IN POSITION 30     1302
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


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post