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
 

 

How to customize job when my input file LRECL changes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Sat Oct 06, 2007 2:50 pm    Post subject: How to customize job when my input file LRECL changes
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Sat Oct 06, 2007 3:32 pm    Post subject: Reply to: How to customize job when my input file LRECL chan
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 Moderator


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

PostPosted: Sat Oct 06, 2007 11:45 pm    Post subject:
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: 120
Location: USA

PostPosted: Mon Oct 08, 2007 3:33 pm    Post subject: Reply to: How to customize job when my input file LRECL chan
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: 2150
Location: At my coffee table

PostPosted: Mon Oct 08, 2007 3:40 pm    Post subject:
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 Moderator


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

PostPosted: Mon Oct 08, 2007 9:08 pm    Post subject:
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:

http://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: 120
Location: USA

PostPosted: Tue Oct 09, 2007 8:51 am    Post subject: Reply to: How to customize job when my input file LRECL chan
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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