Fetch records using JCL based on current date (yyyy-mm-dd)



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Fetch records using JCL based on current date (yyyy-mm-dd)

Postby mounika1041 » Thu Dec 01, 2016 6:50 pm

I have a file of record length 592 . I have a date field in yyyy-mm-dd format . Now, i should get records only of current date.
I have written jcl code

SORT FIELDS=COPY
INCLUDE COND=(583,7,ZD,EQ,DATE1P)

This is working only for format yyyymmdd but my requirement is to get records of current date which has format yyyy-mm-dd
can anyone please help me ?
mounika1041
 
Posts: 3
Joined: Mon Nov 21, 2016 8:05 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Fetch records using JCL based on current date (yyyy-mm-dd)

 

Re: Fetch records using JCL based on current date (yyyy-mm-

Postby BillyBoyo » Fri Dec 02, 2016 1:29 am

What happens when your step runs after midnight? Or you want to do a re-run? Or for testing of any type?

Good systems have a "calendar file(e)" which have all the dates you need. Does your system have one?
BillyBoyo
Global moderator
 
Posts: 3761
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 256 times

Re: Fetch records using JCL based on current date (yyyy-mm-

Postby Robert Sample » Fri Dec 02, 2016 2:13 am

I have written jcl code

SORT FIELDS=COPY
INCLUDE COND=(583,7,ZD,EQ,DATE1P)
Please note that this is NOT "jcl code" (sic). You have written SORT control records which are used by an invocation of SORT within your JCL. JCL starts with // or /* (as stated in the JCL Reference manual talking about what JCL is -- see table 1).
Robert Sample
Global moderator
 
Posts: 3130
Joined: Sat Dec 19, 2009 8:32 pm
Location: Bellevue, Iowa
Has thanked: 1 time
Been thanked: 185 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post