Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find And Print Member Info 1

Status
Not open for further replies.

RBEANRBEAN

Technical User
Jun 7, 2021
5
0
0
ZA
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
 
Hi There,
Assuming that it is Simphony Second Edition and RB.csv is a file which contains your member information sent by a 3rd party loyalty system, here are some suitable options:

1. Pure ISL:
Enable "SIM File Access Service" for a Service Host​
Copy the RB.CSV file to that SH (You can potentially use a CAL package)​
use fopen and fread like you are doing to search for a member​

2. Content Record:
Create a Content record​
Upload the RB.csv file to this Content record​
In your ISL, instead of reading it from the file system, read it using @DataStore​

3. Extension application:
You can use a Content record as your member DB or distribute the RB.csv to each workstation and use the flat file as your DB​
Or, If the Loyalty System offers an API, you can do the search against their API​
Or, If the Loyalty System does NOT offer an API, create your own API that uses the CSV file like a database table​

Each approach has pros and cons.

Hope this helps


 
Hi,

Thank you for the response,
This is indeed V2

I like the conent idea , would I just use @DataStore or is there more to the syntax i.e. content ref# ?
Sorry if this is a silly qeustion.

Thanks
 
Hi,
Check out page G-5 of this : . They have a simple snippet there on @opscontext and @DataStore system variables. These are essentially wrappers around OpsContext and DataStore Extensibility classes. To find out the available methods and properties, you need to refer to the Extensibility document in the same doc repository. IMO, extensibility docs lack a lot of content. What I usually do is to reference to Ops.dll in a C# project, and use the VS intellisense to discover the available methods and properties.
 
Hello,

Will have a look at this, thank you for all the responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top