CatalogSearchSample compile error

General discussion on the JZOS batch launcher and toolkit
Post Reply
jriemer
Posts: 25
Joined: Thu Jul 06, 2006 11:15 am

CatalogSearchSample compile error

Post by jriemer »

Receiving the following attempting to compile CatalogSearchSample.java:

javac -cp /com
/ibm/jzos/sample/ibmjzos.jar:/com/ibm/jzos/sample/jzos_sample.jar /com/ibm/jzos/
sample/CatalogSearchSample.java
/com/ibm/jzos/sample/CatalogSearchSample.java:50: cannot find symbol
symbol : method locateDSN(java.lang.String)
location: class com.ibm.jzos.ZFile
volser = ZFile.locateDSN(qdsn)[0];
^
/com/ibm/jzos/sample/CatalogSearchSample.java:58: cannot find symbol
symbol : method obtainDSN(java.lang.String,java.lang.String)
location: class com.ibm.jzos.ZFile
Format1DSCB dscb = ZFile.obtainDSN(qdsn,
volser);
^
2 errors


I appreciate the assistance.


Additionally, receiving the following runtime error attempting to use the catalog search interface when executing: CatalogSearch catSearch = new CatalogSearch("SYS1.*");


java.lang.IllegalAccessError: com/ibm/jzos/ZUtil.touch()V
at com.ibm.jzos.CatalogSearch.<clinit>(CatalogSearch.java:67)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:194)
at com.ibm.jzos.sample.ADDAMDynaTape.main(ADDAMDynaTape.java:58)
Last edited by jriemer on Thu Mar 27, 2008 5:41 pm, edited 1 time in total.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Do you really have jars in /com/ibm/jzos/sample directory?

You should be able to run the samples without recompiling. If you need to recompile, its best to build your jars under an IDE like Eclipse (free) and then ship the jars to z/OS to run.
jriemer
Posts: 25
Joined: Thu Jul 06, 2006 11:15 am

Post by jriemer »

I placed them there in an attempt to circumvent the problem. I originally experienced the problem in a class I'm developing which receives the same error, so thought I'd test compile with the supplied sample in case I was missing something. Is locateDSN supported?
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

Which version of JZOS are you using? alphaWorks or the version shipped with the SDK?
jriemer
Posts: 25
Joined: Thu Jul 06, 2006 11:15 am

Post by jriemer »

A 2.2.1 download ...
Post Reply