Page 2 of 2

Re: Advice for writing and executing Assembler on the Mainfr

PostPosted: Mon May 30, 2016 8:04 pm
by deucalion0
willy jensen wrote:Unfortunately there is no 'zOS Assembler for beginners' nor a free self-study as already mentioned. There are still some people offering courses, but not for free. And neither will I. So I suggest that you try to find a mentor in your organization.
This small sample only demonstrates one method for starting and ending a program, plus a bit of I/O thrown in. By the way, this is a assemble-link-go, so the module is not stored permanently.
But there is of course much more to assembler than that. First you must decide in which environment the program will run.
Search the internet for 'ibm assembler language tutorial' and similar and see what pops up.

//ASMMINI  JOB (WJ),'small asm pgm',CLASS=A,MSGCLASS=T,COND=(0,LT)
//*                                                                
//   EXEC HLASMCLG,PARM.C='TERM',PARM.L='RMODE(24),AMODE(31)'      
//C.SYSLIB  DD DISP=SHR,DSN=SYS1.MACLIB                            
//          DD DISP=SHR,DSN=SYS1.MODGEN                            
//C.SYSTERM DD SYSOUT=*                                            
//C.SYSIN   DD *                                                  
*PROCESS COMPAT(NOCASE,MACROCASE)                                  
         sysstate archlvl=2                                        
