Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
code generator tool
#1

[attachment=1876]

ACADEMIC PROJECT
REPORT PROGRAMS CODE GENERATOR TOOL
PROJECT OVERVIEW
About the project
An automated code generator will enforce common structure for all batch programs conforming to a specific logic. It will generate the maximum possible program code based upon few user inputs. This generator will also help in reducing coding time of programmers and increase the efficiency by allowing programmers to focus on the application logic. This implies a great reduction in development costs. This will also ensure ease of code maintenance.
Project modules
Input module:
Developers will enter the inputs through web-based front-end screens. After initial validations, this information will be sent to the interfacer as HTML strings. The entire process of capturing inputs can take place in multiple stages.
Interfacer module:
The interfacer does further validations. The information is stored in Database (Oracle/Sql Server/ MySql) tables including intermediate stage Work-In-Progress details.
Code generation module:
When the developer initiates back-end code generation, the information in Database tables will be passed on through ASCII files to the back-end code generator.
The back-end code generator accepts the ASCII file and generates the report generation code.
Design Methodology
The objective of the system is to generate code with required features. For this purpose certain input has to be accepted from the user regarding the application. All the inputs will be stored on to the tables and later on an ASCII file is generated based on this information.
The ASCII file will be parsed and analyzed by the Lexical Analyzer and the relevant portions of information from the file will be collected in data structures, which will be later used to generate the desired code. After parsing, when the complete data from the file is extracted, the main control file will open four files to be generated.

The four files which are thus generated will contain the code for the described features of main flow. The application specific code has to be incorporated to make the application complete.
Data Flow Diagram (DFD)
Level 0 DFD:

Level 1 DFD:

ER-Diagram:


PROGRAM:
This involves the program name for the application. Based on this program name details, the four files which are generated by the tool are named.
INPUT TABLES:
This is a collection of all the Tool tables used in the application. For each Tool table, relevant details such as field names, sort keys, filter clause etc. are collected and stored in the tables.
OUTPUT REPORTS:
This is a collection of information required to generate report from the program which was generated by the tool.
INSERT/ UPDATE/DELETE OPERATIONS:
These denote a set of operations that are made on the tables in the database which are incorporated in the program which was generated by the tool.
DESCRIPTION OF INPUT MODULES

SCREEN I:
Login :
Password :
This is the first screen of the Tool Module. This screen accepts the Login and Password needed to use the Tool.

SCREEN II :
This screen is the main screen of the Tool module. All the other screens revolve around this screen.
By clicking at the appropriate button, the relative screen is displayed.
This screen displays the inputs to be captured




SCREEN II :
PROGRAM
Program Name :
Description :

Validations :
Program Name -> Check if this program name is already available. If so, inform the user about the same.

SCREEN IV :
INPUT TABLES

Table Name : Description :

Table Column(s) Selected Columns(s)


>> <<

Selected Column(s) SORT Keys


>> <<


Duplicate : Yes No


Filter Clause :
Selected Column(s) ORDER BY Column(s)


>> <<


Memory : Yes No *Table Size :
* If Memory is 'Yes', then Table Size is entered.


Validations :
Table Name -> List of Values displays all the tables in the current database along
with the description.
Check if the table name exists in the database. If not, flash an error message and accept again.
Description -> If description is available for the table, it is automatically displayed.
Field Name -> If >> button is pressed, then display all the fields from this Table.
If << button is pressed, then all the fields are deselected.
Individual fields are allowed to select and deselect by clicking on the fields.
Filter Clause -> Check for incorrect syntax or field names by parsing the text.
All incorrect syntax are outlined in red so that the user can
Correct his errors.
Order By -> If >> button is pressed, then display all the fields from the Selected columns only.
If << button is pressed, then all the fields are deselected.
Individual fields are allowed to select and deselect by clicking on the fields.
ISORT Key -> If >> button is pressed, then display all the fields from the Selected columns only.
If << button is pressed, then all the fields are deselected.
Individual fields are allowed to select and deselect by clicking on the fields.
NEXT -> Allows to input the next Tool Table.
CLEAR -> Clears the current entries
CANCEL -> Cancels the current table information and goes to the menu

SAVE -> Stores the Table Details and displays the following screen:

SCREEN V:
INPUT TABLE PRIORITY
Table priority:


Order By :

Ascending Descending
Table I Table II
And so on.

SAVE -> Goes to menu after saving it in database tables.
CANCEL -> Goes to menu without saving.


SCREEN VI
OUTPUT REPORTS
Report ID : Report Name :
Header : Sub Header :

Footer : No. of Lines :


Validations:
Value -> Display the list of Tool tables so that the user can select the table from which the data is to be fetched
For this Table Name, list all the fields so that the user can
Select the field name to get into the column as value.
SAVE -> Goes to menu after saving it in database tables.
CANCEL -> Cancels the current report information and goes to the menu.
NEXT -> Allows to input the next Report information.

SCREEN VII
INSERT OPERATION
Table Name : Description :

Columns(s) Selected Column(s)


>> <<

Values :

Beeline Element :

Validations :
Table Name -> List of Values displays Input tables with the description.
Description -> If the description is available for the table, it is automatically displayed.
Field Name -> If >> button is pressed, then display all the fields from this Table.
If << button is pressed, then all the fields are deselected.
Individual fields are allowed to select and deselect by clicking on the fields.
Values -> Displays a list of Input tables which are selected for the current application and after choosing the tables, a list of all fields of this table are given. A default variable is provided to the user if the value is a computed value.

Element -> This denotes the place inside the program, where this INSERT
Processing should be done.
SAVE -> Goes to menu after saving it in database tables
CANCEL -> Cancels the current report information and goes to the menu

NEXT -> Allows to input the next INSERT information.

SCREEN VII
UPDATE OPERATION
Table Name : Description :

Columns(s) Selected Column(s)


>> <<

Values :

Filter Clause :

Beeline Element :

Validations :
Table Name -> List of Values displays input tables with description
Description -> If the description is available for the table, it is automatically displayed.
Field Name -> If >> button is pressed, then display all the fields from this Table.
If << button is pressed, then all the fields are deselected.
Individual fields are allowed to select and deselect by clicking on the fields.
Values -> Displays a list of input tables which are selected for the current application and after choosing the tables, a list of all fields of this table are given. A default variable is provided for the user if the value is a computed value.

Element -> This denotes the place inside the program, where this UPDATE
Processing should be done.
SAVE -> Goes to menu after saving it in database tables
CANCEL -> Cancels the current report information and goes to the menu

NEXT -> Allows to input the next UPDATE information.

SCREEN IX
DELETE OPERATION
Table Name : Description :


Filter Clause :

Beeline Element :

Validations :
Table Name -> List of Values displays input tables with description
Description -> If the description is available for the table, it is automatically displayed.
Field Name -> If >> button is pressed, then display all the fields from this Table.
If << button is pressed, then all the fields are deselected.
Individual fields are allowed to select and deselect by clicking on the fields.
Element -> This denotes the place inside the program, where this DELETE
Processing should be done.
SAVE -> Goes to menu after saving it in database tables
CANCEL -> Cancels the current report information and goes to the menu

NEXT -> Allows to input the next DELETE information.
DATABASE LAYOUTS

Table Layouts
The details collected by the information collector are stored in the database using the following tables:

S.No Table Name Description
1 PGM_TBL Program Level Details
2 INPUT_TBL Input table details
3 FIELD_TBL Field details of the Input tables
4 RPT_TBL Report Details

PGM_TBL
PGM_TBL is a master table which stores details at the Program Level. This table will have an entry for each program that is generated using the tool.

S.No Field Name Description Type Length

1 pgm_name Program Name varchar 8
2 pgm_desc Program Description varchar 30
3 sort_order Order by clause of the cursor varchar 1
declarations of beeline tables.
4 commit_sz Commit size for the output number 3

INPUT_TBL
INPUT_TBL is a detail table which stores details of all the tables used in the program. The program name and table name form the unique key for the table.

S.No Field Name Description Type Length

1 pgm_name Program Name varchar 8
2 table_name Table Name varchar 10
3 table_desc Table Description varchar 30
4 table_type Type of the table like varchar 1
[I]nput] / O]utput tables.
6. table_priority The priority of the input number 2
tables only .
7. dup_alld Whether duplicate records varchar 1
are allowed or not .
8. dml_flag If the table is an output varchar 1
table , then an [I]nsert /
[U]pdate / [D]elete
operation should take
palace.
9. filter_clause The where clause of the varchar 100
table .

