home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sams Cobol 24 Hours
/
Sams_Cobol_24_Hours.iso
/
Cobol32
/
PowerGEM
/
Powergem.z
/
svd32.scp
< prev
next >
Wrap
Text File
|
1995-10-08
|
5KB
|
165 lines
//************************************************************************
// Script for FUJITSU COBOL85 debugger
//
// ALL Rights Reserved, CopyRight (C) FUJITSU LIMITED 1995
//************************************************************************
public :
var tool ;
var ToolClass = "DEBUG"; // tool class
var Str_Filespec = 0; // file spec
var Com_Filespec = 0; // file spec
var Com_Term = 0 ; // tearmination
var MsgTitle = "SVD32.SCP"; // err message title
var msg1 = "Debugger: Specifed file in uses";
exec() {
var Filespec ;
var Ret ; // return code
MessageOpen(ToolClass) ; // open nessage pass
Filespec = MakeFilespec("*", 0) ; // create filespec
Str_Filespec = Filespec ; // save filespec
MakeEvent("R", ToolClass, "START", Filespec, "start") ;
}
start() {
var Get_MessageID ; // message id
var Make_MessageID; // message id
var Filespec ;
var Ret ; // return code
var PathName ;
var FileName ;
var CommandLine ;
var SenderToolClass ;
var MessageType ;
var ToolClassName ;
var CommandName ;
var Data ;
var Originator ;
Get_MessageID = GetMessageID();
Make_MessageID = MakeMessageID();
Filespec = GetFilespec();
if(Com_Filespec == Filespec) {
MessageBox(msg1,MsgTitle,0);
return(1);
}
Com_Filespec = Filespec ; // save filespec
SenderToolClass = GetSenderToolClass() ;
MessageType = GetMessageType() ;
ToolClassName = GetToolClass() ;
CommandName = GetCommand() ;
Data = GetData(1) ;
Originator = GetOriginator();
MakeEvent("R", ToolClass, "STOP" , Filespec, "stop" ) ;
MakeEvent("R", ToolClass, "MAXIMIZE" , Filespec, "maximize" ) ;
MakeEvent("R", ToolClass, "MINIMIZE" , Filespec, "minimize" ) ;
MakeEvent("R", ToolClass, "NORMALIZE", Filespec, "normalize" ) ;
CommandLine = FilespecToPathName(Filespec) ;
tool = ToolExecEx("WINSVD.EXE", CommandLine, TRUE);
if( IsNULL(tool) ) {
MessageSend(Get_MessageID, "F", ToolClass, "START" , Filespec);
MessageSend(Make_MessageID, "N", ToolClass, "STATUS",
Filespec, "NOTRUNNING") ;
del_event();
Com_Term = 1 ;
MessageClose();
Close();
return(0);
}
MessageSend(Make_MessageID, "N", ToolClass, "STATUS", Filespec, "STARTING") ;
MessageSend(Make_MessageID, "N", ToolClass, "STATUS", Filespec, "READY") ;
MessageSend(Get_MessageID, "N", ToolClass, "START", Filespec) ;
}
stop() {
var Filespec ;
var Ret;
var Get_MessageID;
var Make_MessageID;
var ToolID ;
Script.ErrorDisplay = False ;
ToolID = closewindow(tool);
Script.ErrorDisplay = True ;
Get_MessageID = GetMessageID();
Make_MessageID = MakeMessageID();
Filespec = GetFilespec();
MessageSend(Make_MessageID, "N", ToolClass, "STATUS", Filespec, "NOTRUNNING") ;
MessageSend(Get_MessageID, "N", ToolClass, "STOP", Filespec) ;
Com_Term = 1 ;
del_event() ;
MessageClose();
Close();
}
maximize() {
var MessageID ;
var Filespec ;
MaximizeWindow(tool) ;
MessageID = GetMessageID();
Filespec = GetFilespec();
MessageSend(MessageID, "N", ToolClass, "MAXIMIZE", Filespec);
}
minimize() {
var MessageID ;
var Filespec ;
MinimizeWindow(tool) ;
MessageID = GetMessageID();
Filespec = GetFilespec();
MessageSend(MessageID, "N", ToolClass, "MINIMIZE", Filespec);
}
normalize() {
var MessageID ;
var Filespec ;
RestoreWindow(tool) ;
MessageID = GetMessageID();
Filespec = GetFilespec();
MessageSend(MessageID, "N", ToolClass, "NORMALIZE", Filespec);
}
Terminate() {
var Ret ;
var ToolID ;
var Make_MessageID ;
if(Com_Term != 0) {
Return(0);
}
Script.ErrorDisplay = False ;
ToolID = closewindow(tool);
Script.ErrorDisplay = True ;
Make_MessageID = MakeMessageID();
MessageSend(Make_MessageID, "N", ToolClass, "STATUS", Com_Filespec, "NOTRUNNING") ;
MessageSend(Make_MessageID, "N", ToolClass, "STOP", Com_Filespec) ;
Com_Term = 1 ;
del_event() ;
MessageClose();
Close() ;
}
del_event() {
DeleteEvent("R", ToolClass, "START" , Str_Filespec) ;
DeleteEvent("R", ToolClass, "STOP" , Com_Filespec) ;
DeleteEvent("R", ToolClass, "MAXIMIZE" , Com_Filespec) ;
DeleteEvent("R", ToolClass, "MINIMIZE" , Com_Filespec) ;
DeleteEvent("R", ToolClass, "NORMALIZE", Com_Filespec) ;
}