Filename is an Argument which have the File Path.
Code: Select all
OPENSEQ Filename TO H.FILE1 THEN
CALL DSLogInfo("******************** File " : H.FILE1 : " opened successfully", "JobControl")
END ELSE
CALL DSLogInfo("Unable to open file", "JobControl")
ABORT
END
READSEQ FILE1.RECORD FROM H.FILE1 ELSE
Call DSLogWarn("******************** File is empty", "JobControl")
END
Ans = Trim(FILE1.RECORD," ","A")
Call DSLogInfo("******************** Record read: " : Ans, "JobControl")
CLOSESEQ H.FILE1
Code: Select all
Ans=''
Delimiter='='
OpenSeq Filename To File
Else Print "Error Opening File " : Filename
Loop
While ReadSeq Text From File
ParName = Field(Text,Delimiter,1)
*ParValue = Field(Text,Delimiter,2,10)
ParValue = Field(Text,Delimiter,2,Len(Text))
If UpCase(ParName) = UpCase(Name) Then
Ans = ParValue
End