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: 7932
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 How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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