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

DFSDDLTO and SQLs


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

New User


Joined: 31 May 2008
Posts: 1
Location: mumbai

PostPosted: Tue Jun 17, 2008 2:31 am
Reply with quote

I am DB2 programmer.

Everyone in my village is saying that best way to execute SQLs is using SPUFI, but I am saying "No". I have read DFSDDLTO is most efficient.

Can someone be helping me to find the syntaxes?

Thank you.
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: Tue Jun 17, 2008 3:11 am
Reply with quote

Hello Peshwari Naan and welcome to the forums,

Quote:
that best way to execute SQLs is using SPUFI, but I am saying "No". I have read DFSDDLTO is most efficient.
Learn to say "Yes". . .

If memory serves, DFSDDLTO is part of IMS, not DB2.

Native IMS does not "do" SQL - vis SPUFI or otherwise. If your data is in IMS databases, you need to use IMS commands.

If your data is in DB2, you can use SPUFI for testing or embed the sql in application code (which will most likely happen anyway).
Back to top
View user's profile Send private message
Sinkaravelan S

New User


Joined: 21 Apr 2008
Posts: 27
Location: coimbatore-TN india

PostPosted: Tue Jun 17, 2008 10:58 am
Reply with quote

Exactly Dick.

Thanks,
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Tue Jun 17, 2008 5:31 pm
Reply with quote

There is being some confusement with the SQLs and IMS. I am thinking DFSDDLTO may be what I too need to be using. Could please you elaborate on how I am calling the DFSDDLTO parameters in my program. This is being the
Code:
CALL 'DFSDDLTO' USING ???
where I am thinking I must somehow be passing my SQLs.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 17, 2008 6:06 pm
Reply with quote

please before getting into more trouble
take a look at
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.ims9.doc.aptm/p0htest.htm

it would be nice if you posted where You have read of DFSDDLT0 being used the way You are descrbing
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: Tue Jun 17, 2008 7:03 pm
Reply with quote

Hello,

Quote:
where I am thinking I must somehow be passing my SQLs.
Where did you learn this?
Back to top
View user's profile Send private message
Pankaj Gupta
Currently Banned

New User


Joined: 07 May 2008
Posts: 50
Location: Bangalore

PostPosted: Tue Jun 17, 2008 8:27 pm
Reply with quote

Hello Mr Dick,
I am believing from Mr Naan that we can be using the DFSDDLT0 program to be running my sqls. Then I must be calling this program inside my program and somehow be passing to it my sqls.
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: Tue Jun 17, 2008 9:07 pm
Reply with quote

Hello Pankaj Gupta,

Quote:
that we can be using the DFSDDLT0 program to be running my sqls
Sorry, but we cannot. . . Please re-read my earlier reply.

DB2 SQLs are not run via DFSDDLT0.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 17, 2008 9:38 pm
Reply with quote

did anybody care to look at the link I posted ?? ( not You Dick ! )
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: Tue Jun 17, 2008 10:02 pm
Reply with quote

But the link doesn't say you cannot issue SQL. . . icon_smile.gif

d
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Jun 17, 2008 10:07 pm
Reply with quote

Quote:
The functions that DFSDDLT0 provides include:

* Issuing any valid DL/I call against any database using:
o Any segment search argument (SSA) or PCB, or both
o Any SSA or AIB, or both
* Comparing the results of a call to expected results. This includes the contents of selected PCB fields, the data returned in the I/O area, or both.
* Printing the control statements, the results of calls, and the results of comparisons only when the output is useful, such as after an unequal compare.
* Dumping DL/I control blocks, the I/O buffer pool, or the entire batch region.
* Punching selected control statements into an output file to create new test data sets. This simplifies the construction of new test cases.
* Merging multiple input data sets into a single input data set using a SYSIN2 DD statement in the JCL. You can specify the final order of the merged statements in columns 73 to 80 of the DFSDDLT0 control statements.
* Sending messages to the z/OSĀ® system console (with or without a reply).
* Repeating each call up to 9,999 times.


and here is just one case where sequence number are needed
icon_biggrin.gif
Back to top
View user's profile Send private message
Srinivas George

New User


Joined: 31 May 2008
Posts: 4
Location: bangalore

PostPosted: Wed Jun 18, 2008 1:46 am
Reply with quote

I have been reading with much interest the fine discussions pertaining to the DFSDDLT0 and yes indeed the questions of the SQLs and IMS and I would indeed wish to share with you my experience in this very areas.

Firstly:
Quote:
But the link doesn't say you cannot issue SQL

Let us clear up for all and once now that the DFSDDLT0 program does not process the SQLS in its current version. This is yes very true.

Now if I may be turning to address the questions of the SQLs and IMS in more generally. Here at the site where I am now working we make much use every day of the IMS transaction SQLTDLI which does let us query the IMS database with the SQLS. I have searched the fine manuals so that I might post you all a useful link but yet I have not the correct manual which elaborates. Therefore I post an example yes of the use for the SQLTDLI:

Code:
SQLTDLI SELECT * FROM STOCK_LEVEL WHERE PROD-ID = AF435


That is how we use the transaction and now yes the result screen:

Code:
SQLTDLI V1.7 ...

processing 1 queries ...

PROD-ID     STOCK-LEVEL     REORDER-LEVEL
  AF435           00978               100


query returned 1 rows from PSTOCKL  alias STOCK_LEVEL

CLEAR SCREEN FOR NEXT QUERY



I hope this elaboration you will find useful.

Thank you.
Srinivas.
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: Wed Jun 18, 2008 3:02 am
Reply with quote

Hello Srinivas and welcome to the forums,

Quote:
Let us clear up for all and once now that the DFSDDLT0 program does not process the SQLS in its current version. This is yes very true.

This has been clear to most for a long, long time. . .

The output from your "transaction" shows a version/release number. Does it also show any copyright info? Do you know who is the vendor?

There are many add-on products that support many things that are not part of the products we use. When mentioning something that is not part of the standard product offering, it is best to note where the add-on originated. These are also known as site-specific in parts of the forum.
Back to top
View user's profile Send private message
Srinivas George

New User


Joined: 31 May 2008
Posts: 4
Location: bangalore

PostPosted: Wed Jun 18, 2008 3:27 am
Reply with quote

Thank you, Mr Dick, for your kind welcoming words.

As far as I have known, SQLTDLI is yes an IBM transaction. We enter it on an IMS screen like any other IMS transaction. Everyone here uses it all the time as it is certainly the easy way to query the IMS dbs. But it is an interesting point yes that you raise because certainly too I cannot find SQLTDLI in the IMS manuals. No one I have ask knows so I will certainly talk to the DBA after his holiday as I would like to clear this up. There seems to be much uncertainty yes about this whole area.

Thank you
Srinivas
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: Wed Jun 18, 2008 3:34 am
Reply with quote

You're welcome icon_smile.gif

Quote:
I cannot find SQLTDLI in the IMS manuals
I looked several places and was also not able to find even the first "hit".

I've heard of several add-ons that support basic SQL for IMS, but they are all for-fee products. It will be interesting what is learned from your dba.

Enjoy the forums icon_cool.gif

d
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
This topic is locked: you cannot edit posts or make replies. COBOL-Common routine that contains al... COBOL Programming 4
No new posts Dynamic SQLs DB2 2
No new posts how to pass parm value to a pli pgm w... JCL & VSAM 6
No new posts Executing SQLs thru JCL DB2 2
No new posts need REXX code to extract all the SQL... CLIST & REXX 14
Search our Forums:

Back to Top