Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

JCL inputs for to copy GDG name and its generation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL inputs for to copy GDG name and its generation
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

Site Director


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

PostPosted: Fri May 02, 2008 10:43 am    Post subject:
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    Post subject: JCL inputs for to copy GDG name and its generation > Upda
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

Moderator Team Head


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

PostPosted: Fri May 02, 2008 6:24 pm    Post subject: Reply to: JCL inputs for to copy GDG name and its generation
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

Site Director


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

PostPosted: Fri May 02, 2008 7:53 pm    Post subject:
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    Post subject: Reply to: JCL inputs for to copy GDG name and its generation
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

Site Director


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

PostPosted: Sat May 03, 2008 1:55 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us