home *** CD-ROM | disk | FTP | other *** search
- <<* SSBMIS.GEN (Ver 1.1A) *>>
- <<* (C) 1991 SHEN YANG WHITE HORSE SOFTWART COMPANY *>>
-
- <<#
- title 'To generate the item of Procedure with SSBMIS template.'
-
- <<*---Declare global variables---*>>
- string fpath,fname,fext
- string prgpath,prgname,fileprefix,datafile
- string response
- integer group
- logical ismultials
- logical Fox
-
- <<*16-bit feature combinations (1...16)*>>
- <<*bits: 1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,-32768*>>
-
- #>>
- <<*---General modules---*>>
- <<#include 'GENFILE.INC'#>> <<*Contains GenHeader,GenFooter,etc.*>>
- <<#include 'GENCOLOR.INC'#>> <<*Contains GenColor*>>
- <<#include 'GENLINE.INC'#>>
-
- <<#
- procedure InitGlobals
- begin
- fileprefix := substr( fname,1,7 ) <<*1st seven letters as prefix*>>
- select database 1
- filespec( dbfnam,fpath,datafile,fext ) <<*Init 'datafile'*>>
- select all <<*Reset all scoping*>>
- ismultials := (dbftotal > 1) <<*Using more than 1 database?*>>
- set lmargin to 0 <<*No left margin offset*>>
- set rmargin to 255 <<*No right margin wrap-around*>>
- set AutoMem to true <<*Gen with memvars*>>
- end <<*InitGlobals*>>
-
-
- procedure SubProgram( filename : string )
- string fspec,response
- begin
- filespec( Template,fpath,fname,fext ) <<*Get current path*>>
- fspec := fpath + filename
- if file( fspec )
- <<*---Pass information to subprograms via USER STACK---*>>
- zapstack
- push( datafile ) <<*filename of PRIMARY database file*>>
- push( fileprefix ) <<*Three letter file prefix*>>
- push( prgname ) <<*Filename of main program to generate*>>
- push( prgpath ) <<*Pathname of main program to generate*>>
- subprocess( fspec )
- else
- wait "File not found. Cannot continue..." to response message fspec
- HALT
- endif
- end <<*SubProgram*>>
-
-
- procedure ExecGroups( group : integer )
- integer nextmenutype
- logical IsGroupAll,IsAllOthers
- logical IsGroup1,IsGroup2,IsGroup3,IsGroup4,IsGroup5
- begin
- IsGroupAll := (group and 1) <> 0
- IsGroup1 := (group and 2) <> 0
- IsGroup2 := (group and 4) <> 0
- IsGroup3 := (group and 8) <> 0
- IsGroup4 := (group and 16) <> 0
- IsGroup5 := (group and 32) <> 0
- IsAllOthers := (group and (not 2)) <> 0
- if IsAllOthers
- if IsGroupAll or IsGroup2
- SubProgram( 'SSB00.COD' ) <<*PROCEDURE file*>>
- SubProgram( 'SSB01.COD' ) <<*PROCEDURE file*>>
- SubProgram( 'SSB02.COD' ) <<*OPEN/MENU/APPE/UPDA*>>
- endif
- if IsGroupAll or IsGroup4
- SubProgram( 'SSB03.COD' ) <<*BROW/EDIT/DISP/COND/FIND*>>
- endif
- if IsGroupAll or IsGroup5
- SubProgram( 'SSB04.COD' ) <<*HELP/LABE/PACK/EXPR/ERROR/REPO*>>
- endif
- endif
- end ExecGroups
-
-
- begin <<*MAIN*>>
- if Table
- prgname := Table
- filespec( prgname,prgpath,fname,fext )
- if prgname
- InitGlobals
- group := 1 <<*all groups*>>
- ExecGroups( group )
- endif
- else
- wait 'No DATAFILE of SSBMIS available '
- endif
- end <<*MAIN*>>
-
- <<*EOF: SSBMIS.GEN*>>
- #>>
-