I retrieve the data and move it to the dfhcommarea variable declared as LS-COMM Pic x(100).
when i do a display LS-comm in my cobol and compile it works.(that is i am able to see both the records)
the code that i am using:
EXEC SQL INCLUDE SQLCA END-EXEC.
EXEC SQL INCLUDE CUST END-EXEC.
DECLARE CUR1 CURSOR FOR
SELECT CUSTOMERNO,CUSTOMERNAME FROM CUST
01 WS-CUST PIC X(200).
03 WS-CUSTOMER PIC X(200).
03 LS-CUSTOMER PIC X(200).
PERFORM PARA1 UNTIL SQLCODE NOT EQUAL TO 0.
FETCH CUR1 INTO :CUSTOMERNO,:CUSTOMERNAME
IF SQLCODE = 0
STRING CUSTOMERNAME DELIMITED BY SIZE,
"~" DELIMITED BY SIZE,
CUSTOMERNAME DELIMITED BY SIZE,
"#" DELIMITED BY SIZE
MOVE WS-CUST TO LS-CUSTOMER.
* DISPLAY LS-CUSTOMER.
* DISPLAY CUSTOMERNAME.
EXEC CICS RETURN
My java code has to read that string and display..
Currently it is only displaying the last record in the table.
we need to resolve this quickly.
your guidance is greatly appreciated.
Joined: 18 Jul 2007 Posts: 2150 Location: At my coffee table
Ignoring several errors, you are overlaying (replacing) the first row with the second row in the move to the commarea.....
If there will only ever be just two rows, set up an additional area to save the first row....