Aditya Jain wrote:Iâ€™ve made two JCLs one compile and the second run
Note that you should have used the standard compile/link/bind etc.JCL provided by your shop; running your own JCL is ground for dismissal in some shops.
Assuming that you're still employed, however...
The second runs the program and takes the package name via IKJEFT01
Note the package
name is not wanted, the plan
name is (unless you're running some sort of process that does a plan bind just before the program is run each time
I am unable to perform select queries that have the where clause
It says the column is not found in the table
Iâ€™ve tried putting the exact column name mentioned in the declare table clause and the working storage section entry that represents the table. Both donâ€™t work.
It sounds as if you're a bit confused. Let us go back a couple of steps.
Presumably your program has embedded in it a SQL statement that looks something like:
SELECT THIS_COL, THAT_COL FROM YYYY
WHERE FOO = 'BAR'
with suitable delimiters for COBOL (not having written any COBOL in years, I forget what they are). You are getting a negative SQLCODE (probably -204) at package bind time.
Now, you must realize that DECLARE TABLE is of little value; lose it. Using QMF, SPUFI, DSNTEP*, or whatever tool is convenient and comfortable for you, run the query
SELECT COLNO, SUBSTR(NAME,1,18) AS NAME, COLTYPE, LENGTH, NULLS
Give your query and the output of the query on SYSCOLUMNS.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day