Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8195
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 Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm
No new posts Strange Code amitc23 COBOL Programming 6 Tue Nov 28, 2017 11:25 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us