Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Computer by using a (DBMS) data base management system software than in Computer
Terminology. This file is called data base.
(1)Menu bar
(2)Menu Pad
(3)Popup menu
(4)Menu option
Command Window:
The Window at the Command window which is
used to enter the fox-pro Command to perform Several operation in Visual foxpro, the
Command Window is automatically opened.
(Note:- That Command Window is used only for entering the commander where as the
another part of the Screen is used for displaying the result. Results are not display in the
Command window that window is called programme window.
1. CREATE Command
This is Used to Create a data base file.
Syntax :- Create DBF File name
After the using this Command the data base structure window
appear In this window we specify the number of fields and their name and their size
And their type.
The name of field may be up to character long. It doesn’t allow any mark
(1~) underscore (-) Can be use for this purpose. In structure of data base we can input the
record into the date base file.
TABLE DESIGNER
NAME
The name specify the name of the field, field name may be consist of
letter, number and underscore character but the name of field must be started with an
alphabet, field can be up to 10 character long.
(Note :- Space and other marks are not allow in a field name)
TYPE
Type specify the data type that the field can store. A field type can be 1
to 13 types.
Type of data base are-
CHARACTER
Character is the most Common data type in table. Character
field store 1 to 254 alphabet, numeric character such as leter, number symbol, space,
character is the kdefault field type and it is not used for calculation.
Numeric
Numeric field is used to store numbers with or without decimal
place, number can be upto 20 digits In length.
Float
Float type of field can have a width upto 20 digits, including
On optional +,- and (decimal). This field is used for scientific and static Calculation float
type of field is used in business Calculation.
INTEGER
The integer type is use for non decimal numeric value. In the table the integer field type
is stored or a 4 byte binary value so it require less memory than other numeric data type.
DATE
Date field is stored in America Format (MM/DD/YY). The Visual
foxpro automatically show the standard width for the 8 character including the slash (1).
DATE/TIME
Date/time fields contain Combination of the data and time. The
value is stored in the format of YY/MM/dd/hh/mm/ss.
Double
Double type of field allow you to store data that require a higher degree of
precision. This is most use in scientific and engineering application.
(Note :- The double data type holds numeric data but it does calculate with
For more accuracy then the numeric data type.
LOGICAL
Logical field is a single char or false which represiting a true
representing ‘True’ or ‘F’ and ‘n’ Represent ‘False’.
MEMO
Memo field is also type of black of text unlink a character field.
Visual foxpro, create a specify ‘FPT’ file ‘FPT’ text memo field are limited only
By the available space on hard disk. We cannot compare this field to another
Field.
CURRENCY
This field is used to store money value. Its contents are accurate of
four decimal place.
GENERAL
The most Common use of which store OLE (object linking and
embbeding) whose size is limited only by available memory. In this type we can Insert
picture.
111. WIDTH
Memory 1 to 20 by
Tes
in table.
Float → INT./float →
5. INDEX
A table Contains records in the order that they are add to the record
order instead of changing the physical record order instead of changing the physical order
instead of changing the physical order visual fox-pro used a recnd file
Called on index file that is present the records to us in a different the records to us in a
different order. Index specify a regular index on the field in any order.
6. Null
.
Null column, when check is used to define a field that Can accept null
Value. (10).
MODIFY A TABLE
We can modify the structure throught the menu by selecting
the table designer form. The view menu or from the window menu
Selected the data session. The dialogue box is display and click on properties
Box is display and click on propertier buton. It again display a working area dialogue
box now choose modify button with modify structure. We the structure
Through the menu by selecting the table designer form. The view menu or form
the view window menu selected the data session. The dialogue for is display and
click on properties button. It again display a working area dialogue box now choose
modify button with modify structure we can add or remove field and change widh or data
type.
In other way we can also modify structure by the command
window for this purpose we can use modify structure command before using this
Command it is to the noted that the data base file is must be open.
Syntex → :- Modify structure
Which we want modify the structure of data base or table. Modi Stru command creates a
back up file.
Click on file menu and choose open to access the open dialogue box.
Select type of file and select the table for displaying.
(note :- The table file have the extension .dbf).
The desire table is found click it and select the file name and click ‘or’ button
to open the selected table. The status for display the name of the table that you
have open.
By using Command window
The use command can be used for this purpose with
following format :
Syn :- USE info ←
A status for is that which display the file name which open
Currently and record status that is total number of record of the current file.
Syn :- APPEND ←
Append command automatically insert a blanbk record at the end of
the file after inwrting all the records and press the ‘ctrl+w’ to exit and save it.
List
This command display the all records of the data base file along with their
record numbers.
Syn :- List ←
There are several options we can use widh the list command
When we use this command foxpro also display the result on the screen by default.
If we want that it doesn’t display the result on the screen during
Printing than for this purpose we can use a option “No-CONSOLE” with list
Command.
Syn:- List to printer No CONSOLE ←
(II) DISPLAY
The display command is used to display the current record of the data
base file. The display command is different from list command because list command
Display all records of the file and display command displayed only current record.
Syn :- Display ← (When we have a leye amount of records in D.B.F than
display show them page-wise)
Scope
Scope specify the criteria about the number of records scope mainly refers to
the number of records that visual fox-pro search for performing a command, there are 4
type of scope. :
All
Rest
This work on the record being with the current record and counting
Until the last record in the file.
Syn :- Display Rest <Rec No.> ←
There works are similar and use for editing the records in DBF.
There command can be applied on all the fields or specified fields of the DBF. If
We want to apply the command with the specify field than we can use field option
With field list.
Syn :- edit fields <field list> ←
Displaying specific fields in the Browse Window to display the specific field in the
Browse windows we can use the fields option with the field list. By using this option we
can also arrange the order of the fields in the ‘Browse window’.
Syn :- Browse fields <field list>
Reacall
This command is used to re call or re cover the records that are Logically
delete in the dbf. That is the record which are deleted by the ‘delete’ command. They
can be recover again for future use in dbf.
Syn :- Recall (scope) for <condition> ←
PACK
This command is used to remove all records that are logically delete that is
used to remove the logically deleted records physically in the dbf . It is to be noted that
no condition are use with the pack command.
Syn :- PACK ←
ZAP
It removes all records from the current dbf. This is equal to delete pack
command or delete all. Zap command is much faster than delete and pack command.
Syn :- ZAP ←
( Notes) Once the records zap can’t be recover only data base structure remaining).
For Clause
This is used to specify a condition. It is used to retrieve the record a critarea
is specified with this clause on which the given command will be apply. The ‘For’ clause
can be use with with several types of command like display. List, locate, replace, delete
etc.
Syn :- Command (scope) for <condition> ←
Operators
An operator in Visual fox-pro specifies an operation to be perform on
operands to give a value. An uprand is depend on an operator acts. Operators that works
on two operands are called.
Binary operators:
Such as ‘+-*/ etc.
The operator that work on one value are called “Unary Operators”.
Arithmetics Operators
These operators are used to perform Arithmatic operators.
Artihmatic operators are used to do “Add; sub” etc in numerical type of data. These are:
Operation Symbol
Add +
Sub -
Multiple *
Div. /
Modules %
Exponensions or **
Relational operators
(Note) “$” and “= =” operator are available only for character type.
Logical operators
It used when m than one condition has to be specify at the same
command line. There are three types of Logical computers.
And
It is called logical operators. This operators apply that every condition is
joined by an ‘and’ operators its true than the side action take place so we say.
T + F = F
F + T = F
F + F = F
Or
F + T = T
T + T = T
F + F = F
(C) Not
It is called logical ‘not’ operators. The ‘Not’ logical operators is useful when
you need to list records not matching with condition that its called ‘True’, if the given
condition is false that only than the side action take place we can use the ‘not’ operator
before conditional expression to reverse the meaning of the expression.
Example :- List for not class to
Sort
Sorting means grouping records in particular order say ascending or descending
order base on key field of the records.
Sorting helps us in local required records such as name of sub seriber. The
different user of table may be need record in different frequency. The organization of the
table record in some local order alphabetically, numerically, character wise. It’s two
purpose.
Visual FoxPro would be able to search through the fusel of records more quickly.
(Note :- Every sorted file require disk space to the original table been sorted as it
creats a deeplicate copy of the original table.)
Sorting a table
Visual FoxPro create a new table using the sort command and stores the
sorted records.
Syn :- Sort to <file name> on <field name> →
The option A specify an ascending order for the field name
The option /D specify a descending order.
The option /e is specify the ignoring case.
(Note) :- Uppper case and lowercase letter are created equally in the sorting order
othecwise uppercase letter comes earlier to lowercase letter.)
(note :- if we do not Use (A,or/D or/ visual FoxPro assume that accending order which
is default option an also noted that we can’t sort me fields)
Socting creates a repeate file equal to the size of orzginal file and therefore waste the disk
space.
If we need several sort orders for a large table we can’t quickly run out of disk space.
Sorting is a slow process and consume a lot of time when we are sorting very large table.
If records are adds in the sorted table this table need to sorted again to maintain the
sorted order.
We can overcome these problems by using “Index” command in
place of sort command. Because indexing is much faster and index retriere data from a
table in order.
INDEX
↓ ↓
Single Index file Command
(.Idx) (.cdx)
↓ ↓
↓ ↓ ↓
↓
Compact Non compact Structure Non
Structure
Types of Index
Visual FoxPro provide two types of Index file :-
(Note :- Non structural or independent compound index file neither have the same
primary name as a table file has nor they would open automatically when a table fill is
open.)
“Index Commands”
A data base can be open with more than one index however the
order in which record would appear in control only by the single index for an index to
control be active. We can use the several command for this purpose:-
Set index to :
By using this command we can activate any of the indexes in another
words we may say that set index to command is use to open the single index file or
“cdx”.
Syn :- Set index to <file name> ←
Step 1. Select the form wizard option which creates you form to a single table click OK.
First of all form wizard is displayed prompting to select the table on which you want.
Step 2. where we click on next button then we are promoted to specify the style of form
the choice are :-
standard
chired
shaded
Boxes
Embassed
(Notes) Ascending radio button is selected by default and click on ‘Next’ button to
go to next.
Step 4. Finish.
Buttons Discriptions
Erase command
You may also use the delete command for delete the records we
can use errors command when need of erare the file from disk.
Syn :- Erase <file name
Date
The date functions reads the computer system date then supply a date type
value representing it. The display will be in the default format MM/DD/YY or in some
other as specified by the set date command.
Syn :- Date < >
CDOW functions :
This character day of the week function converts the data
expression into day of the week expressed in text form.
Syn :- CDOW (date )
CMONTH
The character month of year function converts the data exp. Into the
month of the year expressed as a name.
Syn :- CMONTH (date)
C to D ( ):
The character to data function convert the data expressed as a text string
into a standard data type expression.
Syn :- C to D (char – exp)
Day ( ) :
The day of month function converts the data expression into the day of the
month.
DMY ( )
This function returns a date exp in European date/month/year format for the
given date. It always returns the month with a full spelling.
Syn :- DMY <Date – exp)
D to C ( )
This function return achar string containing the date co-representing to a
date expression.
Syn :- D to C (Dae Exp)
D to SU :-
This functions returns an eight digit char string in the format
YYYY/MM/WW for a given date exp.
Syn : D to S (date exp.) , no of month)
MONTHS
The month functions converts date exp into the month of the year as a
number.
Syn : MONTH (Date Exp.)
R TO d ( )
This function return the degree In an angel with the given N number of
radions.
Syn :- R to D (radions)
SIGN ( )
This function return a numeric value of ‘1’ -1 or ‘0’ depending on sign of a
numeric exp. If the numeric argument is positive the function returns ‘t’. If the numeric
exp is negative it returns “ -1. If the num argument is ‘0’ it returns ‘0’.
Syn :- SIN (num)
SQRT ( )
This is the square root operator.
Syn : SQRT (num)
16=4
SIN ( )
This function return the sin of num. orgument.
Syn :- SIN (num)
TAN ( )
This function returns the tangent of a num argument.
Syn :- TAN (num)
VAL ( )
This function return a num. value co. respondes character value of the digits
contain in the character string exp.
Syn :- VAL (char. Exp.)
(15, pratap nagar)
LOGICAL FUNCTION :
Delected
This function returns the detestation status of one or more records. It returns
logical value such as true ‘T’ or false ‘F’. The deleted function supported on optional
argument which indicate the work area. If you omit the argument it return the status for
the currently selected work area.
Syn :- Delected (alias)
File
This function is used to test for the existence of a file. You must accept specify any
extension in the file name.
Syn :- file (file name)
FOUND
This function returns a logical true value when it find the object of the find,
seek, locate or continue commands. If it doesnot find the object. It returns a logical
“false” ‘f’.
Syn : found (alias)
IIF ( )
You can use this function in place of an if, else and if exp. This function checks
the logical exp. For a logical true or false value if it is true it returns the ‘T’ exp. If it is
false it returns the ‘F’ exp.
Syn : IIF (logical exp, true exp, false exp)
Is Alpha ( )
If the arguments begins with an alphabetical character this function returns a
logical ‘T’.
Syn :- IS ALPHA (EXP)
Is coror ( )
If you are using a color display this function returns a logical true value.
Syn :- Is color (exp.)
Is Lower
This function returns a logical true value if the first character is an exp. A
lower case alphabet character.
Syn :- IS lower (exp)
Is Upper :
This function return a logical true value if the first character is an exp. A lower
case alphabate character.
Syn :- Is Upper (exp)
SEEK
This function returns a true value if a seek was successful.
Syn :- SEK (Exp.)
STRING FUNCTIONS
INTRODUCTION
A string is a series of character and space stored as a single veriable
or array of veriable string type are either numeric, character, numbers, string function are
tools that control the way you can store or display character in the string they also eat.
You find some character about string. The string Function convert numbers to
characters, char to numbers, deci. To num to whole number. The gernal form of a string
function is the function identify command or symbol followed by the Exp in parathesis.
Function (exp)
The exp usually contains the value of a field or memory veriable. It
can also contain a numeric or character string that you enter directly from the keyboard.
All Trim ( )
To remove the loading and blanks from character exp.
Syn :- All trim (char . string)
(ii) ASC ( )
It returns the ASCII code equalent of the left most character is a
character exp.
Syn :- ASC (char – string)
AT ( )
The function search for source exp. In a target exp. And returns the
position where the source exp: was found.
Syn :- AT (source exp, target exp., string)
Between ( )
The function determine if an exp lies between two other exp. It return
a true value if the exp is greater than or equal to the lover limit and less than or equal to
the upper limit.
Syn :- BETWEEN (Source exp, lover limit, upper limit)
CHR
This function return the character whose ASCII code is the same as the value of a
numeric exp.
Syn :- CHR (num :-exp)
Ex. CHR (65)
DIFFERENCE
This function returns a relative difference between two character exp.
Syn : Difference (string 1, string2)
LEFT
This function return a specify number of character.
Syn :- Left (string, no of char)
LEN ( )
This functions returns the length of a char. Exp.
Syn :- LEN (char –exp)
Ex. LEN (“info”)
LIKE ( )
This function compares two char exp and returns a true or false value if the exp
is same return true else false.
Syn :- Like (string exp 1, string exp2)
LOWER
This function return a specify char exp in lower case.
Syn : Lower (string exp.)
PROPER
This function returns a char. Exp in capitalize as appropriate for proper name.
Syn :- proper (string)
REPLICATE
This function returns a char string resulting form repeting a char exp. To
specified number of times.
Syn :- replicate (char- string, no of times)
RIGHT
This function returns a right most position of a char string or memory variable.
Syn : right (string, no of char, times)
SPACE
This function returns a char string composed of number of specified blanks.
Syn :- Space (numeric)
Ex. Store space (10) to blank
STR
This function convert a numeric exp, to a char exp.
Syn :- Str (num. exp, length of char string, length of decimal)
STUFF
This function returns a specify num. of char from a given exp.
Sym :- STUFF (exp, string position, no of char)
SUB STR ( )
This function return a specified num of char from a gives exp.
Syn :- SUBSTAR ( Exp. Starting position, no of char.)
Ex. SUBSTAR ( “information system”, 1,4) info
RTRJMC
Remove blanks (promote right side in string)
D TO C
The function convert dark evp to char exp.
TRANSFORM
This function allows you to format char string and numeric variable
without the use of @.... say” command.
Syn:- Transform (exp. Picture)
TRIM
The function trim trailing blanks form an exp
Syn :- TRIM (string)
TRIM (info)
TYPE
Returns single char describe the data type of any exp.
Value Discription
C Char exp.
N Numeric Exp.
D Date
L Logic
M Memo
UPPER ( )
This function return the specified exp in upper case.
Syn :- Upper (string)
C TO D
This function convert a char.
MEMORY VARIABLE
The date item store in RAM as memory variable. The
memory veriable are the temporary storage. You can need to assign a name for the
memory variable which can store any kind of date at a time. A memory variable follow
the some rules used for naming a field in data base file that is a memory variable can be
upto to character long. It should been which a letter and the following character can be
letter, number for the under score character. You can’t use space or function marks in
memory variable name.
Visual FoxPro automatically create or provide a file variable letter that are
called system variable which always been with the under score character, the second type
of the variable are called user define variable that are created by user.
Store 1000 to B
A character type memory variable inclose data with single or double contation mark (“
or”) square brackets ({ }). The data value in close with curly brackets.
Ex. Store (info sys) to name
When you type the store command V.F display the value store in variable on the screen.
If you wish you can stop redisplay the data type by typing. You can use “set talk off”
command in the command window before entering the variable the format of assignment
statement.”
Syn :- Variable Name = <exp>
Ex. A= 100
(char) name = “info sys”.
Viewing contents of Memory Variable
V.F display memory command for viewing
the contents of memory variables. This command display the variable name, type and
contents of variable. It also display the number of variable that have define and memory
bytes use in their variables and number of variables.
C = Character
N = Numeric
L = Logical
D = Date
A = Array
Character Variables
It stores string of character which can be letters, number, or
combination of both.
Numeric
There are used to store numeric value such as whole number or decimal
place.
Date
Date Variable store date value return in MM/DD/YY format.
Logical
If contain Logical value T (True) or Y (yes)
(Note :- You can list memory command in place of “Display” memory command” the
work of “Display memory command” and list memory command are similar exceptthat
“display memory command”)
The space command creates an empty character type memory variable of a specify
length.
A = space (20)
A = “info”
It create character type variable that create 20 space in the empty character variable
are normally used in foxpro programmme to display a blank area for data entry. It can be
upto 65,504 char long for the standard version of foxpro.
To save the memory variable V.F provide “save command” by using this
command you can save all over specified memory variable in specified memory variable
file.
Syn :- Save to <memory variable bame>
Ex. Save to info
When we use the above command all the variable will save in “info memory
variable file.If you like you can specify a different extension name and path.
Release All
Clear Memory
(Note) while loading memory variable from memory file the current variable are clear.
FLOWCHART
A flowchart is a goaphical representation of the sequence of operation in
an information system or programme flowcharts show the sequerte of instructions in a
single programme a subrutier flowchart uses boxes of different shapes to be not different
types of instructions. The actual instructions are return with in these boxes using clear
and concise statement. These boxes are connected by solid lines having arrow marks to
indicate the flow of operation that is the exact sequence in which the instruction are to be
executed.
ALGORITHM:
Logic of programme return in english understandable by a user.
Symbol description
Start/Stop
Terminal use for termination or start or end of
programme
Input/output
Indicate input/ output function.
↑
←→
↓ It is uses for connecting boxes
Alogothm : Start
Read/Input A,B
Sum = A+B
Print/output. Sum
End.
Flowchart :-
↓
Q Draw a flow chart with algo. User is “valid for vote or not”
Algorithm : start
FLOWCHART
PROGRAMMING
Accept Command :
It is used for get character values from the user and store it in a
character variable
Syn :- Accept “message” to variable name
Ex. Accept “enter by name” to name
Input command
This command is similar to accept command but it is used to get
numeric values from the user. It show the prompt from the user and than accept numbers
from the user through the keyboard.
Syn ; Input “message” to variable name
Ex. Input “enter salary” to salary
@ command
This command is one of the most powerful command that can be used for
several purpose.
@--- GET
A field or memory variable name is specified with “@ Get” command this
command display the current value of the get variable.
The “read” command activate the get variable and you can enter the new data in
variable or field.
Syn :- @ <standing position> say <exp> get no.
Ex. @ 10, 5 say “enter name” get name
@---Edit
If you want to enter or edit in a long character field or variable or memo
field.
This command is create a rectangle text editing reason of a specified on the screen
for editing the size of the text editing reason is specified by the size clause.
You can specified the height and width of rectangle or window with the “size”
clause.
Syn ;- @ <starting position> edit variable name size <position>
Programme
Sum of two values
Clear
Store 0 to a
? “ It is not one”
End of
? “it is one”
Else
If (a =2)
?” it is two”
Else
If (a=3)
?” It is three”
Case a =1
? It is one”
Case a =2
?” It is two
Otherwise
?” it is entry”
End case
Statement
Enddo
Read
Clear all
Enddo
SKIP
This command used to send the pointer to the next field is skip -1 for back.
LOOPING
Repeating a step on a number of steps of a programme for a specified number
of line or until a condition is not is known as looping. Loop is logic which used when
one or more instruction may be executed several times depending on a condition. V.F
provides three loop command.
Do while----- Enddo :
Do while loop is most important command in V.F language
when the programme reach this Do while command it checks to confirm if the logic exp.
Evaluated is true if it does the programme executes the command that flow when it gets
end do it loops back. It checks the logical exp. For the new situation. Do while checks
again to sec if the logic exp still evaluated as true if it do it again execute the same
command when the programme discovered the logical exp. Doesn’t evaluates a true it
shop and executes the can end do.
Syn : Do while
Use AA dbf
Append Blank
Replace Roll No with R
Replace name with N
@ 14,12 say “enter y for yes or n for not: get ans read
Enddo use.
For-----------------End for
It executes a set of statements within a loop for a
specified number of times. You can use a memory variable as a counter to determine
many time visual foxpro executes the statement inside the loop.
Syn : For <memory variable> = <exp1> to <exp2>
Ex. : for c= 1 to 10
?C
End for
The for-----end for setup a repeatire loop which repeat a set of statement a specified
number of lines when the for statement is 1st encounter V.F. creates a memory variable
and assign it the initial value exp. 1st than it executes then Programme until reach and
end for, than increment the value of memory variable by one and loop back to the for
statements to check again whether memory variable is equal to exp. 2.
By default for-----end for incrime the counter by can. We can use the optional
clause` “step” to increment the memory variable by a value.
Syn :- For <memory variable> >(exp1) to
<exp.> step <value>
Scan -------------end scaro :
It is another very useful structure for prog in V.F as can loop
act like a do while loop. It read a table file sequencly.
Syn : Scan (scope) (condition) (for/while condition)
Statement 1
Statement 2
End scan
For example
Set talk off
Clear
Use ashu. Dbf
Scan
For name= “Ayushi”
? name
End scan
example
Set talk off
Clear
Use ashu. Dbf
While salasy > 4000
?name
? Add
In scan end scan we not need include skip command V.F automatically change the
record printer to the next record.
Such function are called user define function user define function are written a
value. There function should be define by the use. So that such function can perform the
task as desired by the user.
PROCESSING
There are various method of processing of data depending on the type
of data and the time available for processing and getting the results.
MODES of processing :
Batch processing
Online processing
Real time processing
Batch Processing
It is one of the oddest method of running programme that is still
being employed by many data processing centers for processing their job in batch
processing mode each user prepare his programme online and submittes it to these
computer. A Computer operator collect programme which have been stored on steps
when a batch of programme into the computer at one time where they are executed one
after another.
Batch pro is also known as serial sequencial offline of processing.
Defination of “programme”
Programme is a collection of instruction that control the
computer what to do. A programme is called software, which is a programming language
and it is converted into computer machine language by software which called assembless
and compliters.
instruction
Buffers
Constants
Instruction
There are the direction that the computer will follow and a particular sequer of
instructions is called the prog logic.
Buffer
These are reserved space in the computer memory that will accept and hold the
data while it is being processed.
Constant
These are fixed value with in the prog that are used for comparing.
Read ability
Aqrtability
Mentainability
Read Ability
Two way decision statement are based on if----end if--- else--- end if…
Two way decision statement are based on if--- end if, if--- else--- end if
Loops are not custom design with the use of the go to statement. But are base do a use of
for—end for, do while--- enddo.
Or
Top Down Design
It is the techniques of breaking problem down into the mlases task tdo
be perform each of these tasks is broken down, into separate sub task is broken down,
into separate sub task. And soon each sub task is sufficiently and simple to be written as
a self contain model or procesure.
Bottom up design
When a programme faced with a large and complex problem
then we use bottom up design approach because it may be easy to attack parts of
problem indivirually and taking easier accepts and gaining and tacked the more
difficult task and finally to try and bold them all together to form the complete
solution this is called the bottom up appricate.
Programme document
Document of a software system involve collecting,
organiging, sorting and maintaining and string complete historical record of program
and other documents used or prepared called programme documentation.
………….. After successfully completing the prog we must insure that over dec is
complete and it is in a finished this includes in technical document. The programmer
whose working with programmer and modifying the completed prog called user level
documentation.
ARRAY :
To create an Array variable you can use the following two commands.
(i) Declare
(ii) Dimension
Declare
Syn :- Declare <array name> <size/subcribe>
(iii) Dimensional
Syn : Trimension <array name> <size/sub. Script>
You can identify the element in the array by the use of subscript. The
subscript is an array always start with one (1)
e(Note ; If you toy to address an element whose value is negative or (0) zero
size of array than you get error message sub script out of bounds.)
Display Status
If you want to find out data base file that are open
in their work area use the display status command.
This command display status command of the open
database and the cor--- resp ending work area.
Syn : Display status
“Concept of files”
File
A file is collection of related data that is treated as a single unit.
Organization name C 30
Organization add C 50
Budg, Expenditure N 15
Capital A/C N 15
Assets N 15
It is very important that a transaction file should contain records with the
field and their name in the same order and size and type as that of the master file.
The transaction file may contain the following fields.
Sales N 15
Stock a/c N 15
Assets a/c N 15
Ex. Select 1
Use ayushi
Index on code to c
Select 2
Use ASHI
Index on code to c2
Select 1
Use ASHI
Index on code to (1
Select 3
Use ASHU
Index on code to (2
Select 1
Set relation to code into Ashi, code into ASHU
AYUSHI dbf
code Name Amount
code Address salary
code phone Description
Ex.
Select 1
Use Ayushi
Index on code to C
Select 2
Use ASHI
Index on code to c1
Select
Update on code from ASHU replace amount with ASHI Salary.
On using the update commad V.F automatically update all records from required field on
specified field.
The join command join two database file to create a new database file . You
can include specified or all fields in the new database files.
Syn ; join with <child> to <new file> for <common filed>= <child field
name>
Ex. Select
Use master
Index on code to c
Select 2
Use transaction
Index on code to c1
Select
Join with 2 to ashi for code = 2 amount
(OR)
Join with 2 to ashi for code= fields name, add, 2 amount
You can copy all or selected records from a database file in use to create another
database files. Before using this command the fource file must be open.
Syn ; Use <fource file>
Copy to <target file>
This copy command creates a new <target fru> dbf and copy all the record from
the fource file.
If you want to delete the copied file than use set delected on command before
using “copy to”command” by default it is dbf.
Coping structure of a dbf
The “copy structure” command allows you to copy the complete or
partial to the structure of the data base in use.
Syn ; Ise <dbf name>
Copy structure to <target file>
If you want to copy the structure to partial. You can use fields clauses with
copy structure command.
Syn : Copy structure field <field list> to <target file>
Note : Before using the copy structure command you need to open the database
file.
Squencial file:
A squencial file is one to which the record are stored in some
sequence or order.
Asequencial file organization is best suited for mortar file on which batch
processing is done.
“Relative file” :
A relative file doesn’t use on index to access record
randomly. The key field of the each record is used to calculate the record
relative location in the file stored on the disk.
”Indexed file” :
An index file is one that has an index for looking up location
of records on a disk. The index on a disk is similar to a book index which has
unique subject and their cor responding page number.
Disadvantage
1. Relatively on expensive medium is used.
2. Not well suited for batch processing
(1) Seek and find are both method for fast searching of data base. They
matching value as specified along with the command.
(2) Find and seek both move the record printer to the record in the table
whose index key match the char. Exp.
(3) They reqwred the selected table to be index.
(4) Find is used to search char. Exp and seek can be used for numeric, char
and even date exp.
A part from the built in library function of visual foxpro. User define functions should be
codified by the user. So that such function can perform the task as desired by the user.
Syn : Function <function name>
Command
Statements
Returns [Expression]
End function.
Select Command
The “select” clause is use for the field list and “from” clause specifies the DBF
which the field are to be selected.
Syn : Select <field list> from (.DBF)
We use function with the select command. These function are sum average, max min,
count.
Syn : Select sum (field name) to total from <DBF)
Object linking and embedding
Object linking and embedding is a method by which an
object create in another application OLE is way of transferring and sharing file among
application by passing information created in one application patkoger to another
application polikager.
LINKING
Linking is the term use to describe the establishment of a connection
between the source and destination document. A linking object maintain connection
between the two document. When the indexation change in the source document the
change are reflected in the destination document automatically.
Embedding
Embedding is the term use to describe the insertation of a copy of an
object from an application to another to another application.
Sequential file
A sequential file is one in which the record are stored in jome sequence or
order.
A sequential file organization is best suited for master files on which batch
processing is done.
Relative file
A relative file doesn’t use an index to access record ranabdomly. The key field of the
each record is used to calculate the records relative location in the file stored on the
disk.
Indexed file
An index file is one that has an index for looking up location of records on a disk.
The index on a disk is similar to a book index which has unique subjects and their
corresponding page number.
Disadvantage
1. Relatively an expensive medium is used.
2. Not well suited for batch processing.
Queries
Creating a Query
Using query wizard we can display data in a table in what ever
way it is most useful for us. Query control the following items:
1. Click file menu and choose new or click on new on standard tool bar.
2. Select the query radio button.
Query designer
In visual FoxPro we create queries in a special window called the queries designer. The
query designer regrs to the way that V.F.P allows us to get information from table queries
like tables and indexed are saved aspiles these query file are small p;rogramme by
running the query programs.
You can also start a new Query from the command window by typing create
query and pressing enter key.
Syn : Create Query<Query name>
If query dsesigner isn’t shown than choose view menu and select tool bar option when
toolbar dialogue box is displayed click the Query designer and click on O.K.
Selecting fields to include in the Query click on Add button include the fields in
the selected out put.
Query wizard :
We can start query wizard in following ways.
1.To start a Query wizard open the tool menu and select wizards and select Query
option. It display a wizard selection dialogue box.
2Choose “Query” wizard and click on ‘OK” button.
3. Open the new dialogue box clicking on the “new” toolbar button.
4. Add the selected fields by click on “Add” button & click on “next button”.
5. Filter records ex can reduce the number of records by creating expressions that
would filtes records from the table. You may create two expression and connect
them with and or or click on next button.
6. To display the sort order dialogue box here we can select up to fields or and index
tag to dsetermine the order in which our query result will be sort select accending
to sort the result in accending order or decending to sort the result in desencing
order click on next button.
7. Than display step-4 (a) limit records here ex can limit the number of records in
the view, based on a present of records . Click on next button to display the finish
pane select the Save query button to save the Query and than Click “finish” button
Note :
When using the find command an index file is open first “AND”you don’t
have to put around a character string with the find command.
Query skps
Introduction
It is very important to plan the accounting system carefully, since it must
satisfy an audites, manager, the book kepper, the company share holder, creditors and
owners.
Function to fas
Various accounting section FAS such as-
(1) Accounts Receivable System (ACRES)
(2) Account Payable System(ACPAYS)
(3) Inventory management System (INMAS)
(4) Payroll Recording System (PAYS)
1.ACRES:
This system passer entry recording of sale, cash receipts and other
adjustment.
2.ACPAYS
Create General entry to recording invoices and credits for goods
and service and other payments.
3. INMAS :
In general entry for the cort of goods sold and purchase and other
adjustment to the inventory account.
4.PAYS :
Entry are for payroll:
Transaction file :
(1) Voucher transaction file
Voucher (Transaction file contain field)
Like-
(a) Voucher Type
(b) Voucher Number
(c) Voucher date
(d) General ledger code
(e) Subbridiary ledger code
(f) Narration
(g) Debit on credit flag
(h) Amount
(I)Reference document number
(j)Reference document date
(k)Due date
(l)Bank code (for bank voucher only)
(M) Bank code (for bank voucher only)
(n) cheque number
(o) cost center code.
“Inventory Controll”:
Kinds of Inventory
Most product go through several stage until the final product is
created the raw material go through various production process. The output of each stage
of processing become the input to the next stage and so on. This is continue till the
product is finally created.
Demand
Refers to the quantity of finished goods that can be sold during fixed
period of time.
When an order is placed, it may take some time, before it is actually executed. The
actual time taken to fulfill the order is called lead time.
Note Ordering at the right time minimize storage and other related cost.
(1) EOQ