IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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: 445
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: 2455
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
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1008

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: 2455
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: 2632
Location: NYC,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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Installing sort utilities on hercules... DFSORT/ICETOOL 0
This topic is locked: you cannot edit posts or make replies. Sort card help to prepare status report DFSORT/ICETOOL 13
This topic is locked: you cannot edit posts or make replies. A Rexx who changes date into a JCL?Po... CLIST & REXX 9
This topic is locked: you cannot edit posts or make replies. include and copy COBOL Programming 4
No new posts DFDSS COPY using Filter REFDT statement JCL & VSAM 2
Search our Forums:

Back to Top