/* ISPF key behaviour   */
'MACRO LPEX'

'SET ACTION.ENTER ;PREFIXPROCESS ;PRIMITIVE PREVIOUSTAB'
'SET ACCELERATOR.LP_NEWVIEW F2'
'SET ACTION.F4 QUIT'
'SET ACCELERATOR.LP_FINDNEXT F5'
'SET ACCELERATOR.LP_FINDCHANGE F6'
'SET ACTION.F7 SCROLL SCREEN UP'
'SET ACTION.F8 SCROLL SCREEN DOWN'
'SET ACCELERATOR.LP_NEXTFILE F9'
'SET ACTION.F11 SCROLL SCREEN RIGHT'
'SET ACTION.F12 QQUIT'
'MACRO ISPFPRF'                           /* run the profile */

'EXTRACT VIEWNUM'
'EXTRACT VIEWLIST'
do while(viewlist \= '')
   'GOVIEW NOACT VIEWNUM 'subword(viewlist,1,1)

   'SET MENUCHECK.LP_LPEXKEYS  OFF'
   'SET MENUCHECK.LP_EPMKEYS   OFF'
   'SET MENUCHECK.LP_SEUKEYS   OFF'
   'SET MENUCHECK.LP_XEDITKEYS OFF'
   'SET MENUCHECK.LP_ISPFKEYS  ON'
   'SET MENUCHECK.LP_CUSTOMIZE OFF'
   'SET PREFIXDISPLAYFORMAT 99999'
   'SET PREFIXSHOW ON'
   viewlist = delword(viewlist,1,1)
end
'GOVIEW NOACT VIEWNUM 'VIEWNUM

'EXTRACT DOCNUM INTO DOCNUM'
"SET GLOBAL.DOC" || DOCNUM || " 'MACRO ISPF'"
