DCB and APF Authorized



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

Re: DCB and APF Authorized

Postby steve-myers » Fri Mar 01, 2013 11:24 am

enrico-sorichetti wrote:... and Yes, I am very picky when it comes to assembler programming ... to avoid surprises I prefer to fill up myself the proper addresses in the <copied> DCBs/DCBEs

for a plain DCB for example
here is my standard <open> sequence

000098 ...
000104 OPEN ((<DCBREG>),(INPUT)),MF=(E,OPENLST)
000107 ...
...
I'm afraid I didn't pick up on this until just now, but there is another problem in your code snippet: you don't show how you initialize OPENLST. The OPEN macro you show does not set end of OPEN parameter list. Another potential issue is you do not specify a second option after INPUT. Since it's not specified, the macro won't change whatever may be in OPENLST if it's non-zero. Either issue may result in an oops.

I had noticed this ages ago. Somewhere around OS/360 R19 there was a PTF that fixed the end of list issue. It didn't last long; I suspected then someone had code like your code to just change the first entry in a multiple entry parm list. Oops. A PE against the PTF.
steve-myers
Global moderator
 
Posts: 1885
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: Re: DCB and APF Authorized

 

Re: DCB and APF Authorized

Postby enrico-sorichetti » Fri Mar 01, 2013 12:51 pm

you don't show how you initialize OPENLST. The OPEN macro you show does not set end of OPEN parameter list.

the execute form does not do it... the list form does it

the fact that I did not show it, does not mean that I did not take care of it :geek:

everything gets initialized by the MVCL priming the 24BITS working storage

as ... ( source code )
 000014 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 000015 *              INITIALIZE WORKING STORAGE
 000016          LA    R4,WORK
 000017          LA    R5,WORKL
 000018          LA    R6,DATA
 000019          LA    R7,DATAL
 000020          MVCL  R4,R6
 ... ... ... ... ...
 ... ... ... ... ...
 ... ... ... ... ...

 000532 RENT     DSECT
 ... ... ... ... ...
 ... ... ... ... ...
 ... ... ... ... ...
 000584 WORK     DS    0D
 000585 ENQ      ENQ   (*-*,*-*,E,52,SYSTEMS),RET=USE,MF=L
 000586 ENQ2     ENQ   (*-*,*-*,E,44,SYSTEMS),MF=L
 000587 ENQRSV   RESERVE (*-*,*-*,E,44,SYSTEMS),UCB=*-*,MF=L
 000588 DEQ      DEQ   (*-*,*-*,52,SYSTEMS),MF=L
 000589 DEQ2     DEQ   (*-*,*-*,44,SYSTEMS),MF=L
 000590 DEQRSV   DEQ   (*-*,*-*,44,SYSTEMS),MF=L
 000591 PDSDCB   DCB   DSORG=PO,MACRF=(R),DDNAME=*-*,RECFM=U,EXLST=*-*
 000592 PD2DCB   DCB   DSORG=PO,MACRF=(W),DDNAME=*-*
 000593 PD3DCB   DCB   DSORG=PO,MACRF=(R),DDNAME=*-*
 000594 OPENLST  OPEN  (*-*,(INPUT)),MF=L
 000595 OPENLS2  OPEN  (*-*,(OUTPUT)),MF=L
 000596 CLOSLST  CLOSE (*-*),MF=L
 000597 DECBR    READ  DECB1,SF,*-*,*-*,*-*,MF=L
 000598 DECBW    WRITE DECB2,SF,*-*,*-*,*-*,MF=L
 ... ... ... ... ...
 ... ... ... ... ...
 ... ... ... ... ...
 000626          DS    0D
 000627 WORKL    EQU   *-WORK
 000628 RENTL    EQU   *-RENT
 ... ... ... ... ...
 ... ... ... ... ...
 ... ... ... ... ...
 000484 DATA     DS    0D
 000485          ENQ   (*-*,*-*,E,52,SYSTEMS),RET=USE,MF=L
 000486          ENQ   (*-*,*-*,E,44,SYSTEMS),MF=L
 000487          RESERVE (*-*,*-*,E,44,SYSTEMS),UCB=*-*,LOC=ANY,MF=L
 000488          DEQ   (*-*,*-*,52,SYSTEMS),MF=L
 000489          DEQ   (*-*,*-*,44,SYSTEMS),MF=L
 000490          DEQ   (*-*,*-*,44,SYSTEMS),MF=L
 000491          DCB   DSORG=PO,MACRF=(R),DDNAME=*-*,RECFM=U,EXLST=*-*
 000492          DCB   DSORG=PO,MACRF=(W),DDNAME=*-*
 000493          DCB   DSORG=PO,MACRF=(R),DDNAME=*-*
 000494          OPEN  (*-*,(INPUT)),MF=L
 000495          OPEN  (*-*,(OUTPUT)),MF=L
 000496          CLOSE (*-*),MF=L
 000497          READ  ZZZZ1,SF,*-*,*-*,*-*,MF=L
 000498          WRITE ZZZZ2,SF,*-*,*-*,*-*,MF=L
 ... ... ... ... ...
 ... ... ... ... ...
 ... ... ... ... ...
 000516          DS    0D
 000517 DATAL    EQU   *-DATA


output ( print gen to show that ... )
  COMMAND INPUT ===>                                            SCROLL ===> CSR
                                    1149          OPEN  (*-*,(INPUT)),MF=L
 000A64                             1150+         DC    0F'0'
 000A64 80                          1151+         DC    AL1(128)
 000A65 000000                      1152+         DC    AL3(*-*)
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: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Previous

Return to Assembler