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

Needs to split one input file with diffrent LRECL


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

New User


Joined: 03 Jun 2008
Posts: 14
Location: chennai

PostPosted: Thu Jan 28, 2010 6:19 pm
Reply with quote

Hi,

I have to split the one input file into two output files with diffrent LRECL e.g one output file with 250,and another with 170.

My Input file Layout:
Code:
SEQNO(10)
LENDER NO(6)
REPORTNO(3)
SSN(9)
BORROWER NAME(32)
LOAN TOKEN(11)
LOAN TYPE(3)
EFFECTIVE DATE(10)
AMOUNT1(10)
AMOUNT2(10)


My output file1 layout (170) My outfile2 Layout(260)
Code:
                                     SEQNOx(10)
SEQNOx(10)                     DESCRPTIONx(50)
FILENAMEx(10)                 FILENAMEx(10)
PORTFOLIOx(10)               PORTFOLIOx(10)
K1x(10)                            K1x(10)
K2x(10)                            K2x(10)
K3x(10)                            K3x(10) 
K4x(10)                            K4x(10) 
K5x(10)                            K5x(10)
K6x(10)                            K6x(10)
A1x(11)                            A1x(11)   
A2x(11)                            A2x(11)
A3x(11)                            A3x(11)
A4x(11)                            A4x(11)
A5x(11)                            A5x(11)
A6x(11)                             A6x(11)



We coded as
Code:
SORTIN     DD DSN=Inputfile
OUTDD1    DD DSN=OUTFILE1
                      DISP=(NEW,CATLG,CATLG),
                      UNIT=SYSDA,
                      SPACE=(TRK,(20,20),RLSE)
OUTDD2    DD DSN=OUTFILE2
                      DISP=(NEW,CATLG,CATLG),
                      UNIT=SYSDA,
                      SPACE=(TRK,(20,20),RLSE)
SYSIN DD *
      OPTION COPY
      OUTFIL FNAMES=OUTDD1,INCLUDE=(102,09,CH,EQ,113,09,CH),
                             OUTREC=(001:1,10,
                             011:C'ABCDEFGHIJ',
                             021:18,8,
                             031:11,6,
                             041:C'SPACES',
                             051:C'SPACES',
                             061:C'SPACES',
                             071:C'SPACES',
                             081:102,09,
                             093:C'0',
                            105:C'0',
                            117:C'0',
                            129:C'0',
                            141:C'0',
                           153:90,10)

              OUTFIL FNAMES=OUTDD2,INCLUDE=(102,09,CH,NE,113,09,CH),
                             OUTREC=(001:1,10,
                             011:C'ABCDEFGHIJ',
                             071:18,8,
                             081:11,6,
                             041:C'SPACES',
                             091:C'SPACES',
                             101:C'SPACES',
                             121:C'SPACES',
                             131:102,09,
                             143:C'0',
                            155:C'0',
                            167:C'0',
                             179:C'0',
                            191:C'0',
                          243:90,10)


When we give same length for outrec it will work fine.
When we give diffrent length in outrec it will not work.
Can you please tell me the solution.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 28, 2010 6:56 pm
Reply with quote

We now know that it does not work, but unfortunately we do not know anything more.

In what way does it not work. Does the job abend, does the job fail to create output, does the job create output that you do not expect, or what .........

Please also post the output of the run that did not work as this may hold clues as to the reason.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jan 28, 2010 7:35 pm
Reply with quote

For OUTDD1, specifying:

153:90,10)

results in a total output record length of 162. If you want 170, then you should pad the records out:

153:90,10,170:X)

For OUTDD2, specifying:

243:90,10)

results in a total output record length of 252. If you want 250, then you'll have to trim something back. Specifying:

241:90,10)

would work.
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 Jan 28, 2010 10:57 pm
Reply with quote

harithaganna,

When I use your control statements with DFSORT I get this error message:

ICE126A 9 INCONSISTENT OUTDD2 IFTHEN 0 REFORMATTING FIELD FOUND

This is the result of having overlapping fields in the OUTREC operand for OUTDD2. Specifically, you have:


Code:

...
   011:C'ABCDEFGHIJ',   
   071:18,8,           
   081:11,6,           
   041:C'SPACES',       
   091:C'SPACES',       
...


The next position after 81:11,6 is 87, but you have 41: so that's an overlap. If you want C'SPACES' at 41, you have to put them in their appropriate place:

Code:

...
   011:C'ABCDEFGHIJ',   
   041:C'SPACES',       
   071:18,8,           
   081:11,6,           
   091:C'SPACES',       
...


That will give you a return code 0, but as Kevin pointed out, OUTDD1 will have an LRECL of 162 instead of 170 and OUTDD2 will have an LRECL of 252 instead of 250, so you need to fix that as well.

I can't figure out from your description of your input and output fields what you really want, so I can't help you further unless you can clarify it.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
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
Search our Forums:

Back to Top