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
 

 

Pseudo-conversational mode in a XCTL target program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Bartolomeo Vaieretti

New User


Joined: 09 Mar 2011
Posts: 6
Location: Germany

PostPosted: Thu Mar 10, 2011 8:39 pm    Post subject: Pseudo-conversational mode in a XCTL target program
Reply with quote

Transaction TRN1 has associated program PROG1 (pseudo-conversational). Under certain condition, PROG1 transfer control (XCTL) to PROG2, which should have his own pseudo-conversation with the terminal. When PROG2 send the map and execute a RETURN TRANSID('TRN1'), after receiving the control from the terminal, which program will be initiated?

Tnx for your time icon_biggrin.gif
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Mar 10, 2011 8:41 pm    Post subject:
Reply with quote

TRN1 is associated with PROG1
what tran is associated with PROG2?
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Thu Mar 10, 2011 8:46 pm    Post subject:
Reply with quote

There is a complete description of what happens when you issue a 'RETURN TRANSID(name)' in the CICS Application Programming Reference Manual.
How do YOU interpret what it says?
Is the explanation in the manual confusing?
Have you even looked at the manual?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 11, 2011 2:43 pm    Post subject:
Reply with quote

Nice Avatar Ronald - Dinosaur still rules, even in Ice-age! icon_smile.gif
Back to top
View user's profile Send private message
Bartolomeo Vaieretti

New User


Joined: 09 Mar 2011
Posts: 6
Location: Germany

PostPosted: Mon Mar 21, 2011 8:25 pm    Post subject:
Reply with quote

@ dbzTHEdinosauer:
In my case, there is no second transaction associated with PROG2, because my idea was to use XCTL. But maybe I should transfer the control in another way, creating the second transaction TRN2 associated to PROG2 and then doing a START. By now, I solved temporary my problem including the logic of PROG2 into PROG1, and flagging in the COMMAREA which map and program is active.
I wanted to solve the case splitting both pseudo-conversations in two programs (and two transactions maybe) to understand better how this would work, because I'm sure I'll have in the near future cases where I'll need to split the logic yes or yes. So, my current problem is solved, but I still want to learn the alternative.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8051
Location: East Dubuque, Illinois, USA

PostPosted: Mon Mar 21, 2011 8:32 pm    Post subject:
Reply with quote

If you want to do EXEC CICS RETURN TRANSID from PROG2, and have it return to PROG2, there must be a transaction name associated with PROG2. Otherwise, the only way you can get back to PROG2 is to set a flag in DFHCOMMAREA that PROG1 checks and immediately does an XCTL to PROG2.

Copying the logic from program to program is a really bad idea -- because sooner or later the logic will require a change. Unless there's very clear documentation that BOTH programs must be changed, one will get changed and the other won't -- although you could use a copybook to help (but still you'd have to know to recompile both programs when the copybook changed).
Back to top
View user's profile Send private message
Bartolomeo Vaieretti

New User


Joined: 09 Mar 2011
Posts: 6
Location: Germany

PostPosted: Mon Mar 21, 2011 8:53 pm    Post subject:
Reply with quote

@ Ronald Burr (and others):
I'm agree with Anuj, nice avatar.
Well, I was reading the CICS Application Programming Reference Manual before to write the original question, and now again, before to write this time.
The RETURN description is complete as reference, but nothing in this description clear what I was asking about (the target transaction is clear, I minded if the target program would change because my last program was PROG2 and not PROG1, but I think it's not like this).
Maybe my question was not clear. Anyway, the description is clear: If I write RETURN TRANSID(TRN1) then the transaction TRN1 will be started (with the exception of the terminal's permanent transaction, but it's not my case).
I think my understanding problem is more about XCTL and not about RETURN TRANSID().

In the main transaction (TRN1), main program (PROG1), the main logic is "pseudo-conversing" with the terminal operator.

Now the thing itself: At certain point, the operator press any key (for any specific action) and I need to jump to a second pseudo-conversational logic, in an small window (leaving the rest of the last full screen in the background), where the operator needs to enter and confirm some data. And after finished this secondary logic, I should return to the main one. This secondary logic is the one I wanted to split to PROG2, not only to have two simpler separated logics instead one more complex like now, also to be able in the future to call the secondary logic from any other main program which needs the same extra data and confirmation.

Right now, I solved the case including all (both logics) in PROG1 (associated with TRN1). And it's working perfectly. But I'd still like to separate both processes.

I think my solution pass by using START instead XCTL. But I'm minding in which pseudo-conversational cases could XCTL be used.

Anyway, thanks for your time. As soon I finish the set of transactions my boss asked me for, I'll return to the case to try with START.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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