Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL: FTP question

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL: FTP question
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

Site Director


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

PostPosted: Fri May 25, 2012 12:01 am    Post subject:
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: 7914
Location: Bellevue, IA

PostPosted: Fri May 25, 2012 12:06 am    Post subject:
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    Post subject: Reply to: JCL: FTP question
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

Site Director


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

PostPosted: Fri May 25, 2012 12:48 am    Post subject:
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    Post subject:
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: 175
Location: UK

PostPosted: Fri May 25, 2012 1:33 am    Post subject:
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

Senior Member


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

PostPosted: Fri May 25, 2012 4:36 pm    Post subject:
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    Post subject: Reply to: JCL: FTP question
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: 645
Location: Pennsylvania

PostPosted: Fri May 25, 2012 9:45 pm    Post subject:
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

Senior Member


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

PostPosted: Fri May 25, 2012 9:54 pm    Post subject: Reply to: JCL: FTP question
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    Post subject: Reply to: JCL: FTP question
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: 645
Location: Pennsylvania

PostPosted: Fri May 25, 2012 10:01 pm    Post subject:
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    Post subject: Reply to: JCL: FTP question
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

Active Member


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

PostPosted: Sat May 26, 2012 10:33 am    Post subject:
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: 1717
Location: UK

PostPosted: Sat May 26, 2012 9:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fault Analyzer - listings question. egrove IBM Tools 4 Thu Aug 11, 2016 5:31 pm
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts DFSort Question krrp DFSORT/ICETOOL 9 Mon Mar 07, 2016 7:11 pm
No new posts Question: REORG on LOB tablespaces rakesh1155 DB2 1 Fri Aug 14, 2015 2:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us