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

To find latest generation of GDG


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Mon Aug 06, 2007 5:25 pm
Reply with quote

Hello,

Can somebody help me out for the following requirement.

1) Using Rexx, I have to find the 5 recent generations of a GDG & display the contents of it in a word document.

2) Then i have to choose a job name listed in the contents of GDG (randomly from any one generation) & browse a pds (where job info is stored as members) to display the corres job info in a word document. (Assume as each generation is a report which contains list of job names)

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

Global Moderator


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

PostPosted: Mon Aug 06, 2007 6:27 pm
Reply with quote

Interesting project. There is nothing in your requirements that you shouldn't be able to find by searching the forums. I'll start by offering some tips:

rabindranathtawker wrote:
Using Rexx, I have to find the 5 recent generations of a GDG ...

Nothing in REXX will do this. The same utility you use to define and modify GDG's (IDCAMS) also can be used to query them. A quick search located a couple of useful topics:

www.ibmmainframes.com/viewtopic.php?t=18963
www.ibmmainframes.com/viewtopic.php?t=19564

The rest of the project sounds like normal logic processing and file I/O, which if you already know REXX shouldn't be much of an issue.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Aug 06, 2007 6:31 pm
Reply with quote

Another tip: Use correct terminology. GDG's are usually referred to by their generation (Gnnnn), not by their version (Vnn).
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Mon Aug 06, 2007 6:57 pm
Reply with quote

Hello,

Tx frnds for ur help.. im new to rexx. i have coded my pgm - given below - till the point of browsing the 5 versions & appending all the data to a single ps. now im wondering as how to convert this to a word doc.. is there any way where ftp & rexx could be clubbed?

Code:

$DSN = "T6201BTX.T6201.DAILY.HANG"               
 Q = OUTTRAP(DATA.)                               
      ADDRESS TSO  "LISTC ENT('"||$DSN||"')"     
 Q = OUTTRAP(OFF)                                 
$REC = DATA.0 - 1                                 
 COUNT = 0                                       
DO SUBSCRIPT = (DATA.0 - 1) to 1 BY -2,           
   UNTIL COUNT = 5                               
   COUNT = COUNT +  1                             
   say subscript                                 
   say count                                     
   say data.subscript                             
 PARSE VAR DATA.subscript . . $NAME               
   CALL copy_file                                 
END                                               
EXIT                                             

Copy_file:                                                             
                                                                       
Address TSO                                                             
  say $name                                                             
                                                                       
  "ALLOC F(IN)  DA('"$name"') SHR"                                     
  "ALLOC F(OUT) DA('t3162btx.t3162.daily.hang.report') MOD"             
  'EXECIO * DISKR IN (STEM rprt. FINIS'     /* copy file into stem*/   
/*Queue */                          /* add null line to stack */       
  'EXECIO * DISKW  OUT (STEM rprt. FINIS'   /* copy using stem*/       
  "FREE F(IN,OUT)"                                                     
  say 'no. of lines ' data.0                                           
  RETURN                                                               
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Mon Aug 06, 2007 7:00 pm
Reply with quote

Yes Kevin.. as u said, little search helped me to kick start this pgm..
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Aug 06, 2007 7:15 pm
Reply with quote

rabindranathtawker wrote:
now im wondering as how to convert this to a word doc


Don't know - that's a proprietary format. I'd do an internet search for text-to-word conversion utilities. I know there exists somewhere a TXT2RTF REXX utility and a TXT2PDF REXX utility.

rabindranathtawker wrote:
is there any way where ftp & rexx could be clubbed?


I have no idea what this statement means. FTP is a native TSO command, so it can, of course, be called by a REXX exec.
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: Mon Aug 06, 2007 7:54 pm
Reply with quote

Quote:
rabindranathtawker wrote:
is there any way where ftp & rexx could be clubbed?


Quote:
I have no idea what this statement means.

I believe it means "joined" or "used together" and sometimes horizontal concatenation (rather than vertical as with DDs).

Maybe someone will share a "real" definition. . . .

d
Back to top
View user's profile Send private message
rabindranathtawker

New User


Joined: 22 Jun 2007
Posts: 22
Location: Connecticut

PostPosted: Tue Aug 14, 2007 10:24 am
Reply with quote

Hi Frnds,

Sry. Was out of town. so couldn't reply immd.

Kevin, what i meant was can FTP be used/invoked thru REXX by any means... I will check out on TXT2RTF utility..

Thanks all for your help..
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Compare latest 2 rows of a table usin... DB2 1
Search our Forums:

Back to Top