what's the mean of HSA LSA WD1?



High Level Assembler(HLASM) for MVS & VM & VSE

Re: what's the mean of HSA LSA WD1?

Postby bobguo » Tue Nov 20, 2012 11:42 am

or can you tell me, under what conditions, LSA has to be used?
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: what's the mean of HSA LSA WD1?

Postby steve-myers » Tue Nov 20, 2012 6:21 pm

You should always use LSA, for the reason given. Yes, you can trace back starting with reg 13, but the dump program only follows the HSA chain for 1 save area. Try running the following job. It illustrates the strengths and weknesses of the dump program's save area trace. For what it's worth, ABEND actually uses the SNAP macro to write its dumps; the miniature dumps in the SNAP output just shows the minimum useful data for the save areas.
//A       EXEC PGM=ASMA90,PARM='OBJECT,NODECK,XREF(SHORT)'
//SYSPRINT DD  SYSOUT=*
//SYSLIB   DD  DISP=SHR,DSN=SYS1.MACLIB
//SYSLIN   DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1)),
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS)
//SYSIN    DD  *
MINILINK CSECT                     DEFINE PROGRAM CSECT
         SAVE  (14,12),,*          SAVE REGISTERS
         CNOP  0,4
         BAS   15,INITSAVE-MINILINK(,15)  BR AROUND SAVE AREA AND     ->
                                           STORE NEW SAVE AREA ADDR   ->
                                            IN REG 15
         USING *,13                ESTABLISH PROGRAM ADDRESSABILITY
         DC    18F'0'              NEW SAVE AREA
INITSAVE ST    13,4(,15)           ADD NEW SAVE AREA TO THE
         ST    15,8(,13)            SAVE AREA CHAIN
         LR    13,15               ESTABLISH NEW SAVE AREA POINTER
         OPEN  (SNAPDCB,OUTPUT)    OPEN THE DCB
         SNAP  MF=(E,SNAPPARM)     SNAP THE SAVE AREAS
         BAS   14,SUB01            CALL A SUBROUTINE
         SNAP  MF=(E,SNAPPARM),ID=5  SNAP THE SAVE AREAS
         CLOSE SNAPDCB             CLOSE THE DCB
         L     13,4(,13)           LOAD ADDR OF THE HIGHER SAVE AREA
         RETURN (14,12),T,RC=0     RESTORE REGS & RETURN
SNAPDCB  DCB   DSORG=PS,MACRF=W,DDNAME=SNAP,RECFM=VBA,LRECL=125,      ->
               BLKSIZE=1632
SNAPPARM SNAP  MF=L,PDATA=(PSW,REGS,SA),DCB=SNAPDCB,ID=1  SNAP PARMS
         DROP  ,                   KILL ADDRESSABILITY
         CNOP  0,8
SUB01    BASR  15,0                STORE CURRENT ADDRESS IN REG 15
SUB01X   EQU   *
         SAVE  (14,12),,SUB01      SAVE THE REGISTERS
         CNOP  0,4
         BAS   15,SUB01Y-SUB01X(,15)  BR AROUND THE NEW SAVE AREA
         USING *,13                ESTABLISH ADDRESSABILITY
         DC    18F'0'
SUB01Y   ST    13,4(,15)           ADD NEW SAVE AREA TO THE
         ST    15,8(,13)            SAVE AREA CHAIN
         LR    13,15               ESTABLISH THE NEW SAVE AREA POINTER
         L     2,=A(SNAPPARM)      LOAD ADDR OF THE SNAP PARM LIST
         SNAP  MF=(E,(2)),ID=2     SNAP THE SAVE AREAS
         BAS   14,SUB02            CALL THE NEXT SUBROUTINE
         L     13,4(,13)           LO
         RETURN (14,12),T
         DC    0D'0'
         LTORG ,
         CNOP  0,8
SUB02    BASR  15,0
SUB02X   EQU   *
         SAVE  (14,12),,SUB02
         CNOP  0,4
         BAS   15,SUB02Y-SUB02X(,15)
         USING *,13
         DC    18F'0'
SUB02Y   ST    13,4(,15)           ADD NEW SAVE AREA TO THE
         ST    15,8(,13)            SAVE AREA CHAIN
         LR    13,15               ESTABLISH THE NEW SAVE AREA POINTER
         L     2,=A(SNAPPARM)
         SNAP  MF=(E,(2)),ID=2
         BAS   14,SUB03
         L     13,4(,13)
         RETURN (14,12),T
         DC    0D'0'
         LTORG ,
         CNOP  0,8
SUB03    BASR  15,0
SUB03X   EQU   *
         SAVE  (14,12),,SUB03
         CNOP  0,4
         BAS   15,SUB03Y-SUB03X(,15)
         USING *,13
         DC    18F'0'
SUB03Y   ST    13,4(,15)           ADD NEW SAVE AREA TO THE
         ST    15,8(,13)            SAVE AREA CHAIN
         LR    13,15               ESTABLISH THE NEW SAVE AREA POINTER
         L     2,=A(SNAPPARM)
         SNAP  MF=(E,(2)),ID=3
         BAS   14,SUB04
         L     13,4(,13)
         RETURN (14,12),T
         DC    0D'0'
         LTORG ,
         CNOP  0,8
SUB04    BASR  15,0
SUB04X   EQU   *
         SAVE  (14,12),,SUB04
         CNOP  0,4
         BAS   15,SUB04Y-SUB04X(,15)
         USING *,13
         DC    18F'0'
SUB04Y   ST    13,4(,15)           ADD NEW SAVE AREA TO THE
         ST    15,8(,13)            SAVE AREA CHAIN
         LR    13,15               ESTABLISH THE NEW SAVE AREA POINTER
         L     2,=A(SNAPPARM)
         SNAP  MF=(E,(2)),ID=4
         L     13,4(,13)
         RETURN (14,12),T
         DC    0D'0'
         LTORG ,
         END   MINILINK
//B       EXEC PGM=IEWL,COND=(0,NE),PARM=MAP
//SYSPRINT DD  SYSOUT=*
//SYSLMOD  DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1,1)),DSN=&&GO(GO)
//SYSLIN   DD  DISP=(OLD,DELETE),DSN=*.A.SYSLIN
//C       EXEC PGM=*.B.SYSLMOD
//SNAP     DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: what's the mean of HSA LSA WD1?

Postby bobguo » Wed Nov 21, 2012 12:18 pm

thanks very much.

do you have some materials which describle these macros in detal? such as SNAP WTO...
i locates in shanghai, can't use google...if you have, could you please give me one link?
Happy Thanksgiving.
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Re: what's the mean of HSA LSA WD1?

Postby enrico-sorichetti » Wed Nov 21, 2012 12:37 pm

cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: what's the mean of HSA LSA WD1?

Postby steve-myers » Fri Nov 23, 2012 8:11 am

SNAP and WTO are in z/OS MVS Assembler Services Reference IAR-XCT for your z/OS release.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: what's the mean of HSA LSA WD1?

Postby bobguo » Sat Nov 24, 2012 1:43 pm

thanks steve.

the codes your provided i have read, i noticed that the program use HSA to get father program' SA, while,
I really can't catch where LSA was used, though i just noticed LSA was saved in SA
please give me a briefly explain about LSA's purpose in this program. thanks
bobguo
 
Posts: 76
Joined: Thu Apr 26, 2012 11:18 am
Location: shanghai
Has thanked: 22 times
Been thanked: 0 time

Previous

Return to Assembler