i'm trying to open the hash file using OPENPATH but it is picking up the ON ERROR/ ELSE statements. Also have problem in parsing the record, record has like varchar, numeric and varchar types.
![Sad :(](./images/smilies/icon_sad.gif)
Any help would be really appreciated...
Thanx,
San
Moderators: chulett, rschirm, roy
Code: Select all
OPENPATH '/open/devel/work/hash' to f.infile
ELSE ABORT
QUIT=@FALSE
Loop
read RCD from f.infile else QUIT=@TRUE
UNTIL QUIT DO
FileName = RCD[1,20]
IF(FileName = InputArg )
THEN RCD[21]=0 RCD[22] = 0
QUIT=@True
REPEAT
ErrorCode = 0
Code: Select all
OPENPATH '/wherever/FRED' TO F.FRED Else
Call DSLogFatal("Unable to open FRED", "YourFunction")
End
SELECT F.FRED
Done = @FALSE
Loop
READNEXT KEY Else Done = @TRUE
Until Done Do
Read FredRow From F.FRED,KEY Then
* Do something
End
Repeat
Call DSLogInfo("All Done", "YourFunction")
Code: Select all
http://www.dsxchange.com/viewtopic.php?t=85364
Code: Select all
SELECT F.FRED
Code: Select all
Read FredRow From F.FRED,KEY Then
Code: Select all
Read FredRow From F.FRED,"your key value" Then
Do This
End Else
Do that
End