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

JCL inputs for to copy GDG name and its generation


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ybkadam

New User


Joined: 26 Oct 2007
Posts: 3
Location: Pune

PostPosted: Fri May 02, 2008 8:58 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 02, 2008 10:43 am
Reply with quote

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
View user's profile Send private message
ybkadam

New User


Joined: 26 Oct 2007
Posts: 3
Location: Pune

PostPosted: Fri May 02, 2008 6:11 pm
Reply with quote

Thanks Dick for your input!

Could you please elaborate on this?

- Yashwant
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri May 02, 2008 6:24 pm
Reply with quote

Yashwant, I'm confused (what else is new, huh?). icon_confused.gif

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 02, 2008 7:53 pm
Reply with quote

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
View user's profile Send private message
ybkadam

New User


Joined: 26 Oct 2007
Posts: 3
Location: Pune

PostPosted: Sat May 03, 2008 12:49 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 03, 2008 1:55 pm
Reply with quote

Hi Yash,
Quote:
Sorry for troubling you again.
No trouble icon_smile.gif

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top