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 

Extract only last month data from a GDG

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


Joined: 24 Nov 2005
Posts: 4
Topics: 4

PostPosted: Thu Nov 24, 2005 3:08 am    Post subject: Extract only last month data from a GDG Reply with quote

Problem is as follows.
This program/utility will run 7th of every month.What it should do is copy all records of GDG genertions which is having the last month dates as its one of the fields.
Example. GDG record contains a date field.Based on this we have to copy it to another file.Assume that the program runs on DEC 7th.if date field contain 20051123 we have to copy it to another file.if the date is 2001202 discard it.We can do this by comparing '11'(month field).But I want to run this program every month (and it should copy the records containing previous month dates) without changing anything.Can we do this using SORT/ICETOOL utility?
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: Thu Nov 24, 2005 6:56 am    Post subject: Reply with quote

mcshastry,

Plese do not post the same topic in more than 1 forum. I am deleting your other post.

Check this link which discusses about a similar issue

http://www.mvsforums.com/helpboards/viewtopic.php?p=22381#22381

Change step0100 sysin cards to the following .

Code:

//SYSIN    DD *                                               
  SORT FIELDS=COPY                                           
  INREC FIELDS=(DATE2)                                       
  OUTREC FIELDS=(1,6,                                         
                 7:5,2,CHANGE=(2,C'01',C'89'),NOMATCH=(C'01'))

  OUTFIL OUTREC=(C' SORT FIELDS=COPY',/,                     
                 C' INCLUDE COND=(1,6,ZD,EQ,',               
                 1,6,ZD,SUB,7,2,ZD,EDIT=(TTTTTT),               
                 C')',80:X)                                   
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu


Last edited by kolusu on Thu Nov 24, 2005 7:10 am; edited 1 time in total
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: Thu Apr 27, 2006 11:43 am    Post subject: Reply with quote

With z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006), you can now use DFSORT's new past and future date constant support for this kind of thing. In this case, you can use these DFSORT control statements:

Code:

  OPTION COPY                         
  INCLUDE COND=(1,6,ZD,EQ,DATE2P-1)   


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