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
 
Run 2 JCLs using a single JOB
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
andycool

Active User


Joined: 12 Apr 2005
Posts: 65

PostPosted: Sun May 08, 2005 12:45 pm    Post subject:
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
References
MGIndaco

Moderator


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

PostPosted: Mon May 09, 2005 1:54 pm    Post subject:
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

Active User


Joined: 12 Apr 2005
Posts: 65

PostPosted: Tue May 10, 2005 3:16 pm    Post subject:
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

Moderator


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

PostPosted: Tue May 10, 2005 6:55 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Tue May 10, 2005 7:22 pm    Post subject: Re: Run 2 JCLs using a single JOB
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

Moderator


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

PostPosted: Tue May 10, 2005 8:36 pm    Post subject:
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 HoursGoto page Previous  1, 2, 3
Page 3 of 3