|
View previous topic :: View next topic
|
| Author |
Message |
Grant Goodale
New User
Joined: 13 Nov 2010 Posts: 67 Location: Brampton, Ontario, Canada
|
|
|
|
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 |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
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 |
|
 |
PeterHolland
Global Moderator

Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
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 |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10903 Location: italy
|
|
|
|
| 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 |
|
 |
Grant Goodale
New User
Joined: 13 Nov 2010 Posts: 67 Location: Brampton, Ontario, Canada
|
|
|
|
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
Many thanks for the suggestions. |
|
| Back to top |
|
 |
PeterHolland
Global Moderator

Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
| I guess you screwed up the parameter list. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|