Fujitsu J Adapter Class Generator инструкция обслуживания

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98

Идти на страницу of

Хорошее руководство по эксплуатации

Законодательство обязывает продавца передать покупателю, вместе с товаром, руководство по эксплуатации Fujitsu J Adapter Class Generator. Отсутствие инструкции либо неправильная информация, переданная потребителю, составляют основание для рекламации в связи с несоответствием устройства с договором. В законодательстве допускается предоставлении руководства в другой, чем бумажная форме, что, в последнее время, часто используется, предоставляя графическую или электронную форму инструкции Fujitsu J Adapter Class Generator или обучающее видео для пользователей. Условием остается четкая и понятная форма.

Что такое руководство?

Слово происходит от латинского "instructio", тоесть привести в порядок. Следовательно в инструкции Fujitsu J Adapter Class Generator можно найти описание этапов поведения. Цель инструкции заключается в облегчении запуска, использования оборудования либо выполнения определенной деятельности. Инструкция является набором информации о предмете/услуге, подсказкой.

К сожалению немного пользователей находит время для чтения инструкций Fujitsu J Adapter Class Generator, и хорошая инструкция позволяет не только узнать ряд дополнительных функций приобретенного устройства, но и позволяет избежать возникновения большинства поломок.

Из чего должно состоять идеальное руководство по эксплуатации?

Прежде всего в инструкции Fujitsu J Adapter Class Generator должна находится:
- информация относительно технических данных устройства Fujitsu J Adapter Class Generator
- название производителя и год производства оборудования Fujitsu J Adapter Class Generator
- правила обслуживания, настройки и ухода за оборудованием Fujitsu J Adapter Class Generator
- знаки безопасности и сертификаты, подтверждающие соответствие стандартам

Почему мы не читаем инструкций?

Как правило из-за нехватки времени и уверенности в отдельных функциональностях приобретенных устройств. К сожалению само подсоединение и запуск Fujitsu J Adapter Class Generator это слишком мало. Инструкция заключает ряд отдельных указаний, касающихся функциональности, принципов безопасности, способов ухода (даже то, какие средства стоит использовать), возможных поломок Fujitsu J Adapter Class Generator и способов решения проблем, возникающих во время использования. И наконец то, в инструкции можно найти адресные данные сайта Fujitsu, в случае отсутствия эффективности предлагаемых решений. Сейчас очень большой популярностью пользуются инструкции в форме интересных анимаций или видео материалов, которое лучше, чем брошюра воспринимаются пользователем. Такой вид инструкции позволяет пользователю просмотреть весь фильм, не пропуская спецификацию и сложные технические описания Fujitsu J Adapter Class Generator, как это часто бывает в случае бумажной версии.

Почему стоит читать инструкции?

Прежде всего здесь мы найдем ответы касательно конструкции, возможностей устройства Fujitsu J Adapter Class Generator, использования отдельных аксессуаров и ряд информации, позволяющей вполне использовать все функции и упрощения.

После удачной покупки оборудования/устройства стоит посвятить несколько минут для ознакомления с каждой частью инструкции Fujitsu J Adapter Class Generator. Сейчас их старательно готовят или переводят, чтобы они были не только понятными для пользователя, но и чтобы выполняли свою основную информационно-поддерживающую функцию.

