Continuation of report in ICETOOL



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

Continuation of report in ICETOOL

Postby schintala » Sat Dec 24, 2022 10:32 pm

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
schintala
 
Posts: 5
Joined: Wed Jun 10, 2020 12:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: Continuation of report in ICETOOL

Postby vasanthz » Sat Dec 24, 2022 10:49 pm

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.
User avatar
vasanthz
 
Posts: 27
Joined: Thu Aug 05, 2010 2:53 pm
Has thanked: 8 times
Been thanked: 0 time

Re: Continuation of report in ICETOOL

Postby schintala » Sat Dec 24, 2022 11:40 pm

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)  -      
  ----
  ----
 
schintala
 
Posts: 5
Joined: Wed Jun 10, 2020 12:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: Continuation of report in ICETOOL

Postby vasanthz » Sun Dec 25, 2022 6:10 pm

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.
User avatar
vasanthz
 
Posts: 27
Joined: Thu Aug 05, 2010 2:53 pm
Has thanked: 8 times
Been thanked: 0 time

Re: Continuation of report in ICETOOL

Postby schintala » Mon Dec 26, 2022 7:59 pm

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?
schintala
 
Posts: 5
Joined: Wed Jun 10, 2020 12:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: Continuation of report in ICETOOL

Postby sergeyken » Tue Dec 27, 2022 9:32 pm

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
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 409
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 6 times
Been thanked: 40 times

Re: Continuation of report in ICETOOL

Postby schintala » Wed Dec 28, 2022 8:54 pm

Thanks much for the recommendation. It's my turn now to build logic based on it.
schintala
 
Posts: 5
Joined: Wed Jun 10, 2020 12:15 am
Has thanked: 0 time
Been thanked: 0 time

Re: Continuation of report in ICETOOL

Postby sergeyken » Fri Dec 30, 2022 12:27 am

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.
Javas and Pythons come and go, but JCL and SORT stay forever.
User avatar
sergeyken
 
Posts: 409
Joined: Wed Jul 24, 2019 10:12 pm
Has thanked: 6 times
Been thanked: 40 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post