How to SORT data from input when it is in YY/MM/DD format

Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL
N J Baruah
Posts: 12
Joined: Wed Apr 04, 2018 6:02 pm
Skillset: Cobol, Jcl etc
Referer: Through Internet

How to SORT data from input when it is in YY/MM/DD format

Postby N J Baruah » Wed Apr 04, 2018 10:42 pm

Hi All,

I am trying to sort data from an input file based on the reference date present in it from column 55 to 62. My requirement is to sort out data which has been last referenced within 3 months.

Please note that the reference date is present in the format YY/DD/MM (e.g: 18/03/14 etc).

I have tried the below sort code but it works only when the date format is YYYY/MM/DD. But I need to sort out the data from the input file which is present in the format YY/DD/MM and was last referenced within 3 months. So can anyone please help me with this.
--------------------------------------------------------------------------------

Code: Select all

//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(55,8,CH,GT,DATE1(-)-90)
/*

--------------------------------------------------------------------------------
Coded for you - do it yourself next time

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: How to SORT data from input when it is in YY/MM/DD forma

Postby NicC » Wed Apr 04, 2018 11:39 pm

You need to sort yourself out - the title says the date is YY/MM/DD but your post says YY/DD/MM. If it is the latter then sort on 55 for 2, 61 for 2 and 58 for 2.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

N J Baruah
Posts: 12
Joined: Wed Apr 04, 2018 6:02 pm
Skillset: Cobol, Jcl etc
Referer: Through Internet

Re: How to SORT data from input when it is in YY/MM/DD forma

Postby N J Baruah » Thu Apr 05, 2018 10:35 am

correction Nic.... it is YY/MM/DD

N J Baruah
Posts: 12
Joined: Wed Apr 04, 2018 6:02 pm
Skillset: Cobol, Jcl etc
Referer: Through Internet

Re: How to SORT data from input when it is in YY/MM/DD forma

Postby N J Baruah » Thu Apr 05, 2018 9:37 pm

Hi All,

Can anyone please help me?
Your help will be really appreciated...


"I am trying to sort out data from an input file based on the reference date present in it from column 55 to 62. My requirement is to sort out data which has been last referenced within 3 months. Please note that the reference date is present in the format YY/MM/DD (e.g: 18/03/14 etc). "

enrico-sorichetti
Global moderator
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
Referer: www.ibmmainframes.com

Re: How to SORT data from input when it is in YY/MM/DD forma

Postby enrico-sorichetti » Thu Apr 05, 2018 11:09 pm

soliciting for answers is considered bad netiquette
and it will usually make people ignore the topic

remember ...
we reply on our own time and free of charge

if nobody replies it means that
nobody has an in depth knowledge of the topic
nobody is interested in answering
nobody likes You :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

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: How to SORT data from input when it is in YY/MM/DD forma

Postby Robert Sample » Fri Apr 06, 2018 1:51 am

Furthermore, your post mentions DATE1 but doesn't say if you've tried any of the D2? variables yet. If not, you need to look at them.


  • Similar Topics
    Replies
    Views
    Last post