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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros SIM - LoadMagInfo

Status
Not open for further replies.

jd11111

Programmer
Apr 29, 2010
160
US
LOADMAGINO

Does anyone know how this command is used? Is it possible to use this command to make the system think that a card was swiped?
 
Hi,
do you mean LOADMAGINFO? There is no SIM command in 8700, 3700 or 9700 SIM manuals, if you are reading this in an existing SIM maybe it is a function?

This takes Mag Card input:


Input strCheckId{m2, *}, "Please Swipe Card, Or Cancel To Return"

If @MAGSTATUS = "N" Then
If @EMPLOPT[4] = 0 Then
Exitwitherror "Card Swipe Compulsory"
Else
LoadKyBdMacro MakeKeys(strCheckId), Key(1,393222)
EndIf
ElseIf @MAGSTATUS = "Y" Then
Call ValidateID(strCheckId)
LoadKyBdMacro MakeKeys(strCheckId), Key(1,393222)

EndIf

Else


//And to Validate the card (as above)

Sub ValidateID(ref passedID)

Var nId : N9 = passedID
if (nID >= 1000 and nID <=2999)
// all good
Else
ExitWithError "This is not a valid Tab Card"
EndIf

EndSub
 
It is a command. You may recall from a previous post that my goal is to require mag card for signing into the system - BUT I need to attach logic to the clock out function. In order to do this, I either have disable the mag card requirement OR somehow figure out a way to allow a user to:

1 - swipe their card
2 - take their password ID and see if they have completed some steps in a custom application
3 - if they have send their password it (which was just swiped) to the timeclock (using loadkybdmacro and makekeys).

The problem is on step 3. The variable @MAGSTATUS is "N" even if they swiped their card.

I found this command in the sim manual (3700) and thought it might be useful.
------------------------------------
LoadMAGInfo

Function

This command is used to load information via a SIM script into a OPS MAGInfo data area. When the MACRO system encounters a KEY_MAGCARD key, it triggers OPS to take the previously loaded MAGInfo and process it. The KEY_MAGCARD key (278528) is a KEY_TYPE_FUNCTION type (1).

Syntax
LoadMagInfo Track2_Expression
LoadMagInfo Track1_Expression, Track2_Expression

Argument/Description
This will take either one or two parameters. If one parameter is supplied, the function will fill the TRACK2 data. If two parameters are supplied, then the function will fill both TRACK1 and TRACK2.

Both parameters are an expression that represents the string used as the mag card track. The SIM script that uses this function ensures that the format of the Track1 expression is in the form "%" + cc track1 data + "?" and that the Track2 expression is in the form ";" + cc track2 data + "?"

LoadMAGInfo Example
Event Inq : 1
var CC_Track1 : a79
var CC_Track2 : a79
var fCC_Track1 : a79
var fCC_Track2 : a79
var CC_Auth_Key : key = key(1,458787)
input CC_Track1 {m1, *}, CC_Track2 {m2, *}
If (@MAGSTATUS = "Y")
LoadKybdMacro MakeKeys("1.00"), CC_Auth_Key
format fCC_Track1 as "%", CC_Track1, "?"
// Notice format is "%" + Track 1 mag Info + "?"
format fCC_Track2 as ";", CC_Track2, "?"
// Notice format is ";" + Track 2 Mag Info + "?"
LoadMagInfo fCC_Track1, fCC_Track2
LoadKybdMacro key(1,278528)
EndIf
EndEvent




 
Hi,

The part that reads what track is the m2 part of the below code line. It means track 2, {m1 would be track 1

Input MemberID{m2, 1, 1, *}, "Enter Member Number Or Swipe Card"


I have put 2 Micros SIMS up that may help (I didnt write).
This one is for CCards, and captures track 1

and this one is a clockin/out script (and captures track 2)
 
thanks, but the problem here is that I need @MAGSTATUS to be "Y". When the user swipes their card, I get their password and perform some logic before allowing them to clock out. When I get to the step where I perform the clock-out macro, @MAGSTATUS = "N" because the password ID is being used by "makeKeys", not an actual card swipe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top