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

How to code OUTPUT parameters dynamically


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

New User


Joined: 17 Jun 2009
Posts: 38
Location: Denver

PostPosted: Thu Jul 19, 2012 3:26 am
Reply with quote

Hi

I use IEBGENER with an OUTPUT DEST parameter to send emails. Sample JCL is

//EMAIL010 EXEC PGM=IEBGENER
//OUT1 OUTPUT DEST=LPEMAIL3,
// USERDATA=('TO:ab.bc@xyz.COM',
// 'SUBJECT:Email Subject,
// 'FILENAME: Test.CSV')
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=V,OUTPUT=*.OUT1
//SYSUT1 DD DSN=AB.BC.DDD.CSV,DISP=SHR

As you can see the email parametes ( To, Subject etc) is coded in USERDATA parameters. I have a project where I cannot predict the To address. I want the OUTPUT parameters to be sent to the JCL dynamically.
I can use a JCLLIB ORDER and expand the JCL from it. But my shop doesnt allow JCLs to be expnanded from regular PDS ( allows only from Changeman libraries).

Basically I want the below lines

//OUT1 OUTPUT DEST=LPEMAIL3,
// USERDATA=('TO:ab.bc@xyz.COM',
// 'SUBJECT:Email Subject,
// 'FILENAME: Test.CSV')

to be dynamically inserted in the IEBGENER step.

Any help is appreciated

Manu
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 19, 2012 3:50 am
Reply with quote

where from/when do you know the
DEST=xxxx (is the xxxx also one of the dynamic parms?)
email address
file name (is that another one of the dynamic parms?)

this kind of thing has only been explained about 20-30 times
since the first of the year.
Back to top
View user's profile Send private message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 38
Location: Denver

PostPosted: Thu Jul 19, 2012 4:23 am
Reply with quote

DEST will be constant. Other parameters are variable..I get them from a database
I couldnt find a similar query in the forum.
Can you please help
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 19, 2012 5:05 am
Reply with quote

query? this is the jcl forum, not the db2 forum.

at any time there are 3-somethimes 20 or 30 members logged-on
and 300 to 500 guests.

now we know what the member do,
but the guests?
wonder what they are doing? certainly not chatting!
my guess is that they are searching the forum,
looking thru threads that can give them a hint (if not complete solution)
about how they can solve their problem.

normally, what one does is to search/look-thru threads
find something that approximates their situation
make an attempt to implement,
if all goes well, then they are done.
in the cases where the individual still has problems,
the the post consists (should consist) of:
  • a complete description of the the desired results
  • a complete description of the problem
  • error codes encountered
  • the jcl for the job (including control cards for any utilities)
  • jessysmsgs

using BBCode to provide readability for members
who wish
(on their own time, without compensation)
to contribute to the solution of the Thread Starter's problem.

now, you have only told us that you can not modify the production Job PDS,
that you want to dynamically provide 'overrides'/input to the submitted JOB.

So, it sounds as if you need a JOB that has steps to:
  • extract data from a database
  • and provide control cards for the TO address and the FILENAME
  • and have that available to iebgener step


are you allowed to use INTRDR to submit JOBS by a JOB?
are you allowed to modify production INCLUDE libraries on the fly?
have you tried using symbolics? does that work with the USERDATA control cards?
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
Search our Forums:

Back to Top