static void SGX_timeConsumed(Args _args)
{
FromTime startTime = timeNow();
int i;
str dummyStr;
;
for (i = 1 ; i <= 500000; i++)
{
dummyStr += int2str(i);
}
info(strFmt("Total time consumed is %1", timeConsumed(startTime, timeNow())));
}
static void mandatoryFieldsOfATable(Args _args)
{
SysDictTable sysDictTable;
SysDictField sysDictField;
TableId tableId;
Counter counter;
;
sysDictTable = new SysDictTable(tablenum(CustTable));
for(counter = 1;counter <= sysDictTable.fieldCnt(); counter++)
{
sysDictField = new sysDictField(sysDictTable.id(), sysDictTable.fieldCnt2Id(counter));
if(sysDictField.mandatory())
info(sysDictField.name());
}
}
static void ShowFileNameinDirectory(Args _args)
{
int handle;
FilePath filePath;
FileName FileName;
;
filepath = "E:\\";
[handle,filename] =
WinAPI::findFirstFile(filepath + "\\*.doc");
while (filename)
{
info(filepath + "\\" + filename);
filename = WinAPI::findNextFile(handle);
}
WinAPI::findClose(handle);
}
static void Date(Args _args)
{
date d;
d= dateMthFwd(systemdateget(), 120); //Adding 2 years to the System Date
info(d);
info(date2str(today(),123,2,2,2,2,4));
info(date2str(systemDateGet(),123,2,2,2,2,4));
info(date2str(DateTimeUtil::date(DateTimeUtil::getSystemDateTime()),123,2,2,2,2,4));
}
static void TableData_without_TableBuffer(Args _args)
{
print (select MyTabble7).FirstName;
print (select MyTabble7).LaStNAme;
pause;
}
static void Job_To_GetTableIds(Args _args)
{
Dictionary d1;
TableId t1;
;
d1=new Dictionary();
t1=d1.tableNext(0);
while(t1)
{
info(int2str(t1));
t1= d1.tableNext(t1);
}
}
static void JobToCountTables(Args _args)
{
Dictionary dict;
int totalTables;
dict=new Dictionary();
totalTables=dict.tableCnt();
info(strfmt("%1",totalTables));
}
No comments:
Post a Comment