View previous topic :: View next topic
|
Author |
Message |
vivky_vivek
New User
Joined: 14 Aug 2020 Posts: 3 Location: India
|
|
|
|
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 |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1167 Location: Bamberg, Germany
|
|
|
|
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 |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 1940 Location: USA
|
|
|
|
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! |
 |
|
Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
No it's not - it's PL/1 or Rexx  |
|
Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3038 Location: NYC,USA
|
|
|
|
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 |
|
 |
vivky_vivek
New User
Joined: 14 Aug 2020 Posts: 3 Location: India
|
|
|
|
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 |
|
 |
|