IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

JCL: FTP question


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Thu May 24, 2012 11:46 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 25, 2012 12:01 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri May 25, 2012 12:06 am
Reply with quote

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
View user's profile Send private message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Fri May 25, 2012 12:32 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 25, 2012 12:48 am
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri May 25, 2012 12:49 am
Reply with quote

>>>>>>>>>>>G for generation
NCL0.TWXXXXC0.G0001V00
>>>>>>>>>>>>>>>V for Version
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Fri May 25, 2012 1:33 am
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 25, 2012 4:36 pm
Reply with quote

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
View user's profile Send private message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Fri May 25, 2012 9:18 pm
Reply with quote

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
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri May 25, 2012 9:45 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri May 25, 2012 9:54 pm
Reply with quote

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
View user's profile Send private message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Fri May 25, 2012 9:58 pm
Reply with quote

it was my bad..apologies..yes it is generations...

thanks..
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri May 25, 2012 10:01 pm
Reply with quote

Are you done with the 1000 times on the board already? icon_wink.gif
Back to top
View user's profile Send private message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Fri May 25, 2012 10:06 pm
Reply with quote

YES..
i did it in front of my manager and included in my timsheet as well..
icon_razz.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Sat May 26, 2012 10:33 am
Reply with quote

The actual punishment is 1024 times.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat May 26, 2012 9:29 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Question for file manager IBM Tools 7
No new posts question for Pedro TSO/ISPF 2
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts panel creation question TSO/ISPF 12
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
Search our Forums:

Back to Top