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

I am getting a LENGERR in the following code


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dates

New User


Joined: 11 Mar 2008
Posts: 9
Location: LA,USA

PostPosted: Tue Dec 01, 2009 5:14 pm
Reply with quote

Code:
MOVE '1'                                     TO  SUB-LFI.
MOVE WS-SUBSCRIBER               TO  SUB-SUB-NO.
EXEC CICS READ FILE('SUB1')
               INTO(SUBSCRIBER-RECORD)
               RIDFLD(SUB-KEY1)
               NOHANDLE
               RESP(WW-CICS-RESP-CODE)
END-EXEC
IF WW-CICS-RESP-CODE NOT = DFHRESP(NORMAL)
   MOVE 'SVMSUB READ ERROR    RC='
                                TO OUT-MESSAGE(1:28)
   MOVE WW-CICS-RESP-CODE       TO WS-MSG-RESP-CODE
   MOVE 'E082'                  TO OUT-MESS-CODE
      PERFORM ZX-ERROR
END-IF.



I am getting a LENGERR in the above code.
Can anyone help me out why this is coming ?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Dec 01, 2009 5:35 pm
Reply with quote

There is a manuals link at the top of the page. If you click on it, pull up the CICS Application Programming Reference manual, and look up the READ command you will find the following LENGERR possibilities:
Quote:
LENGERR
RESP2 values:

10
Neither the LENGTH option nor the SET option is specified on a READ command for a file with variable-length records or for a BDAM file with variable-length or undefined-format records.

11
The length of a record read with the INTO option specified exceeds the value specified in the LENGTH option; the record is truncated, and the data area supplied in the LENGTH option is set to the actual length of the record.

13
An incorrect length is specified for a file with fixed-length records.

Default action: terminate the task abnormally.
So what's the value of RESP2?
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Monitoring production job progress. N... JCL & VSAM 4
Search our Forums:

Back to Top