Te MF=L would be in place of the other MF=L, not in addition to it.

Also, check the forward chain.

________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Brian Chapman <bchapma...@gmail.com>
Sent: Tuesday, November 1, 2022 4:13 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

Shmuel,

All I see is that your save area code is bad

Thanks. I'm not sure how that 64 bit save area code got stuck in there.

What's in SESSBLK?

SESSBLK is just a user control block with the 'session' variables. The
values for SESSPRI and SESSALT and SESSATTR are still zero after the SVC
call.

I would probably have written something like

GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR,         *
               MF=(E,GTTLIST)

for documentation, but AFAIK that wouldn't affect the length.

I'm not sure I understand. I get an assembly error with "Previously defined
symbol' when I re-use the GTTLIST label.


Thank you,

Brian Chapman


On Tue, Nov 1, 2022 at 3:42 PM Seymour J Metz <sme...@gmu.edu> wrote:

> All I see is that your save area code is bad, but that shouldn't affect
> the returned values from GTTERM. What's in SESSBLK?
>
> I would probably have written something like
>
> GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR,         *
>                MF=(E,GTTLIST)
>
> for documentation, but AFAIK that wouldn't affect the length.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> ________________________________________
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Brian Chapman [bchapma...@gmail.com]
> Sent: Tuesday, November 1, 2022 2:45 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: GTTERM assistance
>
> Hello all,
>
> Any assistance would be greatly appreciated.
>
> I am working on a SNA interface for a batch framework. This is mostly just
> a massive learning exercise that will likely never be utilized, but I have
> learned SO much while working on this project (currently 6 years in the
> making).
>
> The address space accepts terminals with MOD2 terminals and everything
> displays great. However, I would like to support larger terminal sizes. My
> first hurdle is GTTERM. I understand that my program should be in  RMODE24
> and AMODE24. The program is assembled with AMODE 31, but performs a SAM24
> and SAM31 before and after the SVC call. The dynamic storage area for the
> program is also acquired below the line.
>
> I check register 15 after the SVC, and it is zero. But the SVC parameter
> values are still zero.
>
> Here is my source:
>
>          REGEQU
>          COPY  SESSBLK
> *
> WORKAREA DSECT
> WORKNAME DS    CL8
> SAVEAREA DS    18F
> SAVERC   DS    F
> SAVEPARM DS    F
> *
> GTTLIST  GTTERM MF=L
> *
> WORKLEN  EQU   *-WORKAREA
> *
> WORKREG  EQU   R3
> SESSREG  EQU   R5
> *
> PORTTC04 CSECT
> PORTTC04 AMODE 31
> PORTTC04 RMODE 24
>          STM   R14,R12,12(R13)         SAVE REGISTERS
>          LR    R12,R15                 ESTABLISH BASE
>          USING PORTTC04,R12            *
>          B     START
> *
>          DC    CL9'PORTTC04'
>          DC    CL9'&SYSDATC'
>          DC    CL5'&SYSTIME'
> *
> START    DS    0H
>          LR    R2,R1                   SAVE REGISTER 2
>          LHI   R7,WORKLEN              LOAD WORK AREA LENGTH
>          GETMAIN RU,LV=(R7),LOC=BELOW
>          LR    WORKREG,R1              *
>          USING WORKAREA,WORKREG        SET ADDRESSIBILITY
> *
>          LR    R6,WORKREG              LOAD REGISTER
>          LA    R8,0                    SET DUMMY FROM ADDRESS
>          XR    R9,R9                   SET PADDING TO LOW VALUES
>          MVCL  R6,R8                   INITIALIZE AREA
> *
>          ST    R13,SAVEAREA+4          CHAIN CALLER'S SAVEAREA ADDRESS
>          LA    R13,SAVEAREA
>          ST    R13,SAVEAREA+8          SAVE CURRENT SAVEAREA ADDRESS
>          MVC   SAVEAREA(4),=CL4'F4SA'
>          MVC   WORKNAME(8),=CL8'PORTTC04'
> *
> GETLINK  DS    0H
>          LR    R1,R2                   RESTORE REGISTER 2
>          ST    R1,SAVEPARM
>          LT    SESSREG,4(R1)           GET ADDRESS OF SESSBLK
>          BZ    BADLINK                 NO LINKAGE PASSED
>          USING SESSBLK,SESSREG         SET ADDRESSIBILITY
> *
> GETTERM  DS    0H
>          SAM24
> *
>          GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR,         *
>                MF=(E,GTTLIST)
> *
>          ABEND 91,DUMP
>          SAM31
> *
>          LTR   R15,R15
>          BNZ   BADRC
> *
>          ST    R15,SESSATTR+4
> *
>          B     RETURN
> *
> BADRC    DS    0H
>          WTO   'PORTTC04 BAD GTTERM RC'
>          MVHI  SAVERC,16               SET BAD RETURN CODE
>          ABEND 98,DUMP
> *
> BADLINK  DS    0H
>          WTO   'PORTTC04 INVALID LINKAGE PARAMETERS'
>          MVHI  SAVERC,16               SET BAD RETURN CODE
>          ABEND 99,DUMP
> *
> RETURN   DS    0H
>          L     R13,SAVEAREA+4          RESTORE R13
>          L     R2,SAVERC               LOAD RC
> *
>          LHI   R0,WORKLEN              LOAD WORK AREA LENGTH
>          FREEMAIN RU,LV=(R0),A=(WORKREG)
> *
>          LR    R15,R2                  LOAD RC FROM R2
>          L     R14,12(R13)             RESTORE R14
>          LM    R0,R12,20(R13)          RESTORE R0-R12 (RETAIN R15)
>          BR    R14                     RETURN TO CALLER
> *
>          LTORG
> *
>          END
>
> I added the ABEND 91 instruction to produce a dump. Register 3 contains the
> SVC plist.
>
> The SESSBLK contains the SESSPRI, SESSALT, and SESSATTR fields (addressed
> by register 5).
>
> Here are the dump contents:
>
> Program PORTTC04 issued an SVC 13 (ABEND) code U0091
>
>         at address 00000000_00007A5C, offset B4 in Program PORTTC04
>
>
>
> Registers when request issued.
>
> 0 00000000_80000000 1 00000000_8000005B 2 00000000_000943C8 3 00000000_
> 0002CF48
> 4 00000000_362BC048 5 00000000_0002CBF0 6 00000000_B5D08928 7
> 00000000_B5D08A28
> 8 00000000_00000000 9 00000000_00000000 A 00000000_40404040 B
> 00000000_00000000
> C 00000000_800079A8 D 00000000_0002CF50 E 00000000_B5FA5C56 F
> 00000000_00000000
>
>
> Last Instruction: SVC      13  ABEND
>
>    Instruction has no operands
>
>
>
> PSW when request issued: 078D1000 00007A5E
>
>    PER-Mask . . . . . . . . . . OFF
>
>    DAT Mode . . . . . . . . . . ON
>
>    I/O Mask . . . . . . . . . . ON
>
>    External Mask. . . . . . . . ON
>
>    PSW Key. . . . . . . . . . . 8
>
>    EC Mode. . . . . . . . . . . ON
>
>    Machine-Check Mask . . . . . ON
>
>    Wait State . . . . . . . . . OFF
>
>    Problem State. . . . . . . . ON
>
>    Address Space Control. . . . Primary ASC Mode
>    Condition Code . . . . . . . 1
>    Program Mask . . . . . . . . 0
>    Addressing Mode. . . . . . . 24 bit
>    Instruction Address. . . . . 007A5E
>
> The program's dynamic storage area:
>
> Address  Offset from 00000000_0002C000                Origin STORAGE 0001
> 0002CF48 000F48 D7D6D9E3 E3C3F0F4 C6F4E2C1 000945C0 *PORTTC04F4SA.. {* R3
> 0002CF58 000F58 0002CF50 00000000 00000000 00000000 *.. &............*
> 0002CF68 000F68 00000000 00000000 00000000 00000000 *................*
> 0002CF78 000F78 00000000 00000000 00000000 00000000 *................*
> 0002CF88 000F88 00000000 00000000 00000000 00000000 *................*
> 0002CF98 000F98 00000000 000943C8 00000000 00000000 *...... H........*
> 0002CFA8 000FA8 00000000 00000000 0002CBFC 0002CBFE *..........  ..  *
> 0002CFB8 000FB8 8002CC00 00000000 00000000 00000000 * .รถ.............*
> 0002CFC8 000FC8 00000000 00000000 00000000 00000000 *................*
> 0002CFD8 000FD8 00000000 00000000 00000000 00000000 *................*
> 0002CFE8 000FE8 00000000 00000000 00000000 00000000 *................*
>
> Address  Offset from 00000000_0002C000                Origin STORAGE 0001
> 0002CBFC 000BFC 00000000 00000000 00000000 00000000 *................*
>
> Address  Offset from 00000000_0002C000                Origin STORAGE 0001
> 0002CBFE 000BFE 00000000 00000000 00000000 00000000 *................*
>
> Address  Offset from 00000000_0002C000                Origin STORAGE 0001
> 0002CC00 000C00 00000000 00000000 00000000 00000000 *................*
>
>
> Thank you,
>
> Brian Chapman
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to