IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to customize job when my input file LRECL changes


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Sat Oct 06, 2007 2:50 pm
Reply with quote

Hi,

The purpose of this job is comparing the two files based on the key provided and write to corresponding output using splice. Here both the input files are of same record length. ie. LRECL=80.
But when ever my input files changes i need to make changes for TOOLIN, CTL1CNTL, CTL2CNTL, CTL3CNTL.
This job will run when my input file is of LRECL=80.
Is there any way so that i can use this job commonly for different LRECL of input files.

Here is the job:

Code:

//COMPARE JOB 1,CLASS=6,MSGCLASS=0,NOTIFY=&SYSUID
//JCLLIB   JCLLIB ORDER=(MY.PDS.PROCLIB)
//JSTEP010 EXEC COMPARE
//STEP010.INPUT1 DD DSN=MY.INPUT.FILE1,DISP=SHR
//STEP010.INPUT2 DD DSN=MY.INPUT.FILE2,DISP=SHR
//*


And the proc is:

Code:

//COMPARE  PROC INPUT1=,
//             INPUT2=
//STEP010  EXEC PGM=ICETOOL
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//INPUT1   DD DSN=&INPUT1,DISP=SHR
//INPUT2   DD DSN=&INPUT2,DISP=SHR
//TEMP     DD DSN=&&TEMP,DISP=(MOD,PASS)
//MATCH    DD DSN=MY.OUTPUT.MATCH,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//F1ONLY   DD DSN=MY.OUTPUT.F1ONLY,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//F2ONLY   DD DSN=MY.OUTPUT.F2ONLY,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//TOOLIN   DD *
COPY FROM(INPUT1) TO(TEMP) USING(CTL1)
COPY FROM(INPUT2) TO(TEMP) USING(CTL2)
SPLICE FROM(TEMP) TO(MATCH) ON(81,8,ZD) ON(1,10,CH) -
  WITH(90,1) KEEPNODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(81:SEQNUM,8,ZD,C'11')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(81:SEQNUM,8,ZD,C'22')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=MATCH,INCLUDE=(89,2,CH,EQ,C'12'),OUTREC=(1,80)
  OUTFIL FNAMES=F1ONLY,INCLUDE=(89,2,CH,EQ,C'11'),OUTREC=(1,80)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(89,2,CH,EQ,C'22'),OUTREC=(1,80)
/*
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Oct 06, 2007 3:32 pm
Reply with quote

From Your jcl nothing has to be changed as far as DCB info is concerned,
but if Your record length changes I would not call it customization,
it could be a completely different record layout,
a completely different matching logic
and ...

the suggestion is :
analyze the specs and rewrite

regards

e.s
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sat Oct 06, 2007 11:45 pm
Reply with quote

Bhaskar,

If you're looking for a way to use the job without knowing the LRECL - that will be difficult.

If you're looking for a way to make it easier to change the job for a known LRECL, that's relatively easy. You can change your DFSORT/ICETOOL job to use Symbols. The only change you'll have to make for a different LRECL is to change 80 to the new LRECL in the Record symbol (e.g. for LRECL=100, use Record,1,100). If the key changes, change the Key symbol accordingly.

Code:

//COMPARE  PROC INPUT1=,
//             INPUT2=
//STEP010  EXEC PGM=ICETOOL
//SYMNAMES DD *
Key,1,10,CH
Record,1,80    --->  Set to 1,LRECL <------
Seqnum,*,8,ZD
Startcol,=
Id,*,2,CH
Id1,=,1
Id2,*,1
/*
//SYMNOUT DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//INPUT1   DD DSN=&INPUT1,DISP=SHR
//INPUT2   DD DSN=&INPUT2,DISP=SHR
//TEMP     DD DSN=&&TEMP,DISP=(MOD,PASS)
//MATCH    DD DSN=MY.OUTPUT.MATCH,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//F1ONLY   DD DSN=MY.OUTPUT.F1ONLY,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//F2ONLY   DD DSN=MY.OUTPUT.F2ONLY,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//TOOLIN   DD *
COPY FROM(INPUT1) TO(TEMP) USING(CTL1)
COPY FROM(INPUT2) TO(TEMP) USING(CTL2)
SPLICE FROM(TEMP) TO(MATCH) ON(Seqnum) ON(Key) -
  WITH(Id2) KEEPNODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(Startcol:SEQNUM,8,ZD,C'11')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(Startcol:SEQNUM,8,ZD,C'22')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=MATCH,INCLUDE=(Id,EQ,C'12'),OUTREC=(Record)
  OUTFIL FNAMES=F1ONLY,INCLUDE=(Id,EQ,C'11'),OUTREC=(Record)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(Id,EQ,C'22'),OUTREC=(Record)
/*
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Mon Oct 08, 2007 3:33 pm
Reply with quote

Hi Frank,

Thanks for you reply. It worked.

If you dont mind can u please explain me how the below part is done.
Code:

//SYMNAMES DD *
Key,1,10,CH
Record,1,80    --->  Set to 1,LRECL <------
Seqnum,*,8,ZD
Startcol,=
Id,*,2,CH
Id1,=,1
Id2,*,1
/*

I know about Key and Record as they are symbolic names.
But i didnt get how the seqnum, startcol, etc.. are written.
Could you please explain me about them.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


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

PostPosted: Mon Oct 08, 2007 3:40 pm
Reply with quote

The SYSOUTs should provide a good idea of how they are being used, why don't you post them too?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Oct 08, 2007 9:08 pm
Reply with quote

Bhaskar,

I'm not quite sure what you're asking. Everything in SYMNAMES is a symbol statement. If you look in SYMNOUT, you'll see how DFSORT expanded the original Symbol statements:

Code:

------- ORIGINAL STATEMENTS FROM SYMNAMES -------           
Key,1,10,CH                                                 
Record,1,80       1,LRECL                                   
Seqnum,*,8,ZD                                               
Startcol,=                                                 
Id,*,2,CH                                                   
Id1,=,1                                                     
Id2,*,1                                                     
                                                           
------------------ SYMBOL TABLE -----------------           
Key,1,10,CH                                                 
Record,1,80                                                 
Seqnum,81,8,ZD                                             
Startcol,81                                                 
Id,89,2,CH                                                 
Id1,89,1                                                   
Id2,90,1                                                   


* means start at the next position. = means start at the previous position.

For complete details on DFSORT Symbols, see:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA20/7.0?DT=20060615185603
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Tue Oct 09, 2007 8:51 am
Reply with quote

Frank,

Quote:
* means start at the next position. = means start at the previous position.


This is what i want to know. Thanks for providing me the information.
Thank You So Much.
Now i clearly understood how it was written.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top