• No se han encontrado resultados

Generación de nubes de puntos para superficies y volúmenes, algoritmo de rellenado de

Capítulo II: Algoritmos de pre y post-proceso para la generación de nubes de puntos y la visualización de

2.4 Generación de nubes de puntos para superficies y volúmenes, algoritmo de rellenado de

._

TOTAL PURMASES: $

._

LAST PURQUiSE:

_J_J_

Data in < > can be used to FIND vendors

l*

OPEN VENDOR

//

all

files

must be opened. ENTER VENDOR

//

inltalize enter macro.

AUTOPAGE FORM

//

automatically assign windows ENTRY VENDOR.RECNUM {NOPUT,AUT0FIND}

//

Translatiom Do data entry with the record number of the vendor

file

//

automat1ca11y find record, do not update the record buffer since

//

record number can't be changed. ENTRY VENDOR. VENDOR

//

Translation, Do standard data entry on the vendor name of the vendor

file.

ENTRY VENDOR.ADDRESS

ENTRY VENDOR.CITY ENTRY VENDOR.STATE ENTRY VENDOR.ZIP ENTRY VEND0R.NONE_AC ENTRY VENDOR. PHONE

_

EXOlG ENTRY VENDOR.FHONE

_NUMBER

ENTRY VENDOR.TERMS ENTRY VENDOR.CREDIT_ LIMIT

ENTRY VENDOR.CREDIT _USED {DISPLAYONLY}

//

Translation, When the vendor

file

is FOUND, display credit used in this

//

window.

ENTRY (FORM.II-FORM.12) {DISPLAY0NLY}

//

Translation, When a record is founch display the result of the calculation

//

of credit

limit

(FORM.II) minus credit used (FORM.12) fn this window. ENTRY VENDOR.PURMASES {DISPLAY0NLY}

ENTRY VENDOR.LAST_PURMASE {DISPLAYONLY}

RETURN

//

return from entry section

ENTEREND

//

end of enter cormand

ABORT

//

stop after escape key.

//

note: the entry command can only be used inside an enter or entergroup KEYPROC KEY.USER

//

Define action of user defined key

OUTPUT FORM

//

Output the page

ENTAGAIN

//

Return to same window

RETURN

———————

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-81

————— —

Notice the similarity between this

file

and the one for CUSTOMERS. Each ENTRY connand line links a data base field with a WINDOW. Close to the bottom. we see something new: ENTRY (F0RM.I1-F0RM.12).

This is a calculated field that translates to:

WHEN DISPLAYING FILE 21, SUBTRACT THE VALUE OF WINDOW 12 (FORM.12) FROM THE VALUE OF WINDOW

li

(FORM.ll) AND PUT THE RESULT IN WINDOW 13.

There is not a report for the vendor

file

supplied with the sample

configurations; this one is up to you. Create a report format for

VENDOR and use the CUSTOMER report as a model. After making the

report, add

it

to the MENU using the MENUDEF program.

After.making your reportg try your hand at a simple

file

definition and configuration using the AUTODEF Program. AUTODEF takes a screen IMAGE format created with a text editor and makes both the

file

definition and compilable configuration

file

from

it.

After making thesep look at the

file

definition with the FILEDEF program and type

out the configuration with the operating system TYPE command. Then

compile the configuration. THE INVENTORY FILE:

With the inventory

file

we start to see the true power of DataF]ex.

Each inventory part is supplied by a VENDOR, so the INVENTORY

file

is

said to RELATE to the VENDOR

file.

When an inventory part is found

(called into memory), the RELATED VENDOR record automatically comes

with

it.

This relationship is automatically maintained by DataFlex.

DATA ACCESS CORPORATION INVENTORY MASTER FILE

—————— VENDOR NUNBER:

_

.

NAME: VENDOR PART ID:

YOUR PART ID: DESCRIPTION: STOCK QUANTITY: . MINIMUM QUANTITY: . REORDER QUANTITY: . QTY ON ORDER: . SALES/MONTH: $ .

_

SALES/YEAR: $

._

PROFIT/YEAR: $

._

LIST PRICE: $

._

WHOLESALE PRICE: $

._

AVERAGE COST: $ .

_

STOCK VALUE: $

._

——————— —

C-82 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual

— —————

— ————————————

When running the inventory data entry screen, the

first

two fields are

actually out of the VENDOR

file.

You can find the vendor of interest on this screen by either keyp just like you could in the VENDOR

screen. You can then move the cursor down to VENDOR PART ID: to find

the

first

(or any) part for that vendor. The vendor number and then

vendorG part number make up a "two segment key", that is, you must

find the vendor, then, put in all or part of the vendors part number

to find a record by that index. To find the

first

part for any vendor, enter the VENDOR NUMBER or NAME and

hit

the "SUPERFINO" key. The INVENTORY

file

is also indexed (able to find records by) "YOUR PART ID" and "DESCRIPTION". You can put the cursor in any of these windows and find a particular partt

When you are creating a new partg find the vendor firstp then

fill

In

the other windows like you did in the other screens. This configura-

tion will also allow you to create new vendors from this inventory

screen. Just enter a new vendor name with no vendor number, and when you SAVE the partg a new vendor will be created. Later we

will

see how to disable this feature

if

you want.

DataF1ex 2.0 User's Manual SAKPLE APPLICATIONS C-83

