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.
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