FIELD_TBL
FIELD_TBL is a detail table which stores details of all the fields used in the program. The program name and table name is the key combination for selecting all the related fields of a particular table.

S.No Field Name Description Type Length

1. pgm_name Program Name varchar 8
2. table_name Table Name varchar 10
3. field_name Field Name varchar 30
4. fileld_expr Field Expression varchar 40
5. fileld_size Field Size number 3
6. field_occ_cnt Field Occurrence number 3
7. field_type Field Type varchar 1
8. field_category Field category varchar 1
[S]ort/[N]ormal

RPT_TBL
RPT_TBL is a detail table which stores details of all the Reports used in the program.

S.No Field Name Description Type Length

1. pgm_name Program Name varchar 8
2. report_name Report Name varchar 10
3. key_1 Reserved Words like varchar 30
Header/Footer etc.
4. value Value for the key specified varchar 300


OUTPUT LAYOUTS

EXTRACT ASCII FILE STRUCTURE
ASCII files will be created containing the information accepted from the front-end screens. This data will also be present in the tables. A sample ASCII file structure is given below:
INPUT_TABLE : 01 : CDMST :
: FIELD : card_num : OCC_CNT : 1 : ACT_FIELD : card_num :
DATATYPE : NUMBER : FIELDSIZE : 16 :
: FIELD : cust_no : OCC_CNT : 1 : ACT_FIELD : cust_no :
DATATYPE : NUMBER : FIELDSIZE : 8 :
: FIELD : cyc_code : OCC_CNT : 1 : ACT_FIELD : cyc_code :
DATATYPE : NUMBER : FIELDSIZE : 4 :
: FIELD : card_status : OCC_CNT : 1 : ACT_FIELD : card_status :
DATATYPE : VARCHAR2 : FIELDSIZE : 2 :
: FIELD : stat_chg_date : OCC_CNT : 1 : ACT_FIELD : stat_chg_date :
DATATYPE : VARCHAR2 : FIELDSIZE : 6 :
: FIELD : mem_since : OCC_CNT : 1 : ACT_FIELD : mem_since :
DATATYPE : NUMBER : FIELDSIZE : 6 :
: FIELD : highest_billed : OCC_CNT : 1 : ACT_FIELD : highest_billed :
: A_KEY : card_type = 20 and card_mem_type <> 'A':
: ORDER : ASC :
: DUP_ALLW : Y : ERR_TYPE ::
: PRIORITY : 1 :
: ARR_SIZE : 500 :
: DESCRIPT : master : ;
INPUT_TABLE : 02 : tr4009806 :
: FIELD : card_no : OCC_CNT : 1 : ACT_FIELD : card_no :
DATATYPE : NUMBER : FIELDSIZE : 16 :
: FIELD : cyc_code : OCC_CNT : 1 : ACT_FIELD : cyc_code :
DATATYPE : NUMBER : FIELDSIZE : 2 :

DATATYPE : NUMBER : FIELDSIZE : 10 :
: FIELD : deliq_cnt : OCC_CNT : 1 : ACT_FIELD : deliq_cnt :
DATATYPE : NUMBER : FIELDSIZE : 2 :
: FIELD : min_due : OCC_CNT : 1 : ACT_FIELD : min_due :
DATATYPE : NUMBER : FIELDSIZE : 10 :
: FIELD : memo : OCC_CNT : 1 : ACT_FIELD : memo :
: ORDER : ASC :
: DUP_ALLW : Y : ERR_TYPE ::
: PRIORITY : 2 :
: ARR_SIZE : 500 :
: DESCRIPT : Transaction : ;
SORT_SEQ : 01 : ISORT_FIELD : 0 : EOF1 : FIELDSIZE : 1 :
: 1 : TABLE : cdmst : FIELD : card_num : DATATYPE : NUMBER :
FIELDSIZE : 16 :
: TABLE : tr4009806 : FIELD : card_no : DATATYPE : NUMBER :
FIELDSIZE : 16 :
: 2 : FILE_NO : FIELDSIZE : 1 :
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.