Error line is MARKED in the logic below
This is my logic :
"PIPE (end \) < '"MsgFile"' | STEM REC."
If RC <> 0 /* */
Then Do /* */
Say "+++ Error" RC "Reading file '"MsgFile"'"
Exit /* */
End
Say "Retrybad = '"RetryBad"'"
Parse Value 0 With RetryBad_sw 1 Skipmsg_sw
If 'ABBREV'('YES',retrybad,1)
Then Parse Value 1 With RetryBad_sw 1 Skipmsg_sw
/*!-------------------------------------------------------------------*/
/*! Build the entry into 1 or more messages. The seperator is */
/*! 5 or more '=' starting in column 1 ('====='). Also ignore lines */
/*! that begin with '*'. */
/*!-------------------------------------------------------------------*/
MetaDataString. = '' /* */
cntr = 1 /* */
Do i = 1 To rec.0 /* */
If 'LEFT'(rec.i,1) = '*' Then Iterate /* Skip a comment */
Test = 'LEFT'(rec.i,5)
If test = '=====' | test = '++++ '
Then Do /* Marker for new record */
If RetryBad_sw
Then If test = '++++ '
Then Skipmsg_sw = 0
Else Do
Skipmsg_sw = 1
Iterate
End
If MetaDataString.cntr <> '' /* */
Then cntr = cntr + 1 /* */
Iterate /* */
End /* */
If Skipmsg_sw Then Iterate
rec.i = 'STRIP'(rec.i,'B')
If 'WORDPOS'('LEFT'(rec.i,1),"< =") = 0
Then rec.i = ' 'rec.i /* Add a leading blank */
MetaDataString.cntr = MetaDataString.cntr||rec.i <<< ERROR LINE : Machine Storage exhausted
End
If MetaDataString.cntr = '' Then cntr = cntr - 1;
MetaDataString.0 = cntr
If RC <> 0 /* */
Then Do /* */
Say "+++ Error" RC "Reading file '"MsgFile"'"
Exit /* */
End
Say "Retrybad = '"RetryBad"'"
Parse Value 0 With RetryBad_sw 1 Skipmsg_sw
If 'ABBREV'('YES',retrybad,1)
Then Parse Value 1 With RetryBad_sw 1 Skipmsg_sw
/*!-------------------------------------------------------------------*/
/*! Build the entry into 1 or more messages. The seperator is */
/*! 5 or more '=' starting in column 1 ('====='). Also ignore lines */
/*! that begin with '*'. */
/*!-------------------------------------------------------------------*/
MetaDataString. = '' /* */
cntr = 1 /* */
Do i = 1 To rec.0 /* */
If 'LEFT'(rec.i,1) = '*' Then Iterate /* Skip a comment */
Test = 'LEFT'(rec.i,5)
If test = '=====' | test = '++++ '
Then Do /* Marker for new record */
If RetryBad_sw
Then If test = '++++ '
Then Skipmsg_sw = 0
Else Do
Skipmsg_sw = 1
Iterate
End
If MetaDataString.cntr <> '' /* */
Then cntr = cntr + 1 /* */
Iterate /* */
End /* */
If Skipmsg_sw Then Iterate
rec.i = 'STRIP'(rec.i,'B')
If 'WORDPOS'('LEFT'(rec.i,1),"< =") = 0
Then rec.i = ' 'rec.i /* Add a leading blank */
MetaDataString.cntr = MetaDataString.cntr||rec.i <<< ERROR LINE : Machine Storage exhausted
End
If MetaDataString.cntr = '' Then cntr = cntr - 1;
MetaDataString.0 = cntr
Anyone could help me ?
Thank so so so so much in advance.