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
 

 

Automate the job/jcl to run with new inputs whenever recived

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ramukadam

New User


Joined: 31 Oct 2007
Posts: 7
Location: Pune

PostPosted: Tue Jun 03, 2008 5:32 pm    Post subject: Automate the job/jcl to run with new inputs whenever recived
Reply with quote

We have one of our job in which we are providing the Payroll number as input and submiting the same. After execution it will send the output reports to mail which is mentioned in that job.
Now the challange for our team is that to submit this job automatically with new payroll number.

Let me know if you any more details.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Tue Jun 03, 2008 5:33 pm    Post subject: Reply to: Automate the job/jcl to run with new inputs whenev
Reply with quote

Quote:
Now the challenge for our team is that to sunbmit this job automatically with new payroll number.


how does the new payroll number originate ??
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Jun 03, 2008 9:45 pm    Post subject: Reply to: Automate the job/jcl to run with new inputs whenev
Reply with quote

Not clear what this means:
Quote:

providing the Payroll number as input and submiting the same

Is it a job that submits another job?

and...
Quote:

submit this job automatically with new payroll number.

are you already automatically submiting with static payroll number?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Jun 03, 2008 10:57 pm    Post subject: Reply to: Automate the job/jcl to run with new inputs whenev
Reply with quote

ramu,

as said your requirement is not clear. From what i understood you can use REXX for the same.

1) Throw a panel and get the payroll no

2) when entered submit the job using sub.

3) keep a loop and throw the panel again and check if you want to submit the job again. If yes use the new payroll no entered and proced, else exit.
Back to top
View user's profile Send private message
ramukadam

New User


Joined: 31 Oct 2007
Posts: 7
Location: Pune

PostPosted: Wed Jun 04, 2008 12:03 pm    Post subject: Automate the job/jcl to run with new inputs whenever recived
Reply with quote

We receive a large number of requests for Book of Business (BOB). We need to determine the feasibility of automating the BOB requests. So need to add functionality to select records by the agent number. This would be a new online transaction.

Below is the job for BOB. We are providing the Agent number (payroll no) in LTCINPUT whenever that agent sells the policy and then submit the job. The Agent number we will come to know, and now we want to provide the agent number at ONLINE screen such that as we give the agent number the following job should run automatically with that agent number and will send the reports to mail is mentioned.

