COUNT and SYSIN



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

COUNT and SYSIN

Postby samb01 » Tue Feb 19, 2019 5:25 pm

Hello,

i would like to get the line's numbre of a dataset and use it in a sysin :


//VERIFLNA EXEC PGM=ICETOOL                  
//TOOLMSG DD SYSOUT=*                        
//DFSMSG DD SYSOUT=*                          
//INDD DD DISP=SHR,DSN=DATASET.NOTEQUAL  
//TOOLIN DD            
COUNT FROM(INDD) NOTEQUAL(58)            

 


The number 58 is the number of line of this dataset : DATASET.NUMBER

Thank's for your help.
samb01
 
Posts: 427
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: COUNT and SYSIN

Postby Garry F Carroll » Tue Feb 19, 2019 5:36 pm

The number 58 is the number of line of this dataset : DATASET.NUMBER


This is unclear. Is 58 a number that is in a record of DATASET.NUMBER or the number of records in DATASET.NUMBER ?

Are you looking to dynamically create the control card
COUNT FROM(INDD) NOTEQUAL(58)
based on the number from DATASET.NUMBER ?

Garry.
Garry F Carroll
 
Posts: 28
Joined: Wed Sep 19, 2018 8:20 pm
Has thanked: 0 time
Been thanked: 1 time

Re: COUNT and SYSIN

Postby samb01 » Tue Feb 19, 2019 6:25 pm

Hello, sorry for my english.
58 is the number of records in DATASET.NUMBER

i 'd like to get this number in the next sysin :


COUNT FROM(INDD) NOTEQUAL(number of records of the dataset : DATASET.NUMBER)
 
samb01
 
Posts: 427
Joined: Mon Nov 16, 2009 7:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: COUNT and SYSIN

Postby Garry F Carroll » Tue Feb 19, 2019 8:13 pm

If you use ICETOOL to COUNT the records in DATASET.NUMBER and put the output to (temporary) dataset, you can use this to dynamically build a SYMNAMES record with the result by extracting the record count. Then, using the SYMNAMES, generate a control card containing the value you want.

//TOOLIN  DD *                
*                            
 COUNT FROM(NUMBER)          
*                            
 

//TOOLIN  DD *                                          
*                                                        
 COPY FROM(COUNTER) TO(SYMNAMES) USING(CTL1)            
*                                                        
/*                                                      
//CTL1CNTL DD *                                          
*                                                        
  INCLUDE COND=(1,80,SS,EQ,C'RECORD COUNT')              
  OUTREC BUILD=(1:C'MyCount,C',C'''',27,15,C'''',80:X)  
*                                                        
 

//DUMMY   DD *                                                    
DUMMY RECORD                                                      
//TOOLIN  DD *                                                    
 COPY FROM(DUMMY) TO(MYCTRL) USING(CTL1)                          
//CTL1CNTL DD *                                                    
*                                                                  
 OUTFIL FNAMES=MYCTRL,                                            
        BUILD=(1:C' COUNT FROM(INDD) NOTEQUAL(',MyCount,C')',80:X)
*                                                                  
 


Garry.
Garry F Carroll
 
Posts: 28
Joined: Wed Sep 19, 2018 8:20 pm
Has thanked: 0 time
Been thanked: 1 time

Re: COUNT and SYSIN

Postby NicC » Wed Feb 20, 2019 5:08 pm

Seems to be a DFsort question not JCL. Moved.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post