IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Run 2 JCLs using a single JOB


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Wed Apr 27, 2005 10:29 pm
Reply with quote

Hi Die7,
I sucessfully ran a chain of two jobs using the above suggesstions given by you.
But there's more yet to come. I hope you are not bored solving the doubts

Thanks a lot !

Regards,
Back to top
View user's profile Send private message
die7nadal

Active User


Joined: 23 Mar 2005
Posts: 156

PostPosted: Wed Apr 27, 2005 10:31 pm
Reply with quote

Anytime.
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Wed May 04, 2005 2:41 pm
Reply with quote

Hi Die7,
Just when i thought it was over, yet a new doubt related to same topic.

Till this point i successfully ran a chain consisting of four jobs.
JOB1=>JOB2=>JOB3=>JOB4
This is working fine.

One of my requirement is, to get a msg in SYSOUT at the end of each job, like:
At the end of JOB1 in its sysout the msg shud be
"Msg- Job1 successful, proceeding to Job2"
and so on

Is there anyway i can get this.
Please let me know,
Thanks in Advance !
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Fri May 06, 2005 3:06 pm
Reply with quote

Can anyone help me in this ?
Please respond !

Regards
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Fri May 06, 2005 9:42 pm
Reply with quote

Hi Andycool, I don't understand your request... are you looking for way to put a message as a WTO upon console? Or are you only looking for a way to append results of execution in another output?
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Sun May 08, 2005 12:45 pm
Reply with quote

Hi MGIndalco, gald you are back !
As i have tried to explain earlier, i have a chain of jobs wch are automatically loaded one after another.
Now, i want some notification to be given to the programmar that, the first job is successfully over and the second is going to start as on; second job is successfully over and third is going to start.
I thought of the NOTIFY parameter but that is not the ideal way as it juss flashes for a second and goes off in a zippy.
Also, the notification or all the jobs are sent at the end of the cycle, like: i ran a cycle of 4 jobs successfully, i received 4 notifications together as the end of last job.

Please get back if its still not clear,
Thanks in Advance,
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Mon May 09, 2005 1:54 pm
Reply with quote

Ok, If can be useful... when you submit next job, you can also, in the same step, send a message to users with "Send" command as you can see below:
SEND '************************' USER(USER1)
SEND 'Phase 1 ended without errors' USER(USER1)
SEND 'Phase 2 submitted ' USER(USER1)
SEND '************************' USER(USER1)
SEND '************************' USER(USER2) LOGON
SEND 'Phase 1 ended without errors' USER(USER2) LOGON
SEND 'Phase 2 submitted ' USER(USER2) LOGON
SEND '************************' USER(USER2) LOGON

User1 will receive the message at the moment and so User2 but the second, if is not logged on, will also receive the message when he'll have access to the system.

If this is not what you are looking for, I'll try to explain you method and consequences about use of WTO messages.
Back to top
View user's profile Send private message
andycool

New User


Joined: 12 Apr 2005
Posts: 64

PostPosted: Tue May 10, 2005 3:16 pm
Reply with quote

Hi MG,
From wht you have illustrated above, i understand that, SEND is again like the NOTIFY parameter and this msg will just flash on the scrn.
Tomorrow if i go in =s.st and look for that particular job run, i wont be able to find the msg that was flashed, as in case of a sysout.
My requirement is whtever msg that is given to the user need not be flashed on the TSO but shud be present in the jobrun.

Example:
/*
//Job1step1
//Job1step2
If successful execute Job1submit else Job1msg
//Job1submit
//Job1msg exec pgm=abc
/*

Here, I shud be able to c in the sysout of step "Job1msg" some msg like "Aborting the job, process incomplete"

Is there any utility "abc" as above with which i can do this. Or please suggest some other idea.

Thanks n' Regards,
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue May 10, 2005 6:55 pm
Reply with quote

Ok, try but with JCL IF-ELSE-ENDIF
i.e.

//JOB1STEP1 EXEC PGM=...
//JOB1STEP2 EXEC PGM=...
//*-------------------------------------------*
//*- TEST OF PREVIOUS STEPS:
//*- mod1 TEST SINGLE STEP
//*- mod2 TEST MAXCC
//*-------------------------------------------*
mod1//TESTJOB1 IF JOB1STEP1.RC = 0 AND JOB1STEP2.RC = 0 THEN
mod2//TESTJOB1 IF RC = 0 THEN
//*-------------------------------------------*
//*- EXECUTION ENDED WITHOUT ERRORS
//*-------------------------------------------*
//JOB1SUB2 -> submit the second job
//JOB1END EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD *
Job ended successfully
//OUTPUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(INPUT) OUTFILE(OUTPUT)
/*
//*-------------------------------------------*
//*- EXECUTION ENDED WITH ERRORS
//*-------------------------------------------*
//TESTJOB1 ELSE
//JOB1END EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//INPUT DD *
Job ended with errors.
//OUTPUT DD SYSOUT=*
//SYSIN DD *
REPRO INFILE(INPUT) OUTFILE(OUTPUT)
/*
//TESTJOB1 ENDIF
//*-------------------------------------------*
//*- END OF JOB
//*-------------------------------------------*
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue May 10, 2005 7:22 pm
Reply with quote

MGIndaco, from his last post, it DOES sound like andycool wants to use a Write-To-Operator (WTO) function so that the messages appear in the job's output stream (JESMSGLG).
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue May 10, 2005 8:36 pm
Reply with quote

Ok, excuse me for my superficial understanding. icon_redface.gif
To write to operator, you must know the name of assembler routine installed on your system that manage wto(or look for a sample in the net), then you can call it with various languages and manage answer as you desire.
But, I don't understand why, at the end of our reasoning, Andy, you are still looking for a solution that wait a wto reply, needing so an unnecessary manual activity.
icon_question.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Submit multiple jobs from a library t... JCL & VSAM 14
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
No new posts Merge a variable number of records fr... DFSORT/ICETOOL 5
Search our Forums:

Back to Top