*                                                                  
* equate registers                                                
*                                                                  
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                                                  
*                                                                  
* Macro for clearing area                                          
*                                                                  
         Macro                                                    
         CLEAR &area                                              
         mvi   &area,c' '              clear                      
         mvc   &area+1(l'&area-1),&area    target                  
         Mend                                                      
*                                                                  
* Program prolog                                                  
*                                                                  
         using ASMMINI,r12                                        
ASMMINI  amode 31                                                  
ASMMINI  rmode any                                                
ASMMINI  csect                                                    
         save  (14,12)                                            
         larl  r12,ASMMINI                                        
         sam31                                                    
* get dynamic storage                                              
         getmain R,lv=workln                                      
         lr    r10,r1                                              
         using work,r10                                            
* chain saveareas re linkage conventions                          
         la    r14,sa1                                            
         st    r13,4(,r14)                                        
         st    r14,8(,r13)                                        
         lr    r13,r14                                                  
*                                                                      
* open files                                                            
*                                                                      
         Open  (infile,(input))                                        
         Open  (prtfile,(output))                                      
*                                                                      
         clear prtrec                                                  
         mvc   prtrec(20),=cl20'
*Starting program'                      
         put   prtfile,prtrec                                          
*                                                                      
* read and list                                                        
*                                                                      
Readit   equ   *                                                        
         get   infile,inrec                                            
         clear prtrec                                                  
         mvc   prtrec,inrec                                            
         put   prtfile,prtrec                                          
         j     readit                                                  
Readend  equ   *                                                        
         clear prtrec                                                  
         mvc   prtrec(25),=cl25'*End of file reached'                  
         put   prtfile,prtrec                                          
* remove the asterix in the next statement to get a S0C1 abend          
*        dc    h'0'                                                    
         clear prtrec                                                  
         mvc   prtrec(15),=cl25'*End of program'                        
         put   prtfile,prtrec                                          
*                                                                      
* close files                                                          
*                                                                      
         close  infile                                                  
         close  prtfile                                                
*                                                                      
* Program epilog                                                        
*                                                                      
         l     r13,4(,r13)         unchain savearea                    
* release dynamic storage                                              
         Freemain R,lv=workln,a=(10)                                    
*        wto 'freemain done'                                            
* set rc and get back                                                  
         xr    r15,r15                                                  
         l     r14,12(,r13)                                            
         return (2,12)                                                  
*                                                                      
* static work area                                                      
*                                                                      
blank    dc    cl150' '                                                
         print nogen                                                    
infile   dcb   ddname=INDATA,dsorg=ps,macrf=gm,recfm=fb,eodad=readend  
prtfile  dcb   ddname=SYSPRINT,                                        c
               dsorg=ps,macrf=pm,recfm=fb,lrecl=l'prtrec,blksize=0      
         print gen                                                      
         ltorg                                                          
*                                                                      
* dynamic work area      
*                        
work     Dsect          
sa1      ds    18f      
         ds    0d        
inrec    ds    cl200    
prtrec   ds    cl133    
         ds    0d        
workln   equ   *-work    
                         
         End            
//G.SYSPRINT DD SYSOUT=*
//G.INDATA   DD *        
kilroy                  
 was                    
  here                  


Hi Willy,

Thanks a lot for taking the time to provide me with that example.

This is a Macro right? I was reading about Macro's the other day and I read that they can be quite complex and more difficult to write than actual Assembler. I do not know if there is much truth in that.

I think Macro's are designed to generate Assembler code? I am not sure why, perhaps it makes creating Assembler programs faster and more dynamic?

I will study your example and see if I can make sense of it.

Really appreciate your time and help.

Re: Advice for writing and executing Assembler on the Mainfr

PostPosted: Mon May 30, 2016 8:29 pm
by enrico-sorichetti
I think Macro's are designed to generate Assembler code?

Yes... that' what they do

I am not sure why, perhaps it makes creating Assembler programs faster and more dynamic?

NO, it it just a way to encapsulate repetitive STANDARD sequence of instructions
certainly if You do not have to code by hand the sequence of instruction for open,close, ... add as many as You want
writing an assembler program will take less time
faster execution and more dynamic are not taken into account

Re: Advice for writing and executing Assembler on the Mainfr

PostPosted: Mon May 30, 2016 10:17 pm
by steve-myers
enrico-sorichetti wrote:NO, it it just a way to encapsulate repetitive STANDARD sequence of instructions
certainly if You do not have to code by hand the sequence of instruction for open,close, ... add as many as You want
writing an assembler program will take less time
faster execution and more dynamic are not taken into account
The code generated inside macros is often pretty awful. For example -
          CALL  HELLO,(A,B),VL  
+         CNOP  0,4            
+         B     *+8            
+IHB0001B DC    V(HELLO)        
+         LA    1,IHB0003      
+         B     IHB0003A        
+IHB0003  DS    0F              
+         DC    A(A)            
+         DC    A(B+X'80000000')
+IHB0003A EQU   *              
+         L     15,IHB0001B    
+         BALR  14,15          
BUT it makes us Assembler programmers more productive. If we don't like the standard code, we can always write -
         L     15,=V(HELLO)        
         CALL  (15),MF=(E,PARMLIST)
         ...
PARMLIST CALL  ,(A,B),VL,MF=L
which generates -
          L     15,=V(HELLO)        
          CALL  (15),MF=(E,PARMLIST)
+         DS    0H                  
+         LA    1,PARMLIST          
+         BALR  14,15              
          ...
 PARMLIST CALL  ,(A,B),VL,MF=L  
+PARMLIST DS    0F              
+         DC    A(A)            
+         DC    A(B+X'80000000')
which is much more reasonable!

In my opinion, much of the success of OS/360 Assembler relative to Assembler on other platforms is the powerful macro language coupled with tens of thousands of lines of IBM standard macros. Compare this with the miserable excuse of the preprocessor in C - as an example.

I won't try to justify some macro failings here. I can recall one thread where the topic starter could not understand why -

READ DECB,SF,ADCB,(R4),'S' or something very similar

would not work and created some pretty crazy error messages

Re: Advice for writing and executing Assembler on the Mainfr

PostPosted: Sat Jun 04, 2016 12:40 pm
by steve-myers
Here is an extremely simplified example of linkage -
//A       EXEC HLASMCLG
//C.DUMP   DD  DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
//             DSN=&SYSUID..LINKAGE.DUMP
//C.LPT    DD  DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
//             DSN=&SYSUID..LINKAGE.LPT
//C.SYSIN  DD  *
MAIN     CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
         LA    15,MAINSAVE
         ST    13,4(,15)
         ST    15,8(,13)
         LR    13,15
         L     15,=A(SUBR1)
         CALL  (15)
         L     13,4(,13)
         RETURN (14,12),T,RC=(15)
MAINSAVE DC    9D'0'
         LTORG ,
SUBR1    CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
         LA    15,SBR1SAVE
         ST    13,4(,15)
         ST    15,8(,13)
         LR    13,15
         L     15,=V(SUBR2)
         CALL  (15)
         L     13,4(,13)
         RETURN (14,12),T,RC=(15)
SBR1SAVE DC    9D'0'
         LTORG ,
SUBR2    CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
         LA    15,SBR2SAVE
         ST    13,4(,15)
         ST    15,8(,13)
         LR    13,15
         DC    H'0'
         L     13,4(,13)
         SR    15,15
         RETURN (14,12),T,RC=(15)
SBR2SAVE DC    9D'0'
         END   MAIN
//G.SYSUDUMP DD DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(50,5),RLSE),
//             DSN=&SYSUID..LINKAGE.DUMP
//CONVERT EXEC PGM=CNVTM,COND=ONLY
//STEPLIB  DD  DISP=(SHR,PASS),DSN=&SYSUID..LOAD
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,DELETE),DSN=&SYSUID..LINKAGE.DUMP
//SYSUT2   DD  DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(50,5),RLSE),
//             DSN=&SYSUID..LINKAGE.LPT
MAIN calls SUBR1 which calls SUBR2. SUBR2 has been "zapped" to abnormally terminate. The program in the CONVERT step fixes a data set with control characters - the dump - so it is a little more friendly on a work station.

