File structures that refer to local variables will convert to java okay - but the java will not compile.
Example:
----
importSMS procedure
logfilename string(100)
logfile file,driver('basic'),name(logfilename)
record record,pre()
time string(8)
.
code
----
Generates java, but will not compile.
Suspect problem is in compiler, FileConstruct does not support notion of scope escalation. So it cannot discover the variable in question.
Workaround exists : use file{prop:name} instead of a variable reference.
Workaround 2: Make variable a global variable. That should work too.
I thought this was illegal in Clarion also. Don't names declared this was have to be global?
You are probably right this is illegal under clarion. I never actually tried to compile this under clarion. Yet I reckon this should work in the language. It would be useful if it could handle this. In my case I worked around it by declaring logfilename globally. But it should still work.