Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieve am Qshell's message in batch job from CL

 
Eung maeng
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Does anyone had an experience to retrieve a Qshell messages('QSH0005') from batch job in CL on iseries?
I can get the message id when I execute Qshell command interactive with rcvmsg but not from batch job when submitted Qshell command?

please show how to get it. it would be good good.

e.g.
Would you be able to give an idea how to retrieve an messages(QSH0005/6/7) from CL when submitted QSH command in batch? I was trying to get an idea on web site and found your article regarding qshell.





This CL is how I am trying to retrieve a message id from Qshell command when job finished in batch job.



This CL is submitted QSHELL command to execute a JAVA API.



When JAVA API completed the process, it will be returned exit code to QSHELL and QSHELL will returned an message ID(�QSH005�) to CL
when they return an �QSH0005� in batch, I need to retrieve it on CL.
When I call QSHELL Command interactive rather than in batch on CL, I can retrieve this message ID with �RCVMSG� CL command which is good, but not from in batch


e.g.
IBM CL program

LINE 1 PGM

LINE4 SBMJOB CMD(QSH CMD('/home/ibbi_api/ibbi368p.sh'))
LINE5
LINE6 RCVMSG
LINE7 SNDUSRMSG MSG(&MSGID) MSGTYPE(*INFO)


LINE9 ENDPGM
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic