| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| syandra Beginner
 
  
 Joined: 26 May 2003
 Posts: 19
 Topics: 6
 
 
 | 
			
				|  Posted: Mon May 26, 2003 3:16 am    Post subject: execute db2 queries from TSO |   |  
				| 
 |  
				| Hi all, 
 Can we execute DB2 queries from the TSO.
 PLease let me know all the possibilities.
 
 Thanks,
 Sukumar
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| coolman Intermediate
 
 
 Joined: 03 Jan 2003
 Posts: 283
 Topics: 27
 Location: US
 
 | 
			
				|  Posted: Mon May 26, 2003 4:06 am    Post subject: |   |  
				| 
 |  
				| Sukumar, 
 The following job would execute a query from a batch job
 
 
  	  | Code: |  	  | //STEP   EXEC PGM=IKJEFT01
 //SYSTSIN     DD *
 DSN  SYSTEM(DSN)
 RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)
 //SYSTSPRT    DD SYSOUT=*
 //SYSPRINT    DD SYSOUT=*
 //DSNTRACE    DD SYSOUT=*
 //SYSIN       DD *
 YOUR.QUERY.GOES.HERE
 /*
 //
 
 | 
 
 Hope this helps...
 
 Cheers,
 Coolman.
 ________
 NSR50R
 
 Last edited by coolman on Sat Feb 05, 2011 1:21 am; edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| syandra Beginner
 
  
 Joined: 26 May 2003
 Posts: 19
 Topics: 6
 
 
 | 
			
				|  Posted: Tue May 27, 2003 12:57 am    Post subject: |   |  
				| 
 |  
				| Can we run DB2 queries from the TSO command line |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| coolman Intermediate
 
 
 Joined: 03 Jan 2003
 Posts: 283
 Topics: 27
 Location: US
 
 | 
			
				|  Posted: Wed May 28, 2003 1:58 am    Post subject: |   |  
				| 
 |  
				| Kolusu, Iam not able to access the link you had provided.
 
 Syandra,
 Answering your question, just try this :
 
 1.Go to command shell (option 6)
 2.Type TSO DSN
 3. Now Type this
 RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)
 4. You would have a : prompt
 5. Now, type your query there and press Enter
 6. You would be greeted with +: prompt
 7. Now press space bar (or any other characters), and complete that line
 8. When you press an Enter, you would get the Result of your query (online)
 
 Kolusu,
 This is where I have a question. How do you replace step7. I tried "end,exit,quit" (allmost everything), but not able to find a way to terminate the program
 
 Any suggestions...
 
 Hope this helps...
 
 Cheers,
 Coolman.
 ________
 marijuana dispensary
 
 Last edited by coolman on Sat Feb 05, 2011 1:23 am; edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 | 
			
				|  Posted: Wed May 28, 2003 5:18 am    Post subject: |   |  
				| 
 |  
				| coolman, 
 I have no problems accessing the above posted link. Do you have acrobat reader on your system?If you do not have then you can download the reader from the net. It is free. The link points to a PDF file and if you are on a dial up connection it will take a while for the link to open.
 
 Coming to your other query, my shop has restricted the usage of DB2 utility programs via TSO. so I cannot simulate your problem. sorry about that.
 
 Thanks
 
 Kolusu
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |