i've jcl which accepts date and pass value to rexx to get next date and previous date. and then jcl prints that next and previous dates.
please tell how to take value back from rexx to jcl and use that values in jcl
i've jcl which accepts date and pass value to rexx to get next date and previous date. and then jcl prints that next and previous dates.
please tell how to take value back from rexx to jcl and use that values in jcl
If it's to print the date, then JCL doesn't actually do that. Rather JCL invokes a program that writes data that can be printed.
If it's printing of the dates, then that could be achieved using EXECIO.
If your requirement is to modify JCL AND that JCL is not the current JCL, then Rexx can be used to submit a modified job or jobs (system authority permitting). If I recall correctly you'd use INTRDR.
blvdeer kind of explained how JCL works above in the comment but you can start to work of something like this. Use REXX to invoke its DATE (reference here - z/OS TSO/E REXX DATE) and put this into a variable to do whatever you want with it (in this case current and previous dates) and use EXECIO as per MikeT answer to write this to a dateset.
Later you can run a JCL to do whatever with this newly created dataset as an input.
Regards, Jarek.