Page 1 of 1

Continuation of report in ICETOOL

PostPosted: Sat Dec 24, 2022 10:32 pm
by schintala
Hi Friends,
I am having trouble in generating report using ICETOOL. My requirement as below.
Sample input file here.

LCNDBP1          QREPSTC   10/22/2021
YYYYYYYYYYYY YY Y                    
LCNDBP1          QREPSTC   10/22/2021
       Y   Y    


Need to print the report as below.

LOCATION         USER/GROUP     DATEGRANTED    
------------     ----------     -----------      
LCNDBP1          DB2ADM1        08/14/2022  

SYSADM     SYSCTRL     ARCHIVE     BSDS     CREATEDBA     CREATEDBC
------     -------     -------     ----     ---------     ---------
   Y           Y         Y          Y
 


Is this something can be achieved in ICETOOL? Need to continue in 2nd line.

Thanks
schintala

Re: Continuation of report in ICETOOL

PostPosted: Sat Dec 24, 2022 10:49 pm
by vasanthz
DB2ADM1 is not there in the input file you showed. But in output file you have DB2ADM1.

Post the correct input file and the corresponding output file requirement.

Re: Continuation of report in ICETOOL

PostPosted: Sat Dec 24, 2022 11:40 pm
by schintala
Thank you Vasanthz for the replay.
Here is the correct input

LCNDBP1          QREPSTC   10/22/2021
             YY Y                    
LCNDBP1          QREPSTC   10/22/2021
       Y   Y    


My JCL something like this.
//STPN030  EXEC PGM=ICETOOL,ACCT='C<5'                                
//TOOLMSG   DD SYSOUT=*                                              
//DFSMSG    DD SYSOUT=*                                              
//SQLIN     DD DISP=SHR,DSN=E456004.DB.PARMLIB(DBRAU103)              
//INPUT     DD DSN=&&SYSAUTH,DISP=(OLD,DELETE)                        
//SQLOUT    DD SYSOUT=*                                              
//REPORT1   DD DISP=SHR,DSN=PERM.TDB.SHORTTRM.OUTPUT.TEST            
//TOOLIN   DD  *                                                      
  RESIZE FROM(INPUT) TO(REPORT1) TOLEN(37)                            
//STPN035  EXEC PGM=ICETOOL,ACCT='C<5'                                
//TOOLMSG   DD SYSOUT=*                                              
//DFSMSG    DD SYSOUT=*                                              
//SQLIN     DD DISP=SHR,DSN=E456004.DB.PARMLIB(DBRAU103)              
//INPUT     DD DISP=SHR,DSN=PERM.TDB.SHORTTRM.OUTPUT.TEST            
//SQLOUT    DD SYSOUT=*                                              
//REPORT1   DD SYSOUT=*                                              
//TOOLIN   DD  *                                                      
  DISPLAY FROM(SQLIN) LIST(SQLOUT) ON(1,71,CH) INDENT(5)              
  DISPLAY FROM(INPUT) LIST(REPORT1) DATE BLANK -                      
  TITLE('** USERS/GROUPS WITH SYSADM/SYSCTRL ACCESS **') -            
  PAGE  -                                                            
  BETWEEN(5) -                                                        
  HEADER('LOCATION')   ON(1,12,CH) -    
  HEADER('USER/GROUP') ON(18,10,CH) -  
  HEADER('DATEGRANTED') ON(28,10,CH) -  
  HEADER('SYSADM') ON(01,1,CH)  -      
  ----
  ----
 

Re: Continuation of report in ICETOOL

PostPosted: Sun Dec 25, 2022 6:10 pm
by vasanthz
Your input file still doesn't have DB2ADM1. But your output file has DB2ADM1.
What is the logic behind that?

you have 5 Y in input, but 4 in output.

Describe clearly the layout of input file and the logic to obtain the output file.

Re: Continuation of report in ICETOOL

PostPosted: Mon Dec 26, 2022 7:59 pm
by schintala
Thank you for the update.
We migrated reports from CA - SAR to $AVRS (from SEA soft company) now IBM product. One of report has 27 columns to print. Unfortunately, $AVRS prints only 20 headers and if it is beyond 20 it has to be in 2nd line. I split the record into two lines using RESIZE in ICETOOL and new input like this below.

Field1, Filed2, Filed3, ------ Field10
Field11, Filed12, ..........................Field27


I am struggling to print/display the 2nd line as continuation from first line. Is there anyway, can we do in ICETOOL?

Re: Continuation of report in ICETOOL

PostPosted: Tue Dec 27, 2022 9:32 pm
by sergeyken
schintala wrote:Thank you for the update.
We migrated reports from CA - SAR to $AVRS (from SEA soft company) now IBM product. One of report has 27 columns to print. Unfortunately, $AVRS prints only 20 headers and if it is beyond 20 it has to be in 2nd line. I split the record into two lines using RESIZE in ICETOOL and new input like this below.

Field1, Filed2, Filed3, ------ Field10
Field11, Filed12, ..........................Field27


I am struggling to print/display the 2nd line as continuation from first line. Is there anyway, can we do in ICETOOL?


If you are looking for a secret option like OPTION DOMYJOBFORME, there is no this one.

You need to implement some (very trivial) logic, using existing SORT statements, and a little bit your own mind.

1. Using IFTHEN=(WHEN=GROUP,... detect each type-1 line, and push whole content to the extended positions of the record.

2. Using IFTHEN=(WHEN=(condition),... detect each type-2 line (belonging to the group detected in #1).

3. Using BUILD=(...), combine new line out of type-2 record fields, plus copy of type-1 record fields pushed to the extended positions.

4. Ignore all source records; use only the newly built record from #3.

That's it

Re: Continuation of report in ICETOOL

PostPosted: Wed Dec 28, 2022 8:54 pm
by schintala
Thanks much for the recommendation. It's my turn now to build logic based on it.

Re: Continuation of report in ICETOOL

PostPosted: Fri Dec 30, 2022 12:27 am
by sergeyken
P.S.
From my point of view, attempting to use those sophisticated and mysterious "combined" operations provided by ICETOOL is not worth; much more simple and more clear solution is guaranteed by the basic operators provided by DFSORT itself.

ICETOOL may be useful only for standard trivial processing; any non-standard operation requires non-obvious tricks and gimbles in ICETOOL.