files fusion



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

files fusion

Postby pulcinella » Fri Feb 18, 2011 12:31 am

Hello.

I have a process that one is he executes all the weekdays and generates several files with the date of the day.
(FILE1.F110103 FILE2. F110104 FILE3. F110105 FILE4. F110107.... The 6th was festive and it was not generated)

I need to do a sort who gathers all these files last day of the week bearing in mind the date in which they were executed and fuses them in the only one

It might do a process with parameters, across the CONTROL - M, which verifies the dates but, I know that exist a utility that allows to take all the files that start by a certain cualificador and fuses them ((in example FILE*.)

I used it but I don't remember know Might you help me or say me that utility or command is?

Thank you very much
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: files fusion

Postby NicC » Fri Feb 18, 2011 1:49 am

The term is 'MERGE' not fusion. Do you just want the files as one file with the records in the same sequence as they are in the original files or do you want them sorted? If you want them sorted the just concatenate them on your SORTIN DD statement otherwise just concaenate them on your SYSUT1 statement into IEBGENER.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: files fusion

Postby Frank Yaeger » Fri Feb 18, 2011 2:17 am

pulcinella,

I know that exist a utility that allows to take all the files that start by a certain qualifier and fuses them ((in example FILE*.)


I can't help you with that. But I can clarify DFSORT terminology.

A MERGE requires sorted files as input; it produces a "merged" file as output. It uses SORTINnn DD statements for the input files.

A SORT does not require sorted files as input; it produces a "sorted" file as output. It uses a SORTIN DD statement for the input file (can contain concatenated files).

A COPY does not require sorted files as input; it produces an "unsorted" file as output. It uses a SORTIN DD statement for the input file (can contain concatenated files).

A JOIN "joins" two files on a key.
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: files fusion

Postby dick scherrer » Fri Feb 18, 2011 2:21 am

Hello,

Or use your sort to copy them as a concatenated SORTIN collection of files. To do this or use IEBGENER, each dataset name would need to be specified in the jcl.

If you want to use a wildcard (FILE*) regular JCL will not do this. ADRDSSU does this, but the output is not a single, usable file. It is a "backup file".

One easy to do what you want is to do a listcat and create the needed concatenation from the dataset names returned by the listcat.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: files fusion

Postby pulcinella » Fri Feb 18, 2011 4:38 am

I think that I don't explain.

I know (because I used it by JCL but I don't remember) that I can SORT (not MERGE excuse me) several files in spite of all that do not know am going to have. In only one step one I could do the sort without knowing the number of files of entry that it was going to have. If I do not remember badly it was done by means of a first qualifiers and was ending in a script "-". I didn't use many DD statement; I only used one DD statement which includes an undetermined number of files. Only I can said that was similar at LISTCAT command.

I try to remember as I did.

Thanks and excuse me
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: files fusion

Postby dick scherrer » Fri Feb 18, 2011 8:37 am

Hello,

One way to do this is to specify the gdg base of a generation dataset. If the base is specified on a dd statement, all of the generations are read as a single file.

Another is if your organization has some home-written or purchased utility that offers this functionality.

If this is something that would be useful, you could implement your own by generating the needed input concatenation dd and using this as inpout to the run.

Good luck :)
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: files fusion

Postby pulcinella » Mon Feb 21, 2011 6:17 pm

Thank you for your answer.

Possibly had a utility that did that. Try to find out.
Meanwhile I would be useful to know if I can do a sort with several DD without knowing whether or not a file.
I mean, if I do a SORT and one of the files did not exist I think I would give an error. How I can solve this without having to check if the file exists or not? "I can use the ICETOOL or another utility to do the check for me?. No need to tell me the exact code, just tell me the command or manual where I can read it.
Best regards and excuse me
Pulcinella
pulcinella
 
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: files fusion

Postby dick scherrer » Tue Feb 22, 2011 1:18 am

Hello,

I mean, if I do a SORT and one of the files did not exist I think I would give an error.
Yes, if you specify a dataset name on a dd statement as input and the dataset does not exist, there will be a jcl error and the job flushed. . .

No need to tell me the exact code, just tell me the command or manual where I can read it
As i mentioned before:
One easy to do what you want is to do a listcat and create the needed concatenation from the dataset names returned by the listcat.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post