The dump program prints a nice little summary at the start -
COMPLETION CODE      SYSTEM = 0C1      REASON CODE = 00000001

  PSW AT ENTRY TO ABEND   078D0000  00007FA0  ILC  02  INTC  0001

PSW LOAD MODULE             ADDRESS = 00007E70  OFFSET = 00000130
NAME=GO
Sometimes the summary is useful, especially with S0Cx ABENDs. Dump was not always so accommodating! We used to have to do some hexadecimal arithmetic -

7FA0 (the address in the PSW) - 7E70 (which dump was kind enough to extract) = 130

Now the 7E70 is the entry point of the load module, which for our example is the start of the load module. This is not always the case!

No summary? What do we do?

Now we have to dig into the main part of the dump.

First, find the TCB. Most of the time we don't really look at the TCB, but we have to find it.

After the TCB in the dump is a series of control blocks called Request Blocks, or the short cut RBs. MVS creates an RB in response to system assisted linkage. We're usually only interested in PRBs and SVRBs. Finding the "correct" RB is a bit of an art. Start with the ABEND code 0C1. This means we need to find an RB with interrupt code 1.
PRB: 009F9090
          -0020  XSB...... 7FFFDDF0  FLAGS2... 00        RTPSW1... 078D0000  00007FA0            RTPSW2... 00020001
          -000C            7F646000  FLAGS1... 00000000  WLIC..... 00020001
          +0000  RSV...... 00000000  00000000            SZSTAB... 00110082  CDE...... 009FC488
          +0010  OPSW..... 078D0000  00007FA0            SQE...... 00000000  LINK..... 009CCC48
The interrupt code is the last two bytes of WLIC.

After the RB that caused the error we usually see two SVRBs. The first SVRB is for ABEND itself. The second SVRB is for "SNAP," the program that actually prints the dump. The ABEND SVRB is very important. The "registers" listed with the failing PRB have nothing to do with the PRB. The registers at the time of the ABEND are in the ABEND SVRB -
SVRB: 009FD660
          -0020  XSB...... 7FFEF8C8  FLAGS2... 00        RTPSW1... 00000000  00000000            RTPSW2... 00000000
          -000C            00000000  FLAGS1... 22000000  WLIC..... 00020033
          +0000  RSV...... 00000000  00000000            SZSTAB... 001ED022  CDE...... 00000000
          +0010  OPSW..... 070C1000  8582EA12            Q........ 00000000  LINK..... 009F9090
          +0020  GPR0-3... FD000008  00006FF8  00000040  009D09D4
          +0030  GPR4-7... 009D09B0  009FD098  009BDFE0  FD000000
          +0040  GPR8-11.. 009F91C8  009CD9C8  00000000  009FD098
          +0050  GPR12-15. 00007F80  00007FB8  40007F1C  00007FB8


Why? They're there so they can be restored when a normal SVC function ends.

Now how we convert the load module offset to an offset in a CSECT? We start with the module map, either from the Binder or IMBLIST -
CLASS
OFFSET  NAME                TYPE    LENGTH

     0  MAIN               CSECT        84

    88  SUBR1              CSECT        84

   110  SUBR2              CSECT        80


We easily see offset 130 is in SUBR2, at offset 20. Hex arithmetic again -

