MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with SNAP-Macro...

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
ReinerZ
Beginner


Joined: 30 Nov 2006
Posts: 11
Topics: 4
Location: Germany

PostPosted: Mon Feb 12, 2007 1:21 pm    Post subject: Problem with SNAP-Macro... Reply with quote

Hi all,

I'm in the process of learning to program the MVS-Environment.

Yesterday I have had some problems in a program
and tried to resolve them with the help of a SNAP-Dump.
After reading the documentation of the SNAP-Macroinstruction,
I have written a piece of code (according to the documentation)
as follows.
(My intention was to dump the storage acquired by the
3 Character-Constants labelled RZS01, RZS02 and RZS03).

Code:

*                                                                       
DUMPIT    OPEN  (SNAPDCB,(OUTPUT))                                       
               SNAP  DCB=SNAPDCB,PDATA=REGS,                              C
               LIST=DMPLIST                                             
               CLOSE (SNAPDCB)                                               
               B     PGMEXIT                                                 
*                                                                       
               DS    0D                                                       
DMPLIST  EQU   *                                                       
DMPBEG   DC    A(RZS01)                                                 
               DC    X'80'                                                   
DMPEND   DC    AL3(RZS03+L'RZS03)                                       
*                                                                       
               DS    0D                                                       
RZS01     DC    C'RZS07K0 - This is message number 1.'                   
RZS02     DC    C'RZS07K0 - This is message number 2.'                   
RZS03     DC    C'RZS07K0 - This is message number 3.'                   
*                                                                       
SNAPDCB  DCB   DSORG=PS,MACRF=W,RECFM=VBA,                        C
                BLKSIZE=1632,LRECL=125,DDNAME=SNAPDUMP                   

The result of excuting the code above was a storage-dump, but NOT the
areas I want to dump!

Did I something wrong?
Any help is appreciated...

Thank you

Reiner

PS: The above code is running under TSO/E via the CALL-Command.
z/OS-Version is V1.R5.
Code:
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Mon Feb 12, 2007 4:02 pm    Post subject: Reply with quote

Copied your code and ran as batch asm/lked/go and it worked OK!
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
ReinerZ
Beginner


Joined: 30 Nov 2006
Posts: 11
Topics: 4
Location: Germany

PostPosted: Tue Feb 13, 2007 4:12 am    Post subject: Reply with quote

Bill,

I have copied the code from my origin program to a "fresh" one (with only that code), and it worked too!

Dont know what to do!

best regards

Reiner
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue Feb 13, 2007 9:49 am    Post subject: Reply with quote

Upon second glance, it's very likely that the alignment of the EQU and the first DC A didn't jibe. The DC A(RZS01) would have aligned to a fullword while the EQU may have been a byte or two ahead. Better coding would be:
Code:
DMPLIST  DS   0F
DMPBEG   DC   A(RZS01)
to ensure the label is also fullword aligned.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Thu Jul 03, 2008 9:42 am    Post subject: Reply with quote

I had used SNAP successfully in other programs. When I added SNAP to an existing program:
Code:

         OPEN  (SNAP,OUTPUT)
         SNAP   DCB=SNAP,PDATA=(PSW,REGS)
......
.......
SNAP     DCB   DSORG=PS,MACRF=W,RECFM=VBA,                             +
               BLKSIZE=1632,LRECL=125,DDNAME=SNAP

It failed to assemble:
Code:

                                   9209          OPEN  (SNAP,OUTPUT)
00008E 0700                        9210+         CNOP  0,4
000090 4510 8098            00098  9211+         BAL   1,*+8
000094 8F                          9212+         DC    AL1(143)
000095 000000                      9213+         DC    AL3(SNAP)
** ASMA032E Relocatable value found when absolute value required - SNAP

What should I do to resolve the problem?
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Jul 03, 2008 10:56 am    Post subject: Reply with quote

Hard to tell without the full listing. Maybe too many uses of 'SNAP' confused the assembler. Try changing the DCB name to something else.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Thu Jul 03, 2008 11:37 am    Post subject: Reply with quote

Bill,

I changed DCB name from SNAP to LOGREG and comment out "SNAP DCB=LOGREG,PDATA=(PSW,REGS)" (so I won't be calling SNAP at all), same error message.
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Jul 03, 2008 3:56 pm    Post subject: Reply with quote

And you changed to OPEN macro to point to LOGREG?
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group