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

Error- length of the record variable less than record length


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Wed Jun 02, 2010 3:14 pm
Reply with quote

Hi

I have an output file of length 69. The structure is as follows..(Just few from the copy book)

1 RGP0203 BASED(PREMPTR),
2 APAGTNO FIXED DEC(7),
2 APBIT8A,
3 APBUYOUT BIT(1),
3 APSRVFEE BIT(1),
3 APBIFLAG BIT(1),
3 APPDFLAG BIT(1),


Now I changed the layout of this copy book. APAGTNO FIXED DEC(7) to APAGTNO CHAR(7). So the lenght of the new copy book is 72. Also I changed the output file length in JCL to 72. But when I run the JCL I am getting the following error.

IBM0121S ONCODE=21 The RECORD condition was raised because the length of the record variable was less than the record length ('ONFILE'= PREMSUM).


Eventhough I changed the length correctly to 72, I don't know why I am getting this error. Please give ur suggestions.
Back to top
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Jun 02, 2010 4:14 pm
Reply with quote

Kumar,
There may be some other changes to the copybook. You can check the exact record length using file aid or file manager.
Back to top
View user's profile Send private message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Wed Jun 02, 2010 9:08 pm
Reply with quote

There are no other changes to this copy book..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 02, 2010 9:19 pm
Reply with quote

Quote:
Eventhough I changed the length correctly to 72, I don't know why I am getting this error


well, the OPs-Sys thinks the record that your are generating is larger than 72.

have you checked in the compile listing that the associated record with the write is actually 72?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jun 02, 2010 9:45 pm
Reply with quote

check the listing for the aggregate length
You will have to specify AGGREGATE as a compile parm or a process option ( IIRC )

check the manual for the exact spelling
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Thu Jun 03, 2010 1:54 am
Reply with quote

Let's guess:

Code:
BASED(PREMPTR)


is your solution...
Back to top
View user's profile Send private message
kumar_jalluri

New User


Joined: 02 Jun 2005
Posts: 24
Location: PUNE

PostPosted: Thu Jun 03, 2010 2:28 pm
Reply with quote

Hi Prino,

Could you please let me know in more detail about your suggested solution.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jun 03, 2010 6:08 pm
Reply with quote

show where the pointer points to,
show how the pointed area is defined,
show the statement used for the write
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Thu Jun 03, 2010 7:01 pm
Reply with quote

Have you defined the LRECL in the Environment attributes?

Garry.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top