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
 

 

ISPF Length error while running REXX EXECIO

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

New User


Joined: 23 Dec 2010
Posts: 17
Location: Mumbai, India

PostPosted: Wed Jul 17, 2013 6:38 pm    Post subject: ISPF Length error while running REXX EXECIO
Reply with quote

Hi

We are trying to check if the file is empty or not using REXX and if the file is empty we are appending 'E' to file name and write the entire string in a PS.

The below piece of code is not working for all the files. Some of the files it is able to write with an appended 'E' but as soon as the file with a bigger name encountered it errored with ISPF error ISPV006. Screenshot attached.
As far as I know we dont variable length limits in REXX ( Atleast we dont have to define them). Although the output file names are not that lengthy too. Please help on this.

We have Another confusion here that whenever EXECIO is used in loop it automatically appends 1 to the stem variable ( Hence you can see the workaround in the code for it icon_smile.gif). Does it work this way ??
Code:

    DO I = 1 TO 20                                         
         ADDRESS ISPEXEC                                       
           "LMDLIST LISTID("VAR1") OPTION(LIST) DATASET(DSVAR1)"
           IF RC = 0 THEN                                       
             DO                                                 
                                               
               DSNNAME = DSVAR1                                 
               ADDRESS TSO                                     
               "ALLOC DA('"DSNNAME"') F(TESTF) SHR REUSE"       
               "EXECIO 1 DISKR TESTF (FINIS STEM DSTEST"       
                 IF RC \= 0 THEN                               
                    DO                                         
                      DSVAR1 = DSNNAME || ' E'                 
                    END                                         
               "FREE F(TESTF)"                                 
                                             
               ADDRESS ISPEXEC                                 
               ADDRESS ISPEXEC                                       
               "DSINFO DATASET('"DSNNAME"')"                         
               IF RUNDATE = ZDSCDATE | RUNDAT2 = ZDSCDATE THEN       
               DO                                                                       
                 ADDRESS TSO                                         
                 "ALLOC DA('"OUTFILE"') F(OUTFL) MOD"     
/* Tried TRACE and Code is abending with ISPV006 here */           
                 "EXECIO 1 DISKW OUTFL (FINIS STEM DSVAR"           
                 "FREE F(OUTFL)"                                     
               END                                                   
             END                                                     
         END                                                         
          ADDRESS ISPEXEC                                           
           "LMDLIST LISTID("VAR1")   OPTION(FREE)"                   
                                                     
                     



ISPV006 is the error I am getting. Please help
Back to top
View user's profile Send private message

sshakya2

New User


Joined: 23 Dec 2010
Posts: 17
Location: Mumbai, India

PostPosted: Wed Jul 17, 2013 7:11 pm    Post subject:
Reply with quote

ISPV006 Data truncation occurred - Data for aaaaaaaa format variable
"bbbbbbbb" was too long.

Explanation: The variable value being updated is longer than the length
specified on the VDEFINE for the variable in question.

User response: Contact the responsible programmer.


I have kept the RECLENGTH of the output file as 80. It should be good enough !!!
Back to top
View user's profile Send private message
sshakya2

New User


Joined: 23 Dec 2010
Posts: 17
Location: Mumbai, India

PostPosted: Wed Jul 17, 2013 7:12 pm    Post subject:
Reply with quote

And this is all REXX Code. So Lengths shouldn't be aproblem here ?? Please correct me if i am wrong.
Back to top
View user's profile Send private message
sshakya2

New User


Joined: 23 Dec 2010
Posts: 17
Location: Mumbai, India

PostPosted: Wed Jul 17, 2013 7:19 pm    Post subject:
Reply with quote

Also, the name of the next file which code should be about to list is of 40 characters.

I have tried increasing the RECLENGTH of output file to 2500 from 80. It is still giving the same abend.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Wed Jul 17, 2013 7:53 pm    Post subject:
Reply with quote

Note that in your EXECIO statements you are not specifying a stem, but a partial name. You have
Code:
"EXECIO 1 DISKR TESTF (FINIS STEM DSTEST"

which indeed causes EXECIO to concatenate a number to DSTEST. If instead you wrote
Code:
"EXECIO 1 DISKR TESTF (FINIS STEM DSTEST."

it would be a true stem (note the period) and your input record would in variable DSTEST.1.

Please post the trace for the iteration of the outermost loop in which the abend occurs. It is possible that appending the "E" causes either the DSN or the LLQ to be of an invalid length.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 17, 2013 7:54 pm    Post subject:
Reply with quote

Where is the LMDINIT statement ?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Jul 17, 2013 9:58 pm    Post subject: Reply to: ISPF Length error while running REXX EXECIO
Reply with quote

I've been trying to figure out why the error message is from ISPF and not from REXX. I think that mixing the ISPF variable DSVAR1 with a REXX stem variable of the same name is the culprit.
Back to top
View user's profile Send private message
sshakya2

New User


Joined: 23 Dec 2010
Posts: 17
Location: Mumbai, India

PostPosted: Thu Jul 18, 2013 11:41 am    Post subject: Reply to: ISPF Length error while running REXX EXECIO
Reply with quote

Akatsukami: Thanks for the clarification of STEM EXECIO appending 1. New learning for me today. The requirement is such that we cant write an array so used it this way.

EXPAT : I have written LMDINIT Statement too in the code but not mentioned in the screenshot.

Superk : Bingo !!!! You nailed the issue. I introduced another variable and it worked. Can never thank you enough !!!

Code snippet is below :

Code:


ADDRESS ISPEXEC
     "LMDLIST LISTID("VAR1") OPTION(LIST) DATASET(DSVAR1)"
   IF RC = 0 THEN
     DO
         DSNNAME = DSVAR1
         FINDSN1 = DSVAR1
         ADDRESS TSO
         "ALLOC DA('"DSNNAME"') F(TESTF) SHR REUSE"
         "EXECIO 1 DISKR TESTF (FINIS STEM DSTEST"
           IF RC \= 0 THEN
              DO
                FINDSN1 = DSNNAME || ' E'
              END
         "FREE F(TESTF)"
        DO
         ADDRESS TSO
         "ALLOC DA('"OUTFILE"') F(OUTFL) MOD"
         "EXECIO 1 DISKW OUTFL (FINIS STEM FINDSN"
         "FREE F(OUTFL)"
       END
     END

Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Thu Jul 18, 2013 4:34 pm    Post subject:
Reply with quote

Why are you opening and closing the output file every time you want to write a record? And why not store all the data to be written in a stem and write at the end?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Jul 18, 2013 4:41 pm    Post subject:
Reply with quote

Nic Clouston wrote:
Why are you opening and closing the output file every time you want to write a record? And why not store all the data to be written in a stem and write at the end?


sshakya2 wrote:
The requirement is such that we cant write an array so used it this way.


Very few software engineers have either the knowledge or the seniority to question "requirements", however foolish.
Back to top
View user's profile Send private message
sshakya2

New User


Joined: 23 Dec 2010
Posts: 17
Location: Mumbai, India

PostPosted: Thu Jul 18, 2013 4:59 pm    Post subject:
Reply with quote

Nic .. The file which I am writing is being written from multiple places with different data streams one by one.

Akatsukami : Thanks for your "Non Required" comments too.
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm


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