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

NAT3041 - Natural run time error - Help needed


IBM Mainframe Forums -> Java & MQSeries
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Arunprasad.k

New User


Joined: 04 Jan 2008
Posts: 7
Location: Chennai, India

PostPosted: Thu Jan 24, 2008 8:48 pm
Reply with quote

Experts,

I am reading a ADABAS file with a view defined. Here is the simple program I have written.

Code:
DEFINE DATA                                                             
 LOCAL                                                                 
01 AR_VEHICHLES-VIEW VIEW OF VEHICLES                                   
   02 WHOLESALE-SALE-DATA (1:20)                                       
    03  DEALER-ORDER-NUMBER                                             
    03  DEALER-ORDER-TYPE                                               
   02 NMC-MODEL-SERIAL (N11.0)                                         
   02 VIN-PREFIX (A11)                                                 
01 #I  (N2)                                                             
END-DEFINE                                                             
*                                                                       
RD1. READ (40) AR_VEHICHLES-VIEW                                       
  FOR #I=1 TO 20                                                       
   IF SUBSTR(DEALER-ORDER-NUMBER(#I),1,1) = 'F'                         
      DISPLAY VIN-PREFIX 1X NMC-MODEL-SERIAL 4X DEALER-ORDER-NUMBER(#I)
   END-IF                                                               
  END-FOR                                                               
END-READ                                                               
END   


When I check this code (giving CHECk in command line), it shows no errors. But when I run this code (by giving RUN in command line) it gives me the following error.

Quote:
NAT3041 Error detected in format buffer. DB/FNR 233/6


Line of error:

Code:
RD1. READ (40) AR_VEHICHLES-VIEW



PS: I searched this forum with the key word NAT3041 and could not found any hits. Since I am new to Natural, I could not think of some other key words.
Back to top
View user's profile Send private message
Arunprasad.k

New User


Joined: 04 Jan 2008
Posts: 7
Location: Chennai, India

PostPosted: Thu Jan 24, 2008 9:55 pm
Reply with quote

Sorry guys, the problem is resolved!!

Reason: The ADABAS file is not present in that region (or Library. Not sure regarding the terms).

I was under an assumption that when a VIEW (of Vehicles file) is present then the FILE should also be present in that region.

Thank you all.
Arun.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jan 25, 2008 12:27 am
Reply with quote

You're welcome icon_smile.gif

Thank you for posting what you found.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Jan 25, 2008 3:25 am
Reply with quote

A little explanation:

Although NATURAL is an interpreted language, it still generate some kind of object-like-module that is created when you CATALOG, STOW or CATALL.

Within this module, NATURAL keep track of files and their origin. If a view was specified, and that view came from a DDM that contains an FNR and DBID, then NATURAL imbed their values into this "module".

Then, when executing the module, NATURAL is looking for these specific FNR and DBID (in your case: 233/6).

There are several solution for this issue.
First direction is to use DBID=0 in the DDM.
The other direction is to use logical files table, and point the DBID/FNR to other numbers at run time (there are at least 3 ways to achieve this).


O.
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 -> Java & MQSeries

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
Search our Forums:

Back to Top