RBEANRBEAN
Technical User
Hello
I am trying to use an ISL to find member info and then print it on Micros Simphony. Currently script as flat file but would like to possibly use content or extensibilty.
Sample attached of the ISL ( not working ) Any help would be appreciated.
//=============================================================================
//
// Title : VacationClub.isl
// Date Created : August, 2018
// Author : Brandon Balsdon
// Modified By : Dewald Lubbe
// Purpose : Search Vacation Club Member file for Member details
//
//----------------------------------------------------------------------------//
// For Inquire# 1
// In RVC Parameters - Format Options, Turn on bits 24-28 appropriately
// Also, set "Number of Guest Check Information Lines" to at least 3
//----------------------------------------------------------------------------//
// ISL Settings
//----------------------------------------------------------------------------//
//setreread
//----------------------------------------------------------------------------//
// Global Variable Declaration //
//----------------------------------------------------------------------------//
var ContractNoI :n12
var ContractNo :n12
var MemberNo :N12
var Locked :A32
var Title :A32
var First_Name :A64
var Last_Name :A164
var Company :A32
var MVGNo :A32
var confirm :A1
var fn :N5
var Line :A200
var Data :A200
var linesread :n6
var customerdb :A64 = "C:\Micros\RB.csv"
Event Inq:1
clearchkinfo
infomessage "111"
fopen fn, customerdb, read, Local
if fn = 0
errormessage @FILE_ERRSTR "File not found"
exitcontinue
endif
call find_customer
endevent
sub find_customer
window 10,45, "Find Customer"
display 2,2, "Member Number:"
// display 4,2, customerdb
// display 6,2, fn
//displayinput 2,18, ContractNoI{M2,1,4,5}, "Enter Member Number"
displayinput 2,18, ContractNoI, "Enter Member Number"
windowinput
while not feof ( fn )
call read_from_db
if ContractNo = ContractNoI
if MemberNo = ContractNoI
infomessage "ContractNo", ContractNo, "ContactNoI", ContractNoI
call found_customer
endif
if MemberNo <> ContractNoI
exitwitherror "Member Could Not Be Found"
endif
endwhile
fclose fn
endsub
sub read_from_db
// icros\RB.csv"
//var fn :N5
fopen fn, customerdb , read, local
fseek fn, customerdb
freadbfr fn, customerdb, data, 20000, linesread, (CustomerNo), (CustomerNoI)
if linesread <> 50000
errormessage linesread
exitcancel
endif
freadln fn,1, Line
window 1, 78
display 1, 2, Line
waitforclear
windowclose
ContractNo = mid( line, 1, 5 )
fread fn, ContractNo, MemberNo, Locked, Title, First_Name, Last_Name, Company, MVGNo, *
endsub
sub found_customer
window 8,64, "Found Customer"
display 2,2, "Contract No: ", ContractNo
display 3,2, " Member No: ", MemberNo
display 4,2, " Locked ?: ", Locked
display 5,2, " Title: ", Title
display 6,2, " First Name: ", First_Name
display 7,2, " Last Name: ", Last_Name
display 8,2, " MVG No: ", MVGNo
displayinput 8,64, confirm, "Enter To Continue - Clear To Cancel"
windowinput
call save_to_check
exitcontinue
endsub
sub save_to_check
savechkinfo "*CUSTOMER INFO*"
savechkinfo "--------------------"
savechkinfo first_name
savechkinfo last_name
savechkinfo MVGNo
savechkinfo "--------------------"
savechkinfo " "
endsub
I am trying to use an ISL to find member info and then print it on Micros Simphony. Currently script as flat file but would like to possibly use content or extensibilty.
Sample attached of the ISL ( not working ) Any help would be appreciated.
//=============================================================================
//
// Title : VacationClub.isl
// Date Created : August, 2018
// Author : Brandon Balsdon
// Modified By : Dewald Lubbe
// Purpose : Search Vacation Club Member file for Member details
//
//----------------------------------------------------------------------------//
// For Inquire# 1
// In RVC Parameters - Format Options, Turn on bits 24-28 appropriately
// Also, set "Number of Guest Check Information Lines" to at least 3
//----------------------------------------------------------------------------//
// ISL Settings
//----------------------------------------------------------------------------//
//setreread
//----------------------------------------------------------------------------//
// Global Variable Declaration //
//----------------------------------------------------------------------------//
var ContractNoI :n12
var ContractNo :n12
var MemberNo :N12
var Locked :A32
var Title :A32
var First_Name :A64
var Last_Name :A164
var Company :A32
var MVGNo :A32
var confirm :A1
var fn :N5
var Line :A200
var Data :A200
var linesread :n6
var customerdb :A64 = "C:\Micros\RB.csv"
Event Inq:1
clearchkinfo
infomessage "111"
fopen fn, customerdb, read, Local
if fn = 0
errormessage @FILE_ERRSTR "File not found"
exitcontinue
endif
call find_customer
endevent
sub find_customer
window 10,45, "Find Customer"
display 2,2, "Member Number:"
// display 4,2, customerdb
// display 6,2, fn
//displayinput 2,18, ContractNoI{M2,1,4,5}, "Enter Member Number"
displayinput 2,18, ContractNoI, "Enter Member Number"
windowinput
while not feof ( fn )
call read_from_db
if ContractNo = ContractNoI
if MemberNo = ContractNoI
infomessage "ContractNo", ContractNo, "ContactNoI", ContractNoI
call found_customer
endif
if MemberNo <> ContractNoI
exitwitherror "Member Could Not Be Found"
endif
endwhile
fclose fn
endsub
sub read_from_db
// icros\RB.csv"
//var fn :N5
fopen fn, customerdb , read, local
fseek fn, customerdb
freadbfr fn, customerdb, data, 20000, linesread, (CustomerNo), (CustomerNoI)
if linesread <> 50000
errormessage linesread
exitcancel
endif
freadln fn,1, Line
window 1, 78
display 1, 2, Line
waitforclear
windowclose
ContractNo = mid( line, 1, 5 )
fread fn, ContractNo, MemberNo, Locked, Title, First_Name, Last_Name, Company, MVGNo, *
endsub
sub found_customer
window 8,64, "Found Customer"
display 2,2, "Contract No: ", ContractNo
display 3,2, " Member No: ", MemberNo
display 4,2, " Locked ?: ", Locked
display 5,2, " Title: ", Title
display 6,2, " First Name: ", First_Name
display 7,2, " Last Name: ", Last_Name
display 8,2, " MVG No: ", MVGNo
displayinput 8,64, confirm, "Enter To Continue - Clear To Cancel"
windowinput
call save_to_check
exitcontinue
endsub
sub save_to_check
savechkinfo "*CUSTOMER INFO*"
savechkinfo "--------------------"
savechkinfo first_name
savechkinfo last_name
savechkinfo MVGNo
savechkinfo "--------------------"
savechkinfo " "
endsub