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

Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL
mounika1041
Posts: 3
Joined: Mon Nov 21, 2016 8:05 pm
Skillset: Mainframes beginner
Referer: google first search

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 ?

BillyBoyo
Global moderator
Posts: 3805
Joined: Tue Jan 25, 2011 12:02 am
Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
Referer: Google

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?

Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
Referer: other forum
Location: Dubuque, Iowa, USA

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).


  • Similar Topics
    Replies
    Views
    Last post