130 - 110 = 20

That's enough to get you started.

Every error is different; the steps to find the request block are basically the same, though they differ based on the ABEND. Most ABENDs in an SVC do not really represent an error in IBM code. They really represent an issue with the caller of the SVC, so you backup to the RB that called the failing SVC.

Re: Advice for writing and executing Assembler on the Mainfr

PostPosted: Wed Jun 08, 2016 5:21 pm
by deucalion0
steve-myers wrote:Here is an extremely simplified example of linkage -
//A       EXEC HLASMCLG
//C.DUMP   DD  DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
//             DSN=&SYSUID..LINKAGE.DUMP
//C.LPT    DD  DISP=(MOD,DELETE),UNIT=SYSALLDA,SPACE=(TRK,0),
//             DSN=&SYSUID..LINKAGE.LPT
//C.SYSIN  DD  *
MAIN     CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
         LA    15,MAINSAVE
         ST    13,4(,15)
         ST    15,8(,13)
         LR    13,15
         L     15,=A(SUBR1)
         CALL  (15)
         L     13,4(,13)
         RETURN (14,12),T,RC=(15)
MAINSAVE DC    9D'0'
         LTORG ,
SUBR1    CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
         LA    15,SBR1SAVE
         ST    13,4(,15)
         ST    15,8(,13)
         LR    13,15
         L     15,=V(SUBR2)
         CALL  (15)
         L     13,4(,13)
         RETURN (14,12),T,RC=(15)
SBR1SAVE DC    9D'0'
         LTORG ,
SUBR2    CSECT
         USING *,12
         SAVE  (14,12),,*
         LR    12,15
         LA    15,SBR2SAVE
         ST    13,4(,15)
         ST    15,8(,13)
         LR    13,15
         DC    H'0'
         L     13,4(,13)
         SR    15,15
         RETURN (14,12),T,RC=(15)
SBR2SAVE DC    9D'0'
         END   MAIN
//G.SYSUDUMP DD DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(50,5),RLSE),
//             DSN=&SYSUID..LINKAGE.DUMP
//CONVERT EXEC PGM=CNVTM,COND=ONLY
//STEPLIB  DD  DISP=(SHR,PASS),DSN=&SYSUID..LOAD
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,DELETE),DSN=&SYSUID..LINKAGE.DUMP
//SYSUT2   DD  DISP=(,CATLG),UNIT=SYSDA,SPACE=(TRK,(50,5),RLSE),
//             DSN=&SYSUID..LINKAGE.LPT
MAIN calls SUBR1 which calls SUBR2. SUBR2 has been "zapped" to abnormally terminate. The program in the CONVERT step fixes a data set with control characters - the dump - so it is a little more friendly on a work station.

The dump program prints a nice little summary at the start -
COMPLETION CODE      SYSTEM = 0C1      REASON CODE = 00000001

  PSW AT ENTRY TO ABEND   078D0000  00007FA0  ILC  02  INTC  0001

PSW LOAD MODULE             ADDRESS = 00007E70  OFFSET = 00000130
NAME=GO
Sometimes the summary is useful, especially with S0Cx ABENDs. Dump was not always so accommodating! We used to have to do some hexadecimal arithmetic -

7FA0 (the address in the PSW) - 7E70 (which dump was kind enough to extract) = 130

Now the 7E70 is the entry point of the load module, which for our example is the start of the load module. This is not always the case!

No summary? What do we do?

Now we have to dig into the main part of the dump.

First, find the TCB. Most of the time we don't really look at the TCB, but we have to find it.

After the TCB in the dump is a series of control blocks called Request Blocks, or the short cut RBs. MVS creates an RB in response to system assisted linkage. We're usually only interested in PRBs and SVRBs. Finding the "correct" RB is a bit of an art. Start with the ABEND code 0C1. This means we need to find an RB with interrupt code 1.
PRB: 009F9090
          -0020  XSB...... 7FFFDDF0  FLAGS2... 00        RTPSW1... 078D0000  00007FA0            RTPSW2... 00020001
          -000C            7F646000  FLAGS1... 00000000  WLIC..... 00020001
          +0000  RSV...... 00000000  00000000            SZSTAB... 00110082  CDE...... 009FC488
          +0010  OPSW..... 078D0000  00007FA0            SQE...... 00000000  LINK..... 009CCC48
