View previous topic :: View next topic
|
Author |
Message |
Rameshkumar.R
New User
Joined: 15 May 2008 Posts: 9 Location: chennai
|
|
|
|
Here is the requirement,
We have 27 input files to be concatenated to a 1 output file.
In that 27 files, 15 files LRECL = 9050 & 12 files LRECL = 3078.
We are not sure that all the 27 files will be available at all time.
Some files may be available and remaining may not available during run.
1. Is there any way to avoid the unavailable datasets in the SORTIN during run?
2. Is it possible to have the input files having LRECL=9050,3078 in a same sort step? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
how to use BBCODE
also, use of the preview button - sort of like desk checking a program.
yeah, I know, unknown concept. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Rameshkumar.R wrote: |
Is there any way to avoid the unavailable datasets in the SORTIN during run? |
Yes, either use IDCAMS with a LISTCAT command for each of the datasets to determine if they are cataloged or not, or do the same process using the LISTCAT command in a batch TSO, REXX, or CLIST session.
Rameshkumar.R wrote: |
Is it possible to have the input files having LRECL=9050,3078 in a same sort step? |
You can't concatenate FB datasets with different LRECLS. They'll have to be assigned to different DD's, so you'll probably want to use ICETOOL for that step. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Quote: |
Is it possible to have the input files having LRECL=9050,3078 in a same sort step? |
Yes if VB, no if FB.
Quote: |
Is there any way to avoid the unavailable datasets in the SORTIN during run? |
Don't include the unavailable DDs in the concatenation? |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
You can use IDCAMS for availability.
Yes, you can concatenate files of different LRECL. To do that, you can either use OVERLAY or BUILD depending on your requirement.
However, please show us the sample input and output data if possible or atleast give us LRECL for the input and output with the field positions for each field.
Thanks, |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
CICS Guy,
File1 :- 01-20
File2 :- 01-10
Using ICETOOL you can increase the file2 to 20 bytes.
Now that your FILE1 and FILE2 are of the same length you can concatenate both of them but you would also need to align fields before you concatenate.
This is exactly what I have asked to OP in my earlier post.
Here is the sample ICETOOL job.
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//I1 DD DISP=SHR,DSN=TSOID.TEST.LRECL10
//T1 DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(5,1),RLSE)
//CON DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
// DD DISP=SHR,DSN=TSOID.TEST.LRECL20
//OUT DD SYSOUT=*
//TOOLIN DD *
COPY FROM(I1) USING(CTL1)
COPY FROM(T1) TO(OUT)
//CTL1CNTL DD *
OUTFIL FNAMES=T1,OVERLAY=(20:X)
//* |
Thanks, |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why are there 2 T1 DD statements. . . |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
huh?
Sorry for using confusing names but one of them is I1 as in Input1 and the other is T1
Thanks, |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
My bad. . .
Eyes only semi-functional today. . .
I'll clean this up later - maybe. . .
d |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
when you are as old as we are,
Quote: |
Eyes only semi-functional today. . .
|
is a good day! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
As long as the plumbing works and we can still walk. . .
d |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
dick scherrer wrote: |
As long as the plumbing works and we can still walk. . . |
That comment was a bit below the belt |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Some times we have to walk rather briskly, due to the plumbing. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
To automatically handle possibly missing files, how about this:
1. create a GDG base
2. one step per file: copy it to the GDG (+1); if the step fails due to no input file, that's OK
3. input the GDG base only, which concatenates whatever generations are there
Note that this does not address the different LRECL issue.
BUT - this fails, because the non-existent dataset causes a JCL EROR, so the job does not run.
Anyone know how to avoid this? |
|
Back to top |
|
|
|