Fujitsu J Adapter Class Generator User Manual page 63

Fujitsu user's guide j adapter class generator
Table of Contents

Advertisement

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.
...
REPOSITORY.
CLASS J-String AS "java-lang-String"
...
WORKING-STORAGE SECTION.
01
initialValue
PIC N(50).
01
aString
OBJECT REFERENCE J-String.
...
PROCEDURE DIVISION.
...
MOVE NC"Two-byte-code" TO initialValue.
INVOKE J-String "NEW-STRING-N" USING initialValue RETURNING aString.
...
MOVE NC"Two-byte-code" & X"0000" TO initialValue.
INVOKE J-String "NEW-STRING-N" USING initialValue RETURNING aString.
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.
GET-STRING-X method (object method)
Explanation
This method fetches the character string from the String object as an alphanumeric
data item.
Syntax
anObject
INVOKE
"GET-STRING-X" RETURNING
Parameter and return value
anObject
Specifies the String object from which a character string is to be fetched.
stringValue (attribute: PIC X ANY LENGTH)
Returns the character string fetched from the String object. If the specified data
item is shorter than the fetched character string, it is truncated. If the specified
data item is longer than the fetched character string, the trailing area is padded
with blanks.
Chapter 5. Adapter Class Reference
stringValue
63
[1]
[2]

Advertisement

Table of Contents
loading

Table of Contents