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

Handle ROLLBACK in EXCI interface


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 21, 2012 2:38 pm
Reply with quote

I have 3 programs

Program A(Batch program) calling program B (which has synconreturn).Program B links CICS program C which does table updates.

1 St call C Updates table
before 2nd call program abends in A
No roll back happens



Program A(Batch program) calling program B (which has no synconreturn).Program B links CICS program C which does table updates.

1st call C updates table
2nd call happens program abends in B for the below error

Code:
RESPONSE CODE  =0000000088
RESP2    CODE  =0000000422
CICS ABENDCODE =ADPL


ADPL
Quote:
The IBM "CICS/ESA Messages and Codes" manual provides the following information regarding the abend ADPL:
Explanation: A server program has issued a command which is restricted in the distributed program link (DPL) environment. Certain API and CPI- RR requests, and the DL/I terminate request are not allowed in the DPL environment. See the CICS/ESA Application Programming Guide for a list of these restricted commands.

A server program is a program which has been remotely linked, or a Program defined to run with the DPL subset.
Existing and new applications should be examined to verify that they do not use commands that are not supported under DPL.
Now my requirement is After doing table updates using program B and program returns to A.When program A abends due to some reason the processed data in table should be rolledback.

How to achieve this using this EXCI interface?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 21, 2012 6:12 pm
Reply with quote

I believe when PGM C returns to PgmB
a commit is made by virtue of the CICs Task Terminating.

Why do you want a RollBack, anyway?

A and B are batch,
B has the execi link

you are talking about rollback if A abends, but here B has abended.

also, terminology. A program ABENDs
because the OPS-SYS determines that the offending Program
can be no-longer allowed to continue.

what you have showed us is the execi response code to a LINK.
nothing abended.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 21, 2012 6:27 pm
Reply with quote

Thanks Dick

In my first case

Program A(Batch program) calling program B (which has synconreturn).Program B links CICS program C which does table updates.

1st call to program C through B Updates table on gets commited due to SYNCONRETURN if my program abends due to some issue say SOC7, or due to any other table processing failure within program A I actually wanted the program to roll off updates happend through program C.

I wanted to rollback because after fixing the issues on restart I tend to process the same data again and encounter a duplicate entry and my program fails again
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 21, 2012 6:34 pm
Reply with quote

well,
i think you first design error was encountered
when you did not realize that a COMMIT or ROLLBACK
is a task oriented activity
and you essentially have two tasks:
the batch task
the cics task.

since you can not issue a COMMIT or ROLLBACK in one task
that will affect the other,
sounds as if you need a different approach in your RESTART process.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 21, 2012 7:15 pm
Reply with quote

I understand Dick.

I guessed so just thought if there was an approach to ROLLBACK things

Thanks Dick for your inputs.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 21, 2012 7:35 pm
Reply with quote

Hi Dick,

Btw removing SYNCONRETURN from the EXCI will that make any help??

Because I tried that

What I did is the following actions

A links C through B returns successful
A links C through B abends with

Code:
RESPONSE CODE  =0000000088
RESP2    CODE  =0000000422
CICS ABENDCODE =ADPL


but the action rolls back for the first insert

Probably if I dont get the above abend I guess I might achieve what I need . Frankly no clue to fix the above issue .

Pointers will be helpful icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 21, 2012 8:47 pm
Reply with quote

I would separate the db2 logic in the cics program
and create a new/non cics program that can be called from batch or cics.

why does the db2 logic require cics?

reusable code does not mean figure out how to jump into a convoluted mess of old code to take advantage of one function.

it means separate the function - make a separate module -.

yeah I know, fixing it so that it conforms to modern program techniques
is harder
than figuring out how to set 13 different switches
and do this in the batch program to offset that
which is done in the quagmire of existing code.

at some point, you just have to change something.

the modular programming technique was so named
because people could not grasp the idea of each module only performing one function.

the days of 15000 lines of spaghetti code should come to an end.

CALLs do not take that much time.
and even if they do, computers run at such speeds
that writing function oriented modules is much easier to maintain
and implement.

so you have 100 200-line modules instead of 1 20000-line modue. HFC?
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 21, 2012 9:29 pm
Reply with quote

Initially we had this program to be accessed for different functions over a series of tables for CICS

Later point it was realised we need them for Batch so we decided to reuse this rather developing one similar for batches

so that is the history

Thanks again :-)

What is HFC?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 21, 2012 9:44 pm
Reply with quote

Quote:
program to be accessed for different functions over a series of tables for CICS


as I said, complicated/complex - IMUO bad design.
did not have to be a cics module
1 module for each function.
series of tables....

another advantage of 1 function/1 table module
is that a change to this is easily tested.

a multi-function/muti-table module to be properly tested (who does this???)
means testing every function over every table anytime
any change is made.

HFC - should have been WFC
who f******* cares?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 21, 2012 10:17 pm
Reply with quote

sorry Pandora_Box,

i should not subject you to my sermons
when you are not in a position to make any major changes.

you are stuck trying to debug you exci stuff.

without further info about your unique implementation,
it is tough to give you suggestions,
considering the many varied ways exci can be implemented.

good luck.
possibly others with better first hand knowledge of the interface
can help you.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Fri Sep 21, 2012 10:33 pm
Reply with quote

No please never be sorry

I just treat them as invaluable inputs

Its not that I cant change them Considering the timeline we have its tough

Also I am sorry I thought I gave you all I want

Plz let me know what details you need I will share them asap

Yes as said I will wait
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 21, 2012 10:43 pm
Reply with quote

here is a writeup on SYNCONRETURN:
do a right click and open in new tab:
publib.boulder.ibm.com/infocenter/cicsts/v3r1/index.jsp?topic=%2Fcom.ibm.cics.ts31.doc%2Fdfhtm%2Fdfhtm49.htm

as you can see, depending on your site, things can get confusing.

at any rate, you now have a link to the manual.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Sat Sep 22, 2012 11:07 am
Reply with quote

Thanks for the link Dick

Will Call to SRRBACK in program A when there is use of SYNCONRETURN resolve?
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Batch call online program, EXCI task ... CICS 3
No new posts CICS webservice - Flexible Interface CICS 0
No new posts filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
No new posts DFSORT to handle in between specific ... DFSORT/ICETOOL 6
No new posts HANDLE AD2R CICS ABEND CICS 4
Search our Forums:

Back to Top