[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference csc32::consolemanager

Title:POLYCENTER Console Manager
Notice:Kits, Scans, Docs on CSC32:: as PCM$KITS:,PCM$DOCS:, PCM$SCANS:
Moderator:CSC32::BUTTERWORTH
Created:Thu Aug 06 1992
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1541
Total number of notes:6564

1444.0. "anyway to get rid of the <lf> in dialog mode?" by CSC32::J_WIELAND () Fri Dec 13 1996 11:43

dear readers,

digital unix V3.2c, pcm v1.61...
i have a customer that is trying to initialize his 'concurrent' (type of 
computer) systems thru PCM using the dialog scripts.  from the gui, it works
fine but trying to automate this from the command line using dialog it doesn't
work.  he connected a data scope between the terminal server and the 
'concurrent' computer system, and finds the following..

when using the gui, he send the init command and on the scope sees..

init<cr>

when he does it from the dialog box via a SEND command, he gets..

init<cr><lf>

its the <lf> that is causing his concurrent system a problem because it only
wants to see the <cr> ending the line..

Anyway to get RID of this <lf> character?  (he is using lat for the pcm
connection...  i know if he could use telnet, which he can't, it would 
be easy..)

thanks in advance
john wieland
T.RTitleUserPersonal
Name
DateLines
1444.1CSC32::BUTTERWORTHGun Control is a steady hand.Fri Dec 13 1996 14:5227
    Hmmmm...... a quick code check shows the following offending line:
    
    
    sprintf(temp,"%s\r\n", ptr1);
    
    the variable "ptr1" which contains the string that is specified after
    the SEND command is copied to "temp" and appended with a CR-LF pair.
    "temp" is then handed off to the routine that actually transmits the
    string to the managed system.
    
    SET TONE=SCOLDING_YOUR_DOG
    
    Bad code... bad bad code... bad code....
    
    The workaround...
    
    Use your favorite editor to implant a CR in the send string so that the
    resulting stream sent to the console is (spaces added for clarity)
    
    your-string CR CR LF
    
    This way you can fake it out by sending a "null" record and the lf will
    follow the "null" record and not the actual "init" command.
    
    
    Regs,
       Dan
1444.2good idea, but will not work because....CSC32::J_WIELANDThu Dec 19 1996 06:3014
    dan,
    
    great suggestion, unfortunately, it will not work.  it seems that the 
    'concurrent' systems when they recieve 'ANY' character at the serial 
    port, (including a <lf>), will think that they are in recieving data 
    mode, and will not leave this mode until they get a <cr>.  while in
    'recieving data' mode, the init command that the customer is trying to
    initiate will not function properly..
    
    any other thought on how to resolve this problem?
    
    thanks in advance, 
    john wieland
    customer support center
1444.3CSC32::BUTTERWORTHGun Control is a steady hand.Thu Dec 19 1996 13:059
    >any other thought on how to resolve this problem.
    
    Not without changing the code. What I would recommend is that you
    submit an IPMT. The right way to fix the code is to enhance it to look
    for a new environment variable that would allow the user to specify
    the terminating character(s) for any record sent via DIALOG.
    
    Regs,
      Dan
1444.4CSC32::BUTTERWORTHGun Control is a steady hand.Thu Dec 19 1996 13:1422
    One final question about your response in -2.
    
    You said that 
    
    >It seems that the 'concurrent' systems when they recieve 'ANY' character 
    >at the serial port, (including a <lf>), will think that they are in 
    >recieving data mode, and will not leave this mode until they get a <cr>.
    
    If this is true then why doesn't the first CR satisy this condition and
    allow the "init" command to execute? If a time delay between characters
    would help then place the following command at the top of your
    DIALOG file:
    
    SPEED 1000
    
    This will cause a 1 second delay between transmission of each
    character. The delay value is in units of milli-seconds.
    
    Regs,
      Dan