This Piece of code did it for me. Thank You guys for suggesting me answers and directing me to the right path.
while select * from BatchJobHistory
order by BatchJobHistory.StartDateTime Desc
where BatchJobHistory.Caption == "Generate Earning Statement From Assignments"
{
data = BatchJobHistory::showLog(BatchJobHistory.RecId);
for(i=1; i<=conLen(data); i++)
{
if (typeof(conPeek(data,i)) == Types::Container)
{
sysInfologEnumerator = SysInfologEnumerator::newData(conPeek(data,i));
while (sysInfologEnumerator.moveNext())
{
switch (sysInfologEnumerator.currentException())
{
case Exception::Error:
infoMessageStruct = new SysInfologMessageStruct(sysInfologEnumerator.currentMessage());
exception = sysInfologEnumerator.currentException();
ErrorMessage = sysInfologEnumerator.currentMessage();
ErrorLineDocument = strScan(ErrorMessage,"Document Number:",0,strLen(ErrorMessage));
ErrorLineWorker = strScan(ErrorMessage,"The line for worker",0,strLen(ErrorMessage));
info(strFmt("%1; %2",
exception,
infoMessageStruct.message()));
ErrorMessage = sysInfologEnumerator.currentMessage();
break;
}
This Job breaks down the infolog into its containers and read the data from them and prints it on the screen.