IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Capture Input GDG base names into QSAM Output file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
puneetvirmani143

New User


Joined: 24 Jul 2007
Posts: 55
Location: noida

PostPosted: Wed Mar 14, 2012 4:16 pm
Reply with quote

Hi,

I have a strange requirement to capture the names of GDG base names and their record count into one QSAM Output file thru ICETOOL/SORT.

Ex.

Input files are

//DD1 DD DSN=A.B.C(0),DISP=SHR
//DD2 DD DSN=C.D.E(0),DISP=SHR
//DD3 DD DSN=E.F.G(0),DISP=SHR

//DDOUT DD DSN=QSAm-Output-File, DISP=(,Caltg,Delete) and other parameters.

After completion of Job

DDOUT should show data as

A.B.C 10
C.D.E 20
E.F.G 30

where 10, 20 , 30 are number of records in Each GDG current generation.

Please help

Regards
Puneet
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 14, 2012 4:27 pm
Reply with quote

how many potential gdg's can you have?
are they always going to be the same name?
have you searched the forum?
do you know anything about computers? ibm mainframes?
what reward do you receive when you can provide your boss with this solution?
have you thought of collecting the information from another source,
such as job output from creator of current gdg generation,
instead of reading the files and counting.
what will you do with this report?
will it add to the companies ROI?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Wed Mar 14, 2012 7:41 pm
Reply with quote

puneetvirmani143,
Are you looking for all the "GDG Base" that starts with certain qualifier and get a count of each base with their respective counts?

OR

If you know the names of "GDG Base" in advance and you are just trying to get a total count of records for each gdg version?


If later is true, you may just read GDG base as SORTIN and run count job. That will give read all the GDG versions in the input. Something like below will give you output in flat file but you get the idea... If you are trying to get a list of "GDG base" depending on certain qualifier and you don't how many bases will result from that, you can still do that but you need to provide us with qualifier value and explain the rules in detail.

Code:
//STEP0001 EXEC PGM=SORT                                               
//SORTIN   DD  DISP=SHR,DSN=GDG BASE                                   
//SORTOUT  DD  SYSOUT=*                                               
//SYSIN DD *                                                           
   SORT FIELDS=COPY                                                   
   OUTFIL REMOVECC,NODETAIL,TRAILER1=('GDG BASE',COUNT=(M11,LENGTH=8))
/*                                                                     
//SYSOUT DD SYSOUT=*                                                   
//*                                                                   



Thanks,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top