RAMESH KRISHNA REDDY mainframe discussion forum - cobol, db2,cics,jcl,file-aid,changeman,... interview questions, quizs
Online Tutorials   | PREV  | TOP  | NEXT



DRONA SERIES
SORT INCLUDE TUTORIAL


CHAPTER - 2


Using DATE in SORT INCLUDE CARDS



   
 
 
Using DATE constants in SORT INCLUDE
 



 
Working with DATE Constants.


We can use current date, past date, future dates to compare with input fields.
Here is the format of the dates avaiable to use in SORT INCLUDE.



For Current Date use one of the Constants. 


 Available pre-defined constants                Format of the date.
  DATE1P                                        +yyyymmdd
  DATE2P                                        +yyyymm
  DATE3P                                        +yyyyddd
For comparing with past dates use above pre-defined constants, substract the days from DATE1P (ex. DATE1P-11 ... means substract 11 days from current date ) subtract months from DATE2P, subtract days from DATE3P formats respectively. For comparing with future dates.. the same rules applies. add number of days to to current date. (ex. DATE1P+30.. means add 30 days to current date), add months to DATE2P, add days to DATE3P. If you want to use date constants as character value remove letter P from the constants (EX. DATE1 is equals to C'20121110' )
    

NEXT CHAPTER TOPIC : Using DATE1P,DATE2P,DATE3P in SORT INCLUDE CARDS - Example JCL


                                   




Home | Donations | Online Tutorials | Books | Entertainment | Contactme | privacy |  sql tutorial | jcl interview questions | JCL Tutorial | JCL Tutorial - chapter1 | JCL Tutorial - chapter2 | JCL Tutorial - chapter3 | JCL Tutorial - chapter4 | JCL Tutorial - chapter5 | JCL Tutorial - chapter6 | JCL Tutorial - chapter7 | JCL Tutorial - chapter8 | JCL Tutorial - chapter9 | JCL Tutorial - chapter10 | JCL Tutorial - chapter11