*SCREEN-IO in Batchmode

Hallo all!

The following program…

write notitle '=' *SCREEN-IO
write '=' *DEVICE
end

…does the following output in batchmode:

Logon accepted to library MYLIB.
SCREEN-IO: X
TTYP: BATCH
NAT9995 Natural session terminated normally.
Used CPU time:   0 00:00:00.02
Elapsed time:    0 00:00:00.03

Here’s the test-script:

#!/usr/bin/bash
natural batchmode bp=natbp parm=myparm cmprint=/tmp/test.out stack="(logon mylib;testing;fin)"

I expect SCREEN-IO to be FALSE in batchmode. :?:
What do you think?

Matthias

Good question,

Although the documentation for *SCREEN-IO says

you can still issue an INPUT

The same (*SCREEN-IO = TRUE) is shown for batch-mode on z/OS as well, btw.

So if there is a program which is used in Dialog, Batch and via RPC, I have to code the following:

if *SCREEN-IO and *DEVICE ne 'BATCH'
  /* do an input using map, e.g. "Are you sure?"
end-if