View previous topic :: View next topic
|
Author |
Message |
vinayknj
New User
Joined: 26 May 2008 Posts: 50 Location: Bangalore
|
|
|
|
Hi,
I am facing ASRA ABEND when trying to execute the below query in online program
SELECT CURRENT DATE
INTO :WS-DATE
FROM SYSIBM.SYSDUMMY1
WS-DATE is declared as X(10).
I am able to run the above query succesfuly in SPUFI.
Please let me know what might be the problem. Thanks |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
are You sure You are getting the ASRA at the select statement
and not when You process the date ?? |
|
Back to top |
|
|
vinayknj
New User
Joined: 26 May 2008 Posts: 50 Location: Bangalore
|
|
|
|
Yes... I checked while XPED and at the time of executing the SQL its giving ASRA. Its not going to the next statement also... Thanks |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you could have a fundamental problem with the way your program is communicating with db2,
but I would follow Enrico's suggestion.
also, since this is an online program, WTF don't you use the EIBDATE field? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
when you are in XPED,
why don't you skip this CALL to db2 for the date (and plug a date in working-storage via XPED)
and then see if you have a problem with another SQL in your program?
that will tell you if you have a problem with your db2 communications, or db2 or whatever. |
|
Back to top |
|
|
vinayknj
New User
Joined: 26 May 2008 Posts: 50 Location: Bangalore
|
|
|
|
I have tried one more thing. I am calling a Online pgm from a batch program and I have given the SQL staatements in the online program. I am invoking the batch pgm from a JCl.
When I submitted the JCL its giving MAXCC=12. But am able see SQL statement executed properly in batch program.
But when I am trying to execute SQL query in online program am getting SOC4 as below
The system detected a protection exception (System Completion Code=0C4).
From compile unit TESTPGM2 at entry point TESTPGM2 at compile unit offset +0000
at address 37E51C32. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
To repeat what DBZ mentioned:
Quote: |
you could have a fundamental problem with the way your program is communicating with db2,
|
Suggest you work with your dba to make sure that your code used the proper compile/link/bind process.
Do you see any "unresolved" messages in any of the output? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
compile unit offset +0000 at address 37E51C32. |
offset +0000 of any program is the first instruction which usually has something to do with either Reg 15 addressing or simply associating the
program with the environment - in this case CICS.
I would guess that your construct of the load module
(pre-compile/compile/link/bind)
is faulty.
but someone else with more experience may comment.
Have no idea what invokes the online module in CICS -
you mentioned this as your first test.
isolate the module and invoke it normally - via CICS transid or whatever
and solve the problem of your CICS module first.
and then get tricky and invoke it via the batch interface. |
|
Back to top |
|
|
rahuindo
New User
Joined: 09 Apr 2008 Posts: 83 Location: Chennai
|
|
|
|
Vinay,
Is this your first SQL statement which is encountered in the program? If yes, then as suggested by DBZ, you will need to link edit your CICS program to the CSECT DSNCLI.
This can be included during the compilation of the program as one of the parameters. |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
I would suggest you use the SQL form:
Code: |
SET :WS-DATE TO CURRENT DATE |
if you are required to retreive the DB2 date. |
|
Back to top |
|
|
|