Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love the structure of the site. You start at the top, and drill down to what you want. Maybe I've been using Unix too long... :-) "

Geography

Where in the world do Tek-Tips members come from?
RedMage1967 (Programmer)
22 Jul 03 16:30
Is there a way to have a program wait until a batch jobs completes?  Example, Program A does a sbmjob cmd(call pgm(programb)).  I need program A to wait until program B completes is batch processing.  Is there a way in the CL of program A to make this happen?

RedMage1967
IBM Certifed - RPG IV Progammer

jack1955 (Programmer)
22 Jul 03 17:34
Create and lock a data area of file in program a.  Have program b attempt to acquire it (in a cl?) using ALCOBJ.
RedMage1967 (Programmer)
22 Jul 03 17:36
Ok, now here's the monkey wench.  Would the same thing work if Program A is a Visual Age RPG program running on my desktop?

RedMage1967
IBM Certifed - RPG IV Progammer

jack1955 (Programmer)
23 Jul 03 8:26
Send an entry in a data queue?
RedMage1967 (Programmer)
23 Jul 03 11:01
That's the idea that hit me heading home last night.  Instead of having the VRPG program do the sbmjob, I'm going to write a CLP that will 1) change the data area to show I'm running my formating program; 2) the formatting program will change the data area to indicate that's it's completed it's job; 3) the CLP will wait until the data area's been modified.

Thanks for the help, jack1955.

When you mentioned data area in your previous post, kinda got the dust knocked off of the memory cells here.

RedMage1967
IBM Certifed - RPG IV Progammer

Wernhow (Programmer)
28 Jul 03 8:33
As silly as this may sound, why is pgm A submitting pgm B then waiting until pgm B finishes.  Why not just call pgm B?
iSeriesCodePoet (Programmer)
28 Jul 03 11:09
Run programb in interactive, not batch. You will be waiting the same amount of time either way.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator

See my progress to converting to linux. http://koldark.hopto.org/linux/
The Programmer's Knowledge Base -> http://koldark.hopto.org/twiki/bin/view/Programkb/WebHome

RedMage1967 (Programmer)
28 Jul 03 15:31
OK.  Here's the problem I had with this app.

First of all, it's a Visual Age RPG (VARPG) application that enables my production manger to do reprints on three different types of statements.  This app calls one of three different RPG ILE programs on the As/400, depending on what type of statement is selected.  These ILE programs create a SPLF of the statement, then copy that SPLF back into a PF so I can do further manipulation on the file (put into tray sequence, add Xerox and insterter commands, etc).  

What was happening is I was getting a SYSOPR message saying the SPLF could not be found.  In researching the problem I found that when using VARPG to call the ILE programs, the SPLF's (for some oddball reason) have a different qualified job name than the programs that created them.  When the ILE programs are sent to batch, the SPLF's are under the same job as the ILE program creating them.  That's why I have to have the VARPG program call a CLP program that does a SBMJOB on one of the three ILE programs.  Otherwise, I can't get to my SPLF output.  

Hope this makes sense.

RedMage1967
IBM Certifed - RPG IV Progammer

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close