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
 

 

I am getting a LENGERR in the following code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: I am getting a LENGERR in the following code
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: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Tue Dec 01, 2009 5:35 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Read of TDQ fails in LENGERR Tracy Hansen CICS 10 Wed Apr 05, 2017 12:10 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm


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