View previous topic :: View next topic
|
Author |
Message |
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
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 |
|
|
die7nadal
Active User
Joined: 23 Mar 2005 Posts: 156
|
|
|
|
Anytime. |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
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 |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Can anyone help me in this ?
Please respond !
Regards |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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 |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
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 |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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 |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
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 |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Ok, excuse me for my superficial understanding.
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.
|
|
Back to top |
|
|
|