MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

determining creation of gdg for use in creation of jcl

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
timfoster
Beginner


Joined: 08 Jul 2004
Posts: 12
Topics: 5

PostPosted: Fri Jul 09, 2004 8:32 am    Post subject: determining creation of gdg for use in creation of jcl Reply with quote

I have the following scenario that I am trying to design a solution for

we have a number of gdg's on both disk and tape. We want to use the creation date of them in dynamically created jcl that will process the gdg's. It was decided that we want to use rexx to dynamically create the jcl or update the procs and use the creation date as a cycle date.

I currently have created an idcams step that will execute the following command

listcat entries(dataset name) history

and puts the output into a dataset.

The date returned from this is in the format YYYY.DDD. We need it in the format of ccyymmdd.

I was planning to read this dataset in a rexx program and convert the date and then use it to update the procs that will be run to process the gdg's. I also see that I could execute the listcat int he rexx program and trap the output thereby removing the need to run the idcams step.

does anyone know of a function in rexx that will convert the date or would it be better to call a cobol subroutine if one was already written.

also I was wondering if anyone could provide an opinon as to whether this is the best way to go about doing this sort of thing to create jcls without writing a seperate one for each of the 200 gdgs that need to be processed. I am not new to the mainframe but am new to the idea of dynamic jcl generation and the uses to which rexx can be put.

thanks in advance
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12380
Topics: 75
Location: San Jose

PostPosted: Fri Jul 09, 2004 9:54 am    Post subject: Reply with quote

timfoster,

This topic will give you an idea for your problem.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2104

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri Jul 09, 2004 10:02 am    Post subject: Reply with quote

Date Conversions in REXX:

Julian to Gregorian:
Code:

jdate = 04050
Say J2G1(jdate) = 731629
Say J2G2(jdate) = 19/02/04
Say J2G3(jdate) = February
Say J2G4(jdate) = 19 Feb 2004
Say J2G5(jdate) = 04/02/19
Say J2G6(jdate) = 20040219
Say J2G7(jdate) = 02/19/04
Say J2G8(jdate) = Thursday

J2G1:
RETURN DATE('B',ARG(1),'J')   
J2G2:
RETURN DATE('E',ARG(1),'J') 
J2G3:
RETURN DATE('M',ARG(1),'J') 
J2G4:
RETURN DATE('N',ARG(1),'J')   
J2G5:
RETURN DATE('O',ARG(1),'J') 
J2G6:
RETURN DATE('S',ARG(1),'J') 
J2G7:
RETURN DATE('U',ARG(1),'J') 
J2G8:
RETURN DATE('W',ARG(1),'J') 

Gregorian to Julian:
Code:

gdate = '02/19/04'
Say G2J1(gdate) = 50

G2J1:                                   
RETURN DATE('D',ARG(1),'U')
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group