Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
record length mangament

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: record length mangament
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 Moderator


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

PostPosted: Fri Nov 07, 2008 10:05 pm    Post subject:
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    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
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us