Menu

#448 SequentialFile.setRecordFormat() fails on DDS BINCHAR

Record-Level Access
open
Zhang Ze
None
3
2021-05-20
2021-05-20
No

The SequentialFile.setRecordFormat() method does not handle a DDS type of BINCHAR. For example,

> java  -jar jt400.jar jdbc:as400:SYSTEM $USERID $PASSWORD
>!setnewvar AS400=com.ibm.as400.access.AS400(SYSTEM,$USERID,$PASSWORD)
AS400=AS400 (system name: 'SYSTEM' user ID: 'USERID'):com.ibm.as400.access.AS400@b19f074b
>!setnewvar PATH=com.ibm.as400.access.QSYSObjectPathName("QSYS","QAPMJOBS","*LAST","MBR")
PATH=com.ibm.as400.access.QSYSObjectPathName@2a4c8d3c
>!setvar PATHSTRING=PATH.getPath()
PATHSTRING=/QSYS.LIB/QAPMJOBS.FILE/%LAST%.MBR
>!setnewvar FILE=com.ibm.as400.access.SequentialFile(AS400,PATHSTRING)
FILE=com.ibm.as400.access.SequentialFile@5cd0f5af
>!callmethod FILE.setRecordFormat()
No matching method found, possible errors are the following:
Exception com.ibm.as400.access.InternalErrorException: An unknown problem has occurred.
Calling method setRecordFormat with  failed
Could not parse  as integer
Method not found setRecordFormat
Exception com.ibm.as400.access.InternalErrorException: An unknown problem has occurred.
Calling method setRecordFormat with java.lang.String  failed
Did not handle parameter with class com.ibm.as400.access.RecordFormat
Method not found setRecordFormat

Call returned null
>

A trace shows the following cause of the error.

Thread[main,5,main] Thu May 20 10:23:54:076 CDT 2021 Unrecognized field type: 5
java.lang.Throwable
at com.ibm.as400.access.Trace.logData(Trace.java:776)
at com.ibm.as400.access.Trace.log(Trace.java:836)
at com.ibm.as400.access.AS400FileRecordDescriptionImplRemote.addFieldDescription(AS400FileRecordDescriptionImplRemote.java:734)
at com.ibm.as400.access.AS400FileRecordDescriptionImplRemote.retrieveRecordFormat(AS400FileRecordDescriptionImplRemote.java:1330)
at com.ibm.as400.access.AS400FileImplBase.setRecordFormat(AS400FileImplBase.java:825)

There may be other SQL types that need to be verified -- for example -- BINARY, VARBINARY, DECFLOAT, and XML.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB