E-business and The Future

Download Report

Transcript E-business and The Future

Progress
Administration
Dec,12, 2011
SoftSpeed Consultant Ltd.
Add Month 2000
Agenda日程安排

1. Progress Background (Progress 环境)
 Environment variables (环境变量)
 Database Structure
(数据库结构)

2. Database Management (数据库管理)
 Backup
 Delete/Archive Load/Dump

(备份)
(删除/归档 装载/下载)
3. Administration Tools
 Utility Tools (实用管理工具)

4. General Administration
 Compile (编译)
 MFG/PRO Script Create (生成连接脚本)
 5. Progress common statement (Progress 语法)
www.softspeed.com.hk
1. Progress background
System Administration Tasks(系统管理的任务)
Task 任务
Frequency 实施频率
--------------------------------------------- ------------------------------------------• System Backup 系统备份
Daily 每天
• Client setup
客户端设定
Setup for New User
• Performance Monitoring 性能监视Weekly or as needed
• Delete/Archive 数据删除/归档
After financial close
• Dump/Load
下载/装载
After delete/Archive
• Compile source file 编译
As need
• Setup Server
设定服务器
As need
www.softspeed.com.hk
1. Progress background

Progress Environment Variables 系统变量
1. TERM - Specifies the type of terminal used
2. DLC - Specifies the directory where PROGRESS is installed
3. PATH - A list of directories to search for programs and
commands needed to execute
4. PROPATH - Specifies a list of directory paths in order lists
when running an external procedure
5. PROMSGS - Specifies the pathname of the PROGRESS
error messages file
6. PROTERMCAP - Specifies the pathname of the terminal
definition file.
www.softspeed.com.hk
1. Progress background

Main directory 主目录
/DLC – Empty DB, “Sports” DB,Default Startup Parameter
File, “PROMSGS” File, PROGRESS configure file
Progress.cfg ----- > Progress Version


Sub-Directory
子目录
/DLC/bin – Mainly executable file
_mprosrv.exe ----- > Startup Database Command
/DLC/prolang – Contain installed languages empty DB and startup file
Progress Database Architecture 数据库结构
1. Database (.db) file 数据库
Including Table , Field , Index 包含表,字段,索引
2. Before-image (.bi) file 映像文件
Roll-backward when transaction failure 数据回滚
Like buffer to store temp records.
缓冲作用
www.softspeed.com.hk
1. Progress background
3. Log file (.lg) file (日记文件)
Containing a Database event history. Startup , shutdown….
4. Lock file (.lk) file (锁定文件)
System AUTO-create when connect to database
You must delete lk file when database shutdown abnormally.
 The Parameter File : .Pf 参数文件
Connect Database / Startup Parameter. 连接数据库
E.g. : E:\DLC\bin\PROWIN32.EXE –pf (Startup MFG/PRO)
E:\QADCLI\L90CH\Training.pf –ininame (Connect DB)
E:\QADCLI\L90CH\PROGRESS.SVG (Configure Environment)
www.softspeed.com.hk
1. Progress background

Related Progress File 相关文件
1. Database Definition (.df) file 数据库结构文件
An ASCII text file .
文本文件
Dump/load form Progress Administration 来自于 下载 / 装载
2. Data file (.d) file 数据文件
ASCII text file containing database records to be dumped and load
3. The Object code (.r) file. 目标文件
4. Source code (.p) file, You can run directly 源文件
Encrypted code : Can Compile , Not for customization 加密源文件
No-Encrypted : Can Compile, Can Customization 不加密源文件
www.softspeed.com.hk
1. Progress background

Empty Database 空数据库
1. You Can load .d Data file to empty database. 装载数据文件
2. Including following empty database Mfg/Pro 空数据库
mfgempty
Source database for mfg , test, and Production
hlpempty
Source database for mfghelp.
admempty
Source database for adm

Main MFG/PRO Database
1. Production, Test, YourProductionDB
2. Copy from mfgempty and Load relative .d file
www.softspeed.com.hk
1. Progress background

Database sequence (数据内部序号)
1. System Auto-create , sequence identified a transaction系统自动生成
2. Sample: In Tr_hist , without same sequence for two transactions.

不会出现重复的事务号码
Multiple and Custom Database (客户化数据库)
1. Support 5 databases connect in the same time . (支持5个数据库)
2. You must startup the side-Database in client/server script.
(在启动数据库脚本中启动客户化数据库)
www.softspeed.com.hk
2. Database Management 数据库管理

Large Scale Data Movements 数据转移
1. Backup 备份
i) Regularly (Daily midnight ) 每天午夜进行有规律备份
ii) Highly commend full backup Procopy FromDB ToDB 完整备份
iii) Backup correspond .bi 备份相应的.bi 文件
iv) Truncate the bi file
整理bi文件
Syntax: PID\bin\_proutil.exe DB –C truncate bi
v) Shutdown Database 关闭数据库
vi) You Can Run Backup Using NT Schedule Task定时备份数据库
 Control Panel --- > Schedule Tasks --- > Add a Job
 Control Panel --- > Administration Tool -- > Services
--- > Startup Services “ Tacks Schedule”.
www.softspeed.com.hk
2. Database Management

Large Scale Data Movements
2. Delete/Archive 删除/存档
When data is no longer needed 不需要的数据
Frees space by removing records 释放,将产生数据库碎片
In MFG/PRO 5.23 Close PO Delete/Archive
5.13.23 Receive Delete/Archive
3. Dump/Load 下载 / 装载
IT will integrate the Database and Re-Index Index . 重组数据库,索引
Dump / Load Table structure And Save to .df File 结构存于.df文件
Dump / Load Table Data And Save to .d File
数据存于.d文件
<< See MFG/PRO Data Administrator >>
Data Administration -- > Admi --- > Dump/Load Data
www.softspeed.com.hk
2. Database Management
 Startup Parameters 数据库启动参数
1. Parameter List 参数清单
Option Effect
Apply
Notes
-B
Database buffer 缓冲
Server start
2000 = 8 M
-L
Lock Table 锁记录
(_mprosrv)
How many record
To be locked.
-N
#of Users
Server start
-H
Host name 主机名
NT\system32\
Drivers\etc\
Setup in file hosts
-S
Services name
服务名
NT\system32\
Drivers\etc\
Setup in file
services
-By
Bypass
停止所有访问
Server shut
(_mprshut)
Setup in file
services
www.softspeed.com.hk
2. Database Management
 Startup Parameters
1. Parameters List
Option
Effect
Apply
Notes
-cpstream
Stream code type
Server start
BIG-5,GB2312
-cpinternal
Internal code type
(_mprosrv)
-cprcodein
Server start
Sample :
E:\DLC\bin\_mprosrv.exe E:\DATABASE\Training –cpstream
GB2312 –cpinternal GB2312 -cprcodein GB2312 -cpcoll basic
-B 60000 -L 40000 -n 8 –H Softspeed -S Training90ch -N TCP
E:\DLC\bin\_mprshut.exe E:\DATABASE\Training -cpstream
GB2312 -cpinternal GB2312 -cprcodein GB2312 -cpcoll basic -by
www.softspeed.com.hk
3. Administration Tools
PROMON ---- Progress Monitor
Start PROMON by Typing
\bin\Promon DBName
1.
2.
3.
4.
5.
6.
7.
User Control 用户控制
Locking And Waiting Statistics
Block Access
Record locking table
Activity
Shared Resources
Database status
T.
L.
C.
Transactions Control
Resolve Limbo Transactions
Coordinator Information
M.
Modify Defaults
www.softspeed.com.hk
锁/等 统计
块访问
事务控制
解决出错事务
3. Administration Tools
PROMON ---- Progress Monitor
 1. User Control
Shows All/Specific users logged on to the Database. Type:
Broker, Monitor, Self-services etc.
 2. Locking and Waiting Statistics
Shows All/Specific users that are holding, Or have held,waiting records
 3. Block Access
Shows All/Specific users requests users have made , along with total requests.
The DB Reads and DB Reqst is a critical determining the –B parameter.
Type Usr Name
DB Reqst DB Read ……………………
------ ---- ---------- ----------- -------------ACC 999 TOTAL 804590
72152
www.softspeed.com.hk
3. Administration Tools
PROMON ---- Progress Monitor
 4. Record locking table
Show the exact record ID and lock Type
Usr
---12
13
14
Name Chian #
Rec-id Lock Flags
---------- -------- ------- --------- -------- ------Admin REC 123 12345 EXEC
Sam
REC 321 54321 SHR
Admin REC 132 12345 EXEC Q
 5. Activity
Show large amount of data for DB status
 6. Shared Resources
Show the setting of the current system parameters
www.softspeed.com.hk
3. Administration Tools
PROMON ---- Progress Monitor
 7. Database Status
Show physical characteristics about the database
 8. Shut Down Database
i) Disconnect a User
Selecting 1 give the result , Kill User according User Number.
ii) Unconditional Shutdown
This is a normal shutdown , Any Pending transactions are rolled backward from
the .bi file as the users are disconnected.
iii) Emergency shutdown.
It will Kill all users , can not roll-back from the .bi file. As next server startup, It
will integrate the database.
 T. Transactions Control
Show all transaction which submit to database. ------- Transaction NO
www.softspeed.com.hk
3. Administration Tools
PROMON ---- Progress Monitor
 L. Resolve Limbo Transactions (解决出错事务)
i) Abort a Limbo Transaction ----- Kill Transactions
ii) Commit a Limbo Transaction ---- Submit Transactions
 C. Coordinator Information
 M. Modify Default
www.softspeed.com.hk
3. Administration Tools
Utility Tools 实用工具
 1. Create a New Database 生产新数据库
$DLC\bin\Prodb database Name
Enter the name of the database copy from Copy Structure ONLY
 2. Copy a New Database from an existing database 复制数据库
$DLC\bin\procopy <source DB_Name> <destination DB_Name>
 3. Database Index Re-build 数据库重索引
$DLC\bin\Proutil <Database> -C idxbuild -T <Temp_dir>
i) Space required for rebuild all index is 75% of the DB size
ii) Repairs corrupted indexes in the database
iii) You must shut down database before you rebuild index
iv) You can rebuild index for specify table
www.softspeed.com.hk
3. Administration Tools
Utility Tools
 4. Display Database storage
$DLC\bin\Prostrct statistics Database_Name
i) Shutdown server
www.softspeed.com.hk
4. General Administration
Maintaining MFG/PRO Scripts and Database set 产生脚本
1. Open MFG/UTIL utility and icons are based on database sets
2. Setup Database sets[Training]
 Configure  Any Database set  Training  Setup DB
i) DB start Parameter :
 -d dmy
------- Date Format
 -yy 1920 ------- Min Year
 -p mf.p
------- Startup Program eg. RUN mf.p in progress editor
 Active
------- Yes/No
ii) Component Setup
 Physical database : Really Name for database
 logical database :
Let It BANK for production DB
 Connect Parameter:
-trig TRIGGERS
 Connect Type
:
(a) Local (b) Client/Server
 Host/Services
:
Host Name and Services Name (FOR Client/server Only)

Path :
Physical Path for DB ( FOR Local ONLY)
www.softspeed.com.hk
4. General Administration
Maintaining MFG/PRO Scripts and Database set
3. Generate Startup scripts
Scripts  Generate Startup scripts  Select Database set
www.softspeed.com.hk
4. General Administration
Compiling Programs
1.
2.
Use to compile a custom program or recompile an existing program
Create object file .r and save it to sub-directory using the first two
letters of the program name
3. This Program will be copied to language directory.
xxsosomt.p -- xxsosomt.r -- Save to xx sub-directory
File in source directory
Files listed in work file
Source Directory
Work file Name
Save New r-code
Language
www.softspeed.com.hk
------- > Compile all source program in specify directory.
------- > Compile program which list in work file.
-------- > The Source Program which locate .
-------- > The Work file Name and directory .
ONLY use for option “Files listed in WF” be selected.
-------- > Select this Option
------- > Language Code . TW CH US
System will Auto Create sub-directory CH
4. General Administration
Compiling Programs
r-code to MFG/PRO default ------- > r-code will save to MFG/PRO default directory.
R-code to flat destination dir ------- > Directly save to destination directory.
Destination Directory
-------- > Where r-code will be saved
Using The Database set
-------- > Which DB set will be used to compile
Compile Propath
-------- > The order of search source program
It must including “/ch/src”
4. Following messages will be show after you press “Compile” button.
www.softspeed.com.hk
4. General Administration
Compiling Programs
Preparing for compile... Begin Compile using: c:\temp\a.txt at:
11/03/01 12:42:17
Using Compile
PROPATH: .,E:\QADGUI~1,E:\QADGUI~1\mfguobj,e:\DLC\gui,e:\DLC,e:\DLC
\bin,E:\QADGUIFS90CH\ch\SRC
Connecting to: e:\database\mfgtrain -trig TRIGGERS
Logical Name: mfgtrain
Source directory: C:\temp\
Destination directory: c:\temp\ch
Counting number of files to compile.
Starting compile of 1 file(s).
Compile contained 0 Errors.
Resetting PROPATH and disconnecting from databases.
End Compile: 11/03/01 12:42:19
press CLOSE to exit.
www.softspeed.com.hk
5. Progress Statement
A.
Common PROGRESS Statements
A.
Define
A.
B.
C.
D.
E.
B.
Define Variables, Work Files, Buffer,etc
Example:
Define variable abc as character.
Define variable def like pt_part.
Define buffer aa for pt_mstr.
Find
A.
B.
C.
D.
E.
Find records using criteria
Error indicating and Table locking
Example:
Find first pt_mstr no-lock no-error.
Find last pt_mstr where pt_part = “XXX”.
www.softspeed.com.hk
5. Progress Statement
•
Common PROGRESS Statements
–
Form … with frame …
•
–
Define the frame with fields, fields and frame attributes
Display
•
•
Display data in a frame.
Example:
display pt_part pt_um pt_desc1 with frame a with 2 column.
display pt_part pt_um pt_desc1 with frame b 5 down.
display pt_part pt_um pt_desc1 with frame c column 10
row 20.
www.softspeed.com.hk
5. Progress Statement
•
Common PROGRESS Statements
–
Output To
•
•
–
Specified the output destination : Printer, File, Terminal
Output Close
Put
•
•
–
Sends the value of the expressions to an output destination other
than the terminal
Example:
put pt_part at 1 pt_um to 25 skip pt_desc1 pt_prod_line.
Message
•
•
Displays messages in the message area at the bottom of the
window
Example:
message “Part Number: ” pt_part.
www.softspeed.com.hk
5. Progress Statement
•
Common PROGRESS Statements
–
Variables Format
•
•
•
•
•
•
•
Specifies the attributes for the variables
CHARACTER:
x(8)
DATE:
99/99/99
DECIMAL:
->>,>>9.99
HANDLE:
>>>>>>9
INTEGER:
->,>>>,>>9
LOGICAL:
yes/no
www.softspeed.com.hk
5. Progress Statement
•
Common PROGRESS Statements
–
For
•
•
•
An iterating block that reads a record from each of one or
more tables at the start of each block iteration
An “End” is required to terminate the block
Example:
for each pt_mstr no-lock:
display pt_part.
end.
www.softspeed.com.hk
5. Progress Statement
•
Common PROGRESS Statements
–
If … then …
•
•
Makes the execution of a statement or block of statements
conditional
Example:
if pt_part > “A” then
message pt_part.
else
message “Exit”.
www.softspeed.com.hk
5. Progress Statement
•
Common PROGRESS Statements
–
Do … End
•
•
Groups statements into a single block
Example:
if pt_part > “A” then do:
message pt_part.
find next pt_mstr no-lock no-error.
display pt_part.
end.
else do:
message “Less than ‘A’”.
message “Exit”.
end.
www.softspeed.com.hk
Thank you !
Sam song
SoftSpeed Consultant Ltd
Add Month 2000