Содержание руководства

  • Страница 1

    J Adapter Class Generator User’s Guide[...]

  • Страница 2

    Seventh Edition: August 2005 The contents of this manual may be revised withou t prior notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express writte n permission of Fujitsu Limited. © 1996-2005 Fujitsu Limited. All Rights Reserved.[...]

  • Страница 3

    Preface The "NetCOBOL J Adapter Class Generator " is a tool that generates a COBOL class (adapter class) used to call a Java class. Using the adapter class thus generated makes the Java class library available from COBOL. A Java runtime environment must be inst alled to execute the generator or the adapter class generated. See " Prep[...]

  • Страница 4

    Chapter 5. Adapter Class Reference Chapter 5 provides detailed information on the FJ-JAVA-BASE, FJ-JAVA-CONTROL and FJ-JAVA-ERROR classes provided by th e J adapter class generator, and adapter classes generated by the J adapter class generator. Appendix A. Message List Appendix A explains the messages output by the J adapter class generator, inclu[...]

  • Страница 5

    Registered Trademarks The registered trademarks appearin g in this manual are as follows: Microsoft, Windows, and Windows NT ar e registered trademarks of Microsoft Corporation in the U.S. and other countries. Java and other trademarks including Java are trademarks of Sun Microsystems, Inc. in the U.S. and other countries. J Adapter Class Generator[...]

  • Страница 6

    6 NetCOBOL J Adapter Class Generator User's Guide[...]

  • Страница 7

    NetCOBOL J Adapter Class Generat or User's Guide 7 Contents Chapter 1. Outline of J Adapter Class Generator ......................................... 9 What is the J Adapte r Class Gene rator? ...............................................................10 What the J Adapter Cla ss Generator Can Do ...........................................[...]

  • Страница 8

    8 NetCOBOL J Adapter Class Generator User's Guid e Messages Output duri ng Execut ion .....................................................................77 Chapter 7. Samples .................................................................................... 81 Sample 1 – Usin g Classe s ...................................................[...]

  • Страница 9

    Chapter 1. Outline of J Adapter Class Generator This chapter explains the function and op erating environment of the J adapter class generator.[...]

  • Страница 10

    10 Chapter 1. Outline of J Adapter Class Generator What is the J Adapter Class Generator? Taking advantage of the object-oriente d function, Fujitsu NetCOBOL enables programming using class libraries . The Fuji tsu NetCOBOL also provides many useful foundation classes. Meantime, as Java be comes popular, many Java class libraries are also provided.[...]

  • Страница 11

    Chapter 1. Outline of J Adapter Class Generator 11 The Java class interface must be converted into the COBOL interface for a COBOL program to use Java classes. The J adapter class generator generates an adapter class that converts the Java interface into the COBOL interface. What the J Adapter Class Generator Can Do Using adapter classes generated [...]

  • Страница 12

    12 Chapter 1. Outline of J Adapter Class Generator Therefore, the following restrictions apply to COBOL: - Listener Java registers a listener object, in which event processing logic is written, within an object that generates an event. However, since no COBOL object can be registered in a Java object, CO BOL cannot be used to write listeners. - Col[...]

  • Страница 13

    Chapter 2. Adapter Class Generator Framework This chapter explains the framework of the J adapter class generator.[...]

  • Страница 14

    14 Chapter 2. Adapter Class Generator Framework Adapter Class To make Java classes available to COBOL, a mechanism for converting the Java class interface into the COBOL interface is requ ired. The J adapter class generator works as an interface converting mechanism to generate adapter classes corresponding to Java classes. To use a Java class from[...]

  • Страница 15

    Chapter 2. Adapter Class Generator Framework 15 Adapter Object At execution time, an adapter class genera tes the adapter object corresponding to a Java instance object. The adapter object: Holds the pointer to the corresponding Java instance object. • • Calls the corresponding Java method of the corresponding Java instance object Only the adap[...]

  • Страница 16

    16 Chapter 2. Adapter Class Generator Framework[...]

  • Страница 17

    Chapter 3. Developing Programs This chapter explains how to develo p programs that use Java classes.[...]

  • Страница 18

    18 Chapter 3. Developing P rograms Creating Adapter Classes This section explains how to generate an adapter class from a Java class. Investigating the Java Class First investigate the specifications of the Ja va class and interface to be used (class name, package name, usage, and so on) to check whether the J adapter class generator can handle the[...]

  • Страница 19

    Chapter 3. Developi ng Programs 19 adapter classes when the class file is not available, see " Generating an adapter class when the class file is not available ." Building an Adapter Class Finally, compile and link-edit the generated ad apter class source to create an adapter class library (DLL). Use the COBOL project manager to do so. Re[...]

  • Страница 20

    20 Chapter 3. Developing P rograms Therefore, an adapter class cannot be generated normally without these class files. These class files may not be available depending on the environment. In this case, to create an adapter class normally, dummy class files having these file names must be prepared. Prepare a dummy class file as follows: 1. Create a [...]

  • Страница 21

    Chapter 3. Developi ng Programs 21 Example: When an application uses only the println (O bject) method of the java.io.PrintStream class, specify as follows: C:> java2cob -r java.io.PrintStream -gm "println(java.lang.Object)" Specifying the -om Option or the "Option ReduceClass" Parameter Specifying the -om option or the &quo[...]

  • Страница 22

    22 Chapter 3. Developing P rograms ... REPOSITORY. CLASS J-OBJECT AS "java-lang-Object" ... LINKAGE SECTION. 01 P1-OUTPUTSTREAM OBJECT REFERENCE J-OBJECT. ... Developing an Application That Uses an Adapter Class This section explains how to develop a program that uses an adapter class. Outline The flow of program processing using the adap[...]

  • Страница 23

    Chapter 3. Developi ng Programs 23 Terminating the Java VM When an adapter class is no longer used, the Java VM must be terminated. Use the JVM-TERMINATE method of the FJ-JAVA-CONTROL class to terminate the Java VM. A coding sample is shown below: ... REPOSITORY. CLASS FJ-JAVA-CONTROL ... PROCEDURE DIVISION. ... INVOKE FJ-JAVA-CONTROL "JVM-TER[...]

  • Страница 24

    24 Chapter 3. Developing P rograms An example of generating a Date class object is shown below: ... REPOSITORY. CLASS J-Date AS "java-util-Date" ... WORKING-STORAGE SECTION 01 anDate OBJECT REFERENCE J-Date. ... PROCEDURE DIVISION. ... INVOKE J-Date "Create-Date-01" RETURNING anDate. ... Note: • Since the adapter class name is[...]

  • Страница 25

    Chapter 3. Developi ng Programs 25 An example of referencing the class variable AM_PM_FIELD (static field) of the DateFormat class is shown below: ... REPOSITORY. CLASS J-DateFormat AS "java-text-DateFormat" ... WORKING-STORAGE SECTION 01 FMT-Type PIC S9(9) COMP-5. ... PROCEDURE DIVISION. ... MOVE JF-AM_PM_FIELD OF J-DateFormat TO FMT-Typ[...]

  • Страница 26

    26 Chapter 3. Developing P rograms An example of assigning an object, which has been referenced with Object class data, into Data class data is shown below: ... REPOSITORY. CLASS J-Object AS "java-lang-Object" CLASS J-Date AS "java-util-Date" ... WORKING-STORAGE SECTION 01 anDate OBJECT REFERENCE J-Date. 01 anObject OBJECT REFER[...]

  • Страница 27

    Chapter 3. Developi ng Programs 27 … When the -s option or the "Option String" parameter is specified, the conversion between the String object and the COBOL data items is not necessary since an alphanumeric item can be specified as the String type argument and returns a value directly. … REPOSITORY. CLASS J-Date AS "java-util-Da[...]

  • Страница 28

    28 Chapter 3. Developing P rograms If an adapter class is generated by specifying the -t option or the "Option Terminal" parameter, the character string that is sh orter than the data item length can be passed to a method without setting the end of string, since the end (X "00") of the character string is set in the adapter clas[...]

  • Страница 29

    Chapter 3. Developi ng Programs 29 DISPLAY "Error Code: " errCode. DISPLAY "Error Message: " errMessage(1:errMessageLen). IF rc NOT = -1 THEN DISPLAY "Java Class Name: " expClass(1:expClassLen) DISPLAY "Java Exception Message: " expMessage(1:expMessageLen) END-IF. END DECLARATIVES. … Note: When the exceptio[...]

  • Страница 30

    30 Chapter 3. Developing P rograms Conversion to Java2 When using the resources (execute-form programs (EXE), DLLs, adapter class source, and program source using adapter classes) created by JDK1.1.x, note the following: • Adapter class source and DLLs created by JDK 1.1.x can be used as they are in the Java2 environment. • If an adapter class [...]

  • Страница 31

    Chapter 4. Using the Generator Command This chapter explains how to use the ge nerator command (java2cob), optional file and output result.[...]

  • Страница 32

    32 Chapter 4. Using the Generat or Command Starting the J Adapter Class Generator Command Syntax When the constructor/method/field is not specified: java2cob [-classpath class-path ] [-d output-folder ] [-ov] [-om] [-oi] [-c{s|u}] [- s[ n ]] [-t] class-name/interface-name ... When the constructor/method/field is specified: java2cob [-classpath clas[...]

  • Страница 33

    Chapter 4. Using the Generat or Command 33 generated. When specifying two or more constructors, they must be delimited by comma (,) or a blank. When two or more constructors of the sa me name exist, only the constructor that matches the parameter type is generated by specifying the parameter-type. If a parameter type is omitted, all of the constr u[...]

  • Страница 34

    34 Chapter 4. Using the Generat or Command -om Specified to reduce the number of adapter cl asses generated. When this parameter is specified, the object reference types of all parameters excluding RETURNING become java-lang-Object. Instead, the pa rameter names are generated so that they include original type information (see "Specifying the [...]

  • Страница 35

    Chapter 4. Using the Generat or Command 35 name, replace the period "." of the internal class name with a dollar sign "$". More than one class name or interface name can be specified. Environment Variable CLASSPATH Specifies the Java class/interface search path. When -classpath is specified, the CLASSPATH environment variable is[...]

  • Страница 36

    36 Chapter 4. Using the Generat or Command Optional File The optional file is a text format file used to define generator options in a file instead of on the command line. The optional file is specified in a command line of the java2cob command. For example, specifying the many method names, etc. in the command line every time is troublesome during[...]

  • Страница 37

    Chapter 4. Using the Generat or Command 37 Notes on describing the optional file: • Clauses enclosed by square brackets can be omitted. • Curly brackets indicate selection of clause that is delimited by ”| ”. • Italic type indicates a variable character string. Class class-name/interface-name Specification format Class class-name/interfac[...]

  • Страница 38

    38 Chapter 4. Using the Generat or Command 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 Spe[...]

  • Страница 39

    Chapter 4. Using the Generat or Command 39 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 nam[...]

  • Страница 40

    40 Chapter 4. Using the Generat or Command 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 includ[...]

  • Страница 41

    Chapter 4. Using the Generat or Command 41 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. (Refer to "End control of character string."[...]

  • Страница 42

    42 Chapter 4. Using the Generat or Command Output The generator outputs the following files: • Adapter class source file • Generation name management file • Method name cross-reference list file Adapter Class Source File The adapter class source file corresponding to the specified Java class or interface is generated. If the specified class o[...]

  • Страница 43

    Chapter 4. Using the Generat or Command 43 Figure 4.1 Generation Name Management File The J adapter class generator uses a gene ration name management file to manage the correspondence between the names used in Java classes and adapter classes. The generation name management file is ge nerated with the following name in the adapter class output fol[...]

  • Страница 44

    44 Chapter 4. Using the Generat or Command A method name cross-reference list file is output in the following format: [Java] java-class-name [COBOL] cobol-external-class-name (1) [Java] type java-method-name (argument-type) [COBOL] cobol-external-method-name (2) [Java] type java-method-name (argument-type) OVERRIDE [COBOL] -None- ... (n) [Java] typ[...]

  • Страница 45

    Chapter 5. Adapter Class Reference This chapter provides detailed informatio n on the FJ-JAVA-BASE, FJ-JAVA-CONTROL and FJ-JAVA-ERROR classes provided by th e J adapter class generator, and adapter classes generated by the J adapter class generator.[...]

  • Страница 46

    46 Chapter 5. Adapter Class Ref erence Class Configuration The figure below shows the hierarchical re lationships among the FJ-JAVA-BASE, FJ- JAVA-CONTROL and FJ-JAVA-ERROR classe s provided by the J adapter class generator, and adapter classes generated by the J adapter class generator. Figure 5.0.1 Class Hierarchy • FJ-JAVA-BASE: Super class of[...]

  • Страница 47

    Chapter 5. Adapter Class Ref erence 47 FJ-JAVA-BASE class The FJ-JAVA-BASE class is the super class of every adapter class. The FJ-JAVA-BASE class has the methods shown below. Method name Type Function J-NARROW Factory Assigns an object to a subclass. J-DUPLICATE Object Duplicates an adapter object. J-EQUALS Object Checks whether the Ja va objects [...]

  • Страница 48

    48 Chapter 5. Adapter Class Ref erence J-EQUALS Method (object method) Explanation This method checks whether the Java objects indicated by two adapter objects are equal. Syntax INVOKE object-1 "J-EQUALS" USING object-2 RETURNING result Parameter and return value • object-1, object-2 (attribute: OBJECT REFERENCE FJ-JAVA-BASE) Specifies [...]

  • Страница 49

    Chapter 5. Adapter Class Ref erence 49 Environment variable name Function COBJNI_MAX_NSTACK Specifies the maximum size (bytes) of the stack used for the native code. The default is 128 kilobytes. COBJNI_JAVA_STACK Specifies the maximum size (bytes) of the stack used for the Java code. The default is 400 kilobytes. COBJNI_MIN_HEAP Specifies the star[...]

  • Страница 50

    50 Chapter 5. Adapter Class Ref erence FJ-JAVA-ERROR class The adapter class generates the exception object when some error is detected during execution period. The FJ-JAVA-ERRO R class is the class of that exception object. The exception message, exception type and exception information of Java can be acquired by using the FJ-JAVA-ERROR class meth[...]

  • Страница 51

    Chapter 5. Adapter Class Ref erence 51 GET-EXCEPTION method (object method) Explanation The Java exception information is returned. Syntax INVOKE EXCEPTION-OBJECT "GET-EXCEPTION" USING message messageLength class classLength RETURNING result Parameter and return value • message (attribute: PIC X ANY LENGTH) Specifies the data item that [...]

  • Страница 52

    52 Chapter 5. Adapter Class Ref erence Data types The Java data types are mapped to the COBOL data types as shown below: Java data type COBOL data type boolean PIC 1 byte PIC X PIC X(2) • When an ANK character is stored, the first byte is used and the second byte is X'00'. • When a Japanese character is stored, two bytes are used. •[...]

  • Страница 53

    Chapter 5. Adapter Class Ref erence 53 Expansion format CLASS-ID. internal-class-name-1 AS " external-class-name " INHERITS internal- class-name-2 . ... FACTORY. ... <<Factory method corresponding to a constructor>> <<Property method corresponding to a class variable>> <<Factory method corresponding to a clas[...]

  • Страница 54

    54 Chapter 5. Adapter Class Ref erence Note: Fujitsu NetCOBOL does not distingu ish between uppercase and lowercase letters of a class name. Therefore, cl ass names whose external class names are different only in uppercase and lowercas e letters cannot be used concurrently. Supplement When the adapter class of java.lang.String is generated, the pu[...]

  • Страница 55

    Chapter 5. Adapter Class Ref erence 55 6. When an exception is declared for the constructor, the RAISING specification is generated. Generation example The factory method corresponding to construc tor Date() of the java.util.Date class is generated as shown below: METHOD-ID. CREATE-01 AS "Create-Date-01". [1] ... LINKAGE SECTION. 01 CREAT[...]

  • Страница 56

    56 Chapter 5. Adapter Class Ref erence Class variable Explanation A public class variable (static field) is ma pped to a COBOL property method (factory). Expansion format METHOD-ID. GET PROPERTY property-name. ... LINKAGE SECTION. 01 property-value data-description-entry. PROCEDURE DIVISION RETURNING property-value. ... END METHOD property-name. ME[...]

  • Страница 57

    Chapter 5. Adapter Class Ref erence 57 2. "out" is mapped to J-PRINTSTREAM (interna l class name of java-io-PrintStream) because its attribute is java.io.PrintStream. Supplement When a property name is generated from a field name, a number is assigned to secure the uniqueness of the name. The class browser can be used to check the corresp[...]

  • Страница 58

    58 Chapter 5. Adapter Class Ref erence Generation example The factory method corresponding to class method abs (long) of the java.lang.Math class is generated as shown below: METHOD-ID. JM-ABS-01 AS "abs-01". [1] ... LINKAGE SECTION. 01 RTN-VALUE PIC S9(18) COMP-5. 01 PARA-1 PIC S9(18) COMP-5. PROCEDURE DIVISION USING PARA-1 RETURNING RTN[...]

  • Страница 59

    Chapter 5. Adapter Class Ref erence 59 - If a same property name has already been assigned, the second and subsequent property names are each suffixed with a hyphen "-" followed by a two-digit number (01 to 99) to prevent name duplication. (See " Numbering names. ") - A name exceeding 30 characters is truncated after the 30th ch[...]

  • Страница 60

    60 Chapter 5. Adapter Class Ref erence Instance Method Explanation A non-public instance method (non-stati c method) is mapped to a COBOL object method. Expansion format METHOD-ID. internal-method-name AS "external-method-name" [OVERRIDE]. ... DATA DIVISION. LINKAGE SECTION. [parameter ...] [return-value ...] PROCEDURE DIVISION [USING par[...]

  • Страница 61

    Chapter 5. Adapter Class Ref erence 61 Generation example The object method corresponding to instance method getTime() of the java.util.Date class is generated as shown below: METHOD-ID. JM-GETTIME AS "getTime". [1] ... LINKAGE SECTION. 01 RTN-VALUE PIC S9(18) COMP-5. PROCEDURE DIVISION RETURNING RTN-VALUE. ... END METHOD JM-GETTIME. 1. S[...]

  • Страница 62

    62 Chapter 5. Adapter Class Ref erence Parameter and return value • class-name Specifies the internal class name of the java-lang-String class declared in the REPOSITORY paragraph. • initialValue (attribute: PIC X ANY LENGTH) Specifies an alphanumeric data item as the initial value of the String object. • createdObject (attribute: OBJECT REFE[...]

  • Страница 63

    Chapter 5. Adapter Class Ref erence 63 • createdObject (attribute: OBJECT REFERENCE SELF) Returns the generated object. Supplement When a data name is specified for initialValue , a String object as long as data item length is generated. However, inserting X”0000” in the statement can generate a String object shorter than data item length. ..[...]

  • Страница 64

    64 Chapter 5. Adapter Class Ref erence GET-STRING-N method (object method) Explanation This method fetches the character string fr om the String object as a national data item. Syntax INVOKE anObject "GET-STRING-N" RETURNING stringValue Parameter and return value • anObject Specifies the String object from which a character string is to[...]

  • Страница 65

    Chapter 5. Adapter Class Ref erence 65 GET-STRING-LENGTH-N method (object method) Explanation This method returns the length of the char acter string of the String object as the length (number of characters) of the national data item. Syntax INVOKE anObject "GET-STRING-LENGTH-N" RETURNING stringLength Parameter and return value • anObje[...]

  • Страница 66

    66 Chapter 5. Adapter Class Ref erence Expansion format CLASS-ID. internal-class-1 AS "external-class-name" INHERITS internal- class-name-2. ... FACTORY. ... <<NEW-ARRAY method>> END FACTORY. OBJECT. ... <<GET-ARRAY-LENGTH method>> <<GET-ARRAY-ELEMENT method>> <<SET-ARRAY-ELEMENT method>> EN[...]

  • Страница 67

    Chapter 5. Adapter Class Ref erence 67 CLASS-ID. JA-1-STRING AS "JA-1-java-lang-String" INHERITS J-OBJECT. ... END CLASS JA-1-STRING. Adapter classes of int [] [] [] are generated as shown below: CLASS-ID. JA-3-INT AS "JA-3-int" INHERITS J-OBJECT. [1] ... END CLASS JA-3-INT. CLASS-ID. JA-2-INT AS "JA-2-int" INHERITS J-[...]

  • Страница 68

    68 Chapter 5. Adapter Class Ref erence ... REPOSITORY. CLASS JA-2-INT AS "JA-2-int" CLASS JA-1-INT AS "JA-1-int" ... 01 anArray OBJECT REFERENCE JA-2-INT. 01 wArray OBJECT REFERENCE JA-1-INT. ... INVOKE JA-2-INT "NEW-ARRAY" USING n RETURNING anArray. [1] PERFORM VARYING I FROM 0 BY 1 UNTIL I >= n INVOKE JA-1-INT &qu[...]

  • Страница 69

    Chapter 5. Adapter Class Ref erence 69 SET-ARRAY-ELEMENT method (object method) Explanation This method sets an element of an array object. Syntax INVOKE anObject "SET-ARRAY-ELEMENT" USING inx elemValue Parameter and return value • anObject Specifies the array object in which an element is to be set. • inx (attribute: PIC S9(9) COMP-5[...]

  • Страница 70

    70 Chapter 5. Adapter Class Ref erence Name that is always unique according to generation rules A class name is generated from a class na me or interface name qualified by a Java package name. Since the qualified name is unique, the COBOL name generated from it is always unique. The sa me applies to an array class name. Thus, no class names and arr[...]

  • Страница 71

    Chapter 5. Adapter Class Ref erence 71 the J adapter class generator. For instance, the java.io.ObjectInputStream class inherits the java.io.ObjectInput interfac e and java.io.InputStream class (see the figure below). Figure 5.2 Relationships among java.io.ObjectInput interface, java.io.InputStream class, and java.io.ObjectInputStream class For the[...]

  • Страница 72

    72 Chapter 5. Adapter Class Ref erence read() read read(byte[]) read-01 java.io.ObjectInput interface read(byte[], int, int) java-io-ObjectInput class read-02 read() read read(byte[]) read-01 java.io.InputStream class read(byte[], int, int) java-io-InputStream class read-02 read() read java.io.ObjectInputStrea m class read(byte[], int, int) java-io[...]

  • Страница 73

    Chapter 6. Messages This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages.[...]

  • Страница 74

    74 Chapter 6. Messa ges Java2cob Command Messages This section explains the messages output by the java2cob command, including the operator responses to the messages. Adapter class generation failed because of a memory space shortage. Terminate unnecessary applications and retry. A memory space shortage occurred. Terminate unnecessary applications,[...]

  • Страница 75

    Chapter 6. Messa ges 75 Error: An invalid class name "xxx" was specified. Specify a Java class name or interface name qualified by a package name. Specify a valid class name or interface name and retry. Error: A valid directory name was missing. The option was ignored to continue processing.<<Same as above>> Specify a valid di[...]

  • Страница 76

    76 Chapter 6. Messa ges Warning: The method name of constructor "xxx" exceeded 160 characters. The characters after the first 160 characters were deleted. Check whether deleting the characters after the first 160 characters results in an unusable name. Error: Class information was not found. Generation was interrupted. Check whether there[...]

  • Страница 77

    Chapter 6. Messa ges 77 Messages Output during Execution This section explains the messages output during execution of programs using adapter classes, including the oper ator responses to the messages. The message format is shown below: Class name information: Message text Class name information indicates the adapter class in which an error occurre[...]

  • Страница 78

    78 Chapter 6. Messa ges The current thread could not be connected to Java VM. Check whether the program properly invokes the JVM-ATTACH method. The current thread could not be disconnected from Java VM. Check whether the program properly invokes the JVM-DETACH method. The adapter class generated by the J adapter class generator contains a Java clas[...]

  • Страница 79

    Chapter 6. Messa ges 79 No Java field is found. Check whether the Java class/interface was changed after execution of the J adapter class generator. The Java class/interface was probably ch anged after generation of an adapter class. Check the Java class/interface. Java class initialization failed. Call the J adapter class generator supplier. The J[...]

  • Страница 80

    80 Chapter 6. Messa ges[...]

  • Страница 81

    Chapter 7. Samples Sample 1 – Using Classes Example 1: Example of using java.lang.System, java.io.PrintStream, and java.util.Date classes This section explains the “Sample Program - Example 1 ” provided with this product. Example 1 shows how the java.lang.System, java.io.PrintStream, and java.util.Date classes of Java are used from COBOL. Out[...]

  • Страница 82

    82 Chapter 7. Samples Generating adapter classes Generate adapter classes using the java2cob command. java2cob java. lang. Object [1] java2cob java.lang. System [2] java2cob java. until. Data [3] 1. Generate an adapter class of the java.lang.Object class (required for calling Java). 2. Generate an adapter class of the java .lang.System class used f[...]

  • Страница 83

    Chapter 7. Samples 83 Sample 2 – Specifying Method Example 2: Example of generating an adapter class by specifying constructor/method/field This program description explains “Sample Program - Example 2” provided with this product. Example 2 shows how to generate the adapter class specifying constructor/method/field. Outline The program conten[...]

  • Страница 84

    84 Chapter 7. Samples Generating adapter classes Generate adapter classes using the java2cob command. java2cob -r java.lang.System -gf out [1] -r java.io.PrintStream -gm "println(java.lang.Object)" [2] -r java.util.Date -gc "Date()" [3] Note: “” shows the continuance line. 1. Generate an adapter class of the java.l ang.[...]

  • Страница 85

    Appendix A. Message List This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages.[...]

  • Страница 86

    86 Appendix A. Message Li st Java2cob Command Messages This section explains the messages output by the java2cob command, including the operator responses to the messages. Adapter class generation failed because of a memory space shortage. Terminate unnecessary applications and retry. A memory space shortage occurred. Terminate unnecessary applicat[...]

  • Страница 87

    Appendix A. Message Li st 87 Messages Output during Generation This section explains the messages output during adapter class generation, including the operator responses to the messages. The message format is shown below: Message type: Message text The message types are shown below: Message type Level Meaning Error Severe No adapter class is gener[...]

  • Страница 88

    88 Appendix A. Message Li st Error: The suffix number exceeded 99. Generation was interrupted. Retry while specifying –r option, -gc opti on, -gm option, -gf option, -om option, constructor/method/field-specifying-option in “Class class-name/interface-name ” parameter, or “Option ReduceClass” parameter to decrease the number of classes, f[...]

  • Страница 89

    Appendix A. Message Li st 89 Warning: The property name of field "xxx" exceeded 30 characters. The characters after the first 30 characters were deleted. Check whether deleting the characters after the first 30 characters results in an unusable name. Warning: The name of method "xxx" exceeded 160 characters. The characters after[...]

  • Страница 90

    90 Appendix A. Message Li st Messages Output during Execution This section explains the messages output during execution of programs using adapter classes, including the oper ator responses to the messages. Messages given while execution is underway ar e output to the same target output as that of the DISPLAY statement that is specified by UPON SYS[...]

  • Страница 91

    Appendix A. Message Li st 91 The adapter class generated by the J adapter class generator contains a Java class name in invalid format. Contact the J adapter class generator supplier. The J adapter class generator failed. Co llect failure information and call your Fujitsu systems engineer. A same name is used for a parent and its child in the Java [...]

  • Страница 92

    92 Appendix A. Message Li st No Java method is found. Check whether the Java class/interface was changed after execution of the J adapter class generator. The Java class/interface was probably ch anged after generation of an adapter class. Check the Java class/interface. The character string could not be fetched from the String object. Call the J a[...]

  • Страница 93

    Appendix B. Exception Type List The exception types that can be acquired by the GET-CODE method of the FJ-JAVA- ERROR class are described in this chapter. 1 Meaning Java VM detected an error. Remove the error cause. Response The Java VM detected an execution-time e rror. Determine the error cause from the exception information returned by the GET-E[...]

  • Страница 94

    94 Appendix B. Excepti on Type List 5 Meaning No Java field is found. Check whether th e Java class/interface was changed after execution of the J adapter class generator. Response The Java class/interface was probably changed after generation of an adapter class. Check the Java class/interface. 6 Meaning The subscript of the array object is invali[...]

  • Страница 95

    Appendix B. Excepti on Type List 95 10 Meaning A required Java class/interface definition is not found. Check the environment variable (COBJNI_CLASSPATH). Response No Java class/interface is found on the search path. Check whether the value of the environment variable (COBJNI_CLASSPATH) is valid. 11 Meaning No Java interface/abstract class instance[...]

  • Страница 96

    96 Appendix B. Excepti on Type List 15 Meaning An internal logical error (inconsistency between the return value and object reference) occurred. Call the J adapter class generator supplier. Response The J adapter class generator failed. Collect failure information and call your Fujitsu systems engineer. 16 Meaning Java VM detected an error. Remove [...]

  • Страница 97

    Index adapter class, 14, 34, 46, 51 adapter object, 15 alphanumeric item, 27, 28, 34, 40 array, 65 assign, 25 -c, 32, 54, 63 class file, 18, 20 class method, 11, 26, 57 class variable, 11, 25, 26, 56 classpath, 35, 37 -classpath, 32 constructor, 32, 34, 37, 51, 54, 55, 57 , 70 constructors. See constructor cross-reference, 33, 39, 42 , 43, 58 -d, 3[...]

  • Страница 98

    98 Index 98 -r, 20, 33, 34, 58 ReduceClass , 40 restrictions, 12 return value, 57 Runtime, 12 -s[n], 34 SET-ARRAY-ELEMENT, 69 source file, 19, 29, 42 String class, 26, 44, 54, 61 -t, 34 Termination, 22 Unicode, 35, 38 unique name, 69[...]