Title: Do I need to worry about the compile warning "Note: MYPROG.java uses unchecked or unsafe operations?"
In isCOBOL you may get a Java warning when you use a deprecated API or a Generic class in Java 1.5+.
In this case, IsControlSet.cbl uses the Vector  generic class.
You can recompile the source code with -jo="-Xlint:unchecked" option to see the warning message:
   java com.iscobol.compiler.Pcc -jo="-Xlint:unchecked" *.cbl
   I --> IsControlSet.cbl
   Compiling result
   Informational(s) - 0
   Warning(s) - 0
   Error(s) - 0
   Severe error(s) - 0
   II--> ISCONTROLSET.java
   ISCONTROLSET.java:2852: warning: [unchecked] unchecked call to addElement(E) 
   as a member of the raw type java.util.Vector
      VECT.addElement("Year 2001");
You can:
  1. Ignore this warning.
  2. Compile the source with the -jo="-source 1.4 -target 1.4" option
   java com.iscobol.compiler.Pcc -jo="-source 1.4 -target 1.4" *.cbl
   I --> IsControlSet.cbl
   Compiling result
   Informational(s) - 0
   Warning(s) - 0
   Error(s) - 0
   Severe error(s) - 0
   II--> ISCONTROLSET.java
You may find this this link about "Generics" and java1.5+ useful:http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html
Authored by: Veryant Support on Wed, Sep 2nd, 2009 at 7:00 PM
This question has been viewed 11331 times so far.
Online URL: http://support.veryant.com/support/phpkb/question.php?ID=98

Powered by PHPKB Knowledge Base Software