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 

Passing SYSUID as a parm from JCL to a DB2 program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sreeko
Beginner


Joined: 22 Jul 2004
Posts: 2
Topics: 1
Location: India

PostPosted: Thu Jul 22, 2004 7:58 am    Post subject: Passing SYSUID as a parm from JCL to a DB2 program Reply with quote

Hi,

I need to pass the SYSUID from the jcl to a db2 program.How do i code for that?

Thanks,
Sreekanth
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 22, 2004 8:05 am    Post subject: Reply with quote

Sreeko,

Please search before posting. This topic has been discussed earlier. Check this topic

http://www.mvsforums.com/helpboards/viewtopic.php?t=2456

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
sreeko
Beginner


Joined: 22 Jul 2004
Posts: 2
Topics: 1
Location: India

PostPosted: Thu Jul 22, 2004 8:09 am    Post subject: Reply with quote

I want to pass &SYSUID to the DB2 program, not the hardcoded user id.

Thanks,
Sreekanth
Back to top
View user's profile Send private message Yahoo Messenger
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Thu Jul 22, 2004 10:30 am    Post subject: Reply with quote

Hi Sreeko,

You can't pass a symbolic via in-stream data in JCL. You're probably using
SYSTSIN DD *

You can produce the JCL dynamically via a COBOL pgm outputting it to the INTRDR. You can then pass the &sysuid to the COBOL pgm via the PARM field.

Regards, Jack.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Jul 22, 2004 12:52 pm    Post subject: Reply with quote

Why can't the field be passed via the PARM statement??

//STEP1 EXEC PGM=DB2PGM,PARM='&SYSUID'
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 22, 2004 1:15 pm    Post subject: Reply with quote

superk,

DB2 programs under IKJEFT01. so you need to pass the parameters via SYSTSIN DD statement

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


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jul 23, 2004 7:08 am    Post subject: Reply with quote

Ahh.

Live and learn!
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Sat Jul 24, 2004 7:08 pm    Post subject: Reply with quote

Hi Sreeko,

Looking over my prev post I realize you only have to create the SYSTSIN dataset and pass it to the IKJEFT01 step. No need for INTRDR. E.g.:

//s1 exec pgm=makeSYSTSIN,parm=(&sysuid)
//systsout dd dcn=&sysuid..systsin.cards,disp=(,pass),etc....
//*
//s2 exec pgm=IKJEFT01,...
//systsin dd dsn=*.s1.systsout,disp=(old,delete,delete)
.
.

Regards, Jack.
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 -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
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