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

record length mangament


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

New User


Joined: 03 Oct 2008
Posts: 25
Location: chennai

PostPosted: Fri Nov 07, 2008 11:28 am
Reply with quote

hello,
i'm learning DFSORT using IBM manuals. I tried a sample job to create a report.
i/p file length:80 record format : FB

Code:
//TTOISORT JOB 1,CLASS=I,MSGCLASS=X,NOTIFY=&SYSUID                   
//* RUN THROUGH JCLPREP ON 06/11/2008 AT 04:00:25 BY SIVAKUS FOR QAOS
//*                                                                 
//STEP1    EXEC PGM=SORT                                             
//SORTIN   DD DSN=TTOI.SUMA.FILE2,DISP=SHR                           
//SORTOUT  DD DSN=TTOI.SUMA.REPORT.OUTPUT6,DISP=(NEW,CATLG,DELETE), 
//             SPACE=(TRK,(1,1),RLSE),                               
//             UNIT=SYSDA                                           
//SYSOUT   DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  INREC FIELDS=(1:28,19,21:16,11,33:1,14,48:48,4)                   
  SORT FIELDS=(1,19,CH,A)                                           
  OUTFIL FNAMES=SORTOUT,                                             
  SECTIONS=(1,19,SKIP=3L,                                           
  HEADER3=(3:X,/,                                                   
           3:'DEPARTMENT : ',1,19,/,X,/,                             
           3:'NUMBER',16:'NAME',31:'PRICE',/,                       
           3:'======',16:'====',31:'====='),                         
  TRAILER3=(3:'======',16:'====',31:'=====',/,                       
          23:'TOTAL:',                                               
          31:TOT=(48,6,UFF,EDIT=(I,IT,TTT)))),                       
  OUTREC=(3:21,11,16:33,14,31:48,4,UFF,EDIT=(IITT),40:X)             
/*       

when i tried running this job i got a msg saying
RECORD TYPE IS F - DATA STARTS IN POSITION 1
END OF SORTOUT FIELD BEYOND MAXIMUM RECORD LENGTH

Then i changed the Inrec fields as: INREC FIELDS=(1:28,19,21:16,11,33:1,14,48:48,30) - it worked fine.
I tried another thing keeping the inrec fields as same as in the initial and changed the total parameter as 31:TOT=(48,4,UFF,EDIT=(I,ITT)))) - it worked fine.

can anyone give me a clear picture on what has happened in the above job and the record length management.
Thanks in advance.

Suma
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: Fri Nov 07, 2008 10:05 pm
Reply with quote

Your INREC statement ends with 48:48,4. That creates reformatted records that are 51 bytes long.

But your TRAILER3 has 48,6 which tries to copy positions 48-53 from the reformatted record. Since the reformatted record is only 51 bytes long, 48,6 is beyond the end of the reformatted record and you get the error message.

When you use 48:48,30 for the INREC statement, you create reformatted records that are 77 bytes long, so 48,6 works fine.

Using 48,4 in TRAILER3 instead of 48,6 works fine with the original INREC statement because 48,4 copies positions 48-51 from the reformatted record and the reformatted record is 51 bytes long.
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 Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top