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

Can i values be passed as parametre in INSERT through JCL?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Fri Aug 27, 2010 8:54 am
Reply with quote

Hi,

I would like to pass VALUE of a field through parametre by submitting jCL. Is that possible?

I am running simple insert query through JCL with insert SQL as below:

INSERT INTO TABLE
VALUES ( &PARM1, &PARM2, 123);

Is that possible for me to pass &PARM1, &PARM2 through jcl in stead of hard coding values?
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Aug 27, 2010 1:25 pm
Reply with quote

JCL doesn't do SQL
you missed a step between JCL and SQL : JCL => program or utility => SQL
Back to top
View user's profile Send private message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Mon Aug 30, 2010 10:19 am
Reply with quote

GuyC,

I mean JCL utility DB2 utility like DB2CPROC or any BMC utility to run SQL queries through data set.

In that case can i mention & in my sql values and pass those values through jcl.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Aug 30, 2010 10:26 am
Reply with quote

Hello,

Suggest you create your insert statement with the values resolved in a pds member and then reference this in the batch sql process.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts DB2 Event passed to the Application P... DB2 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:

Back to Top