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
 

 

Procesing Several files at the Same time?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 90
Location: Spain

PostPosted: Thu Apr 30, 2009 5:28 pm    Post subject: Procesing Several files at the Same time?
Reply with quote

Hi

I have a request in which i need to Process several Files at the same time in the form:

FILENAME.NAME001.DATE*

We have a file for each month of the year, for every year. The date part is in the form: D200901, D200902, etc...

The thing is, I need to sort all files in a given year, any given time, and the job doesn't know at that time, how many files there are. Since the files are updated and generated at random dates, I can't acummulate the files at a given or specific time, nor modify the job every month, so i can't code the job like this:

Code:

//SORTIN   DD DSN=FILENAME.NAME001.D200901,DISP=SHR   
//         DD DSN=FILENAME.NAME001.D200902,DISP=SHR
//         DD ETC.....


My question is, is there a way to read all files at once, and then copy them to a single file, wich would be a Sortin file for a later sort step?

I know Listcat can read catalog entries, but, is there a way to read altogether all the files using an * wildcard and copy them to a new file in a JCL step, instead of processing every file by separate?

I'm sorry for my lousy english icon_redface.gif . I hope that made sense

Thanks in Advance

Oliver
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Apr 30, 2009 5:35 pm    Post subject:
Reply with quote

Have you considered GDGs?
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 90
Location: Spain

PostPosted: Thu Apr 30, 2009 5:42 pm    Post subject:
Reply with quote

In this particular case i can't work with GDG files. All the files are in cartridges, are deleted and created constantly, so the generational indexing would be lost. Also, in this client, well, i'll just say they aren't friendly with GDG files

And i forgot to add, that month by month the number of files well be bigger. I mean, if the date is January, then I'll process all 12 files of the previous year, If the date is march, then I'll process all the files from january to march, therefore my need icon_neutral.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2033
Location: Silicon Valley

PostPosted: Thu Apr 30, 2009 9:02 pm    Post subject: Reply to: Procesing Several files at the Same time?
Reply with quote

There might be other ways to do what you want, but I think you will need to write a rexx program that issues a LISTCAT command, traps the command output, and builds a customized job.
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 90
Location: Spain

PostPosted: Thu Apr 30, 2009 10:05 pm    Post subject:
Reply with quote

Thanks Pedro. That's what people usually do here in this client. However, since i Know that Support constantly takes all kind of files and processes them in bulk, IE, migrating all files with a specific name, i though that maybe i could acomplish something like that, but for copy

I'll keep looking into it, and if i find an answer, I'll post it here as well
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 90
Location: Spain

PostPosted: Sat May 02, 2009 8:44 pm    Post subject:
Reply with quote

So, any ideas anyone?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7996
Location: Bellevue, IA

PostPosted: Sat May 02, 2009 8:53 pm    Post subject:
Reply with quote

Write a program to grab the LISTCAT output, parses it, and builds a customized job to submit, as Pedro said. I don't think there's a whole lot of other ways to do what you want. JCL is determined when submitted so you can't change it on the fly. Therefore before you submit the job it has to have references to every file you're going to process, period. Which implies if you don't know how many files you have to process you have to run a LISTCAT to find out and then run a program to read the LISTCAT output to determine how many there are, update a template to include the ones you need to process, and generate the JCL with the correct file name(s).
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 90
Location: Spain

PostPosted: Sun May 03, 2009 8:03 pm    Post subject: Reply to: Procesing Several files at the Same time?
Reply with quote

Thanks. That's the last solution i wanted to try. To use the listcat to get the filenames and then overwrite the jcllib. I guess that's all i can do. Thanks anyway
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon May 04, 2009 8:42 pm    Post subject:
Reply with quote

It sounds like you could start at month 1 and dynamically allocate the datasets adding 1 to the month each time until the allocate fails.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu May 07, 2009 9:45 pm    Post subject:
Reply with quote

Would something like the following help?
Code:
/* SAMPLE REXX TO EXECUTE DFSORT */                       
"FREE FI(SYSOUT SORTOUT SYSIN)"                           
"FREE FI(SORTIN01 SORTIN02 SORTIN03 SORTIN04 SORTIN05 SORTIN06)"
"FREE FI(SORTIN07 SORTIN08 SORTIN09 SORTIN10 SORTIN11 SORTIN12)"
"ALLOC DDNAME(SYSOUT) DSN(*)"                                   
"ALLOC DDNAME(SORTIN01) DSN('HLQ.D200901') REUSE"         
"ALLOC DDNAME(SORTIN02) DSN('HLQ.D200902') REUSE"         
"ALLOC DDNAME(SORTIN03) DSN('HLQ.D200903') REUSE"         
"ALLOC DDNAME(SORTIN04) DSN('HLQ.D200904') REUSE"         
"ALLOC DDNAME(SORTIN05) DSN('HLQ.D200905') REUSE"         
"ALLOC DDNAME(SORTIN06) DSN('HLQ.D200906') REUSE"         
"ALLOC DDNAME(SORTIN07) DSN('HLQ.D200907') REUSE"         
"ALLOC DDNAME(SORTIN08) DSN('HLQ.D200908') REUSE"         
"ALLOC DDNAME(SORTIN09) DSN('HLQ.D200909') REUSE"         
"ALLOC DDNAME(SORTIN10) DSN('HLQ.D200910') REUSE"         
"ALLOC DDNAME(SORTIN11) DSN('HLQ.D200911') REUSE"         
"ALLOC DDNAME(SORTIN12) DSN('HLQ.D200912') REUSE"         
"ALLOC DDNAME(SORTOUT) DSN('HLQ.. . . ') REUSE"               
"ALLOC DDNAME(SYSIN) DSN('HLQ.PARMLIB(MERGCOPY)') SHR REUSE"
ADDRESS LINKMVS ICEMAN                                           
"FREE FI(SYSOUT SORTOUT SYSIN)"                           
"FREE FI(SORTIN01 SORTIN02 SORTIN03 SORTIN04 SORTIN05 SORTIN06)"
"FREE FI(SORTIN07 SORTIN08 SORTIN09 SORTIN10 SORTIN11 SORTIN12)"

Where 'HLQ.PARMLIB(MERGCOPY)' contains:
Code:
  INREC BUILD=(1:1,80,81:C'1')
  MERGE FIELDS=(81,1,CH,A)   
  OUTREC BUILD=(1:1,80)       

This will copy any of the datasets specified that exist.
Back to top
View user's profile Send private message
ojdiaz

New User


Joined: 19 Nov 2008
Posts: 90
Location: Spain

PostPosted: Mon May 18, 2009 6:04 pm    Post subject:
Reply with quote

Hmm... that looks interesting. However, what is REXX? I don't know or haven't worked before with something with a name like that
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue May 19, 2009 6:45 am    Post subject:
Reply with quote

Do you have a PDS allocated to SYSEXEC or SYSPROC that you can put this into? Then on the ISPF Command line type % and the PDS member name and it will execute. It will also work to submit a batch job running TSO (IKJEFT1A) and executing the REXX. REXX are similar to CLIST but better. There is a section of this forum for CLISTS and REXX and they are very useful. It is a good thing to learn.
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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts CICS transaction slow response time vasanthz All Other Mainframe Topics 3 Thu Jan 19, 2017 1:31 am
No new posts DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm


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