Record Count with current date using ICETOOL



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Record Count with current date using ICETOOL

Postby niyasna » Tue Aug 19, 2014 7:31 pm

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.
niyasna
 
Posts: 2
Joined: Tue Aug 19, 2014 6:43 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Record Count with current date using ICETOOL

 

Re: Record Count with current date using ICETOOL

Postby BillyBoyo » Tue Aug 19, 2014 8:10 pm

Format the data that you want in a file, COPY the file to the same OUDD.

These users thanked the author BillyBoyo for the post:
niyasna (Wed Aug 20, 2014 3:11 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Record Count with current date using ICETOOL

Postby niyasna » Wed Aug 20, 2014 12:37 pm

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
niyasna
 
Posts: 2
Joined: Tue Aug 19, 2014 6:43 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Record Count with current date using ICETOOL

Postby Magesh23586 » Fri Aug 22, 2014 6:43 pm

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
Magesh23586
 
Posts: 35
Joined: Sat Jul 05, 2014 5:36 pm
Has thanked: 1 time
Been thanked: 3 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post