SOLVE:Access contains MAI logon scripts that run fine in mainframe application screens (i.e. CICS, TSO, etc) for terminals logging in as 24 x 80 (MOD2). They fail for terminals logging in at 27 x 132 (MOD5). The application menu is defined with a map of 24 x 80.
A trace of the session shows the MAIFIND getting a RC of 4 and the process loops looking for the find criteria. Is there anyway to get the logon script working for a 27 x 132 session?
Environment
Release: Component: SACCES
Cause
The problem is in the .WAITOUT subroutine. The original subroutine looks like this: .WAITOUTPUT, &MAIREAD ANY &IF &MAIFRLU = PLU &THEN &RETSUB &MAIDEL &GOTO .WAITOUTPUT
The trace shows what happens using this code.
11.28.15 N03802 00007900 PROC: JMTEST NCLID: 770424 &MAIREAD ANY 11.28.15 N51D01 TRACE OF DATASTREAM SENT TO SLU ON SESSION AP : 11.28.15 N51D01 +0000 F3000501 FF02 3... .. 11.28.15 N03802 00008000 PROC: JMTEST NCLID: 770424 &IF SLU = PLU 11.28.15 N03802 00008100 PROC: JMTEST NCLID: 770424 &MAIDEL
The PLU sends x'F3000501FF02...' to the SLU. This is the WSF (Write Structured Field) command code followed by a five-byte structured field. The first two bytes of the structured field form the length count. This in turn is followed by a x'01' to identify a Read Partition structured field. It is mandatory that the partition identifier byte has a value of x'FF'. The last byte is x'02' to indicate a Query. This Query is deleted in the current Script, likely causing it not to work.
Resolution
In this sample Session Script we see that the .WAITOUTPUT subroutine is slightly changed as it checks the data streams for x'F3' in the first byte. Those streams are passed through, as is the answer to that query:
-*----------------------------------------------------------------- -* Subroutine .WAITOUTPUT, waiting for Output from TSO (Answers to -* (Queries from the PLU are passed through (Data streams x'F3...') -*----------------------------------------------------------------- .WAITOUTPUT &WRITEL &0 ===> Script in subroutine .WAITOUTPUT &MAIREAD ANY &DOWHILE .&MAIFRLU = .PLU &MAIDSFMT STRING &FIRST(1) &IF .&FIRST = .F3 &THEN &DO &MAICONT SLU VIEW=WAIT &MAIREAD SLU &MAICONT PLU VIEW=WAIT &MAIREAD PLU &DOEND &RETSUB &DOEND &MAIDEL &GOTO .WAITOUTPUT
Implementing this updated code should correct the problem.