I thank everyone for their help as I learn BWS. I have an issue I cannot
resolve. I have the following script and for some reason the file is not being
read properly. It is trying to put the H header record information into the
screen I am trying to write to instead of skipping it. I have not completed
the ENTER RECORD step yet as I am trying to get the right record to process
first.
Sub myScript2(Optional dummy As Long)
' This subroutine was auto-inserted by the WorkStation.
RuleBehavior = 0: FirstStep = False
If Step = "OPEN MEDITECH" Then
If Rule("") Then
Connect "C:\Program Files (x86)\MEDITECH\Workstation3.x\T.exe",
stMeditech
Step = "LOGIN AND NAVIGATE"
Exit Sub
End If
ElseIf Step = "LOGIN AND NAVIGATE" Then
If Rule("MIS Directories@1,18&@1,35") Then
'Enter "1"
Enter "3"
Exit Sub
End If
If Rule("Medical Information@2,23&@7,17") Then
Enter "msk09"
Connect "C:\Program Files (x86)\MEDITECH\Workstation3.x\T.exe",
stMeditech
Exit Sub
End If
If Rule("Medical Information@2,23&@8,17") Then
Enter "01231h"
Exit Sub
End If
If Rule("Application Database@1,28&@1,50") Then
Enter ""
Enter "16"
Exit Sub
End If
If Rule("MEDITECH Payroll/Per@1,25&@1,58") Then
Enter "10"
Exit Sub
End If
If Rule("Employee Enter/Edit@1,28&@1,66") Then
Enter "11"
Step = "OPEN FILE"
Exit Sub
End If
ElseIf Step = "OPEN FILE" Then
If Rule("") Then
D.Open_ "C:\Users\msk09\Desktop\Book1.csv", ftDelimited,
"C:\Users\msk09\Desktop\Book1.csv.bds"
Step = "EVALUATE STATUS"
Exit Sub
End If
ElseIf Step = "EVALUATE STATUS" Then
If Rule("notEOF&D(""Status"")=") Then
Step = "EVALUATE RECORD"
Exit Sub
End If
If Rule("notEOF&D(""Status"")<>") Then
Step = "NEXT RECORD"
Exit Sub
End If
If Rule("EOF") Then
Step = "LOGOUT"
Exit Sub
End If
ElseIf Step = "EVALUATE RECORD" Then
If Rule("D(""1"")=""H"" D(""Status"")=""Skip""") Then
Step = "NEXT RECORD"
Exit Sub
End If
If Rule("'D(""1"")=""T"" D(""Status"")=""Skip""") Then
Step = "NEXT RECORD"
Exit Sub
End If
If Rule("") Then
Step = "ENTER RECORD"
Exit Sub
End If
ElseIf Step = "ENTER RECORD" Then
If Rule("Enter/Edit Employee@1,27&@4,1") Then
Enter D("1")
Step = "NEXT RECORD"
Exit Sub
End If
ElseIf Step = "NEXT RECORD" Then
If Rule("") Then
Step = "EVALUATE STATUS"
Exit Sub
End If
ElseIf Step = "LOGOUT" Then
Step = "_END_"
ElseIf Step = "_END_" Then
End If
End Sub
Sub RuleShell(Optional dummy As Variant)
Share("Suspend8") = False
Step = "OPEN MEDITECH"
Do Until Step = "_END_"
myScript2
If Share("Suspend8") Then Share("Suspend8") = False: Stop
Stable Share("WaitSpeed")
Loop
End Sub
Mike Klujeske
Project Analyst
MCHS Information Management - Finance
Phone: 507-238-8138 (Office)
Phone: 507-399-9015 (Cell)
E-mail: [email protected]<mailto:[email protected]>
__________________________________
Mayo Clinic Health System
800 Medical Center Drive
Fairmont, MN 56031
mayoclinichealthsystem.org<http://www.mayoclinichealthsystem.org/>
--- To post a message to this list, send mail to: [email protected] You are
currently subscribed as: [email protected] Unsubscribe in the
customer center on our website:
http://www.bostonsoftwaresystems.com/Customers/ListServe.aspx