INVENTORY FILE DEFINITION:

FILE DEFINITION LISTING FOR FILE #22

***************************************************

FILE ROOT NAME = INVT

USER DISPLAY NAME = INVENTORY FILE SHORT NAME = INVT

***************************************************

RECORD LENGTH - 128 (USED = 104) MAX NUMBER OF RECORDS = lOó (USED = 33) DELETED SPACE IS REUSED

MULTI-USER RE-READ ACTIVE

***************************************************

FIELD FIELD FIELD FIELD DEC MAIN RELATES--TO NMBR OFFSET LEN TYPE PTS INDEX FILE FIELD

---

————-— -—--- -—-—-

---

-——-- -—-— -—---

I

l

2 NUMERIC O

l

21 O VENDOR

2 3 15 ASCII

l

O O VENDOR PART_ID

3 18 15 ASCII 2 O O PART_ID 4 33 35 ASCII 3 O O DESCRIPTION 5 68 3 NUMERIC O O O O QUANTITY 6 71 2 NUMERIC O O O O MINIMUM 7 73 3 NUMERIC O O O O REORDER 8 76 3 NUMERIC O O O O ON_0RDER 9 79 5 NUMERIC 2 O O O SALES_M0NTH

10 84 5 NUMERIC 2 O O O SALES YEAR

II

89 4 NUMERIC 2 O O O PR0FIT_YEAR

12 93 4 NUMERIC 2 O O O LIST_PRICE

13 97 4 NUMERIC 2 O O O WH0LESALE_PRICE

14 101 4 NUMERIC 2 O O O AVG_C0ST

INDEX

l:

FIELD SEGMENTS: <1> <2> INDEX 2: FIELD SEGMENTS: . <3>

INDEX 3: FIELD SEGMENTS: <4> <0>

The

first

field "VENDOR NUMBER" RELATES to the record number

(field

zero) of the vendor

file

(#21). This is all that's required to RELATE

the inventory

file

to the vendor

file

and

it

essentlaily makes the vendor

file

a logical extension of the inventory

file.

The INVENTORY

file

has THREE indexes. The

first

index is by vendor number (field one) AND vendor part id (field two). This combining of

fields to make one index is called a multi-segment index. Since

record number is NOT appended to this index, two parts Cáñft have the same vendor AND part number, which would be a duplicate record.

Index TWO is on field 39 or YOUR PART ID, a1lowing the same part to be known by two different part numbers, yours and the vendoMs. Could two parts have the same part number?

If

notp how could you allow that

if

you wanted? Answer: No, two parts could not have the same number, but

if

they coulcb the circumstance could

still

be dealt with

effectively by appending field ZERO (the record number) to the indem

rendering the composite index entry unique despite the duplication. Index THREE allows access by DESCRIPTION. Notice the "MAIN INDEX" column of the

file

definition. The main index is the number of the

C-84 SAMPLE APPLICATIONS DataFlex 2.0 User's Manual

index that will be used when you FIND by that

field.

In this

file

there are no fields that are used in more than one index, but where

there are9 the main index becomes important.

THE INVENTORY ENTER CONFIGURATION: (some lines are deleted from the image area to conserve space) IFORM

DATA ACCESS CORPORATION INVENTORY MASTER FILE

VENDOR NUMBER: <

_

.> NAME: < >

VENDOR PART ID:<

'

YOUR PART ID: < > DESCRIPTI0N: <

'

STOCK QUANTITY: . MINIMUM QUANTITY: _. REORDER QUANTITY: . QTY ON ORDER: SALES/MONTH: $

._

SALES/YEAR: $

._

PROFIT/YEAR: $

._

LIST PRICE: $

._

WHOLESALE PRICE: S

._

AVERAGE COST: $

._

STOCK VALUE: $

._

l*

//

This enter configuration is a

little

more sophisticated since

it

deals

//

with two

files.

The inventory

file

RELATES to the vendor

file.

OPEN INVT

//

All

files

must be OPENED before use. OPEN VENDOR

//

The order of opening the

file

Is

//

not important.

ENTER INVT VENDOR

//

ENTER

will

maintain both INVT and VENDOR.

//

Since INVT relates TO VENDOR

it

MUST be

// first

on the ENTER line.

//

INVT is the main

file.

AUTOPAGE FORM

//

Set up to automatically assign windows.

//

These fields use the AUTOPAGE option--the windows are automatically

//

assigned to the FORM page.

ENTRY VENDOR.RECNUM {AUTOFIND}

//

Translation, do data entry on the record number of the vendor

file.

//

Automatically try to find the vendor by number.

//

Note that the element of the related TO

file

is used here

//

and automatically PUT to the VENDOR field of the INVT ff1e.

//

The related TO element should always be used in a case like this. (This configuration is continued on the next page.)

DataF1ex 2.0 User's Manual SAMPLE APPLICATIONS C-85 ————— ENTRY VENDOR.VENDOR {SKIPF0UND,FINDRECL}

//

Translation, Do data entry on the vendor name of the vendor

file

//

Skip this entry

If

a record has already been found and REQUIRE

//

that a vendor be found to continue.

ENTRY INVT.VEND0R_PART_ID {SKIPF0UND,RETAIN}

//

Translation, Do data entry on the vendor part id of the inventory

// file.

Skip this

Documento similar