IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

Required Date Format in Include Sort Statement


 
IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message
vivky_vivek

New User


Joined: 14 Aug 2020
Posts: 3
Location: India

PostPosted: Fri Aug 14, 2020 6:52 am
Reply with quote

Hii!
I've a requirement to get the records from input which are matching with current Date.
Issue is, Date in input file is in MM/DD/YYYY format.
Can anyone help me to make understand how can I use this format in my include sort statment.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active User


Joined: 15 Aug 2015
Posts: 350
Location: Bamberg, Germany

PostPosted: Fri Aug 14, 2020 9:47 am
Reply with quote

Code:
//TODAY    EXEC PGM=ICEMAN         
//SYMNAMES DD *                   
Today,S'&MON./&DAY./&YR4.'         
/*                                 
//SORTIN   DD *                   
             08/06/2020           
   08/14/2020                     
       12/31/2020                 
/*                                 
//SORTOUT  DD SYSOUT=*             
//SYSOUT   DD SYSOUT=*             
//SYSIN    DD *                   
  OPTION COPY                     
  INCLUDE COND=(1,80,SS,EQ,Today) 
  END                             
/*

Output:
Code:
****** ******************
000001    08/14/2020     
****** ******************
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2429
Location: Hampshire, UK

PostPosted: Fri Aug 14, 2020 2:43 pm
Reply with quote

As you appear to have query relating to a sort product why have you posted in the JCL forum and not the appropriate sort forum. Sort is not JCL and JCL is not sort. Moving to DFSORT forum.
Back to top
View user's profile Send private message
sergeyken

Active Member


Joined: 29 Apr 2008
Posts: 876
Location: Maryland

PostPosted: Fri Aug 14, 2020 4:30 pm
Reply with quote

Nic Clouston wrote:
As you appear to have query relating to a sort product why have you posted in the JCL forum and not the appropriate sort forum. Sort is not JCL and JCL is not sort. Moving to DFSORT forum.


Because:
Quote:
Everything what is not COBOL is JCL!

icon_pray.gif icon_axe.gif 12.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2429
Location: Hampshire, UK

PostPosted: Sat Aug 15, 2020 5:06 am
Reply with quote

No it's not - it's PL/1 or Rexx icon_biggrin.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2503
Location: NY,USA

PostPosted: Wed Aug 19, 2020 3:46 am
Reply with quote

If you tell us the sample input and confirm if its at fixed position then you can simply reformat using INREC OVERLAY and in OUTFIL BUILD you can INCLUDE what you want.
Back to top
View user's profile Send private message
vivky_vivek

New User


Joined: 14 Aug 2020
Posts: 3
Location: India

PostPosted: Wed Aug 26, 2020 7:47 pm
Reply with quote

Thankyou for all you suggestions.

I've reformatted my input date layout from MM/DD/YYYY to Date1 and used the Date functions as per my requirement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
This topic is locked: you cannot edit posts or make replies. Splice JCL into one record for DD sta... SYNCSORT 2
No new posts Date format conversion DFSORT/ICETOOL 4
No new posts Hex Value - vb file replace old date ... DFSORT/ICETOOL 14
No new posts Copying data from prev record using SORT SYNCSORT 19

Back to Top