Jump to content

Recommended Posts

Posted

Problem with gethostname.p & OPSYS

 

 

Hi,

 

Progress v91D

Linux 2.4.9-e.49

 

Running a server side program from a WebSpeed form submit which amongst other things sends an email, however I'm having a problem with the OPSYS variable when trying to return hostname within smtpmail.

 

Codestub below from gethostname.p:

 

DEFINE OUTPUT PARAMETER p-TcpName AS CHARACTER NO-UNDO.

 

MESSAGE "OPSYS: " OPSYS. /* THIS RETURNS UNIX */

 

&IF OPSYS = "UNIX" &THEN /* THIS FAILS */

&SCOPED-DEFINE SC STREAM cmdstream

DEFINE {&SC}.

INPUT {&SC} THROUGH VALUE("hostname -f").

IMPORT {&SC} UNFORMATTED p-TcpName.

INPUT {&SC} CLOSE.

&ELSE

<Do windows stuff which I don't want>

&ENDIF

 

 

Despite my message saying the OPSYS is UNIX the &IF statement then fails.

 

Anyone have any ideas as I'm sure I'm missing something really obvious here.......

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...