My customer have a SAS 9.3 Platform. The Employers have SAS Guide 5.1 and Consultants SAS Base 9.3 client. The IT Department have stricted policy and the only solution to my need is using SAS/CONNECT with TCPwin.scr to customize sas call for workspace session. The Environment by default and for costruction have some scripts that set environment variable with for example the root of the project. The ETL fluxes are made with sas base scripts and use the environment variable in libname statement. Now we want to develop with SAS Base Client from lapton in signon, so we need to call the parameters file before the launche of workspace session. TCPWIN.src answer to my need because i can call a parameters before launch SAS. trace on;
echo on;
/*-------------------------------------------------------------------*/
/*-- Copyright (C) 1993 by SAS Institute Inc., Cary NC --*/
/*-- --*/
/*-- name: tcpwin.scr --*/
/*-- --*/
/*-- purpose: SAS/CONNECT SIGNON/SIGNOFF script for connecting --*/
/*-- to a Windows (either 95 or NT) host via the TCP --*/
/*-- access method. --*/
/*-- --*/
/*-- notes: 1. You must have the spawner program executing on --*/
/*-- the remote 95 or NT workstation in order for the --*/
/*-- local session to be able to establish the --*/
/*-- connection. If the spawner is not running on the --*/
/*-- remote node, you will receive a message telling --*/
/*-- you the connection has been refused. --*/
/*-- --*/
/*-- 2. You must have specified OPTIONS COMAMID=TCP --*/
/*-- in the local SAS session before using the signon --*/
/*-- command. --*/
/*-- --*/
/*-- assumes: 1. The command to execute SAS in your remote (W95 or --*/
/*-- WNT) environment is "sas". If this is incorrect --*/
/*-- for your site, change the contents of the line --*/
/*-- that contains: --*/
/*-- type 'sas ... --*/
/*-- --*/
/*-- support: SAS Institute staff --*/
/*-- --*/
/*-------------------------------------------------------------------*/
log "NOTE: Script file 'tcpwin.scr' entered.";
if not tcp then goto notcp;
if signoff then goto signoff;
%PUT *********************************************;
%PUT CONNESSIONE A SAS UTENTE: &USERWNS24. ;
%PUT *********************************************;
/* --------------- TCP SIGNON ------------------------------------*/
waitfor 'Username:'
, 'Hello>' : ready
, 120 seconds : noprompt
;
type "&USERWNS24" LF;
waitfor 'Password:' , 120 seconds: nolog;
type "&PSWWNS24" LF;
waitfor 'Hello>'
, 'access denied' : nouser
, 120 seconds : timeout
;
ready:
log 'NOTE: Logged onto Windows... Starting remote SAS now.';
/* noterminal suppressses prompts from remote SAS session. */
/* nosyntaxcheck prevents remote side from going into syntax */
/* checking mode when a syntax error is encountered. */
/* The Win spawner supplies the following options by default: */
/* -DMR -COMAMID TCP $SASDMR MSGQUEUE -NOLOGO -NOTERMINAL */
type 'E:\Dati\CDB\sourceroot\bin_win32\connect_test.bat' LF;
waitfor 'SESSION ESTABLISHED', 120 seconds : nosas;
log 'NOTE: SAS/CONNECT conversation established.';
stop;
/*---------------- TCP SIGNOFF --------------------------------------*/
signoff:
log 'NOTE: SAS/CONNECT conversation terminated.';
stop;
/*--------------- SUBROUTINES -----------------------------------*/
/*--------------- ERROR ROUTINES --------------------------------*/
notcp:
log 'ERROR: Incorrect communications access method.';
log 'NOTE: You must set "OPTIONS COMAMID=TCP;" before using this';
log ' script file.';
abort;
noprompt:
log 'ERROR: Did not receive userid prompt.';
log 'NOTE: Ensure spawner process is running on remote node.';
abort;
nolog:
log 'ERROR: Did not receive password prompt.';
abort;
nouser:
log 'ERROR: Unrecognized userid or password.';
abort;
nosas:
log 'ERROR: Did not get SAS software startup messages.';
abort;
timeout:
log 'ERROR: Timeout waiting for remote session response.';
abort;
and my bat is something like this: call E:\dati\CDB\parms\parms
"D:\SAS9.3\Software\SASFoundation\9.3\sas.exe" -dmr -comamid tcp -device grlink -noterminal the error now: ERROR: Conversation termination; status=1.
ERROR: Remote signon to DWHOST canceled. but i can find any information about that.
... View more