0

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

Nithanth
  • 1
  • 2
  • Please show some code – Tomasz Jakub Rup Nov 05 '15 at 11:56
  • 2
    Although this question is extremely narrow (it is impossible to do it how you state, the JCL is already fixed in stone before your Rexx program runs) I'm voting to close as Too Broad because you need one of many different approaches. Those types of question are Off Topic for SO, because it is a Q&A site, not a Mainframe forum. – Bill Woodger Nov 05 '15 at 12:50
  • You cannot modify JCL once job is submitted. If you want something to be dynamic, you will need to create a chain of JCL and REXX. JCL triggers Rexx code, which in turn generates a new JCL and submits it. – blvdeer Jan 13 '16 at 16:53

2 Answers2

1

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.

MikeT
  • 51,415
  • 16
  • 49
  • 68
0

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.

Jarek Brocki
  • 129
  • 1
  • 9