Need help-very new in mainframe



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Need help-very new in mainframe

Postby tanaghosh » Thu Jun 03, 2010 11:48 pm

I am very new to mainframe technology. I just learned the technolgy myself and trying to start working :)
I need your help to complete my first task :)
I am having one jcl. After the job run, it sends the report to control-d.
Now I have to add one logic in jcl so that after the job run it sends the report to control-d and also to an email id.
The logic should be that the report will go to control-d and also into a dataset, and from the dataset we can send it to email id.
Can you please help me that what should be the code/syntax for this in jcl? What is the code I should add in the jcl?
Please help. Thanks in adv :)
tanaghosh
 
Posts: 7
Joined: Thu Jun 03, 2010 11:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help-very new in mainframe

Postby dick scherrer » Fri Jun 04, 2010 1:15 am

Hello and welcome to the forum,

Suggest you post what you have, and explain what it does correctly, what has problems, and what questions you have.

You need to talk with someone on your system for the local specifics for control-d.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Need help-very new in mainframe

Postby Bill Dennis » Fri Jun 04, 2010 2:18 am

I assume the report gets to Control-D based on a SYSOUT class.

To help you get started, you cannot write a report to both SYSOUT and a data set on one DD name. You'll want to create a report data set first and then go from there.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help-very new in mainframe

Postby tanaghosh » Wed Jun 16, 2010 11:33 pm

Hi Bill,
I can write another DD to send the report to dataset right?
can you pls let me know what can be the code snippet for this?
Thanks in adv :))
tanaghosh
 
Posts: 7
Joined: Thu Jun 03, 2010 11:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help-very new in mainframe

Postby dick scherrer » Thu Jun 17, 2010 12:05 am

Hello,

Unless i misunderstand something, you don't need "another DD".

Simply change the existing DD from sysout= to dsn= and describe the dataset to be written.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Need help-very new in mainframe

Postby tanaghosh » Thu Jun 17, 2010 10:06 pm

There is already one DD which sends the job o/p to control-d.
I dont wanna affect this but just wanna send the same job o/p to dataset.
That's why I thought, I may need to write one more DD to send job o/p into dataset.
Please correct me if I'm wrong.
Thanks in adv :)
tanaghosh
 
Posts: 7
Joined: Thu Jun 03, 2010 11:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help-very new in mainframe

Postby steve-myers » Thu Jun 17, 2010 10:31 pm

It doesn't work the way you seem to think it should work. Mr. Scherrrer is proposing that you change something that looks like -
//stpname EXEC PGM=yourpgm,...
 ... (Some JCL)
//yourDD   DD  SYSOUT=x,...
 ... (More JCL)
to something that looks something like -
//stpname EXEC PGM=yourpgm,...
 ... (Some JCL)
//yourDD   DD  DISP=(,CATLG),DSN=your-dataset,...
 ... (More JCL)
//CTLD    EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=OLD,DSN=your-dataset
//SYSUT2   DD  SYSOUT=x,...
//SYSIN    DD  DUMMY
This will work most of the time, but not always. For example, in researching for a recent post to the Assembler forum I wrote a small program that did a dynamic allocation call, then called another program that listed the allocated DD statements to a DD statement that was allocated as a SYSOUT data set, then did another dynamic allocation call, then called the DD statement lister. If the output DD in the DD statement lister had been allocated to a data set rather than a JES data set, the second call to the DD statement lister would have rewritten the output data set rather than add to the data set as it did when I ran my test.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Need help-very new in mainframe

Postby tanaghosh » Thu Jun 17, 2010 11:57 pm

Thanks to all for your help.. I'll try this and let u know :)
tanaghosh
 
Posts: 7
Joined: Thu Jun 03, 2010 11:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help-very new in mainframe

Postby tanaghosh » Thu Jul 01, 2010 7:06 pm

Hi,
Now I am having job reports in dataset.
But I am having 2 reports in 2 datasets. And need to send these reports as an attachment through mail.
My question is:
1) Is it possible to attach two files in one email in single JCL. If yes how to?
2) If no, what is the other way to proceed.

FYI. I have the below codes:
STEPNAME EXEC PROC=XXXXX,..................
HEADER=AAAAAA,
MESSAGE=ABCD.TXT,
ATTACH=My DSN Name,
FILENAME=........,
DATATYPE=TEXT

So here I need to attach one more text file.
tanaghosh
 
Posts: 7
Joined: Thu Jun 03, 2010 11:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Need help-very new in mainframe

Postby Robert Sample » Thu Jul 01, 2010 7:22 pm

You need to contact your site support group and work with them. The procedure you are using is not common -- it is very specific to your site and only your site. There is no way we can know exactly what is being executed therefore no way we can help you. Only your site support group has the knowledge to help.

In general, yes it is possible to send multiple attachments in an email -- assuming, of course, that your site uses standard SMTP for emails. If they use a vendor package then it may or may not be possible. Are you using a vendor package? Only your site support group can say for sure.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post