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

Using ICETOOL SPLICE command for unknown LRECL


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

New User


Joined: 31 Jan 2007
Posts: 21
Location: Chennai

PostPosted: Wed Oct 17, 2007 6:57 pm
Reply with quote

Hi...

I dont know whether this is strange problem or a simple one. But it is killing me inside.

I have to create a GENERIC sysin card for different input files (with different lrecl)


Below is the SYSIN CARD i am using for single file.

Code:

//TOOLIN   DD *                                                 
  SELECT FROM(IN1) TO(F1) ON(1,11,CH) FIRST                     
  SELECT FROM(IN2) TO(F1) ON(1,11,CH) FIRST                     
  SELECT FROM(F1)  TO(T1) ON(1,11,CH) FIRSTDUP USING(CTL1)     
  SELECT FROM(F1)  TO(T1) ON(1,11,CH) NODUPS USING(CTL2)       
  COPY FROM(IN1) TO(T1) USING(CTL3)                             
  COPY FROM(IN2) TO(T1) USING(CTL4)                             
  SPLICE FROM(T1) TO(OUT1) ON(1,11,CH) WITHALL WITH(1,45) -     
    USING(CTL5)                                                 
/*                                                             
//CTL1CNTL DD *                                                 
  OUTFIL FNAMES=T1,OVERLAY=(45:C'DD')                         
/*                                                             
//CTL2CNTL DD *                                                 
  OUTFIL FNAMES=T1,OVERLAY=(45:C'UU')                           
/*                                                             
//CTL3CNTL DD *                                                 
  OUTFIL FNAMES=T1,OVERLAY=(45:C'11')                           
/*                                                             
//CTL4CNTL DD *                                                 
  OUTFIL FNAMES=T1,OVERLAY=(45:C'22')                           
/*                                                             
//CTL5CNTL DD *                                                 
  OUTFIL FNAMES=OUT1,INCLUDE=(45,2,CH,EQ,C'1U'),BUILD=(1,44)   
  OUTFIL FNAMES=OUT2,INCLUDE=(45,2,CH,EQ,C'2U'),BUILD=(1,11)   
  OUTFIL FNAMES=OUT12,SAVE,BUILD=(1,44)                         
/*   


Can you please help me in this?
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: Wed Oct 17, 2007 10:02 pm
Reply with quote

Do you need to determine the LRECL automatically, or could you specify it in a record, e.g.

000044

for a run when the LRECL is 44 and

000050

for another run when the LRECL is 50?
Back to top
View user's profile Send private message
rajantsr

New User


Joined: 31 Jan 2007
Posts: 21
Location: Chennai

PostPosted: Thu Oct 18, 2007 11:38 am
Reply with quote

Frank,

Yes It should find automatically...

I am planning to write a generic SYSIN which will be accessed by more than 50 JOBs to compare files.

The overlay character should be appended at the end of record without mentioning explictly the 44 or 50 in the sysin.

Thanks,
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: Thu Oct 18, 2007 8:42 pm
Reply with quote

I'm on vacation today, but I'll see what I can come up with tomorrow.
Back to top
View user's profile Send private message
rajantsr

New User


Joined: 31 Jan 2007
Posts: 21
Location: Chennai

PostPosted: Fri Oct 19, 2007 12:20 am
Reply with quote

No Problem Frank!

Thanks,
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 20, 2007 2:31 am
Reply with quote

I started to look at this and came up with another question. You have:

Code:

  OUTFIL FNAMES=OUT1,INCLUDE=(45,2,CH,EQ,C'1U'),BUILD=(1,44)   
  OUTFIL FNAMES=OUT2,INCLUDE=(45,2,CH,EQ,C'2U'),BUILD=(1,11)   


I assume 44 is determined from the LRECL. But how is 11 determined?

Does the m in ON(1,m,CH) have to be determined automatically to or is it always 11?

For the example you showed:

What is the LRECL of the IN1 data set?

What is the LRECL of the IN2 data set?

Maybe the answers to these questions are related
Back to top
View user's profile Send private message
rajantsr

New User


Joined: 31 Jan 2007
Posts: 21
Location: Chennai

PostPosted: Mon Oct 22, 2007 3:30 pm
Reply with quote

Yes Frank,

44 is determined from the LRECL, 11 is also detemined from the LRECL.

Actually File-1 contains only the account number which is 11 bytes long.
File-2 contains other data including the account number which is 44 bytes long.

We are planning to write a generic card which will be comparing the 11 bytes account number from file-1 to the account number in the file-2 having various LRECL(can be 44, can be 105, can be 80)
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: Tue Oct 23, 2007 1:36 am
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for. Just put the input file2 name in step S1 and the input file1 and input file2 names in step S2 where indicated. Step S1 will automatically determine the LRECL of input file2 and create DFSORT Symbols based on it. Step S2 will use those Symbols. Note that I fixed up the first SELECT to create 44 byte records as required.

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN2 DD DSN=...  input file2 (FB/n)
//TEMP1 DD DSN=&&TX,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//SYM DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS)
//TOOLIN   DD    *
COPY FROM(IN2) USING(CTL1)
COPY FROM(TEMP1) USING(CTL2)
/*
//CTL1CNTL DD *
  OPTION STOPAFT=1
  OUTFIL FNAMES=TEMP1,FTOV
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=SYM,VTOF,
    BUILD=(C'SYM1,1,',1,2,BI,SUB,+4,EDIT=(TTTTT),80:X,/,
     C'SYM2,',1,2,BI,SUB,+3,EDIT=(TTTTT),C',2',/,
     C'SYM3,',1,2,BI,SUB,+4,EDIT=(TTTTT),/,
     C'SYM4,1,',1,2,BI,SUB,+3,EDIT=(TTTTT))
/*
//S2    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS)
//SYMNOUT DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/11)
//IN2 DD DSN=...  input file2 (FB/n)
//F1 DD DSN=&&F1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT1 DD DSN=...  output file1 (FB/n)
//OUT2 DD DSN=...  output file2 (FB/11)
//OUT12 DD DSN=... output file3 (FB/n)
//TOOLIN   DD *
  SELECT FROM(IN1) TO(F1) ON(1,11,CH) FIRST USING(CTL0)
  SELECT FROM(IN2) TO(F1) ON(1,11,CH) FIRST
  SELECT FROM(F1)  TO(T1) ON(1,11,CH) FIRSTDUP USING(CTL1)
  SELECT FROM(F1)  TO(T1) ON(1,11,CH) NODUPS USING(CTL2)
  COPY FROM(IN1) TO(T1) USING(CTL3)
  COPY FROM(IN2) TO(T1) USING(CTL4)
  SPLICE FROM(T1) TO(OUT1) ON(1,11,CH) WITHALL WITH(SYM4) -
    USING(CTL5)
/*
//CTL0CNTL DD *
  INREC OVERLAY=(SYM3:X)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'DD')
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'UU')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'11')
/*
//CTL4CNTL DD *
  OUTFIL FNAMES=T1,OVERLAY=(SYM2:C'22')
/*
//CTL5CNTL DD *
  OUTFIL FNAMES=OUT1,INCLUDE=(SYM2,CH,EQ,C'1U'),BUILD=(SYM1)
  OUTFIL FNAMES=OUT2,INCLUDE=(SYM2,CH,EQ,C'2U'),BUILD=(1,11)
  OUTFIL FNAMES=OUT12,SAVE,BUILD=(SYM1)
/*
Back to top
View user's profile Send private message
rajantsr

New User


Joined: 31 Jan 2007
Posts: 21
Location: Chennai

PostPosted: Wed Oct 24, 2007 11:58 am
Reply with quote

Thanks Frank..

It worked well..
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 7
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts VB to FB - Finding LRECL SYNCSORT 4
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top