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

Copy GDG file name along with generation in to PS file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijaysankar

New User


Joined: 27 Feb 2008
Posts: 9
Location: chennai

PostPosted: Wed Feb 27, 2008 11:06 pm
Reply with quote

I want to send a GDG file name along with generation number by email.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Feb 27, 2008 11:22 pm
Reply with quote

Could you give an example of what the intended mail message would look like? I'm confused when you refer to both the GDG filename and the Generation name.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Feb 27, 2008 11:29 pm
Reply with quote

I'm thinking that he means the base name and the GnnnVnn since the (+/-nn) would not be much use after a cycle or two.....
Back to top
View user's profile Send private message
vijaysankar

New User


Joined: 27 Feb 2008
Posts: 9
Location: chennai

PostPosted: Wed Feb 27, 2008 11:31 pm
Reply with quote

i want to send mail as per the below format.

HI,

DAILY CYCLE COMPLETED WITH FILE NAME:

GRT.CLMS201D.S215.LR215.RAM.MIS(0)

here instead of "GRT.CLMS201D.S215.LR215.RAM.MIS(0)" i want to send mail with version name like "GRT.CLMS201D.S215.LR215.RAM.MIS.G0768V00" . if you note this instead of (0) version number will be there "G0768V00".
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Feb 27, 2008 11:33 pm
Reply with quote

OK, so resolve the GDG to it's fully-qualified name using LISTCAT or programatically with any of the methods that have already been discussed here before.
Back to top
View user's profile Send private message
vijaysankar

New User


Joined: 27 Feb 2008
Posts: 9
Location: chennai

PostPosted: Wed Feb 27, 2008 11:44 pm
Reply with quote

you mean in the JCL we can use LISTCAT and then print into PS file.
can you able to provide some example for this. i am not getting it clearly icon_sad.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Feb 28, 2008 12:49 am
Reply with quote

Write LISTCAT to a (temp) file, then pull out the lines you want (via a program or SORT or whatever) and write them to a file, then either concatenate the file you want to that write, or write it separately with DISP=MOD.
Back to top
View user's profile Send private message
vijaysankar

New User


Joined: 27 Feb 2008
Posts: 9
Location: chennai

PostPosted: Thu Feb 28, 2008 1:10 am
Reply with quote

I tryied with LISTCAT and write the output in a file. since i used
" LISTC ENT('GDG NAME') " it list out all the details so i am facing difficult for sort. if i sort it also , i am not able to get the GDG latest file, since it will in the middle of the file. Is there any option to list GDG alone using LISTCAT.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Thu Feb 28, 2008 1:20 am
Reply with quote

SORT is designed to, well, sort. It happens to have other useful features, but if you need to extract the last occurrence of a string from a file (as you do here - the last name for a given GDG base), then SORT may not be your best option.

If you are a programmer, then write a program. This should be a relatively simple one.

Let us know.
Back to top
View user's profile Send private message
vijaysankar

New User


Joined: 27 Feb 2008
Posts: 9
Location: chennai

PostPosted: Thu Feb 28, 2008 1:24 am
Reply with quote

i will try to write a program/REXX for editing the LISTCAT file to fetch the GDG alone.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Feb 28, 2008 2:09 am
Reply with quote

If you use REXX, just use the LISTDSI function to resolve the dataset name allocated to a specific DD.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Feb 28, 2008 2:12 am
Reply with quote

This previous topic has some good suggestions also.
Back to top
View user's profile Send private message
vijaysankar

New User


Joined: 27 Feb 2008
Posts: 9
Location: chennai

PostPosted: Thu Feb 28, 2008 10:37 pm
Reply with quote

i got the solution icon_lol.gif using EASYTRIEVE coded in the JCL itself.

1. I got all GDG version by using LISTCAT function
2. Then i code EASYTRIEVE to read the GDG latest version and wite in the PS file which i used in the Mail step.

thanks for providing the solution. icon_lol.gif
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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