🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.listserv.asm370
Article #1623

Re: Interacting with a TSO user from a program

#1623
From: Mark Gass
Date: Wed, 11 Mar 1992 15:31
53 lines
2935 bytes
First note that MVS has multiple C environments, depending on
which C compiler vendor you choose.

For ours (SAS/C), terminal output buffers are flushed before
terminal input is requested. This ensures that any requests
for input are available before the user begins typing.
This is done with TPUT using a flag which tells TSO not
to go to the next line (assuming a newline was not
among the characters flushed). Be aware, however, that "session
manager" (which your users may or may not be running)
does not honor the flag (but then session manager
terminal interaction is not inteded to work like a
plain TTY).

With SAS/C, another way to get a prompt is to use a special
I/O option (we call these "amparms"). There is an amparm
called "prompt". For stdin under TSO, it is set to
"program-name: " by default (where program-name is argv[0])
- but can be changed. This also
takes care of situations where the library must
prompt for input automatically. For example:
  scanf("%d %d", &i, &i);
when the user hits enter after typing only the first
integer. If you use "prompt", then you don't need the
printf at all (as long as the prompt need not change
throughout the use of the terminal file).

If you are generating your own prompts, you will
need to turn off our default prompt. This is
accomplished with a declaration of:
  char *_stdiamp="prompt=";


For more advanced requirements, you can use ISPF or,
better yet, our 3270 windowing library (called FSSL)
which gives you program a look and feel similar to
version 6 of the SAS system under MVS.

The SAS/C library reference Vol 1, 2nd Edition pages 281
and following describe our terminal I/O in detail.

<>           Mark Gass           <>  EMAIL: sasmkg@unx.sas.com <>
<>        SAS/C Development      <>  Voice: (919) 677-8000     <>
<>          SAS Institute        <>    FAX: (919) 677-8224     <>






--
   Thanks,
   --Mark ( sasmkg@unx.sas.com )
Technical Details
Message-ID: <1992Mar11.153121.2670@unx.sas.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!auvm!vm.sas.com!mozart.unx.sas.com!wagner.unx.sas.com!sasmkg
References: <1992Mar10.180109.7979@uai.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcdcb,934060ecaacc1e87
X-Google-Attributes: gidfcdcb,public
X-Google-ArrivalTime: 1992-03-11 07:56:38 PST
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!auvm!vm.sas.com!mozart.unx.sas.com!wagner.unx.sas.com!sasmkg
References: <1992Mar10.180109.7979@uai.com>
Nntp-Posting-Host: hus.unx.sas.com
Organization: SAS Institute Inc.
X-Sender: news@unx.sas.com (Noter of &worthy Events)
Originator: sasmkg@hus.unx.sas.com
X-Bytes: 1914
Lines: 54
Message-ID: <1992Mar11.153121.2670@unx.sas.com>
Newsgroups: bit.listserv.asm370
Date:         Wed, 11 Mar 1992 15:31:21 GMT
Sender:       IBM 370 Assembly Programming Discussion List <ASM370@UGA.BITNET>
Comments:     Warning -- original Sender: tag was NETNEWS@VM.SAS.COM
From:         Mark Gass <sasmkg@UNX.SAS.COM>
Subject:      Re: Interacting with a TSO user from a program
Comments: To: ASM370@UGA.CC.UGA.EDU