|
|
| Author |
Message |
ug123 Warnings : 1 New User
Joined: 01 Mar 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi all,
this is not as usual but something different.
I have a rexx program which submits the jcl. And in the JCL i have written an eazytrieve where I have introduced a count variable to find the total number of records in a dataset.
Now i have to pass this eazytrieve variable again to the same rexx code for further processing.
Could anyone help me out to pass the variable/value to the rexx program.
This is my eazytrieve
FILE INPUT1
*
WS-RECCOUNT W 15 N VALUE 0
*
JOB INPUT INPUT1 FINISH PRINT-PARA
WS-RECCOUNT = WS-RECCOUNT + 1
GOTO JOB
PRINT-PARA. PROC
DISPLAY 'NO OF RECORDS:' WS-RECCOUNT
END-PROC.
Thanks,
Ugandar |
|
| Back to top |
|
 |
References
|
|
 |
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1287 Location: Virginia, USA
|
|
|
|
| You can't. What happens if the job you submitted doesn't run for 4 hours. |
|
| Back to top |
|
 |
prino
Active User
Joined: 07 Feb 2009 Posts: 225 Location: Oostende, Belgium
|
|
|
|
| ug123 wrote: |
this is not as usual but something different.
I have a rexx program which submits the jcl. And in the JCL i have written an eazytrieve where I have introduced a count variable to find the total number of records in a dataset. |
And how do you expect to know the REXX exec will know when the EZ job has finished? This is more of the "usual", people trying to create a home-grown scheduler. |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13607 Location: 221 B Baker St
|
|
|
|
Hello,
Hopefully, you do not intend for an online rexx to wait for the batch job to run. . .
Suggest you end the first rexx when the job is submitted and at the end of the batch easytrieve, invoke rexx in batch. The easytrieve process would write the count into a dataset to be read/used by the batch rexx. |
|
| Back to top |
|
 |
ug123 Warnings : 1 New User
Joined: 01 Mar 2007 Posts: 39 Location: Chennai
|
|
|
|
Wow!!! I hope calling rexx in batch will help me. thanks for your info... i will try and let you know. once again thank you very much...
regards,
Ugandar |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 4060 Location: Charlotte,NC USA
|
|
| Back to top |
|
 |
ug123 Warnings : 1 New User
Joined: 01 Mar 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi,
I am not able to display the value in the screen when I run the rexx in batch mode.
I could see only in the spool. Is there any other way to display the value in screen.
Thanks,
Ugandar |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
| ug123 wrote: |
Hi,
I am not able to display the value in the screen when I run the rexx in batch mode.
I could see only in the spool. Is there any other way to display the value in screen.
Thanks,
Ugandar |
And how do you propose that two totally unrelated address spaces to interact together and pass data ? |
|
| Back to top |
|
 |
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 4259 Location: Atlanta, GA
|
|
|
|
| expat, maybe through a scheduler -- something like CA-7 or Zeke or ... ? |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13607 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
I am not able to display the value in the screen when I run the rexx in batch mode.
I could see only in the spool. Is there any other way to display the value in screen. |
Why not simply look at the info in the spool?
You could write the "answer" to some file or member and then later read this into an online screen. If you use NOTIFY in the batch job, you will get an interruption on the screen to tell you the job ended. |
|
| Back to top |
|
 |
d_pansare
New User
Joined: 25 Apr 2009 Posts: 21 Location: Pune
|
|
|
|
If you just want to count the records in Ezytrv and then display it on screen using rexx then in such scenario why don't you let rexx do both the things for you.. get the count from rexx itself and use it further down the lane for whatever process you want....  |
|
| Back to top |
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 6469 Location: Brussels once more ...
|
|
|
|
For a start REXX is one of the slowest and highest resouce comsumers for heavy IO. So would use far more resource and take longer than most other methods.
In addition as the OP is talking about getting the result back to the screen it would appear that this REXX will be processed in foreground, thus locking the terminal from being used by anything else for the duration of this process.
Had you have bothered to search the forum before answering you would have found that this topic has been discussed numerous times before and as always is given the thumbs down as a method of doing what the OP wants. Although REXX can invoke many other programs or utilities to perform the count and return the value, this still locks the terminal and prevents work. |
|
| Back to top |
|
 |
d_pansare
New User
Joined: 25 Apr 2009 Posts: 21 Location: Pune
|
|
|
|
| Quote: |
Although REXX can invoke many other programs or utilities to perform the count and return the value, this still locks the terminal and prevents work.
|
I am in complete agreement with you.. But just thought if there is no other way... and author still wants have the output on the screen then he will have to use this method irrespective of time that will elapse to get the output... |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 13607 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| But just thought if there is no other way... |
There is nearly always "another way". Unfortunately, "other ways" often require more actual effort and thus become undesirable. . .
| Quote: |
| then he will have to use this method irrespective of time that will elapse to get the output |
which is how an incredible number of really pathetic processes are being justified and causing problems on lots of systems now being supported/maintained by rather incompetent system management people. In previous days, something would not be permitted. . . |
|
| Back to top |
|
 |
ug123 Warnings : 1 New User
Joined: 01 Mar 2007 Posts: 39 Location: Chennai
|
|
|
|
Hi all,
I tried to count the total number of records using REXX program. But it helps only if the dataset has less than 2 lakhs of records. If the dataset has more number of records, REXX variable is not able to store and throwing an error message as 'unable to obtain storage'.
Thanks,
Ugandar |
|
| Back to top |
|
 |
|
|