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

Can we pass values to the SQL query in unload JCL?


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

New User


Joined: 28 May 2010
Posts: 4
Location: India

PostPosted: Thu Aug 05, 2010 3:33 pm
Reply with quote

In unload JCL i want to pass some values in where clause. Is it possible to do that?

For example:

I want to pass '1234' to the below query.

In SYSIN,

select colA,colB from TableA where colA = 'value needs to be substitued'.

That '1234' will change daily.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 05, 2010 3:42 pm
Reply with quote

Huh, Can you explain what on earth this question has to do with DFSORT ?
Topic moved.

Have you searched the forum for symbolic substitution in SYSIN ........... I doubt it
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 05, 2010 4:38 pm
Reply with quote

Revathy K wrote:
That '1234' will change daily.

a few questions:

1. is the SYSIN datastream INLINE or is it a ds or member of a pds?

2. what process will generate the new 'value needs to be substitued' for the where clause?

some tips:

1. when any dd statement references a ds or pds member
you can always concatenate ds.

1st dsn would contain: select colA,colB from TableA where colA =
2nd dsn would contain: 'value needs to be substitued'
3rd dsn would contain the remainder of the sysin data.

2. symbolics have no effect/can not affect sysin data streams,
whether INLINE or not.
Back to top
View user's profile Send private message
Revathy K

New User


Joined: 28 May 2010
Posts: 4
Location: India

PostPosted: Thu Aug 05, 2010 6:03 pm
Reply with quote

Thanks!!!

I used the 1st way.. Conactenating the pds members... It's working fine.. icon_smile.gif
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 Cobol-db2 : SQL query is running for ... DB2 4
No new posts Reading subsequent rows in a query. DB2 12
No new posts Trim values of parameters in JCL JCL & VSAM 2
No new posts SYSIBM Tables Query DB2 8
No new posts Need Help with on of the coalesce query DB2 4
Search our Forums:

Back to Top