Fujitsu J Adapter Class Generator Manual de usuario Pagina 62

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 98
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 61
62 Chapter 5. Adapter Class Reference
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 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”00” in the statement can generate a
String object shorter than data item length.
...
REPOSITORY.
CLASS J-String AS "java-lang-String"
...
WORKING-STORAGE SECTION.
01 initialValue PIC X(50).
01 aString OBJECT REFERENCE J-String.
...
PROCEDURE DIVISION.
...
MOVE "ABC" TO initialValue.
INVOKE J-String "NEW-STRING-X" USING initialValue RETURNING aString.
[1]
...
MOVE "ABC" & X"00" TO initialValue.
INVOKE J-String "NEW-STRING-X" USING initialValue RETURNING aString.
[2]
1. A String object consisting of 50 characters with the last 47-character area
padded with blanks is generated.
2. A String object consisting of three characters is generated.
NEW-STRING-N method (factory method)
Explanation
This method generates a String object having the character string specified for the
national data item as an initial value.
Syntax
INVOKE
class-name
"NEW-STRING-N" USING
initialValue
RETURNING
createdObject
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 N ANY LENGTH)
Specifies a national data item as the initial value of the String object.
Vista de pagina 61
1 2 ... 57 58 59 60 61 62 63 64 65 66 67 ... 97 98

Comentarios a estos manuales

Sin comentarios