View previous topic :: View next topic
|
Author |
Message |
puneetvirmani143
New User
Joined: 24 Jul 2007 Posts: 55 Location: noida
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
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 |
|
|
|