I am facing an issue with FINDREP while trying to replace a text with number.
I have two texts in my input file namely - YYYYMMDD and HHMMSS which I am trying to replace with the value returned from the date time variables - &DATE1 AND &TIME1, but when I run the job its giving me SYNTAX error.
Can you please let me know how to achieve this ?
Joined: 17 Oct 2006 Posts: 2459 Location: @my desk
How about using INREC IFTHEN to OVERLAY current date/time based on input position, instead of FINDREP.
FINDREP is used to find and replace constants within the input data record.
FINDREP Output Constant Rules wrote:
An output constant can be specified as a null string, a single character string, a repeated character string, a single hexadecimal string, or a repeated hexadecimal string. The syntax is: C'' (null), C'string',nC'string', X'string' or nX'string'. n can be 1 to 256.
IIRC current date/time constants can be 'inserted' only with INREC/OUTREC/OUTFIL BUILD or OVERLAY parameters.
How about using INREC IFTHEN to OVERLAY current date/time based on input position, instead of FINDREP.
FINDREP is used to find and replace constants within the input data record.
FINDREP Output Constant Rules wrote:
An output constant can be specified as a null string, a single character string, a repeated character string, a single hexadecimal string, or a repeated hexadecimal string. The syntax is: C'' (null), C'string',nC'string', X'string' or nX'string'. n can be 1 to 256.
IIRC current date/time constants can be 'inserted' only with INREC/OUTREC/OUTFIL BUILD or OVERLAY parameters.
Thanks for the info. I have the solution using overlay, but I want to make it more generic and not based on static position. Thought FINDREP could be used, but it seems I have to go back to overlay method if this is not going to work