Active Database not visible in Natural Editor

I created a Demo database in ADABAS DBA Workbench and activated it.

However I cannot see the active database in the Library menu on left hand side in my Windows Natural Editor.

So if i try running any program which refers to any Database file, then I get an error as - ‘Database not active’.

Please advice / suggest remedial measures.

Invoke the Natural Configuration Utility - it should be available from the START menu.

. Highlight the default parameter file - NATPARM.
. Enter UDB into the drop-down window in the toolbar, and press ENTER.
. Enter the DBID of your demo database in the UDB parameter.
. Restart Natural.

Addendum:

Here’s a program to display or set the UDB value.

UDB               by default, the program will display the current UDB value
UDB 12            or you can set a new UDB value
DEFINE DATA LOCAL
1 #OP (A1)  INIT <'G'>
1 #DB (N5)
1 #RC (I4)
END-DEFINE
IF  *DATA > 0
  THEN
    INPUT #DB (IP=F AD=A)
    ASSIGN #OP = 'S'
END-IF
CALLNAT 'USR1040N' #OP #DB #RC
WRITE NOTITLE '<<<<<Currently>>>>>'
END

Hi Ralph

I performed all the steps and changed the UDB parameter to DBID value of my database in DBA Workbench.

I also ran the code you provided above and got the UDB value as 1.

But still i’m not able to view the active database in my Natural editor.
Appreciate your help.

Having ensured that your DB is active, have you tried to run a program like

READ (1) filename
display field1 field2
loop
end

When you say you are not able to:

"to view the active database in my Natural editor. "

What are you looking for, where?

steve

Anshul,

Did you start the database?

In Workbench, highlight the database in the database list, then press ctrl-s.

Hi Ralph

I started the database using Ctrl+s and then restarted Natural editor. But still getting error.

Steve
I wrote a sample program which accesses the EMPLOYEES DDM from SYSEXDDM.
The program stows successfully but when I try to run it, it gives me the below error -

[color=“blue”]NAT3017 Invalid file number. DB/FNR :1:/:2:. Subcode :3:.

TEXT:
Invalid file number. DB/FNR …/… Subcode …
EXPL:
The file number was invalid. Possible causes are:
- The file number was either 0 or greater than 255.
- The file was not in the database.
- The file was locked.
- A required Adabas system file was not loaded.
ACTN:
Make sure that you use the correct file number.[/color]

Please help.

While in the editor, list the view from the context menu (right-click on the DDM name in “VIEW ddm-name” then click on List). Then invoke Workbench and double-click on the database name to display the file list.

The file numbers in the DDM and the selected file in the Workbench file list must match. If the DBID in the DDM is non-zero, it must match the DBID of the Workbench selection. If the DBID in the DDM is zero, then your UDB setting must match the DBID of the Workbench selection.

Hi Ralph

DBID in the DDM is zero, then my UDB setting must match the DBID of the Workbench selection.
But still my database is not working.

I would like to mention that I have a DEMO database version of Windows ADABAS which is without any licence file, so i dont know if full functionality is available on my ADABAS workbench.

I’m attaching PDF document which i referred while installing and configuring my database settings.
Please check the PDF and see if I need to do some other settings as i’m not able to get the database reference in my Natural editor on starting editor.

Appreciate help from all here.
200808_GettingStarted_tcm16-44429.pdf (2.14 MB)

The instructions in the PDF look fine. The Community edition of Adabas has few limitations - none that will hamper your trial.

I’ve attached an image from my desktop, with Adabas Workbench and Natural Studio. The Workbench shows EMPLOYEES as file 11. In Studio, you see, in the Library Workspace, the matching DDM for file 11. The program refers to the EMPLOYEES DDM as the EMP view. And finally, the Natural window displaying the database records.

In a previous post, you stated, “I’m not able to view the active database in my Natural editor.” As you can see, no database information is available from Natural Studio, other than the DBID in the DDM.

Hi Ralph

Thanks a lot for the screenshot image. I think we are getting close to resolving my error.

I’m still facing the same error.
I have attached the screenshots of my Natural Editor session and Adabas workbench on the same lines.

You will find from the workbench that file no. 11 is missing.

Please help me in adding this file in the Adabas workbench.


At this point I think it would be easiest to use Workbench to

  1. deactivate the database (ctrl-t)
  2. delete the database (database → delete)
    3a. create a new database (database → new)
    3a. check the box at the bottom of the panel, marked “Load demo files”

Hi Ralph

My Natural Editor is up & running fine. :smiley:

Thanks a lot for all your help !!

One more help I need.
My Result window is showing me output in vertical format.
I have attached image of the output window.
Please provide your inputs on correcting this.

Nothing to correct! This is the default display. You are using the DISPLAY command (assuming this is the same program in the previous snapshot) - it produces one line for each iteration through the READ loop.

I suggest you think about what you want to display from the READ loop and post a new thread under an appropriate Natural forum if you have questions on how to do what you want.

Take a look at the documentation for the DISPLAY, WRITE and PRINT statements. If you are looking for a horizontal display of the values, you will probably need to accumulate them into an array and output the array periodically with a WRITE or PRINT statement.