View previous topic :: View next topic
|
Author |
Message |
ybkadam
New User
Joined: 26 Oct 2007 Posts: 3 Location: Pune
|
|
|
|
Hi
My Requirement is that - we have a input PS which containing GDG names. We want GDG name and it's present generation only in two separte columns in the output PS file.
for e.g. if we give GDG name as
XXXX.MYGDG.NAME.PRESENT(+0) in input PS then we are expecting output as:
XXXX.MYGDG.NAME.PRESENT G0051V00
These are two separte columns.
I'm using following logic as:
//STEP10 EXEC PGM=IDCAMS
//*
//* GDG NAME SOULD BE GIVEN HERE IN THE PS
//*
//DD1 DD DSN=RKB1T.O.NEWACT.B.CUTGRP(+0),DISP=SHR
//DD2 DD DSN=RKB1T.O.RKB1DA01.E.RKB1DB00.TRIN(+0),DISP=SHR
//SYSPRINT DD SYSOUT=K
//SYSIN DD *
PRINT INFILE (DD1) COUNT(0) CHAR
PRINT INFILE (DD2) COUNT(0) CHAR
//*
/*
//*
Any pointers on this are highly useful.
Thanks in advance!
- Yash |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Yash and welcome ot the forums,
Write the IDCAMS LISTCAT report to a file. Then pull the info from that data and present it however you want it. |
|
Back to top |
|
|
ybkadam
New User
Joined: 26 Oct 2007 Posts: 3 Location: Pune
|
|
|
|
Thanks Dick for your input!
Could you please elaborate on this?
- Yashwant |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Yashwant, I'm confused (what else is new, huh?).
The job you originally posted will give you the information you need to create your report. What else is it that you're looking for here? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Yash,
I mentioned listcat because that is a way to specify the dataset name(s) in the idcams control statements and not need a dd statement for each dataset.
As Kevin mentioned, the info you want is in the output of what you posted.
Either way you will need to process the idcams output to get this:
Quote: |
XXXX.MYGDG.NAME.PRESENT G0051V00 |
|
|
Back to top |
|
|
ybkadam
New User
Joined: 26 Oct 2007 Posts: 3 Location: Pune
|
|
|
|
Hi Dick,
You are right. Thank you.
My confusion lies here when i see the sysout of this job in SPOOL.
it is as follows:
IDCAMS SYSTEM SERVICES TIME: 02:09:30
PRINT INFILE (DD1) COUNT(0) CHAR
IDCAMS SYSTEM SERVICES TIME: 02:09:30
LISTING OF DATA SET -XXXX.O.MYGDG.NAME.PRESENT.G0051V00
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
IDCAMS SYSTEM SERVICES TIME: 02:09:30
PRINT INFILE (DD2) COUNT(0) CHAR
IDCAMS SYSTEM SERVICES TIME: 02:09:30
LISTING OF DATA SET -XXXX.O.MYGDG.NAME.PRESENT.OTHER.G0110V00
IDC0005I NUMBER OF RECORDS PROCESSED WAS 0
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0
IDCAMS SYSTEM SERVICES TIME: 02:09:30
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0
And my requirement is that when i give GDG name in one PS file i would get GDG name and and it's current generation in two differnet columns of output PS file. So that i will maintain them in separate spreadsheet.
column 1 column 2
XXXX.O.MYGDG.NAME.PRESENT G0051V00
XXXX.O.MYGDG.NAME.PRESENT.OTHER G0110V00
From above sysout if i sort out GDG name with with it's current generation
LISTING OF DATA SET -XXXX.O.MYGDG.NAME.PRESENT.G0051V00
LISTING OF DATA SET -XXXX.O.MYGDG.NAME.PRESENT.OTHER.G0110V00
As these names are variable length so how can i separate GDG geneartions from it's base name and create new output PS file from the same. Any pointers on this are helpful or any other way to do the same requirement.
- Yash
PS: Sorry for troubling you again. I'm very little aware about LISTCAT so can you please advice me where would i get information for the same. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Yash,
Quote: |
Sorry for troubling you again. |
No trouble
To get from
Code: |
LISTING OF DATA SET -XXXX.O.MYGDG.NAME.PRESENT.G0051V00
LISTING OF DATA SET -XXXX.O.MYGDG.NAME.PRESENT.OTHER.G0110V00
|
to
Code: |
XXXX.O.MYGDG.NAME.PRESENT G0051V00
XXXX.O.MYGDG.NAME.PRESENT.OTHER G0110V00
|
i've always written a bit of code to read and reformat the output from some utility into the way i needed the data.
In your case, this
Code: |
XXXX.O.MYGDG.NAME.PRESENT,G0051V00
XXXX.O.MYGDG.NAME.PRESENT.OTHER,G0110V00
|
might be preferable.
I suspect you could do some "programming" with your sort product but i've had this kind of requirement since before the sort was programmable, so i always used code. |
|
Back to top |
|
|
|