//KADAMYAX JOB (acctg,A,ORD),'LTC ',NOTIFY=&SYSUID,
// CLASS=Z,MSGCLASS=V,MSGLEVEL=1
/*JOBPARM R=C04A
//CLEAN1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEL 'ISS.example.FILEOUT.DATA' PURGE
DEL 'ISS.example.FILEOUT.HDR' PURGE
SET MAXCC=0
//*
//STEP EXEC PGM=LTCSELCT
//STEPLIB DD DSN=CMN2.UTIL.#Package No.LNK,DISP=SHR
//*We are using the program from this package TO FIND THE BOB
//*for GIVEN PAYROLL NUMBER.
// DD DSN=SYS2.SHAR.LINKLIB,DISP=SHR
// DD DSN=SYSPROD.CEE.SCEERUN,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABENDAID DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//MASTER DD DSN=P11.samp$0A.QW0A(0),DISP=SHR,DCB=RECFM=VB
// DD DSN=P11.samp$0B.QW0B(0),DISP=SHR,DCB=RECFM=VB
//CNTLIN DD DSN=example.GROUP2.PROCLIB(LTCINPUT),DISP=SHR
//MASTOUT DD DUMMY
//FILEOUT DD DSN=ISS.example.FILEOUT.DATA,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=400,BLKSIZE=2400),
// SPACE=(TRK,(20,5),RLSE)
//HDROUT DD DSN=ISS.example.FILEOUT.HDR,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=400,BLKSIZE=2400),
// SPACE=(TRK,(20,5),RLSE)
//RECIOG DD DSN=VISS2.PPXD0$00.WD00D.Y2K,DISP=SHR
//*
//SEND EXEC PGM=IKJEFT1B
//SYSIN DD DUMMY
//SYSEXEC DD DSN=TSO.SSS.REXXLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%XMITIP 'KADAM, YASHWANT<fred@GMAIL.COM> +
MSGDD CONTENT +
MSG72 +
REPLYTO fred@GMAIL.COM +
FROM fred@GMAIL.COM +
SUBJECT 'LTC FILE' +
FILEDD (CSV ) +
FILEDESC (CSV ) +
FILENAME (887403.CSV ) +
FORMAT TXT/CSV
/*
//CSV DD DSN=ISS.example.FILEOUT.HDR,DISP=SHR
// DD DSN=ISS.example.FILEOUT.DATA,DISP=SHR
//CONTENT DD *
THE LTC FILE.
//

So instead of submitting the job each time we need to run the same with new agent number automatically.
[/b][/url]
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Jun 04, 2008 12:17 pm    Post subject: Reply to: Automate the job/jcl to run with new inputs whenev
Reply with quote

You explanation is again not clear...

since we take time to understand Your process,
You should be so kind not to use Your shop jargon...

we do not care about BOB or ALICE

what is the triggering event for the process ...
that' what You should explain
Back to top
View user's profile Send private message
ramukadam

New User


Joined: 31 Oct 2007
Posts: 7
Location: Pune

PostPosted: Wed Jun 04, 2008 2:04 pm    Post subject: Automate the job/jcl to run with new inputs whenever recived
Reply with quote

We receive a large number of requests for Book of Business (BOB). We need to determine the feasibility of automating the BOB requests. So need to add functionality to select records by the agent number. This would be a new online transaction.

Below is the job for BOB. We are providing the Agent number (payroll no) in LTCINPUT whenever that agent sells the policy and then submit the job. The Agent number we will come to know, and now we want to provide the agent number at ONLINE screen such that as we give the agent number the following job should run automatically with that agent number and will send the reports to mail is mentioned.

//KADAMYAX JOB (D74196,A,ORD),'LTC ',NOTIFY=&SYSUID,
// CLASS=Z,MSGCLASS=V,MSGLEVEL=1
/*JOBPARM R=C04A
//CLEAN1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEL 'ISS.KADAMYA.FILEOUT.DATA' PURGE
DEL 'ISS.KADAMYA.FILEOUT.HDR' PURGE
SET MAXCC=0
//*
//STEP EXEC PGM=LTCSELCT
//STEPLIB DD DSN=CMN2.UTIL.#Package No.LNK,DISP=SHR
//*We are using the program from this package TO FIND THE BOB
//*for GIVEN PAYROLL NUMBER.
// DD DSN=SYS2.SHAR.LINKLIB,DISP=SHR
// DD DSN=SYSPROD.CEE.SCEERUN,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//ABENDAID DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//MASTER DD DSN=P11.PWUWK$0A.QW0A(0),DISP=SHR,DCB=RECFM=VB
// DD DSN=P11.PWUWK$0B.QW0B(0),DISP=SHR,DCB=RECFM=VB
//CNTLIN DD DSN=PNO2.GROUP2.PROCLIB(LTCINPUT),DISP=SHR
//MASTOUT DD DUMMY
//FILEOUT DD DSN=ISS.KADAMYA.FILEOUT.DATA,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=400,BLKSIZE=2400),
// SPACE=(TRK,(20,5),RLSE)
//HDROUT DD DSN=ISS.KADAMYA.FILEOUT.HDR,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=400,BLKSIZE=2400),
// SPACE=(TRK,(20,5),RLSE)
//RECIOG DD DSN=VISS2.PPXD0$00.WD00D.Y2K,DISP=SHR
//*
//SEND EXEC PGM=IKJEFT1B
//SYSIN DD DUMMY
//SYSEXEC DD DSN=TSO.SSS.REXXLIB,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
%XMITIP 'KADAM, YASHWANT<YASHWANTKADAM1@GMAIL.COM> +
MSGDD CONTENT +
MSG72 +
REPLYTO YASHWANTKADAM1@GMAIL.COM +
FROM YASHWANTKADAM1@GMAIL.COM +
SUBJECT 'LTC FILE' +
FILEDD (CSV ) +
FILEDESC (CSV ) +
FILENAME (887403.CSV ) +
FORMAT TXT/CSV
/*
//CSV DD DSN=ISS.KADAMYA.FILEOUT.HDR,DISP=SHR
// DD DSN=ISS.KADAMYA.FILEOUT.DATA,DISP=SHR
//CONTENT DD *
THE LTC FILE.
//

So instead of submitting the job each time we need to run the same with new agent number automatically.
[/b][/url]
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Jun 04, 2008 2:07 pm    Post subject: Reply to: Automate the job/jcl to run with new inputs whenev
Reply with quote

Do You realize that You just reposted the same useless thing..
as I said before a job stream is simply a job stream, and does not give the slightest hint on the process icon_evil.gif

Quote:
... This would be a new online transaction. ...


OK... go ahead I do not see any problems
display a screen,
receive the relevant data
check the data for congruency with the other data in Your databaes
update all the relevant databases
using the internal reader facilities submit a batch job customized for Your needs
display a screen with a confirmation of the actions taken

- check Your docs, cics/ims, to find how to do it
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: Wed Jun 04, 2008 7:39 pm    Post subject:
Reply with quote

Hello,

Said a bit differently, get the value from the screen and submit customized jcl thru the internal reader containing the specifics for "this" run.

If you are not familiar with the internal reader (INTRDR), there are multiple examples in the forums. If you find something you don't understand, post what you found as well as your question about it and someone will be able to offer suggestions.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Jun 04, 2008 10:49 pm    Post subject: Reply to: Automate the job/jcl to run with new inputs whenev
Reply with quote

1. ramukadam, we probably have a language difference...
Quote:
we need to run the same with

The term 'the same' is not clear enough for us to help you. It is fairly clear that you do not want the same. You probably mean something like 'we need to run a very similar job, but which uses a different agent number'

2. Your sample JCL does not seem to have a agent number or payroll number. Perhaps you mean the agent's TSO userid, 'KADAMYA', which I think is in several places. Please do not post your JCL again, but perhaps describe where the agent number is.

3. There are several ways to customize a job. One way is to use rexx along with QUEUE and SUBMIT.
Code:

/* REXX */   
parse upper arg member_name 

