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: 6966
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts RC query -Time column CA Products 3
No new posts Remote Unload of CLOB Columns DB2 6
Search our Forums:

Back to Top