Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenating files in JCL 1

Status
Not open for further replies.

deveshjogal

Programmer
Dec 30, 2002
61
Hi all

I have a requirement. I receive a set of files from differnt vendors. The first 4 node of all datasets are common. The 5th node is a sequence no. Which is varying. i.e. I receive files from AAA.BBB.CCC.DDD.0001 to AAA.BBB.CCC.DDD.nnnn. Plz. note that I cant use a PDS.

The next step is to concatenate all these datasets to a single dataset and then process it.

I want to automate the concatanation procedure. Is there any utility/tool in any language (JCL/Rexx/Clist) thru which I can concatenate all these dataset.

The ideal solution will be an utility/tool which can generate a JCL which has the concatanation procedure and can submit the generated JCL.

Nevertless to say my platform is OS/390.

Any help is appreciated.

Devesh
 
First use a predelete step to delete your target datset, then preallocate it.
As you know ,how many files are going to come from the vendors, use iebgener or icegener to copy( use mod for target dataset). after copy initialise all the vendor datset. So even if you deon't receive some of the datset,it is not going to harm you, because you have already initialised the file.
We were also having the same issue and we were doing the above mentioned method.
 
Rukpillai

The gotcha is I dont know how many vendors will be there as we keep on adding/deleting them and everytime I dont want to change the JCL everytime to reflect the changes. One more imp. thing is the no. of files is currently close to 500 and making entries of them in a JCL is a tedious and errorprone job. So I need a tool (in any language) which can generate the required JCL (i.e. a IBEGENER or IDCAMS) step for me. And if it able to submit that nothing like it.


Thanks anyway.

Devesh
 
Hi Devesh,

You don't say how the files are received or whether they are consecutively numbered when you concat them. Any other details would be helpful.

Here are some thoughts that may help or spur other ideas:

You could write the IP files to a GDG as they are received, then just input the entire GDG to your accum run (don't code a gen# on the OP). The gotcha here, I think, is that there's a 256 (or is it 255?) limit on the # of GDG entries. But you could split the IP into 2 GDGs.

You could write a cobol pgm that creates the DD cards and OPs the JCL created to the INTRDR. If you know a utility that will add a seq# (ICETOOL?) you might be able to use that.

Ruk's idea of receiving the vendor IP to a MOD file can work. I assume the files are sent over a network, not manually. Be advised to backup the MOD file before each transmission, JIC.

BTW, nnnn is not a valid index level for an S390 file, s/b
Annn. It's probably just a typo, but I thought I'd mention it, JIC.

Regards, Jack.
 
Hi all

I receive the file via FTP or XCOM or similar services. I am not sure whether anybody is putting any file manually as there is no documentation for that and my shop has branches all over US which make it difficult to get that info.

I dont want to hardcode all filename because its not necessary that everytime I will have the same no. of files. Again GDG use is difficult as no. of files well exceeds 400 at current; and it will require a lot of coordination to ask all customer to change their file transfer script.

Instead I need a utility to which if I provide first 4 nodes it should able to return me all file begining with those 4 nodes. This is what similar to ISPF 3.4 option.
Thats why I assume this may not be possible in JCL but shud be possible thru Rexx/Clist. Sadly I never tried any of this languages.

I hope I am clear with my requirement;

Thanks
Devesh
 
Been a while since I've fooled with this sort of thing, but the general approach is likely something like:

Step 1 - Print the catalog entries. Route the output to a dataset. Can do this with IEHLIST?

Step 2 - (In COBOL) Read and parse the dataset from Step 1 to create JCL for IEBGENER and route the resulting file to INTRDR.

You could use REXX to do both in one REXX EXEC.

Regards.

Glenn

 
Hi Devesh,

Here's something I've used in the past when I needed to run jobs on a regular basis from the development environment:

1) Use 3.4 as you usually do.
2) When screen appears w/the DS list, enter the following on the cmd line: save ftpfiles
3) A dataset w/the name yourtsoid.ftpfiles.??? is created containing the image of the 3.4 screen. I forgot what the ??? is, probably "files". I know for a PDS list, ??? is "members".
4) Use the yourtsoid.ftpfiles.??? DS to create concatenated DD cards for your JCL.
5) What you do from here is fraught with possibilities: you can use REXX/Clist as Glenn noted. You can write a cobol pgm or you can cut & paste the dsns into a "model" JCL and submit it. You can also write an ISPF Macro to insert the dsns into the JCL.

If you have to submit a Production job, then Glenn's IEHLIST suggestion combined w/a cobol pgm outputting the entire JOB JCL to //outdd dd sysout=(,intrdr) should do the trick.

Regards, Jack.

 
Slade,

Excellent, This is working man!!! I can now write a COBOL program which will generate the required JCL from it.

Catch a star !!!! [thumbsup2]

Though I have not tried IEHLIST yet. Its documentation says it works for volumes or PDS but has not mentioned anything for dataset begining with common nodes.

Thanks Glen and Slade once again

Devesh
 
Hi Devesh,

Thanx for letting us know what worked. If IEHLIST is giving you trouble I think IDCAMS has a list function that accepts wild card requests. Check it out.

Regards, Jack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top