Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Switch between environments

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Sat Jan 17, 2015 2:43 pm    Post subject: Switch between environments
Reply with quote

Hi All,

I am developing a tool to extract spool data every one hour.
I am using IKJEFT01 utility to run the rexx in JCL.

My shop has 5 regions namely rgc1,2,3,4,5
Now am submitting job 5 times for 5 environments

I want to run a single job with 5 steps with same rexx but passing a parm value of region where my rexx should run.


Is this achievable, if yes please teach me how to do.
If possible with code.

Thanks in advance. icon_smile.gif
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sat Jan 17, 2015 8:58 pm    Post subject:
Reply with quote

Terminology is critical in IT, where similar terms may mean very different things. Your use of the term "region" is not a standard usage for that term -- do you mean LPAR? CICS region (the usual context for "region" in z/OS)? something else?

If these "regions" are actually LPARs, then what you want to do cannot be done -- a batch job runs in a single LPAR, period. You might be able to access the data via the spool API, but that would depend upon the spool package being used (among other details).

It sounds like you are attempting to write at least part of a job scheduler -- why not use the job scheduler already installed at your site instead of re-inventing the wheel? Such a task cannot be considered a good use of resources by your organization's management.
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Sat Jan 17, 2015 9:26 pm    Post subject:
Reply with quote

Hi Robert,

Thanks for u reply and valuable comments.

In my project we use TWS as job schedular.
This needs a lot of approvals and formalities do be done.

Even chances for dropping the whole idea. So am using desktop schedular to run jobs in 1 hour interval.

And yes i mean LPAR'S.

I just thought of running a single job which internally triggers 4 other jobs one after another using JOBPARM SYSAFF=A.

But I am able to connect to 3 LPAR but other two are not getting connected.

I have LPAR A,B,C in which I can view A- job logs in B and vice versa. But from A am not able to view D&E.

Is there could be any reason.? Please teach me regarding LPAR settings.

Whole idea is to run a single script to get output's of all LPAR'S

Thanks in advance.

icon_smile.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Sun Jan 18, 2015 3:07 am    Post subject:
Reply with quote

An LPAR is a logical partition of a machine. Essentially, an LPAR is a virtual machine. The fact that you cannot see D & E from A probably indicates that A, B, C share resources while D & E do not share with these LPARs. Hence, it is not possible for you to accumulate data for D & E without running something on one of those LPARs; similarly, you can collect data from A, B, C -- so you MUST run a minimum of two jobs to collect the data you want.

We do not recommend on this forum that you develop your own job scheduler. They are complex pieces of code that frequently depend upon advanced knowledge of the operating system to accomplish their functions and hence rarely should be attempted by anyone without MANY years of z/OS experience. And most sites already have job schedulers so they consider an application programmer writing one to be a waste of time and resources.

No matter how difficult it is to set up your TWS, you would be VASTLY better off using it than trying to write your own scheduler.
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Sun Jan 18, 2015 8:25 am    Post subject:
Reply with quote

Hi Robert,

Thanks a million for sharing the knowledge on LPARs.

Yes you are absolutely right on the schedular part.
I would have to make my code efficient enough to get an approval for TWS.
icon_smile.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Jan 19, 2015 10:20 pm    Post subject: Reply to: Switch between environments
Reply with quote

Quote:
But from A am not able to view D&E.


You should use the JCL OUTPUT statement to get the job output back to A:
Code:
//X  OUTPUT DEST=RGCMVSA.BASHA,DEFAULT=YES


Another approach is to use FTP to submit the jobs and to retrieve the job output.
Code:
FTP RGCMVSD
SITE FILETYPE=JES
PUT filename.filetype

DIR will display the jobs.
GET will get the job output.
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Wed Jan 21, 2015 9:51 am    Post subject:
Reply with quote

Hi Pedro,

I have used FTP concept to submit jobs.

I could successfully run job1 in LPAR1 from 4,

But when i run my rexx code its not working, i mean am getting error at
Code:
Address SDSF "isfexec st(ALTERNATE DELAYED"
if RC ª= 0 then do
say "isfexec RC" RC
exit


Am facing RC 8.

Complete code as below
Code:
/*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
Trace "O"
Parse Source _sys _how _cmd .
parse arg args

IsfRC = isfcalls("ON")
if IsfRC ª= 0 then do
say "isfcalls RC" IsfRC
exit
end

isfprefix = "WR*"
isffilter = "queue = EXECUTION"
/*isfcols = "jname jobid ownerid actsys ISYSID"*/

Address SDSF "isfexec st"
if RC ª= 0 then do
say "isfexec RC" RC
exit
end

do i = 1 to jname.0
say jname.i jobid.i ownerid.i actsys.i jprio.i timee.i
end
call isfcalls "OFF"
exit
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed Jan 21, 2015 8:09 pm    Post subject: Reply to: Switch between environments
Reply with quote

Let me recap the situation...
Quoting Robert Sample:
Quote:
The fact that you cannot see D & E from A probably indicates that A, B, C share resources while D & E do not share with these LPARs. Hence, it is not possible for you to accumulate data for D & E without running something on one of those LPARs;

Then I suggested you use OUTPUT statement or FTP to retrieve the job output.

Then you did not follow either of my suggestions, but tried something else.

SDSF does not work because you do not have access to that LPAR's spool.
Back to top
View user's profile Send private message
Khadhar Basha

New User


Joined: 28 Oct 2014
Posts: 37
Location: India

PostPosted: Wed Jan 21, 2015 8:29 pm    Post subject:
Reply with quote

Hi Pedro,

I have used your technique of FTP ing,

Where am giving ip address of LPAR D and put command to sumbit job from LPAR A then as soon as get the maxcc of job i could able to view job log of LPAR D(ftp submitted) job in D spool itself.

To be precise Job is getting submitted in D(spool) from A using ftp but rexx part am getting rc8.

Is there any way that I can get jobs execution, job id, jname, start time using JCL itself without REXX. Something like PGM=SDSF to get only jobs in execution name id st-time.
I am not sure what parms to pass.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed Jan 21, 2015 10:57 pm    Post subject: Reply to: Switch between environments
Reply with quote

Your JCL should have an OUTPUT statement so that the job output gets routed back to A when the job completes.

Earlier, I suggested this:
Code:
//X  OUTPUT DEST=RGCMVSA.BASHA,DEFAULT=YES

but you need to change to use the correct node name and userid.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How do i use the switch indicators fo... raghava manda COBOL Programming 3 Wed Jan 06, 2016 11:42 pm
No new posts How to switch plans within a batch co... gjdeluca DB2 1 Wed Dec 09, 2009 5:20 am
No new posts Switch And Flag. Robert Sample CICS 11 Thu Apr 09, 2009 8:25 pm
No new posts Production Synchronisation of large s... Peter Poole Testing & Performance analysis 5 Tue Feb 03, 2009 9:19 pm
No new posts Regarding Compiling and Linking in di... vini_srcna PL/I & Assembler 2 Thu Oct 23, 2008 11:22 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us