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
 

 

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 Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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