Page 1 of 1

Record Count with current date using ICETOOL

PostPosted: Tue Aug 19, 2014 7:31 pm
by niyasna
Hi, I have tried using ICETOOL to create a report of number of records present in various files. But i also want to print the current Date and Time as a header of the File. Please help me in achieving it.

Below i have mentioned the code i have used
***************************************************************************
//TOOL EXEC PGM=ICETOOL
//INDD DD DSN=FILE1.TEXT,DISP=OLD
//IND1 DD DSN=FILE2.TEXT,DISP=OLD
//OUDD DD DSN=OUTPUT.TEXT,DISP=MOD
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COUNT FROM(INDD) WRITE(OUDD) TEXT('FILE1 ') DIGITS(7)
COUNT FROM(IND1) WRITE(OUDD) TEXT('FILE2 ') DIGITS(7)
/*
***************************************************************************************
it gives me an output like below

FILE1 0000516
FILE2 0000085


But i want the output to look like

Page:1 Date: 19-AUG-2014 Time: XX:XX:XX
File name Record Count
------------- -----------------
FILE1 0000516
FILE2 0000085


I was able to print current date when i am working on a single file. But not like this. please help me. THank You in advance.

Re: Record Count with current date using ICETOOL

PostPosted: Tue Aug 19, 2014 8:10 pm
by BillyBoyo
Format the data that you want in a file, COPY the file to the same OUDD.

Re: Record Count with current date using ICETOOL

PostPosted: Wed Aug 20, 2014 12:37 pm
by niyasna
Billy, Thanks for the reply.

what i want is to diplay the only the current date and time using ICETOOL command. REst things i can manage. Thanks in Advance

Re: Record Count with current date using ICETOOL

PostPosted: Fri Aug 22, 2014 6:43 pm
by Magesh23586
Here is the code for you.
Just add IND2 dd *

//TOOL EXEC PGM=ICETOOL     
//IND2 DD *                                           
A                                                     
//INDD DD *                                           
A                                                     
B                                                     
//IND1 DD *                                           
C                                                     
D                                                     
//OUDD DD SYSOUT=*                                     
//TOOLMSG DD SYSOUT=*                                 
//DFSMSG DD SYSOUT=*                                   
//TOOLIN DD *                                         
COPY FROM(IND2) TO(OUDD) USING(CNT1)                   
COUNT FROM(INDD) WRITE(OUDD) TEXT('FILE1 ') DIGITS(7) 
COUNT FROM(IND1) WRITE(OUDD) TEXT('FILE2 ') DIGITS(7) 
/*                                                     
//CNT1CNTL DD *                                           
 INREC OVERLAY=(1:C'PAGE:1 DATE: ',DATE1(-),C' TIME: ',TIME1(:))
//*             


You may need to change the date format.
Hope this helps

Regards,
Magesh