MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Trigerring a Job Based on the Presence of a Seq File
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Tue Sep 06, 2005 9:29 pm    Post subject: Trigerring a Job Based on the Presence of a Seq File Reply with quote

Hi Everyone,

Is there a way to invoke a JCL, that will submit a Job based on the Presence of a Sequential File using REXX.

Files are being FTP'ed to the mainframe server periodically. Once they hit the Server, I need to trigger the JCL. I am not interested in achieving this using any Job Schedulers. Just scratching my head if there is some way to do this using REXX or CLIST.

Please share your thoughts on how this can be achieved.

Thanks for your time.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Sep 06, 2005 9:50 pm    Post subject: Reply with quote

Not sure what you mean by 'invoke a jcl', but SYSDSN() or LISTDSI() will tell you if a file exists from Rexx. Just don't submit a long running job that sits in a loop and checks occasionally. That is a major wast of resource, specifically initiators, and is a task better suited to a started task, or if that is out of the qustion, a PC that submits occasional jobs to check.
Back to top
View user's profile Send private message Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Sep 07, 2005 5:52 am    Post subject: Reply with quote

sakreg,

Why not FTP the JCL that needs to run specifying "filetype=jes", which will go to the internal reader and willl be submitted on the mainframe.You can FTP the JCL after FTPing the dataset. check these links

http://www.mvsforums.com/helpboards/viewtopic.php?t=931&highlight=filetype

http://www.mvsforums.com/helpboards/viewtopic.php?t=2358&highlight=filetype

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Sep 07, 2005 6:55 am    Post subject: Reply with quote

Kolusu,

I believe that there is no relation b/w the mainframe dataset and sakreg's jobs. meaning, the datasets might be incoming files for prod/test region but he wants to do something using his jcl once he receives the datasets. Thatz why he said he does not want any Scheduler to do the task.

Instead of monitoring the incoming dataset manually, he is trying to have some tool do the task.

Sakreg,
Let me know if my assumption is wrong.

thanks,
Phantom
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Wed Sep 07, 2005 9:20 am    Post subject: Reply with quote

Quote:
I am not interested in achieving this using any Job Schedulers.


Why not?

It would be interesting to know of any other method.

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Sep 07, 2005 9:32 am    Post subject: Reply with quote

Phantom,

I think we both are on the right path of assuming that sakreg is receiving files on the mainframe from an external source.

My suggestion is to FTP the JCL to be run upon the creation of the dataset immediately after FTP'ing the dataset.

The seq would be:

1. FTP the txt file mainframe and save as hlq.mlq.tlq

2. FTP the JCL using filetype=jes which will actually use the dataset created in step1.

Step2 essentially does the same thing as invoking the Job upon creation of the dataset which is what sakreg wanted.

Hope this helps...

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Sep 07, 2005 9:59 pm    Post subject: Reply with quote

That assumes that the sender is willing to submit the job too which is unlikely. Though sakreg isn't interested in using a job scheduler, what he intends to write is ... a job scheduler. In any event, I'd take the middle ground. Just submit a job from the PC that does the check for the data set in 1 step and if it exists, does whatever work is needed in the next step (or better yet, all in 1 step).
Back to top
View user's profile Send private message Visit poster's website
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Wed Sep 07, 2005 11:22 pm    Post subject: Reply with quote

Both (kolusu and phantom) are right.

I have a Visual Basic Screen which prepares and FTPS's the input file alone.The JCL will reside in the mainframe. This JCL would kick off a COBOL pgm with the File that had been received and then process it.

As of now, we have to monior the presence of the sequential file and then ask the operator to start the job! The design does not allow to define the FTP control card locally and then use it for FTP'ing for some security reasons.

As poinetd out by phantom, I am thinking if a kind of tool using REXX will be a help to monitor the presence of input file and if present, kick off the JCL in the mainframe. Any thoughts around this. I am a absolute beginner for REXX.
But since it is a kind of scripting language, I thought it might be possible.

Thanks.
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Sep 08, 2005 3:14 am    Post subject: Reply with quote

sakreg,

Quote:

The design does not allow to define the FTP control card locally and then use it for FTP'ing for some security reasons.


Not a problem at all, Submitting mainframe jobs from PC can be done in two ways.
1. FTP the JCL from PC to Mainframe Host and submit the job.
2. Invoke a JCL (which is already in mainframe) from PC.

I believe the second option will solve your problem. Just follow the FTP instructions shown below.

Option : 1 FTP & Submit
Code:

ftp ipaddress
userd
password
quote site filetype=jes
put 'your text file having JCL'
quit


Option : 2 Invoke JCL in mainframe.
Code:

ftp ipaddress
userd
password
quote site filetype=jes
get 'YOUR.JCL.PDS(JCLMEM)'
quit


For more details read this topic
http://www.mvsforums.com/helpboards/viewtopic.php?t=2358&highlight=filetype+jes

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Fri Sep 09, 2005 11:51 am    Post subject: Reply with quote

Thanks to everyone, who contributed their thoughts.

I would have to try these. Is there a need to mention the Transfer Type like Ascii or Binary or by default it would be Ascii
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Fri Sep 09, 2005 12:21 pm    Post subject: Reply with quote

Sakreg,

Quote:

Is there a need to mention the Transfer Type like Ascii or Binary or by default it would be Ascii


As far as I know it depends on the default settings of the Target machine. So, there is no harm in being safe by providing ASCII. Binary will be used for transferring LOAD modules and other such crypted data. For JCLs, Programs etc...use ASCII.

Thanks,
Phantom
Back to top
View user's profile Send private message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Mon Sep 12, 2005 8:07 am    Post subject: Reply with quote

Code:
D:\>ftp XX.XXX.XXX.XX
Connected to 12.345.567.89
220-NETIFTP1 IBM FTP CS V1R4 at SITE.COM, 12:52:38 on 2005-09-12
.
220 Connection will close if idle for more than 10 minutes.
User (12.345.567.89:(none)): asdfgh
331 Send password please.
Password:
230 asdfgh is logged on.  Working directory is "asdfgh.".
ftp> quote site filetype=jes
200 SITE command was accepted
ftp> get 'asdfgh.cn.cntl(altseq)'
200 Port request OK.
125-Submitting job 'asdfgh.cn.cntl(altseq)' FIXrecfm 80
125 When JOB02148 is done, will retrieve its output
550 JesPutGet aborted, job not found


Any thoughts on why I am seeing this when I try to trigger a JCL using a command prompt?
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Mon Sep 12, 2005 8:14 am    Post subject: Reply with quote

Does the job in 'asdfgh.cn.cntl(altseq)' start with the same six characters used for the userid? As an example, the job in 'asdfgh.cn.cntl(altseq)' should have a JOB card similar to this:

//ASDFGH1 JOB (.....),CLASS=,MSGLCASS=
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Sep 12, 2005 8:19 am    Post subject: Reply with quote

Sakreg,

Check the status of JOB02148. The job has already been submitted. Check in SPOOL if it ended in error.

Thanks,
Phantom
Back to top
View user's profile Send private message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Mon Sep 12, 2005 8:35 am    Post subject: Reply with quote

I am not able to edit my previous post,

Any thoughts on why I am seeing this
Code:
550 JesPutGet aborted, job not found

when I try to trigger a JCL using a command prompt?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group