I am writing a file thru a sequence. This is basicly a control routine which accepts list of job names and write output in a sequential file . The problem I am facing is whenever I write the target sequential file , Every time the last character of the sequentail file is appended with a junk character and the ascii value of it I found is 0D. dont know what is the problem. Following is the code
Code: Select all
Dest := JobName : "," : JobStartTime : ",": JobEndTime : "," : JobStat : "," : RejEntrWarn : ";": RejEntrFatal :"," : SrcRowCount : "," : DstRowCount: '^'
var1 = char(10):char(13)
Dest = Trim(Dest,'^',"T")
Status = EREPLACE(Dest,'^',var1)
WRITESEQ Status TO FileVar1 ELSE STOP
WEOFSEQ FileVar1
CloseSeq FileVar
END ELSE
Call DSLogFatal('File open error on ':paramset:'. Status = ':Status(),SetParams)
END
Above is my code where JobName , JobStartTime ,JobEndTime , JobStat , RejEntrWarn ,RejEntrFatal , SrcRowCount ,DstRowCount are diffrent varaibles containing Jobs status appended with '^'. I am replacing ^ this to New line character to get each job details in new line and then writng it to file