Emmanuel
Master Tech
- Local time
- Today, 12:24
- Joined
- Sep 4, 2002
- Messages
- 88
Hey Guys I am trying to run this macro that I just created. Let me first explain what it is supposed to do. It reads serial numbers of a text file and the simulates a few steps in a billing system. I have to put a logic so it wont hit the same serial number twice. Also I think I should mention that this would be my second macro or code I have done so I am a real newbie at this and the problem that I have is that is not reading from the file and also is just jumping from the if to the goto logic without doing any steps. Please help... Here is the code:
Thanks in advance,
Emmanuel
dim serial as string
dim serialb as string
Sub Main
EMULATION "TN3270"
emsettitle "Noc_Exceptions"
syshide "TIMER"
OpenFiles:
fileread "NocException.txt", ins, 0
logic:
filereadnext ins,0
serial = left(ins,10)
if serial <> serialb then
emsendkey "<CLEAR>"
emsendkey "ciu "
emsendkey serial
emsendkey "<ENTER>"
emsendkey "<TAB>"
emsendkey "<ENDLINE>"
emsendkey "<ENTER>"
emsendkey "<TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB>"
emsendkey "1"
emsendkey "<TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB>"
emsendkey "2"
emsendkey "<ENTER>"
emsendkey "<CLEAR>"
serialb = serial
goto logic
else
goto logic
end if
End Sub
Thanks in advance,
Emmanuel
dim serial as string
dim serialb as string
Sub Main
EMULATION "TN3270"
emsettitle "Noc_Exceptions"
syshide "TIMER"
OpenFiles:
fileread "NocException.txt", ins, 0
logic:
filereadnext ins,0
serial = left(ins,10)
if serial <> serialb then
emsendkey "<CLEAR>"
emsendkey "ciu "
emsendkey serial
emsendkey "<ENTER>"
emsendkey "<TAB>"
emsendkey "<ENDLINE>"
emsendkey "<ENTER>"
emsendkey "<TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB>"
emsendkey "1"
emsendkey "<TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB>"
emsendkey "2"
emsendkey "<ENTER>"
emsendkey "<CLEAR>"
serialb = serial
goto logic
else
goto logic
end if
End Sub