Sorry, I did a quick copy and paste from some old stuff (not Turnkey). I fired up the Turnkey and made it work.
Here is a complete copy of the program that has assembled, linked and run on Turnkey MVS:
//HERC01J JOB 'TURNKEY USER',CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),
// REGION=4096K,NOTIFY=HERC01
//*
//ASM EXEC PGM=IFOX00,PARM=OBJ,REGION=2048K
//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
//SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA,SPACE=(1700,(600,100))
//SYSUT2 DD DSN=&&SYSUT2,UNIT=SYSDA,SPACE=(1700,(600,100))
//SYSUT3 DD DSN=&&SYSUT3,UNIT=SYSDA,SPACE=(1700,(600,100))
//SYSPRINT DD SYSOUT=*,DCB=BLKSIZE=189
//SYSPUNCH DD DUMMY
//SYSGO DD DSN=&&OBJSET,
// UNIT=SYSDA,SPACE=(80,(200,50)),DISP=(MOD,PASS)
//SYSIN DD *
CLEARSCR TITLE 'CLEARSCR - CLEAR 3270 SCREEN'
CLEARSCR CSECT
R0 EQU 0
R1 EQU 1
R2 EQU 2
R3 EQU 3
R4 EQU 4
R5 EQU 5
R6 EQU 6
R7 EQU 7
R8 EQU 8
R9 EQU 9
R10 EQU 10
R11 EQU 11
R12 EQU 12
R13 EQU 13
R14 EQU 14
R15 EQU 15
BEGIN SAVE (14,12)
USING CLEARSCR,R3
LR R3,R15
ST R13,SAVEAREA+4 STORE CALLERS SAVEAREA IN MY SAVEAREA
LR R12,R13 LOAD CALLERS SAVEAREA ADDR IN R12
LA R13,SAVEAREA LOAD MY SAVEAREA ADDR IN R13
ST R13,8(R12) STORE MY SAVEAREA ADDR IN CALLERS SAVE
STFSMODE ON,INITIAL=YES
LTR R2,R15
BNZ END
TPUT CLEAR,L'CLEAR,FULLSCR
STFSMODE OFF
END EQU *
L R13,SAVEAREA+4 ...END.....
RETURN (14,12),RC=0 ..PROGRAM
SAVEAREA DS 18F
CLEAR DC X'C11140403C4040001140C113'
END CLEARSCR
/*
//LKED EXEC PGM=IEWL,PARM='LIST,XREF,NCAL,LET,SIZE=(300K,64K)',
// COND=(4,LT,ASM)
//SYSLMOD DD DISP=SHR,DSN=HERC01.TEST.LOADLIB
//INPUT DD DSN=&&OBJSET,DISP=(OLD,DELETE)
//SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA,SPACE=(1024,(50,20))
//SYSPRINT DD SYSOUT=*
//SYSLIN DD *
INCLUDE INPUT
NAME CLEARSCR(R)
/*
To test.... Here is a little CLIST that calls the program --> put it in HERC01.TEST.CNTL(TSTCLEAR) ---> Then from READY EX 'HERC01.TEST.CNTL(TSTCLEAR)'
PROC 0
WRITE WE ARE IN THE CLEAR CLIST... GOING TO CALL PROGRAM
CALL 'HERC01.TEST.LOADLIB(CLEARSCR)'
WRITE WE HAVE COMPLETED THE CALL TO 'HERC01.TEST.LOADLIB(CLEARSCR)'
END
e.g.
READY
ex 'herc01.test.cntl(tstclear)'
WE ARE IN THE CLEAR CLIST...
.
.
<SCREEN CLEAR>
.
.
WE HAVE COMPLETED THE CALL TO 'HERC01.TEST.LOADLIB(CLEARSCR)'
READY
I believe this should be able to be called from a Fortran program and get the screen to clear at the appropriate time.
Best Regards,
Mark
Post by Ron HudsonPost by Rick Fochtman-------------------------------<snip>-----------------------------
I once had to clear the screen from a Fortran IV program. I called the
CLEARSCR TITLE 'CLEARSCR - CLEAR 3270 SCREEN'
CLEARSCR CSECT
SETREG 12,CODE=RENT
Change this for?(I know the registers probably change)
SAVE (14,12),,*
LR 12,15
USING HELLO1,12
Post by Rick FochtmanSTFSMODE ON,INITIAL=YES
LTR R2,R15
BNZ END
TPUT CLEAR,L'CLEAR,FULLSCR
STFSMODE OFF
END EOJ RC=(2),LOG=NO
Change this for? (I know the registers probably change)
L 13,4(,13) RESTORE SAVEAREA
LM 14,12,12(13)
SLR 15,15 CLEAR MY ENTRY POINT
BR 14 RETURN TO CALLER
Post by Rick FochtmanCLEAR DC X'C11140403C4040001140C113'
END CLEARSCR
Mark
-----------------------------------<unsnip>-----------------------------
That's reasonable code, Mark. But you have a few non-MVS macros in that
code that might be considered a problem. SETREG? EOJ ??
Rick