queue "//"sysvar('SYSUID')||"X"   "JOB ,"                           
queue "//             TIME=(,59),MSGCLASS=H,NOTIFY="sysvar('SYSUID')
queue "//STEP1   EXEC PGM=IEBCOPY                    "             
queue "//SYSPRINT DD SYSOUT=*                        "             
queue "//OUTDD    DD DISP=SHR,DSN=MY.PDS             "             
queue "//INDD     DD DISP=SHR,DSN=OTHER.PDS          "             
queue "//SYSUT3   DD UNIT=SYSDA,SPACE=(CYL,(10,20))  "             
queue "//SYSUT4   DD UNIT=SYSDA,SPACE=(CYL,(10,20))  "             
queue "//SYSIN    DD *                               "             
queue " COPYMOD INDD=INDD,OUTDD=OUTDD                "             
queue "  SELECT MEMBER=(("member_name",,R)           "             
queue "/*EOF                                         "             
queue "@#"                                                         
Address TSO "SUB * END(@#)"                                         

During the QUEUE, rexx will use variable substitution.
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
This topic is locked: you cannot edit posts or make replies. Providing inputs to a panel of anothe... Raghur CLIST & REXX 2 Tue Apr 05, 2016 12:01 pm
No new posts Need Inputs: for generic program(s) rocky_balboa COBOL Programming 2 Tue Feb 04, 2014 1:43 pm
No new posts DB2 query to fetch records from table... dilip_bangalore DB2 7 Tue Nov 12, 2013 10:03 pm
No new posts Automate Purging of online Exped Session yogesh suryawanshi CICS 5 Thu Aug 22, 2013 10:14 am
No new posts Missing expat's inputs Gnanas N General Talk & Fun Stuff 2 Wed Sep 12, 2012 6:56 pm


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