On Thu, 16 Apr 2020 11:24:43 -0500, Tim Hare <haresystemssupp...@comcast.net> 
wrote:

>Before I start chiseling a piece of stone into a wheel :-)   -  I've been 
>thinking about ICETOOL and DB2.  Is there already in existence something that 
>would provide a SELECT (similar to what is used in DSNTIAUL or DSNTIAD)  to 
>select DB2 data as an E15 exit for DFSORT?  
>
>My ideal would be (Maybe I should write an RFE)
>------
>In ICETOOL the ability to code SQLSEL FROM(SQL) USING(xxxx)
>
>xxxxCNTL DD *
>
>SELECT ....

For anybody that might be interested, SYNCSORT can run SQL SELECT statements.  
I'm not sure of the exact details on how to install/enable that feature, but 
here is some sample SYNCSORT JCL to run a SELECT:

//SORTDB2 EXEC PGM=SORT,PARM='DB2=ssid'                    
//STEPLIB  DD  DISP=SHR,DSN=hlq.xxx.SDSNEXIT               
//         DD  DISP=SHR,DSN=hlq.xxx.SDSNLOAD               
//SYSOUT   DD  SYSOUT=*                                    
//SORTOUT  DD  SYSOUT=*                                    
//SORTDBIN DD  *                                           
  SELECT * FROM Q.STAFF;                                   
/*                                                         
//SYSIN    DD  *                                           
  SORT   FIELDS=COPY                                       
  INREC  FINDREP=(INOUT=(X'00',X'40'),STARTPOS=5,ENDPOS=13)
  OUTFIL HEADER2=(1:' ID#  Name      Dept  Title Years',   
                  42:'Salary    Commission'),              
         BUILD=(1:1,2,BI,ZDF,C' ',                         
                5,9,C' ',                                  
                15,2,BI,ZDF,C' ',                          
                18,5,C' ',                                 
                24,2,BI,EDIT=(IIIIT),C' ',                 
                27,4,PD,EDIT=($I,III,IIT.TT),C' ',         
                32,4,PD,EDIT=($I,III,IIT.TT))              
  END                                                      
/*                                                         
//*                                                        

Q.STAFF is a sample table that ships with QMF.  You have to tell SYNCSORT the 
DB2 SubSystem ID (DB2=ssid) to use and you have to STEPLIB to the DB2 SDSNLOAD 
Library, (if you use SDSNEXIT, then it should come before SDSNLOAD).  You can 
run much more complicated SELECTs then I have in this example!  You can use 
SYNCSORT control statements to reformat the output into a readable report.

-- 
Dale R. Smith

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to