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

CTG ECI request - JAVA client program


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

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Mon Jul 09, 2007 8:49 pm
Reply with quote

Hi this is the code that i am using to communicate to CICS z/os server using the sample code - ECIRequest.
In the CICS TS v2.3 on Z/os the TCPIP listener program is active.
Network connection is working properly ...
when i run the java code i get a return code -27(which is security error) I am not sure whether it is happening in my windows environment or while communicating to z/os cics server.
The code is as follows?(please need your help where i am going wrong)import com.ibm.ctg.client.JavaGateway;
import com.ibm.ctg.client.*;
import java.io.*;
public class Comm
{
public static void main(String args[]) throws IOException
{
try
{
JavaGateway jg = new JavaGateway("localhost",2006);
byte commarea[] = ("abcd").getBytes("IBM037");
ECIRequest req= new ECIRequest(ECIRequest.ECI_SYNC,"CICS1",null,null,"m22ap03","m22c",commarea,100,
ECIRequest.ECI_NO_EXTEND,
ECIRequest.ECI_LUW_NEW);
System.out.println("Comm in: " + new String(req.Commarea, "IBM037"));
jg.flow(req);
System.out.println("Comm out: " + new String(req.Commarea, "IBM037"));
System.out.println("Rc: " + req.getRc());
jg.close();
}catch (IOException ioe) {
System.out.println("Handled exception: " + ioe.toString());
}
}

----I get return code -27
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Tue Jul 10, 2007 7:48 am
Reply with quote

to determine if CICS security error, ask your techsupport. there should be a related security message coming from the CICS region.

or
try executing the CICS program from green screen 3270
Back to top
View user's profile Send private message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Tue Jul 10, 2007 9:48 am
Reply with quote

Thanks earl
Thru telnet port 23 i am able to access my program.
When i try to access it from my java client program using CTG ECIRequest i am getting -27 error.
Which is a security error.
I need some help on understanding the getRC method???
Would like to know whether i have coded it properly.
I am new to JAVA, please some one help us solve this issue...

Thanks!
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Tue Jul 10, 2007 7:17 pm
Reply with quote

ramco_sita,

How are you determing -27 error is security problem?

are you sure you are pointing to correct CICS region ?

-Earl
Back to top
View user's profile Send private message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Tue Jul 10, 2007 8:53 pm
Reply with quote

I am pointing to the correct CICS region.
The only thing i would like to know is do i have to have a webserver to run this java program.
Do i need to change any security settings in the z/os for the ecirequest???
Do i have to mirror the transaction names i use in the ECIREquest - in the CICS z/os
i really need to resolve this ----
thanks in advance
Back to top
View user's profile Send private message
Earl

Active User


Joined: 17 Jun 2007
Posts: 148
Location: oklahoma

PostPosted: Tue Jul 10, 2007 9:31 pm
Reply with quote

I don't understand your comment "mirror the transaction names"

Are you linking to a program that in turn is expected to execute
a CICS transaction ?


can you submit an http request from browser to invoke your program?
ask you systems people for correct syntext:::
http://URLADDRESS/cics/cwba/PROGNAME
Back to top
View user's profile Send private message
Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Wed Jul 11, 2007 7:13 am
Reply with quote

Earl,
Quote:
I don't understand your comment "mirror the transaction names"

while initiating a ECI request from CICS client you can specify how the transaction would be run on the CICS server end whether as mirror transaction i.e. CPMI or with the actual name of the transaction as defined in RCT entries of your CICS region.

ramco_sita,
the security error that you are encountering while making a ECI request. What is the value of the eci_version you are passing to the CICS server and does your shop requires a different userid / password rather than default cics user (it depends on the security settings of the region), if yes you might need to specify the same in eci_userid & eci_password variables of EciParms structure.

Hope this helps
Nimesh
Back to top
View user's profile Send private message
ramco_sita

New User


Joined: 25 Jun 2007
Posts: 40
Location: chennai

PostPosted: Wed Jul 11, 2007 12:14 pm
Reply with quote

Hi Nimesh

In the CICS region when they enabled the TCPIPSERVICE(ECI) the security is set to local.
so we are using the default user id and directly invoking the CICS Tranaction and program thru the ECIRequest.

Am i missing anything in my code.
Do i have to have an websphere application server on the windows...
I am totally lost ---
Back to top
View user's profile Send private message
Nimesh.Srivastava

New User


Joined: 30 Nov 2006
Posts: 78
Location: SINGAPORE

PostPosted: Tue Jul 17, 2007 7:32 am
Reply with quote

ramco_sita,
do one thing, from your CICS client on windows go to CICS terminal and login with a valid user id and initiate your transaction using EXEC CICS START TRAN. On the server-end see whether the transaction is initiated and has run. If yes, then code the same userid and password in your ECI request and test again, it should go through if its because of a userid security validation. If no, then you can ask your system people why is default userid / test userid not working.

Hope this helps
Nimesh
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 Using API Gateway from CICS program CICS 0
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top