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
 

 

Copy GDG file name along with generation in to PS file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Copy GDG file name along with generation in to PS file
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

Moderator Team Head


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

PostPosted: Wed Feb 27, 2008 11:22 pm    Post subject: Reply to: Copy GDG file name along with version in to PS fil
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: 3158
Location: Tucson AZ

PostPosted: Wed Feb 27, 2008 11:29 pm    Post subject:
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    Post subject: Reply to: Copy GDG file name along with generation in to PS
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

Moderator Team Head


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

PostPosted: Wed Feb 27, 2008 11:33 pm    Post subject: Reply to: Copy GDG file name along with generation in to PS
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    Post subject: Reply to: Copy GDG file name along with generation in to PS
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

Active Member


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

PostPosted: Thu Feb 28, 2008 12:49 am    Post subject:
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    Post subject:
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

Active Member


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

PostPosted: Thu Feb 28, 2008 1:20 am    Post subject:
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    Post subject: Reply to: Copy GDG file name along with generation in to PS
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

Moderator Team Head


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

PostPosted: Thu Feb 28, 2008 2:09 am    Post subject: Reply to: Copy GDG file name along with generation in to PS
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

Moderator Team Head


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

PostPosted: Thu Feb 28, 2008 2:12 am    Post subject: Reply to: Copy GDG file name along with generation in to PS
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    Post subject: Reply to: Copy GDG file name along with generation in to PS
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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