Natural batchmode CMOBJIN

Hi,

I am running batch to simulate a Natural online function. Now, I come to a screen which requires a single character input and then press function key [F8]. [ENTER] key is not accepted due to the rule set in the MAP.

I tried to simulate these keystokes in several ways but failed. In the CMOBJIN.txt, I have tried:

3
%K8

or

3 %
%K8

or

3,
%K8

Can someone provide me hint ? Sample screen attached.

Regards.
sample.doc (59 KB)

Hi Tony,

How’s things?

I initially thought the problem might be related to the fact that there is only a one character input field on the map. True on mainframe but I was forgetting this was open systems and a % causes a pop-up window for input.

I wrote a Q&D map & program to test a few theories out. The map had a single A1 input field and the program is below.

0010 SET KEY PF8
0020 INPUT USING MAP 'M1' #A(A1)
0030 WRITE #A *PF-KEY
0040 END

It looks like the % gets in the way of processing the input field on the map. If you enter ‘X’ in #a and press the PF8 button it displays ‘X PF8’ but if you enter ‘X’ and type %K8, it displays ’ PF8’ with #A being null.

Can you change the program (or map processing rule) to check for *DEVICE?

Cheers,

Graeme Lane
graeme.lane@immi.gov.au

Hi Graeme,

How are you? Nice to meet u here.

In my batch job, I can never pass PF8 to the screen. It always treat it as [ENTER]. Using your example, the output is:

NEXT LOGON TEST
Logon accepted to library TEST.
NEXT EXECUTE FX

field1___

DATA a
Page 1 11-05-25 16:37:43

a ENTR
NEXT FIN
NAT9995 Natural session terminated normally.

I could not probably ask customer to change the program. Btw, what do you mean by checking *DEVICE ?

Best Regards.

Just a wild guess:

if *DEVICE = 'BATCH'
  ... fill the mask-fields ...
else
  INPUT using map
end-if

You can use *SCREEN-IO as well.