The interrupt code is the last two bytes of WLIC.

After the RB that caused the error we usually see two SVRBs. The first SVRB is for ABEND itself. The second SVRB is for "SNAP," the program that actually prints the dump. The ABEND SVRB is very important. The "registers" listed with the failing PRB have nothing to do with the PRB. The registers at the time of the ABEND are in the ABEND SVRB -
SVRB: 009FD660
          -0020  XSB...... 7FFEF8C8  FLAGS2... 00        RTPSW1... 00000000  00000000            RTPSW2... 00000000
          -000C            00000000  FLAGS1... 22000000  WLIC..... 00020033
          +0000  RSV...... 00000000  00000000            SZSTAB... 001ED022  CDE...... 00000000
          +0010  OPSW..... 070C1000  8582EA12            Q........ 00000000  LINK..... 009F9090
          +0020  GPR0-3... FD000008  00006FF8  00000040  009D09D4
          +0030  GPR4-7... 009D09B0  009FD098  009BDFE0  FD000000
          +0040  GPR8-11.. 009F91C8  009CD9C8  00000000  009FD098
          +0050  GPR12-15. 00007F80  00007FB8  40007F1C  00007FB8


Why? They're there so they can be restored when a normal SVC function ends.

Now how we convert the load module offset to an offset in a CSECT? We start with the module map, either from the Binder or IMBLIST -
CLASS
OFFSET  NAME                TYPE    LENGTH

     0  MAIN               CSECT        84

    88  SUBR1              CSECT        84

   110  SUBR2              CSECT        80


We easily see offset 130 is in SUBR2, at offset 20. Hex arithmetic again -

130 - 110 = 20

That's enough to get you started.

Every error is different; the steps to find the request block are basically the same, though they differ based on the ABEND. Most ABENDs in an SVC do not really represent an error in IBM code. They really represent an issue with the caller of the SVC, so you backup to the RB that called the failing SVC.


Hi Steve.

This is excellent, thank you very much for taking the time to post this.

I am about to play with this now and experiment with it!

Great example and great explanation, just what I was looking for!!

Much appreciated!!!

Thanks!

Re: Advice for writing and executing Assembler on the Mainfr

PostPosted: Thu Jun 09, 2016 7:17 pm
by steve-myers
This one is more complicated.

COMPLETION CODE      SYSTEM = 213      REASON CODE = 00000004

  PSW AT ENTRY TO ABEND   075C1000  80E3E346  ILC  02  INTC  000D

PSW ADDRESS 00E3E346 AT TIME OF ERROR DOES NOT POINT TO AN ACTIVE MODULE


Now in my last example, I said the summary is not always helpful. Like this one.

A system completion code system xxx usually means the error is in an SVC, so we have to find an SVRB, probably with an interrupt code 000D. This interrupt code is for the SVC instruction for the ABEND macro. We're in luck!
SVRB: 009FDB38
          -0020  XSB...... 7FFEFDF0  FLAGS2... 00        RTPSW1... 00000000  00000000            RTPSW2... 00000000
          -000C            00000000  FLAGS1... 02000000  WLIC..... 0002000D
          +0000  RSV...... 00000000  00000000            SZSTAB... 001ED022  CDE...... 00000000
          +0010  OPSW..... 075C1000  80E3E346            Q........ 00000000  LINK..... 009CB800
          +0020  GPR0-3... FD000008  80007D24  00000040  009D09D4
          +0030  GPR4-7... 009D09B0  009FD098  009BAFE0  FD000000
          +0040  GPR8-11.. 009F91C8  009CB9C8  00000000  009FD098
          +0050  GPR12-15. 00007CF0  00007D60  00FD6C08  00007D60
Now if we go to the previous RB to find the program that issued the SVC that failed we find -
PRB: 009CB800
          -0020  XSB...... 7F67D5B0  FLAGS2... 00        RTPSW1... 00000000  00000000            RTPSW2... 00000000
          -000C            00000000  FLAGS1... 00000000  WLIC..... 00020013
          +0000  RSV...... 00000000  00000000            SZSTAB... 00110002  CDE...... 009FC5F0
          +0010  OPSW..... 078D0000  00007D2A            SQE...... 00000000  LINK..... 009CB888
          +0020  GPR0-3... FD000008  00006FF8  00000040  009D09D4
          +0030  GPR4-7... 009D09B0  009FD098  009BAFE0  FD000000
          +0040  GPR8-11.. 009F91C8  009CB9C8  00000000  009FD098
          +0050  GPR12-15. 00007E18  00007E70  00FD6C08  80007E4C
