Products Downloads


French version


 

 

ADELIA

VADELIA

SADELIA

WADELIA

MADELIA

(I/B)

(I/B) (C/S)

(B) (S)

(I/B) (C/S)

(I) (C/S)

 

Warning: Concening Visual Adelia and Adelia Web programs,

    • "OPEN ViewName" must be used only in the server side,
    • "OPEN LayoutCode" must be used only in the client side.


Section for use

All

 

Syntax

OPEN ViewName

OPEN LayoutCode PrinterNum

 

PrinterNum

1 | 2 | 3 | ... | 9 | None

 

Description

This instruction opens layout or database files for each program.

 

For a VADELIA batch program with a report, the number of the printer PrinterNum can be specified; otherwise the printer number 1 will be used by default.

 

For a WADELIA batch program, PrinterNum is forbidden.

 

File opening and closing operations are managed implicitly by Adelia.

 

If you need to manage file and layout opening and closing operations manually, you must modify the default generation options, specifying that you want to manage file opening operations, or specify the OPEN parameter when using the DEFINE_VIEW or VIEW instructions to make declarations.

As a result, the program will not automatically open and close the file at the start and end of its execution, enabling you to manage these operations as required.

 

If the generation options have been modified to request confirmation before opening a file, you can use AS/400 commands (OPNDBF, etc.) to open the file.

 

It is also possible to use these instructions without modifying the generation options. In this case, you must naturally use "CLOSE ViewName" before "OPEN ViewName".

 

Warning: With screen layouts, "OPEN LayoutCode" is ignored by the C generator and cannot be used with interactive VADELIA programs.

 

Example

* Close, then open the PARAM file with a different member name

* via OVRDBF command

* Note: PARAM file is automatically opened and closed

* (' ' in generation options)

CLOSE PARAMETERS_FILE

AS400_COMMAND = 'OVRDBF FILE(PARAM) TOFILE(PARAM) MBR(INVOICES)'

EXECUTE_CMD AS400_COMMAND

OPEN PARAMETERS_FILE

 

CHAIN PARAMETERS_FILE

 

* Open and close the report layout to print the grand total only

* Note: it was not automatically opened ('Y' in generation options)

OPEN INV950

PRINT HEADER_FMT

PRINT TOTAL_FMT

CLOSE INV950

 

Other example:

 

* Open and close the report layout of Crystal Reports kind (VADELIA program), with preview before printing.

* Printing orders.

OPEN LAYOUTNAME

READ ORDERS_VIEW

DO_WHILE ORDERS_VIEW EXISTS

PRINT_VIEWS

READ ORDERS

REDO

CLOSE LAYOUTNAME *PRV

 

↑ Top of page

  • Aucune étiquette