Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we pass values to the SQL query in unload JCL?
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 05, 2010 3:42 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us