View previous topic :: View next topic |
Author |
Message |
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Tue Sep 06, 2005 9:29 pm Post subject: Trigerring a Job Based on the Presence of a Seq File |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Sep 06, 2005 9:50 pm Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Sep 07, 2005 6:55 am Post subject: |
|
|
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 |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Wed Sep 07, 2005 9:20 am Post subject: |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Wed Sep 07, 2005 9:32 am Post subject: |
|
|
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 |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Sep 07, 2005 9:59 pm Post subject: |
|
|
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 |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Wed Sep 07, 2005 11:22 pm Post subject: |
|
|
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 |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Sep 08, 2005 3:14 am Post subject: |
|
|
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 |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Fri Sep 09, 2005 11:51 am Post subject: |
|
|
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 |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Fri Sep 09, 2005 12:21 pm Post subject: |
|
|
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 |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Mon Sep 12, 2005 8:07 am Post subject: |
|
|
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 |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Mon Sep 12, 2005 8:14 am Post subject: |
|
|
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 |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Mon Sep 12, 2005 8:19 am Post subject: |
|
|
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 |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Mon Sep 12, 2005 8:35 am Post subject: |
|
|
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 |
|
|
|
|