IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ASRA abend for DB2 query


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Mon Apr 19, 2010 5:41 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Apr 19, 2010 5:46 pm
Reply with quote

are You sure You are getting the ASRA at the select statement
and not when You process the date ??
Back to top
View user's profile Send private message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Mon Apr 19, 2010 5:52 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Apr 19, 2010 5:53 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Apr 19, 2010 6:01 pm
Reply with quote

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
View user's profile Send private message
vinayknj

New User


Joined: 26 May 2008
Posts: 50
Location: Bangalore

PostPosted: Tue Apr 20, 2010 10:52 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Apr 20, 2010 7:24 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Apr 20, 2010 8:01 pm
Reply with quote

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
View user's profile Send private message
rahuindo

New User


Joined: 09 Apr 2008
Posts: 83
Location: Chennai

PostPosted: Wed Apr 21, 2010 12:12 am
Reply with quote

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
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Wed Apr 21, 2010 6:31 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top