Top
NetCOBOL V11.0 J Adapter Class GeneratorUser's Guide
FUJITSU Software

4.2.1 Format

The parameters that can be placed in an optional file, are as follows:

Parameter name

Explanation

Note

Class class-name/interface-name

Specify a class name or interface name of Java that generates the adapter class. If necessary, specify the constructor/method/field generated as an adapter class.

Omission is not allowed. Multiple settings are allowed.

Option ClassPath

Specify a search path of the Java class/interface.

Omission is allowed. Multiple setting is not allowed.

Option Code

Specify a code system during execution time.

Omission is allowed. Multiple setting is not allowed.

Option UCS2Encoding

When Unicode is used for the code at runtime, The endian of UTF-16 is specified.

Omission is allowed. Multiple setting is not allowed.

Option CommandOptions

Specify directly options of the java2cob command.

Omission is allowed. Multiple setting is not allowed.

Option GenOnlyUsed

Specify whether or not to specify a constructor/method/field generated as an adapter class.

Omission is allowed. Multiple setting is not allowed.

Option MethodTable

Specify whether or not to output the method name cross-reference list file.

Omission is allowed. Multiple setting is not allowed.

Option OutPutPath

Specify a folder to output the source of the adapter class.

Omission is allowed. Multiple setting is not allowed.

Option OverWrite

Specify to overwrite an existing adapter class or not to overwrite it when an adapter class of the same name already exists.

Omission is allowed. Multiple setting is not allowed.

Option ReduceClass

Specify whether or not to reduce the number of adapter classes.

Omission is allowed. Multiple setting is not allowed.

Option String

Specify whether or not to generate an adapter class in which the java.lang.String type is mapped into alphanumeric item.

Omission is allowed. Multiple setting is not allowed.

Option Terminal

Specify whether or not to generate an adapter class in which the end character string setting is made, for the method that has the parameter of String type field and the String type.

Omission is allowed. Multiple setting is not allowed.

Notes on describing the optional file

Class class-name/interface-name

Specification format
Class class-name/interface-name [ = constructor/method/field-specifying-option ]
Specification contents

Specify the Java class name or interface name that generates an adapter class.

Also specify constructor/method/field specifying options when constructor/method/fields are generated as an adapter class, for that class-name/interface-name.

Meaning of the parameter
class-name/interface-name

Specifies a class name or interface name that is qualified by the package name.

When specifying an internal class name as the parameter type, specify dollar ($) instead of period (.) of the internal class.

constructor/method/field-specifying-option

Specify a constructor/method/field using the format of -gc option, -gm option and -gf option of the java2cob command.

The constructor/method/field-specifying-option is valid when the "Option GenOnlyUsed" parameter specifies YES.

If constructor/method/field-specifying-option is not specified even though the "Option GenOnlyUsed" parameter specifies YES, an adapter class without constructor/method/field is generated.

Option ClassPath

Specification format
Option ClassPath = class-path
Specification contents

Specify a search path of the Java class/interface. When specifying two or more folders, delimit the folders using semicolon (;).

When a blank is included in the class path, enclose the entire class path with double quotation (").

When this option is specified, the environment variable CLASSPATH is ignored.

Unicode native character cannot be specified for the class path.

Option Code

Specification format
Option Code = { SJIS | UNICODE }
Specification contents

Specify a code system during execution time. Specify the same code system as that of the COBOL program that uses the Java class.

When omitted, it is assumed that SJIS is specified.

Meaning of the parameter
SJIS

Specify it when the code system during execution time is native code.

UNICODE

Specify it when the code system during execution time is Unicode.

Option UCS2Encoding

Specification format
Option UCS2Encoding = { Litter | Big }
Specification contents

When Unicode is used for the code at runtime, The endian of UTF-16 is specified. Specify the same endian as that of the COBOL program that uses the Java class.

When omitted, it is assumed that Litter is specified.

Meaning of the parameter
Litter

The little endian is used for the encoding of UTF-16

Big

The big endian is used for the encoding of UTF-16

Option CommandOptions

Specification format
Option CommandOptions = command-options
Specification contents

Specify options of the java2cob command directly. But the -i option cannot be specified.

When a parameter of the same type as the command-options is specified as an optional file, the specified value of the command-options overrides the option file.

Option GenOnlyUsed

Specification format
Option GenOnlyUsed = { YES | NO }
Specification contents

Specify whether or not specify a constructor/method/field generated as an adapter class. When a constructor/method/field is specified, size of the adapter class can be reduced.

When omitted, it is assumed that NO is specified.

The specification value of the "Option GenOnlyUsed" parameter affects all of the "Class class-name/interface-name" inside the optional file.

The "Option GenOnlyUsed" parameter is exclusive with the "Option ReduceClass" parameter.

Meaning of the parameter
YES

Specifies the constructor/method/field.

NO

Does not specify constructor/method/field.

Option MethodTable

Specification format
Option MethodTable { YES | NO }
Specification contents

Specify whether or not to output the method name cross-reference list file (list of adapter class methods that correspond to the Java class methods). If omitted, it is assumed that NO is specified.

The method name cross-reference list file is output using the format of "source-file-name.txt" of the adapter class for each Java class.

Meaning of the parameter
YES

The method name cross-reference list file is output.

NO

The method name cross-reference list file is not output.

Option OutPutPath

Specification format
Option OutPutPath= output-folder
Specification contents

Specify the folder to which source of the adapter class is output.

When a folder include a blank, enclose the entire output target folder with double quotation (").

If omitted, it is generated in the current directory.

Option OverWrite

Specification format
Option OverWrite = { YES | NO }
Specification contents

Specify whether to overwrite an existing adapter class or to overwrite it when an adapter class of the same name already exists.

If omitted, it is assumed that NO is specified.

Meaning of the parameter
YES

Overwrite is executed.

NO

Overwrite is not executed.

Option ReduceClass

Specification format
Option ReduceClass = { YES | NO }
Specification contents

Specify whether or not to reduce the number of adapter classes. When YES is specified, the type of object reference except RETURNING becomes java-lang-Object, and the parameter name is generated so as to include the original type information instead. (see "3.1.5.2 Specifying the -om Option or the "Option ReduceClass" Parameter".) Thus, method can be distinguished with the class browser in most cases. If method cannot be distinguished with the class browser because the parameter name is too long and because of other reasons, it can be distinguished using the method name cross-reference list file.

If omitted, it is assumed that NO is specified.

Meaning of the parameter
YES

Reduces the number of adapter classes.

NO

The number of adapter classes is not reduced.

Option String

Specification format
Option String = { YES [n] | NO }
Specification contents

Specify whether or not to generate an adapter class in which the java. lang. String type is mapped into the alphanumeric item (PIC X). (see "3.2.1.9 Mapping java.lang.String into PIC X.")

If omitted, it is assumed that NO is specified.

Meaning of the parameter
YES [n]

The java.lang.String type is mapped into the alphanumeric item.

n specifies the parameter size (PIC X(n)) of the property method that corresponds to the String type field. If omitted, it is assumed that 256 is specified.

NO

The java.lang.String type is not mapped into the alphanumeric item.

Option Terminal

Specification format
Option Terminal = { YES | NO }
Specification contents

Specify whether or not to generate an adapter class allowed to set end character strings, for the method that has string-type fields and string-type parameters. (see "3.2.1.11 End Control of Character String")

If omitted, it is assumed that NO is specified.

Meaning of the parameter
YES

Generate an adapter class in which the end character string setting is made.

NO

Does not generate an adapter class in which the end character string setting is made.