Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Doing a VCOPY of ZDSTOTA variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Grant Goodale

New User


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

PostPosted: Mon Oct 17, 2011 11:26 pm    Post subject: Doing a VCOPY of ZDSTOTA variable
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    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 18, 2011 2:59 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Tue Oct 18, 2011 3:03 pm    Post subject: Reply to: Doing a VCOPY of ZDSTOTA variable
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: 55
Location: Brampton, Ontario, Canada

PostPosted: Tue Oct 18, 2011 7:46 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 18, 2011 9:28 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am
No new posts File Manager with Variable Length File ahabib IBM Tools 10 Thu Mar 31, 2016 11:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us