Hi All,
I have to do the below through a single icetool step:-
The i/p file has line numbers and have to pick last line number (comma seperated file ) and place it in the header recort count which is on 5th line.
Please see the i/p file:-
-----------------------------------------------------
# ISSUER CODE: 2216317637
# JOB TYPE: ADDUPDEL
# CREATED ON: 20110817
# SEQUENCE NUMBER: 417
# RECORD COUNT: 3
# NUMBER OF FIELDS: 4
# FI ID: abscd
1,A,A,sdjsakjfkjdkfj,67
2,A,A,sdjsakjtitoire,76
3,A,A,sdjsakjyuyu,67
4,A,A,sdjsakj,4069
5,A,A,sdjsakj,38247328
6,A,sajdskdj,854385
7,A,sdjsakj,458475
--------------------------------------------
7 top lines are header info and data starts from 8th record with line number.
File has millions of record.
I need to put the last line number in record acount as it is coming incorrect through icetool step. Also file is in CSV format and have to change file in the same step.
o/p file should be like:-
-----------------------------------------------------
# ISSUER CODE: 2216317637
# JOB TYPE: ADDUPDEL
# CREATED ON: 20110817
# SEQUENCE NUMBER: 417
# RECORD COUNT: 7
# NUMBER OF FIELDS: 4
# FI ID: abscd
1,A,A,sdjsakjfkjdkfj,67
2,A,A,sdjsakjtitoire,76
3,A,A,sdjsakjyuyu,67
4,A,A,sdjsakj,4069
5,A,A,sdjsakj,38247328
6,A,sajdskdj,854385
7,A,sdjsakj,458475
--------------------------------------------
record count should be line number of last record.
I tried an icetool step to get last record in a temp file using below jcl but cant do further. Could you please help.
//JSTEP010 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//IN DD DSN=i/p file
//OUT DD DSN=&&Temp
//TOOLIN DD *
SUBSET FROM(IN) TO(OUT) KEEP INPUT LAST
/*
Thanks,