IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Doing a VCOPY of ZDSTOTA variable


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Mon Oct 17, 2011 11:26 pm
Reply with quote

I am working on an Assembler program that invokes ISPF facilities in batch. I want to retrieve info about a given dataset. I have loaded a copy of ISPFLINK and then I request the ISPF DSINFO with no problems.

I can retrieve the ZDSSPC variable with no problems using VCOPY. I do end up with a problem when I try to retrieve the ZDSTOTA and ZDSTOTU variables.

Below is a code fragment:

Code:

         MVC   WSERVICE,VCOPY      ISPF SERVICE NAME     
         MVC   WVNAME,ZDSTOTA      ZDSTOTA VARIABLE NAME 
         LA    R1,WSERVICE         BUILD ISPLINK PARM LIST
         ST    R1,WPARMS                                 
         LA    R1,WVNAME           VARIABLE NAME         
         ST    R1,WPARMS+4                               
         LA    R1,VLENGTH          LENGTH ARRAY           
         ST    R1,WPARMS+8                               
         LA    R1,WVAR             RETURN AREA           
         ST    R1,WPARMS+12                               
         LA    R1,=CL8'MOVE'       MOVE MODE             
         ST    R1,WPARMS+16                               
         OI    WPARMS+16,X'80'                           
         LA    R1,WPARMS                                 
         L     R15,WISPLINK                               
         BALR  R14,R15             GET VARIABLE VALUE     
         LTR   R15,R15             CHECK RETURN CODE     
         BNZ   MAINE05             BAIL OUT IF ERROR     
         :                                             
VCOPY    DC    CL8'VCOPY'                               
VLENGTH  DC    F'13'                                   
ZDSTOTA  DC    CL8'ZDSTOTA'                             
         :                                             
WISPLINK DS    A                   -> ISPLINK   
WPARMS   DS    8A                  ISPLINK PARMS
WSERVICE DS    CL8                 ISPF SERVICE NAME   
WVNAME   DS    CL8                 VARIABLE NAME (VCOPY)
WVAR     DS    CL13                VARIABLE VALUE       
         :                                             


Below is the message that I get:

Code:

READY                                                                           
 ISPSTART PGM(LISTCXT)                                                         
  ISPV006 Data truncation occurred-/-Data for CHAR format variable "ZDSTOTA" was  too long.
READY                                                                           


I have googled ZDSTOTA and ISPV006 but none of the hits looked like they described my problem.

I suspect that I am doing something dumb in my VCOPY but I cannot seem to spot the problem.

Any ideas would be very much appreciated.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 18, 2011 2:09 pm
Reply with quote

after playing with this REXX Script I determined that the length of
zdstota was 13 (contained a value of 70).

maybe that is your problem.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 18, 2011 2:59 pm
Reply with quote

I always used the following construct, to make life easy :

Code:

         MACRO                                                          00010006
.********************************************************************** 00020006
.* THIS MACRO GENERATES CODING FOR EXIT TO ISPLINK; LOAD ADDRESS OF   * 00030006
.* OF ENTRY POINT IN R15; EXECUTE CALL TO MODULE NAME WITH ENTRY      * 00040006
.* POINT IN R15; LOAD R1 WITH ADDRESS OF PLIST                        * 00050006
.********************************************************************** 00060006
&NAME    ISPEXEC                                                        00070006
         LCLC  &EP                                                      00080006
         LCLA  &COUNT                                                   00090006
         LCLC  &PLIST                                                   00100006
&EP      SETC  '&SYSLIST(1)'                                            00241008
&COUNT   SETA  N'&SYSLIST(2)                                            00241108
&COUNT   SETA  &COUNT*4                                                 00241208
&PLIST   SETC  '&SYSLIST(3)'                                            00242008
&NAME    DS    0H                                                       00250008
         L     R15,&EP                                                  00251008
         XC    &PLIST.(&COUNT.),&PLIST                                  00260006
         CALL  (15),&SYSLIST(2),VL,MF=(E,&PLIST)                        00270008
         MEND                                                           00280006




         LOAD  EP=ISPLINK         LOAD MODULE                           
         ST    R0,EPISP           SAVE EP ADDRESS                       


         ISPEXEC EPISP,(VCOPY,=C'(ZUSER)',=A(8),USER,MOVE),ISPLIST       


EPISP    DC    A(0)

ISPLIST  DS    0A                                                       
ISPPARM1 DC    A(0)                                                     
ISPPARM2 DC    A(0)                                                     
ISPPARM3 DC    A(0)                                                     
ISPPARM4 DC    A(0)                                                     
ISPPARM5 DC    A(0)                                                     
ISPPARM6 DC    A(0)                                                     
ISPPARM7 DC    A(0)                                                     
ISPPARM8 DC    A(0)                                                                                                         

USER     DC    CL8' '
MOVE     DC    CL8'MOVE'                 

Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Oct 18, 2011 3:03 pm
Reply with quote

Code:
         LA    R1,VLENGTH          LENGTH ARRAY           
         ST    R1,WPARMS+8                               


not my preferred coding style, but it seems that the LENGTH gets passed

I am of the opinion that using a standard call sequence would make the code much cleaner ( MF=(E,PLIS) )

I have some administrative issues to deal with right now,
later on I' ll post a snippet with a different approach

I though also of having seen somewhere on the net a nice sets of assembler macros
to make ISPF related coding much easier
I' ll check that also and post accordingly

faster than I thought, file 803 of the CBT tape
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Tue Oct 18, 2011 7:46 pm
Reply with quote

I went digging in my old archives and I found an ISPF invocation macro. I did a bit of tweaking and now everything is working OK.

I really don't know what I screwed up before. Perhaps it is one of those transcendental mysteries of life icon_rolleyes.gif

Many thanks for the suggestions.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 18, 2011 9:28 pm
Reply with quote

I guess you screwed up the parameter list.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top