how to call R4.. in rpg/400 or cl/400 program

farenearl

Member
Hi guys!

I need help! Is it possible to call/execute R47011 or R40211Z in RPG/400 or CL/400 program. If possible, how i'll do it? Thanks a lot.
 
Hi,

Yes you can call UBE's from CL's, use the command RUNUBE with parms: User Profile, Password, Environment, UBE, Version. The command is in the SYS Library on your AS/400.

Goodluck..
 
Hi,

You'll find the runube command in the SYSxxxx library e.g. SYS7333 for XE. So either add it to the libl or fully qualify it.

Regards

Neil.
 
There is somthing else you will need to include in your CL to make everything work properly. It was in a post a while back, but I can't seem to find the post. It had to do with the job running successfully every other time. You need to use the RCLACTGRP command. Check out this themplate I use for creating CL:


J9861101V1: PGM
ADDLIBLE LIB(B7334SYS)
MONMSG MSGID(CPF0000)
RUNUBE USER(UBEID) PASSWORD(PASSWORD) +
ENVIRON(PD7333) REPORT(R9861101) +
VERSION(v0001)
MONMSG MSGID(CPF0000)
RCLACTGRP ACTGRP(J1WACTGRP)
MONMSG MSGID(CPF0000)
RMVLIBLE LIB(B7334SYS)
MONMSG MSGID(CPF0000)
ENDPGM
 
Back
Top