View previous topic :: View next topic |
Author |
Message |
sreeko Beginner
Joined: 22 Jul 2004 Posts: 2 Topics: 1 Location: India
|
Posted: Thu Jul 22, 2004 7:58 am Post subject: Passing SYSUID as a parm from JCL to a DB2 program |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
sreeko Beginner
Joined: 22 Jul 2004 Posts: 2 Topics: 1 Location: India
|
Posted: Thu Jul 22, 2004 8:09 am Post subject: |
|
|
I want to pass &SYSUID to the DB2 program, not the hardcoded user id.
Thanks,
Sreekanth |
|
Back to top |
|
|
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Thu Jul 22, 2004 10:30 am Post subject: |
|
|
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 |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Jul 22, 2004 12:52 pm Post subject: |
|
|
Why can't the field be passed via the PARM statement??
//STEP1 EXEC PGM=DB2PGM,PARM='&SYSUID' |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Jul 22, 2004 1:15 pm Post subject: |
|
|
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 |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Jul 23, 2004 7:08 am Post subject: |
|
|
Ahh.
Live and learn! |
|
Back to top |
|
|
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Sat Jul 24, 2004 7:08 pm Post subject: |
|
|
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 |
|
|
|
|