How to fix Micro focus ED with PostgreSQL generating Return code was 0240?

Dear All, Do we have any solution for the above query? My scenario is, we are using PostgreSQL, instead of DB2 and I'm getting return code 0240 while using "IKJEFT01" or "IDAEFT01" in Batch job. Environment is RedHat Linux MFED.

Sample Code is: 

//TEST01 JOB 'TEST01',CLASS=A,MSGCLASS=X,TIME=1440,
// NOTIFY=MYUSERID,RESTART=*,LINES=(500,CANCEL)
//*

//STEP01 EXEC PGM=IKJEFT01
//SYSTSIN DD *
DSN SYSTEM(AS7R)           /* ODBC Driver
RUN PROGRAM(INSRTISS)      /* Sample COBOL Program
END

//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*

 

ODBC DRIVER

[AS7R]
Description = PostgreSQL connection to AMPG961
Driver = PostgreSQL
Database = test
Servername = 127.0.0.1
Port = 5432
UserName=postgres
Password=postgres
Protocol = 9.4
ReadOnly = No
RowVersioning = No
ShowSystemTables = No
ConnSettings =

 

COBOL PROGRAM (INSRTISS)

*===============================================================**
IDENTIFICATION DIVISION.
*================================================================*

PROGRAM-ID. INSRTISS.
AUTHOR. TSH.
DATE-WRITTEN. 2021-10-28.

******************************************************************
DATA DIVISION.
******************************************************************
WORKING-STORAGE SECTION.

01 WS-SQLSTATE PIC X(5) VALUE ZEROES.
88 SQLSTATE-OK VALUE ZEROES.
88 SQLSTATE-NO-FND VALUE '02000'.


01 WS-KEY.
03 WS-SITE PIC s9(4) binary VALUE 11.
03 WS-BANK PIC s9(4) binary VALUE 21.

EXEC SQL INCLUDE SQLCA END-EXEC.
COPY EDSFILE.

PROCEDURE DIVISION.
MAIN-RTN.

DISPLAY 'WS-SITE:' WS-SITE
DISPLAY 'WS-BANK:' WS-BANK
MOVE WS-SITE TO MASTER-SITE.
MOVE WS-BANK TO MASTER-BANK.
DISPLAY 'MASTER-SITE:' MASTER-SITE.
DISPLAY 'MASTER-BANK:' MASTER-BANK.

EXEC SQL
INSERT INTO public.master_record
( master_site
,master_bank)
VALUES ( :MASTER-SITE
,:MASTER-BANK)

END-EXEC.

DISPLAY '* SQLSTATE : ' SQLSTATE
DISPLAY 'RETURN-CODE AFT:' RETURN-CODE
EXEC SQL
COMMIT WORK
END-EXEC.
DISPLAY 'RETURN-CODE:END:' RETURN-CODE
DISPLAY "*** INSERT FINISHED ***".
STOP RUN.

SYSOUT OF BATCH JOB EXECUTION:

WS-SITE:00011
WS-BANK:00021
MASTER-SITE:00011
MASTER-BANK:00021
* SQLSTATE : 00000
RETURN-CODE AFT:00240
RETURN-CODE:END:00240
*** INSERT FINISHED ***

My Concerns are: 

  1. a) Why I'm getting the Return Code: 0240, even after successful insertion of the records in the Master_Record table?
    b) Is it the issue of the my Program?
    c) Is it the issue of the Batch Job?
    d) Is it the issues of the ODBC Driver config settings?