View previous topic :: View next topic
|
Author |
Message |
chhabraravneet
New User
Joined: 04 Oct 2007 Posts: 49 Location: Mumbai
|
|
|
|
Hi,
Can anyone please help me with the below issue?
I am trying to create a step in JCL where i need to send an email to myself about the GDG input file versions that ran last night..
Problem in Detail:
I have a job PWXXXXCD, which creates a file daily say A.1.
My job PWYYYYCD runs on Monday, and takes all the 7 files as input that PWXXXXCD created.
I want to a jcl step, which will just give me an information..that these are the file versions that were input to my job PWYYYYCD.
Why i want this is i just want to make sure that i have all 7 versions as an input to my job. Nobody should get missed. Once it happened that my job ran with only 3 versions and i came to know about it one month later.
Thanks for helping. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You mean generations rather than versions. . .
You could run a listcat of the gdg and e-mail the output to yourself.
This would NOT be ftp, it would be a batch job to send an e-mail. There are many examples of sending an e-mail in the forum.
If you find something that is not clear, post what you found and your doubt. Someone will be able to clarify. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Your post is very inconsistent -- the topic title mentions FTP yet the post mentions email, which is COMPLETELY different than FTP. Your best bet would be to do as Dick suggested and email a LISTCAT output to yourself.
Are the generations input separately into your program? Are they concatenated? Do you just reference the GDG base and let the system provide you with all the generations? I don't think you've provided nearly enough information to give you any other solution than what Dick suggested. |
|
Back to top |
|
|
chhabraravneet
New User
Joined: 04 Oct 2007 Posts: 49 Location: Mumbai
|
|
|
|
Thanks for the prompt response guys.
Bob:
What Dick suggested i guess will work..
My job takes the GDG base as input.
NCL0.TWXXXXC0 is the GDG base.
I want to find out the number of versions how many are present, like NCL0.TWXXXXC0.G0001V00, NCL0.TWXXXXC0.G00002V00 and pass this through an email.
so my email should consist of : (if there are only 3 version created)
NCL0.TWXXXXC0.G0001V00
NCL0.TWXXXXC0.G0002V00
NCL0.TWXXXXC0.G0003V00
I think below code should work?
//STEP01 EXEC PGM = IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES GDG(NCL0.TWXXXXC0) ALL
/*
Am i correct ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you submit this and see the output.
If there are any questions or problems, post the information generated by the run and we will help.
You need to concentrate on how to sent the e-mail if you have not done this before. It would be good to ask your co-workers or support how e-mail is sent from your mainframe. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
>>>>>>>>>>>G for generation
NCL0.TWXXXXC0.G0001V00
>>>>>>>>>>>>>>>V for Version |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
I might be missing the point, but if you want to ensure all seven generations are processed, why not just specify them all in the JCL instead of just using the GDG base name. Then you'll get a JCL error if any are mising. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
PS.: Automation is good, but to know such a thing looking in JESLOG DD should suffice, no? OR RMSRPT if you use CA7 -- said that because, even if you get the e-mail, job is anyways over already! |
|
Back to top |
|
|
chhabraravneet
New User
Joined: 04 Oct 2007 Posts: 49 Location: Mumbai
|
|
|
|
David,
To answer your question, yes i could use the JCL versions in my job, but you know i just want this requirement on Monday..and then from Tuesday-Friday, i want to use only 1 version..
Let me explain you whole thing:
Sat Sun Mon Tue Wed Thurs Fri
X X X X X X X (all files generate each day)
my job runs on Monday to Friday.
On Monday, i take 3 versions (sat,sun and mon) and run my job monday night with these 3 versions. On rest of days Tue-Fri, i just have a single version.
so i have a SINGLE job which takes care of the files. Now if i will include versions in my job itself..then for Monday i have to right a different jcl.. and for the rest of the days..i have to rite a different jcl. that will be too much of work to schedule that job on monday and what if there's a holiday on monday..
So we decided to use the same jcl...but just sent a notification of the versions on MOnday..that these files are present and got generated.
Anuj -
Yes it is correct to just check the prsd JESLOG directly and verify the versions..that what we are doing right now..
but i just want to automate this so that on monday when i come i could just check my email and thats it. its not hard or there's no pressure to do this..but it would be great if i am able to do this..
This is what i have prepared till now:
//PWSTEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT ENTRIES(NCL0.PW5030C0) ALL
/*
(The above step will give me the versions that are presnt in the system)
Another step:
//PWSTEP02 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(A,SMTPT)
//SYSUT1 DD DISP=SHR,
// DSN=@tsoid.parm.data (ABCD)
//*
Now i am not getting how to use the above output from my pwstep01 so that i could attach that and email it via pwstep02...
@tsoid.parm.data (ABCD) consist of:
HELO PMNODE1
MAIL FROM:<my email>
RCPT TO:<any email id>
RCPT TO:<email id>
DATA
TO:<email id>
TO:<email id>
FROM:<email id>
SUBJECT: MONDAY REPORT |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
chhabraravneet
Go to the black board and write 1000 times GENERATIONS.
Every expert has told you that you are talking about GENERATIONS not versions.
Yet in your lastest post you use versions not one but nine times.
Details are important, and so is reading and comprehending from those who are trying to help you.
You fail at both. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Quote: |
Yet in your lastest post you use versions not one but nine times. |
Thats funny. I had to count them.
This worked for me:
Code: |
//LISTCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A,DEST=(MYSYS,PEDRO)
//SYSIN DD *
LISTC LVL('PEDRO.CLIST.CLIST') ALL
/*EOF |
Where mysys,pedro somehow maps to my intranet id.
but your network definitions/setup might be different.
If you continue with TCP/IP, you need to read the JCL manual on how to use DISP=(,PASS) in your listcat step and how to use one DD name with multiple DD cards to combine your passed file with your email control statements. |
|
Back to top |
|
|
chhabraravneet
New User
Joined: 04 Oct 2007 Posts: 49 Location: Mumbai
|
|
|
|
it was my bad..apologies..yes it is generations...
thanks.. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Are you done with the 1000 times on the board already? |
|
Back to top |
|
|
chhabraravneet
New User
Joined: 04 Oct 2007 Posts: 49 Location: Mumbai
|
|
|
|
YES..
i did it in front of my manager and included in my timsheet as well..
|
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
The actual punishment is 1024 times. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Still, the best and most efficient way is to run 2 different procedures scheduled as required or run the job mutliple times on Monday with each one having a different generation specified - you only need one procedure and a symbolic parameter that defaults to (0) on Tues - friday and is set to (0), (-1), (-2) for the 3 jobs on Monday. If Monday is a holiday then provide an over-ride on Tuesdays jobs to (0) -> (-3). None of this stupid fart-arsed waste of resoiurces trying to be clever. Over the years I have found that doing things in the simplest possible way is more efficient and easily understood by those that come after.
Edit: and setting it up this way is far easier and quicker than the fart-arsed way. Just consider how much time has been wasted trying to get a fart-arsed solution. |
|
Back to top |
|
|
|