Input
0001|7150|2015-03-26
0001|1510|2015-03-26
1800|1800|2015-03-26
7300|7300|2015-03-24
0001|1510|2015-03-26
1800|1800|2015-03-26
7300|7300|2015-03-24
Output
7150|7150|2015-03-26
1510|1510|2015-03-26
1800|1800|2015-03-26
7300|7300|2015-03-24
1510|1510|2015-03-26
1800|1800|2015-03-26
7300|7300|2015-03-24
What I've tried (and it failed) was:
$$FILEM DSU INPUT=FILEIN,
$$FILEM PROC=*
IF SUBSTR(INREC,11,10) == '2015-03-26' THEN
IF SUBSTR(INREC,1,4) == '0001' THEN
OUTREC = CHG(OUTREC,'0001',(SUBSTR(INREC,26,4)),1,1)
RETURN
/+
$$FILEM PROC=*
IF SUBSTR(INREC,11,10) == '2015-03-26' THEN
IF SUBSTR(INREC,1,4) == '0001' THEN
OUTREC = CHG(OUTREC,'0001',(SUBSTR(INREC,26,4)),1,1)
RETURN
/+
Error message:
IBM File Manager for z/OS
133 +++ OUTREC = CHG(OUTREC,'0001',(SUBSTR(INREC,26,4)),1,1)
4 +++ CALL FMPRC
IRX0043I Error running FMNINTEX, line 133: Routine not found
FMNBB382 REXX exec terminated with RC 20043
FMNBB283 43683 record(s) read from input data set
FMNBB434 0 record(s) updated
133 +++ OUTREC = CHG(OUTREC,'0001',(SUBSTR(INREC,26,4)),1,1)
4 +++ CALL FMPRC
IRX0043I Error running FMNINTEX, line 133: Routine not found
FMNBB382 REXX exec terminated with RC 20043
FMNBB283 43683 record(s) read from input data set
FMNBB434 0 record(s) updated