Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

e-mail from Cobol - OS390

Status
Not open for further replies.

MarcLodge

Programmer
Feb 26, 2002
1,886
GB
Hi All,
I have a requirement to send an e-mail from a Cobol program, on a OS390 mainframe under certain conditions. I could do it by setting a particular return code, and then having the JCL pick up on the return code and run an e-mail step as detailed in thread209-449063

Does anybody know of any other way, for example callable program, that will provide the same thing?

Marc
 
Hi,

If you need to schedule some job you can do one of the following things:

1) write to the internal reader and schedule a job
2) use IKJEFT01 of one of it's brothers/sisters to give a TSO command which can do something complex
3) call the program in the exec statement of your job

This subject is not so much COBOL, more a MVS question. So better look it up at
Regards,

Crox
 
Hi Crox,

Subbing a job through the internal reader is definitely an option, but I still wonder if there's something callable from Cobol that will send an e-mail, rather than running a separate job.

Marc
 
Marc -

Some e-mail products have a callable interface, some don't. I suggest you look into which mainframe e-mail product you're using and find out about the availability of a callable interface that way.

Regards.

Glenn
 
Hi,

I guess there are possibilities using MQ, LU, or a TSO command.

How do you send messages now?
Do you have Java available?

Regards,

Crox

 
Hi,

If no utitlities are available, you can create a file in your cobol program and write a JCL in that file which can be submitted via an internal reader. Mind you, you need to hardcode the jobcard and the Step statements.

The Jcl that could be written in the file is as follows
//JOBCARD as you like...
//STEP1 EXEC PGM=IEBEDIT
//SYSUT1 DD DSN='DATASET name'
//SYSUT2 DD SYSOUT =(A, SMTP)
Dataset name should contain the data that you want to send.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top