MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieve Last Months Data thru SORT

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kishore_gk
Beginner


Joined: 23 Jul 2003
Posts: 12
Topics: 8

PostPosted: Mon May 17, 2004 1:47 am    Post subject: Retrieve Last Months Data thru SORT Reply with quote

Hi,

I wanted to retrieve the Last months data. Is it possible thru SORT utility. If so, pls help me on this.

Date format : mmddyyyy
Assume Date field starts at the position 10.

Thanks in Advance,

Kishore
_________________
kishore
Back to top
View user's profile Send private message
kishore_gk
Beginner


Joined: 23 Jul 2003
Posts: 12
Topics: 8

PostPosted: Mon May 17, 2004 3:49 am    Post subject: Reply with quote

Hi Ravi,

Thanks for your reply. Any way i know about this INCLUDE COND (Hardcoded one). Actually i'm searching for a Dynamic one. I'll go thru the link which you have provided.
_________________
kishore
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon May 17, 2004 4:57 am    Post subject: Reply with quote

kishore,

Please do not post the same topic in more than 1 forum. I am deleting your other post in database forum. Please search before posting. This topic has been discussed earlier. Check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=1459&highlight=month

Hope this helps...

Cheers

Kolusu

Ravi: The link you have shown is not valid in this case
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon May 22, 2006 1:13 pm    Post subject: Reply with quote

With z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006), you can use DFSORT's new DATE2-m function in INREC to satisfy this requirement as shown by the DFSORT job below. I assumed the input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/80)
//SORTOUT DD DSN=...  output file (FB/80)
//SYSIN    DD    *
   OPTION COPY
* Generate yyyymm in 81-86 for previous month
* (e.g. '200604' is generated on 2006/05/22).
   INREC OVERLAY=(81:DATE2-1)
* Keep record if yyyy (from mmddyyyy) in record is equal to
* yyyy in 81-84, and mm (from mmddyyyy) in records is equal to
* mm in 85-86.
   OUTFIL INCLUDE=(14,4,ZD,EQ,81,4,ZD,AND,
      10,2,ZD,EQ,85,2,ZD)
/*


For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTFs, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group