Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Passing a variable/value to Rexx
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
ug123
Warnings : 1

New User


Joined: 01 Mar 2007
Posts: 39
Location: Chennai

PostPosted: Wed Jun 24, 2009 1:21 am    Post subject: Passing a variable/value to Rexx
Reply with quote

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
View user's profile Send private message
References
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1287
Location: Virginia, USA

PostPosted: Wed Jun 24, 2009 1:29 am    Post subject:
Reply with quote

You can't. What happens if the job you submitted doesn't run for 4 hours.
Back to top
View user's profile Send private message
prino

Active User


Joined: 07 Feb 2009
Posts: 225
Location: Oostende, Belgium

PostPosted: Wed Jun 24, 2009 1:29 am    Post subject: Re: Passing a variable/value to Rexx
Reply with quote

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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 13607
Location: 221 B Baker St

PostPosted: Wed Jun 24, 2009 1:35 am    Post subject:
Reply with quote

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
View user's profile Send private message
ug123
Warnings : 1

New User


Joined: 01 Mar 2007
Posts: 39
Location: Chennai

PostPosted: Wed Jun 24, 2009 1:40 am    Post subject: Reply to: Passing a variable/value to Rexx
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4060
Location: Charlotte,NC USA

PostPosted: Wed Jun 24, 2009 2:00 am    Post subject: Reply to: Passing a variable/value to Rexx
Reply with quote

icon_rolleyes.gif
Back to top
View user's profile Send private message
ug123
Warnings : 1

New User


Joined: 01 Mar 2007
Posts: 39
Location: Chennai

PostPosted: Wed Jun 24, 2009 9:49 am    Post subject: Reply to: Passing a variable/value to Rexx
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 6469
Location: Brussels once more ...

PostPosted: Wed Jun 24, 2009 11:20 am    Post subject: Re: Reply to: Passing a variable/value to Rexx
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 4259
Location: Atlanta, GA

PostPosted: Wed Jun 24, 2009 5:09 pm    Post subject:
Reply with quote

expat, maybe through a scheduler -- something like CA-7 or Zeke or ... ?
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 13607
Location: 221 B Baker St

PostPosted: Wed Jun 24, 2009 8:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
d_pansare

New User


Joined: 25 Apr 2009
Posts: 21
Location: Pune

PostPosted: Thu Jun 25, 2009 5:18 pm    Post subject:
Reply with quote

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.... icon_confused.gif icon_confused.gif icon_confused.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 6469
Location: Brussels once more ...

PostPosted: Thu Jun 25, 2009 5:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
d_pansare

New User


Joined: 25 Apr 2009
Posts: 21
Location: Pune

PostPosted: Thu Jun 25, 2009 6:18 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 13607
Location: 221 B Baker St

PostPosted: Fri Jun 26, 2009 2:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
ug123
Warnings : 1

New User


Joined: 01 Mar 2007
Posts: 39
Location: Chennai

PostPosted: Fri Jun 26, 2009 2:35 am    Post subject: Reply to: Passing a variable/value to Rexx
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2