Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ASRA abend for DB2 query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: ASRA abend for DB2 query
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Mon Apr 19, 2010 5:46 pm    Post subject: Reply to: ASRA abend for DB2 query
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    Post subject: Reply to: ASRA abend for DB2 query
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    Post subject:
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    Post subject:
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    Post subject: Reply to: ASRA abend for DB2 query
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

Site Director


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

PostPosted: Tue Apr 20, 2010 7:24 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: ASRA abend for DB2 query
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us