Fujitsu J Adapter Class Generator Bedienungsanleitung
- Schauen Sie die Anleitung online durch oderladen Sie diese herunter
- 98 Seiten
- 2.1 mb
Zur Seite of
Ähnliche Gebrauchsanleitungen
-
Server
Fujitsu T2000
2 Seiten 0.37 mb -
Power Supply
Fujitsu 39A105
27 Seiten 0.25 mb -
Air Conditioner
Fujitsu ASU36CLX1
52 Seiten 4 mb -
Computer Hardware
Fujitsu Semiconductor
354 Seiten 4.14 mb -
Desktop
Fujitsu ESPRIMO Q556
100 Seiten 3.77 mb -
Server
Fujitsu T5240
112 Seiten 4.2 mb -
Scanner
Fujitsu P3PC-2022-02ENZ0
87 Seiten 2.37 mb -
Flat Panel Television
Fujitsu P63XHA40U
50 Seiten 8.92 mb
Richtige Gebrauchsanleitung
Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung Fujitsu J Adapter Class Generator an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von Fujitsu J Adapter Class Generator, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.
Was ist eine Gebrauchsanleitung?
Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung Fujitsu J Adapter Class Generator die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.
Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung Fujitsu J Adapter Class Generator. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.
Was sollte also eine ideale Gebrauchsanleitung beinhalten?
Die Gebrauchsanleitung Fujitsu J Adapter Class Generator sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts Fujitsu J Adapter Class Generator
- Den Namen des Produzenten und das Produktionsjahr des Geräts Fujitsu J Adapter Class Generator
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts Fujitsu J Adapter Class Generator
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen
Warum lesen wir keine Gebrauchsanleitungen?
Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von Fujitsu J Adapter Class Generator zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von Fujitsu J Adapter Class Generator und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service Fujitsu finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von Fujitsu J Adapter Class Generator zu überspringen, wie es bei der Papierform passiert.
Warum sollte man Gebrauchsanleitungen lesen?
In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts Fujitsu J Adapter Class Generator, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.
Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von Fujitsu J Adapter Class Generator widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.
Inhaltsverzeichnis der Gebrauchsanleitungen
-
Seite 1
J Adapter Class Generator User’s Guide[...]
-
Seite 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.[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 6
6 NetCOBOL J Adapter Class Generator User's Guide[...]
-
Seite 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 ...........................................[...]
-
Seite 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 ...................................................[...]
-
Seite 9
Chapter 1. Outline of J Adapter Class Generator This chapter explains the function and op erating environment of the J adapter class generator.[...]
-
Seite 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.[...]
-
Seite 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 [...]
-
Seite 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[...]
-
Seite 13
Chapter 2. Adapter Class Generator Framework This chapter explains the framework of the J adapter class generator.[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 16
16 Chapter 2. Adapter Class Generator Framework[...]
-
Seite 17
Chapter 3. Developing Programs This chapter explains how to develo p programs that use Java classes.[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 31
Chapter 4. Using the Generator Command This chapter explains how to use the ge nerator command (java2cob), optional file and output result.[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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."[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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.[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 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 [...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 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. •[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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. ..[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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-[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 73
Chapter 6. Messages This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages.[...]
-
Seite 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,[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 80
80 Chapter 6. Messa ges[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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.[...]
-
Seite 85
Appendix A. Message List This chapter explains the messages output by the J adapter class generator, including the operator responses to the messages.[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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[...]
-
Seite 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 [...]
-
Seite 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[...]
-
Seite 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[...]