The interrupt code in WLIC is 13, which is the SVC in the OPEN macro.

Your next task is to find the module that issued the OPEN request. No one method will always work. In fact, the method I thought would work failed with this dump, but go ahead and do it. Find the storage where the OPEN macro is located using the address in the OPSW in the RB - 00007D2A. This won't display well on the internet, but -
00007CE0 00000000 00000000 00000000 00000000    47F0F01A 14E2E4C2 D9F340F0 F661F0F8   *.................00..SUBR3 06/08*
00007D00 61F1F640 F1F14BF3 F70090EC D00C18CF    41F0C070 50D0F004 50F0D008 18DF0700   */16 11.37...}....0{.&}0.&0}.....*
00007D20 4510C038 8F007DA8 0A134110 C1109670    10019680 10020A33 18BF0700 4510C054   *..{...'y....A.o...o...........{.*
00007D40 80007DA8 0A1418FB 58D0D004 58E0D00C    980CD014 9601D00F 07FE0000 00000000   *..'y.....}}..\}.q.}.o.}.........*

The address in OPSW is the next instruction. In the 00007D20 line you can see what any experienced dump reader will recognize as an OPEN macro - 4510C038 8F007DA8 0A13. The 4510C038 is a BAL instruction. It's purpose is to store the address of 8F007DA8 in register 1 and branch to 0A13, the SVC instruction to open the DCB is at address 007DA8.

In my posts here and elsewhere I keep harping on putting a module identifier in your code -
         SAVE  (14,12),,'SUBR3 &SYSDATE &SYSTIME'

If you look at the dump line for address 00007CE0 you see the result. IBM usually does this for its code; you should too. Putting the identifier in the SAVE macro is actually rather uncommon. Every product seems to have its own idea. It is usually fairly easy to locate the start of the module. In this dump, for example -
00E3E760 00000000 00000000 05904190 9000D217    506497FE 50E05060 47F09034 20C9C7C3   *..............K.&.p.&\&-.0...IGC*
00E3E780 F0F0F1F0 C5F0F361 F1F961F0 F4C8C4E9    F1F1C3F0 40D5D6D5 C5404040 40004110   *0010E03/19/04HDZ11C0 NONE    ...*

The module probably starts at E3E778.

Locating load module information may be more difficult. The dump program often lists load modules by name in its storage dump, but you can also use the formatted control blocks. It's not easy. First, find the load module extent data. It's header is the improbable XTLST.
XTLST

       009F91B8  LNTH..... 00000010  NRFAC.... 00000001  SEGLN.... 800000A8  SEGAD.... 00007F58
       009F9000  LNTH..... 00000010  NRFAC.... 00000001  SEGLN.... 800000A0  SEGAD.... 00007EB8
       009F9770  LNTH..... 00000010  NRFAC.... 00000001  SEGLN.... 800000A0  SEGAD.... 00007E18
       009FC7C0  LNTH..... 00000010  NRFAC.... 00000001  SEGLN.... 80000128  SEGAD.... 00007CF0
       009F9040  LNTH..... 00000010  NRFAC.... 00000001  SEGLN.... 80000088  SEGAD.... 11700F78
In theory there can be multiple lines in each entry for load modules in the “scatter” format that were “scatter” loaded. z/OS never “scatter” loads load modules any more, probably for three reasons.
  • There are very few load modules linked in the “scatter” format any more AND
  • Load modules in the “scatter” format can only load below the line, and most load modules are linked RMODE ANY and normally load above the line AND
  • Storage is rarely, if ever, so fragmented that it is necessary to “scatter” load a load module.
The load module starts at the SEGAD.... address; its length is SEGLEN..... Ignore the high order bit in SEGLEN. Having found the XTLST entry, find the matching CDE entry. The correct CDE entry will point to its XTLST entry in the XLMJP.... data area.

This is about as far as we can go here as more problem analysis depends on your module and your problem. Good luck.