Hi, I am new to CICS COBOL and ADASQL. I am working on a new backend program that is CICS COBOL using ADASQL. We are receiving data via the COMMAREA copyboook from a Webservice. The basic premise of the program is to just insert a new record into the database. I am able to compile the program with no errors. I can run the program with no errors however the data does NOT get written to the database. Anyone please help? This is critical project due next week and I’ve struggled with this for a few days now.
I’ve set up a simple program just to try to get this working.
I have the BEGIN DECLARE statements in the data definition area. I have the INSERT statement in the code using SET and I follow with a COMMIT WORK after I check for response codes. I then RETURN (to CICS) and sent the response back to the webservice. I am getting zero for return code so I know the flow back and forth is correct. I just cannot figure out why the data isn’t being stored to the database. I have full access to read/update. I can add the record in NATURAL.
I also tried declaring a FIND with SELECT in the data definition and then doing an INSERT with the CURSOR…no luck.
Does anyone have any experience with this? Are there other permissions that need to be set? Is there a piece missing? I have attached my code for you to view.
PCPGEA.txt (26.8 KB)
PCPGEA_Copybook.txt (2.02 KB)
Are you probably trying to find the newly added record with a descriptor not (correctly) set on the insert ?
I’d try to also display the ISN after the INSERT, then go back and try to GET the record from Natural with
the displayed ISN.
Thanks Wolfgang, good idea. The ISN comes back as zero.
Now that’s weird, I can hardly believe you can get a zero response code AND a zero ISN …
Can you try to display additions 2 + command time as well ?
Apparently the RCFIND and RCGET NatParms are set OFF to ignore the normal RC113.
I haven’t used ADASQL in years, so I don’t remember where it is specified, but what is the setting for DBID? Verify that the DBIDs specified for the COBOL and Natural programs are the same.
could you please send us the ADASQL parameters. I am afraid that you are not getting to Adabas. Are you using TWA to call Adabas or Commarea? If is it TWA than it should be defined as at least 28 bytes and if you use commarea there is a specific definition. please look at the ADASQL documentation for the definition.
after looking at the translated code, the call to ‘ADASTWA’ and the EXEC ADABAS statement were never being put in for an insert/update but were on a READ so the code was never even calling ADABAS Turns out the OPTIONS global parameter in the ADASQL proc had been set to NOUPDATE. Once we changed that to UPDATE it worked. Now having security issues but one step further!
Thanks all for your input…