Solved

as400/cobol  batch display's

Posted on 2002-05-06
9
686 Views
Last Modified: 2008-02-01
I am converting Wang Cobol to AS400/cobol, On wang display are alway's promped to the workstation, but in AS400 if job is submitted in batch the messages are not prompted

 How can I make my messages displayed on workstation for batch jobs


Thanks

Eli
0
Comment
Question by:mshomi
9 Comments
 
LVL 13

Expert Comment

by:samic400
ID: 6997170
Could you give more detail please?

Are you calling a job interactively at the workstation and want the same type of messages when you submit it?

0
 

Author Comment

by:mshomi
ID: 7000158
Sam,

I submit the jobs in batch , by using cmd SBMJOB, so i am not calling the programs interactively

Thanks

Eli
0
 
LVL 13

Expert Comment

by:samic400
ID: 7001025
All batch submitted jobs have their job messages submitted to QSYSOPR message queue. You could put some code in your program to send messages to a different message queue.

Jobs run interactively will break their messages on your display.

Give me more detail on what it is you are trying to do and maybe I can help you out!
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:mshomi
ID: 7005202
I am converting Wang/cobol to As400/cobol, On wang we have like 500 programs with different kind of display's , which give the operator information, Like the program now is aborting due to ......, but what is happening now the message is not dislayed and the operator he/she is not in a position to know  that the program has aborted

How can I make my Cobol Program work(display's) , like should i call a CL program or What

Thanks
0
 
LVL 1

Expert Comment

by:aaronkempf
ID: 7011270
id call BEI. 425 644 4000.  I think.  maybe its 6000.

they are one of the last WANG vendors that I know.
0
 
LVL 2

Expert Comment

by:olidel
ID: 7040299
Hi,

   As Samic400 said, I think you should send your message to a user MSGQ and of course the interactive job must be in break mode if you want to see the message. This parameters is in the user profile it is called "Message queue delivery".

    Of course, you maybe have to create a CLP before you run your Cobol program. You can also do some AS/400 programming.

Hope this hep.

Bye.
0
 

Author Comment

by:mshomi
ID: 7040469
Olidel,

If the job is submitted in batch (SBMJOB) will the break mode work(prompt the message to the workstation while the job runs )?

Eli
0
 
LVL 3

Accepted Solution

by:
P_S_Price earned 100 total points
ID: 7143165
You have a couple of choices.

You can write a CL program that displays messages on either QSYSOPR, or the submitting user Message Queue (or in fact any other message Queue then have your cobol program call this.

Another alternative is to use a call to QCMDEXC to issue a SNDMSG to QSYSOPR or SNDBRKMSG to a workstation.

One option that is not often considered is that Batch programs CAN be interactive You just have to acquire a workstation device. However this is quite complicated  and probably not worth the effort.


Most developers however usually go for the Call to a CL program. Here is a quick example of a CL program that Might Help get you started

PGM PARM (&MSG &QUEUE)
DCL &MSG *CHAR 80
DCL &QUEUE *CHAR 10
IF (&QUEUE *EQ ' ') (CHGVAR &QUEUE 'QSYSOPR')
SNDPGMMSG MSG(&MSG) TOMSGQ(&MSGQ)
MONMSG CPF0000
ENDPGM

0
 

Expert Comment

by:SpideyMod
ID: 8279306
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question