Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Required Date Format in Include Sort Statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Required Date Format in Include Sort Statement
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: 303
Location: Bamberg, Germany

PostPosted: Fri Aug 14, 2020 9:47 am    Post subject:
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: 2400
Location: Hampshire, UK

PostPosted: Fri Aug 14, 2020 2:43 pm    Post subject: Reply to: Required Date Format in Include Sort Statement
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: 820
Location: Maryland

PostPosted: Fri Aug 14, 2020 4:30 pm    Post subject: Re: Reply to: Required Date Format in Include Sort Statement
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: 2400
Location: Hampshire, UK

PostPosted: Sat Aug 15, 2020 5:06 am    Post subject: Reply to: Required Date Format in Include Sort Statement
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

Senior Member


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

PostPosted: Wed Aug 19, 2020 3:46 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. SORT the records based on the second ... Ramsee SYNCSORT 1 Wed Aug 19, 2020 3:01 pm
No new posts Trying to add current date in place o... shub2204 DFSORT/ICETOOL 8 Wed Aug 12, 2020 4:14 pm
No new posts Populating Date and Sequence numer in... PORYES SYNCSORT 11 Thu Jul 16, 2020 5:01 pm
No new posts Problem while trying to manipulate re... amitc23 DFSORT/ICETOOL 3 Tue Jun 30, 2020 1:19 pm
No new posts CALL statement in COBOL for VSE Kirthishine COBOL Programming 3 Fri Jun 26, 2020 12:12 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us