If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > JCL SET Statements & SQL Queries....

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-10, 12:11
goldfishhh goldfishhh is offline
Registered User
 
Join Date: Nov 2004
Posts: 54
JCL SET Statements & SQL Queries....

I'm trying to simplify my life a tad and want to use SET statements to pass values versus hard coding them. My JCL looks like this:

Code:
//SET01    SET HLQ='TOTI',DBNAME='TOTDB01',SUBSYS='DB2DB2B',
//             SUBID='DB2B',SYSMSG='I'     
//*
.
.
. (few lines deleted)
.
.
//DELETE2  EXEC PGM=IKJEFT1B,DYNAMNBR=20,REGION=0M
//STEPLIB  DD DSN=&SUBSYS..DSNLOAD.TEMP,DISP=SHR
//         DD DSN=&SUBSYS..DSNLOAD.PERM,DISP=SHR
//         DD DSN=&SUBSYS.****NLIB.LOAD.TEMP,DISP=SHR
//         DD DSN=&SUBSYS.****NLIB.LOAD.PERM,DISP=SHR
//SYSPRINT DD SYSOUT=&SYSMSG
//SYSTSPRT DD SYSOUT=&SYSMSG
//SYSTSIN  DD DSN=TOPER.CONTROL(OT&SUBID),DISP=SHR
//SYSOUT   DD SYSOUT=&SYSMSG
//SYSIN    DD DSN=TOPER.CONTROL(SQL500),DISP=SHR

SQL500 looks like this:

Code:
                          
    DSN SYS(DB2B)           

    RUN  PROGRAM(DSNTEP2) PARMS('/ALIGN(LHS)')  
    END
At the top, I have a SET statement for SUBID='DB2B' and I want to change SQL500 to use the SET statement

Code:
                          
   DSN SYS(&SUBID)           

   RUN  PROGRAM(DSNTEP2) PARMS('/ALIGN(LHS)')  
   END
Something isn't happy. What am I doing wrong?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On