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: 7988
Location: Bellevue, IA

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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 2 Thu Jan 12, 2017 12:02 pm


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