| They FINALLY have a text based configuration file, that if you
save in the correct directory under your configuration, will be
autoloaded when you start the server. I saved the following file
from a running connect to a dependent LU on my ST this morning:
# SNALU62_MANAGER - Save Configuration - 4-Jun-1997 11:25:54 DST
SELECT_SERVER{
server_name=TOBLU,
server_node=linkb,
server_transport=TCPIP
}
DEFINE_LOCAL_LU{
fq_local_lu_name=USDEC101.T126C002,
local_lu_alias=T126C002,
lu_session_limit=100,
session_activation=false,
max_sync_level=none,
gateway_node_name=TOBLUE,
gateway_transport=DECNET,
lu_capability=secondary,
access_name=XSNADS,
lu_name=sna-0.1
}
DEFINE_TP{
fq_local_lu_name=USDEC101.T126C002,
tp_name=XXXX,
status=enable,
conversation_type=basic,
sync_level=none,
security_required=none,
pip_type=no,
pip_number=0,
instance_limit=1,
a_mgr_started=true,
a_nodename=linkb,
a_user_id=root,
a_command_string="/trc/lib/sna/examples/cindi/exa4"
}
DEFINE_REMOTE_LU{
fq_local_lu_name=USDEC101.T126C002,
fq_remote_lu_name=USDEC101.CICS41B,
partner_lu_alias=CICS41B,
initiate_type=initiate_only,
parallel_support=false,
cnos_support=false,
security_acceptance=none
}
INITIALIZE_SESSION_LIMIT{
fq_local_lu_name=USDEC101.T126C002,
fq_remote_lu_name=USDEC101.CICS41B,
mode_name= ,
lu_mode_session_limit=1,
min_conwinners_source=1,
min_conwinners_target=0
}
DEFINE_MODE{
fq_local_lu_name=USDEC101.T126C002,
fq_remote_lu_name=USDEC101.CICS41B,
mode_name=XL620256,
send_max_ru_size_lower_bound=256,
send_max_ru_size_upper_bound=256,
recv_max_ru_size_lower_bound=256,
recv_max_ru_size_upper_bound=256,
single_session_reinitiation=secondary_lu,
conwinner_auto_activate_limit=0,
preferred_recv_ru_size=256,
preferred_send_ru_size=256,
local_max_session_limit=1
}
INITIALIZE_SESSION_LIMIT{
fq_local_lu_name=USDEC101.T126C002,
fq_remote_lu_name=USDEC101.CICS41B,
mode_name=XL620256,
lu_mode_session_limit=1,
min_conwinners_source=1,
min_conwinners_target=0
}
ACTIVATE_SESSION{
fq_local_lu_name=USDEC101.T126C002,
fq_remote_lu_name=USDEC101.CICS41B,
mode_name=XL620256
}
# End of Saved Server Configuration File
|
| You no longer have to program your configuration options.
The example programs for allocates and the rest are identical.
The following kludge sent and received data over the dependent
lu you saw configured in the last file. It is IDENTICAL to
the initial code that Echardt used to use to illustrate painful
lu6.2 behavior in 3.0. The names and order of calls has been
changed because the gateway and the partner program being used,
in this case, is different :
This should be enough to either clarify everything COMPLETELY or
make it REALLY confusing. Let me know which one it does.
Regards,
Cindi
==================
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sna/snatprmdf.h>
main( int argc, char** argv )
{
STATUS_RTN status;
STATUS_VEC status_vec;
SRV_INFO server;
char *local_lu = "T126C002";
char *remote_lu = "CICS41B";
char *mode_name = "XL620256";
char data[32000];
UINT32 length;
UINT32 data_recv, status_recv;
RES_ID resource;
TP_NAME tpn;
UINT32 conversation_state;
UINT32 dealloc_type;
unsigned int ii, jj,sndl=100,rcvl=200;
server.identifier = "TOBLU";
server.transport = SNALU62_C_TRANSPORT_TCPIP;
server.nodename = "0"; /* this is the same as localhost
*/
tpn.translate = SNALU62_C_TRANSLATE;
tpn.tpn.length = 4;
tpn.tpn.pointer = (UINT8 *) "GA02";
status= putenv("SNALOG_MASK=0xFFFFFFF");
status= putenv("SNALOG_FILE=/tmp/immallc.logmask");
status= system("export SNALOG_MASK SNALOG_FILE");
status = snalu62_allocate(
&resource,
NULL,
status_vec,
local_lu,
remote_lu,
mode_name,
&tpn,
SNALU62_C_MAPPED,
SNALU62_C_WHEN_SESSION_ALLOC,
0, /* conversation_group_id
*/
SNALU62_C_SL_NONE,
NULL, /* security
*/
NULL, /* pip_data
*/
NULL, /* wait_object
*/
NULL, /* luwid
*/
NULL, /* conversation_correlator
*/
&server
);
if( status == SNALU62_S_OK ) {
sprintf( data, "CONNCPIC1 004USERID PASSWD D
ACPICT4XACPICT4
");
length = strlen( data );
snalu62_as2eb( data, data, length );
status = snalu62_send_data(
resource,
status_vec,
(unsigned char*)data,
length,
NULL, 0, 0, 0, 0, 0, NULL
);
}
if( status != SNALU62_S_OK ) {
printf( " slogon: status= %d\n", status );
}
if( status == SNALU62_S_OK ) {
length = sizeof(data);
status = snalu62_receive_and_wait(
resource,
status_vec,
SNALU62_C_LL,
&length,
0, 0,
(unsigned char*)data,
&data_recv,
&status_recv,
NULL, NULL
);
}
}
if( status != SNALU62_S_OK || data_recv !=
SNALU62_C_DATA_COMPLETE ) {
printf( "rwlogon: status= %d, stat= %d, data= %d, length=
%d\n",
status, status_recv, data_recv, length );
}
if( status == SNALU62_S_OK && data_recv ==
SNALU62_C_DATA_COMPLETE ) {
snalu62_eb2as( data, data, length );
for( ii = 0; ii < length; ii++ ) putchar( data[ii] );
putchar( '\n' );
length = 0;
status = snalu62_receive_immediate(
resource,
status_vec,
SNALU62_C_LL,
&length,
0, 0,
NULL,
&data_recv,
&status_recv,
NULL
);
}
if( status != SNALU62_S_OK || status_recv != SNALU62_C_SEND_RECV
) {
printf( "rilogon: status= %d, stat= %d, data= %d, length=
%d\n",
status, status_recv, data_recv, length );
}
if( status == SNALU62_S_OK && status_recv == SNALU62_C_SEND_RECV
) {
sprintf( data, "%010d%010d", rcvl, sndl );
length = strlen( data );
snalu62_as2eb( data, data, length );
status = snalu62_send_data(
resource,
status_vec,
(unsigned char*)data,
length,
NULL, 0, 0, 0, 0, 0, NULL
);
}
if( status != SNALU62_S_OK ) {
printf( " sprolo: status= %d\n", status );
}
if( status == SNALU62_S_OK ) {
length = sizeof(data);
status = snalu62_receive_and_wait(
resource,
status_vec,
SNALU62_C_LL,
&length,
0, 0,
(unsigned char*)data,
&data_recv,
&status_recv,
NULL, NULL
);
}
if( status != SNALU62_S_OK || data_recv !=
SNALU62_C_DATA_COMPLETE ) {
printf( "rwprolo: status= %d, stat= %d, data= %d, length=
%d\n",
status, status_recv, data_recv, length );
}
if( status == SNALU62_S_OK && data_recv ==
SNALU62_C_DATA_COMPLETE ) {
snalu62_eb2as( data, data, length );
for( ii = 0; ii < length; ii++ ) putchar( data[ii] );
putchar( '\n' );
length = 0;
status = snalu62_receive_immediate(
resource,
status_vec,
SNALU62_C_LL,
&length,
0, 0,
NULL,
&data_recv,
&status_recv,
NULL
);
}
if( status != SNALU62_S_OK || status_recv != SNALU62_C_SEND_RECV
) {
printf( "riprolo: status= %d, stat= %d, data= %d, length=
%d\n",
status, status_recv, data_recv, length );
}
status = snalu62_deallocate(
resource,
status_vec,
dealloc_type,
NULL, /* log_data
*/
NULL, /* exp_data_recv
*/
NULL /* wait_object
*/
);
return status;
}
|