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

Generating report using OUTFIL in SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Tue Oct 20, 2009 6:38 pm
Reply with quote

Hi,
I am trying to generate a report using OUTFIL. I am landing up with the message saying that incompatible LRECL. Please find the details below.
Code:
//STEP05R  EXEC PGM=SORT                                         
//SORTIN   DD  DSN=TDMS.TAPAS.TEST3,DISP=SHR                     
//REPORT1  DD  DSN=TDMS.TAPAS.SAMPL.REPORT,DISP=SHR                     
//SYSIN    DD   *                                                 
  SORT FIELDS=(1,7,ZD,A)                                         
  OUTFIL FNAMES=REPORT1,LINES=10,                                 
    HEADER2=(2:'EMPLOYEE DETAIL REPORT',                         
             40:'DATE',DATE,                                     
             60:'PAGE',PAGE,                                     
             2/,5:'EMPLOYEE ID',                                 
             20:'FIRST NAME',                                     
             40:'LAST NAME',                                     
             55:'DATE OF BIRTH',                                 
             /,2:15'-',                                           
             18:14'-',                                           
             38:14'-',                                             
             53:20'-'),                                           
     OUTREC=(5:1,7,                                               
             20:8,10,                                             
             40:18,10,                                             
             55:28,2,                                             
             57:30,3,                                             
             CHANGE=(10,                                           
                     C'JAN',C'JANUARY',                           
                     C'FEB',C'FEBRUARY',                           
                     C'MAR',C'MARCH',                             
                     C'APR',C'APRIL',                             
                     C'MAY',C'MAY',                               
                     C'JUN',C'JUNE',                               
                     C'JUL',C'JULY',                               
                     C'AUG',C'AUGUST',                             
                     C'SEP',C'SEPTEMBER',                         
                     C'OCT',C'OCTOBER',                           
                     C'NOV',C'NOVEMBER',                           
                     C'DEC',C'DECEMBER'),                         
             67:33,4)                                             
/*                                                                 
//SYSOUT   DD   SYSOUT=*

INPUT:
Code:
198466 TAPAS     PATEL     31MAY1982
240308 RHIANG    PEGU      26JAN1980
237525 JUSTIN    JACOB     20JAN1987

SYSOUT:
Code:
SYSIN :                                     
 SORT FIELDS=(1,7,ZD,A)                   
  OUTFIL FNAMES=REPORT1,LINES=10,           
    HEADER2=(2:'EMPLOYEE DETAIL REPORT',   
             40:'DATE',DATE,               
             60:'PAGE',PAGE,               
             2/,5:'EMPLOYEE ID',           
             20:'FIRST NAME',               
             40:'LAST NAME',               
             55:'DATE OF BIRTH',           
             /,2:15'-',                     
             18:14'-',                     
             38:14'-',                     
             53:20'-'),                     
     OUTREC=(5:1,7,                         
             20:8,10,                       
             40:18,10,                     
             55:28,2,                       
             57:30,3,                       
             CHANGE=(10,                   
                     C'JAN',C'JANUARY',     
                     C'FEB',C'FEBRUARY',   
                     C'MAR',C'MARCH',       
                     C'APR',C'APRIL',       
                     C'MAY',C'MAY',         
                     C'JUN',C'JUNE',                               
                     C'JUL',C'JULY',                               
                     C'AUG',C'AUGUST',                             
                     C'SEP',C'SEPTEMBER',                         
                     C'OCT',C'OCTOBER',                           
                     C'NOV',C'NOVEMBER',                           
                     C'DEC',C'DECEMBER'),                         
             67:33,4)                                             
WER276B  SYSDIAG= 63636, 634967, 634967, 1016784                   
WER164B  24,604K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B     0 BYTES RESERVE REQUESTED, 1,004K BYTES USED           
WER146B  20K BYTES OF EMERGENCY SPACE ALLOCATED                   
WER108I  SORTIN   : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920     
WER110I  REPORT1  : RECFM=FBA  ; LRECL=    76; BLKSIZE= 27968     
WER247A  REPORT1  HAS INCOMPATIBLE LRECL

Please let me know the reason for above error. Is it mandatory that I have to give the RECFM for report as FBA?

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 21, 2009 3:26 am
Reply with quote

Hi,

change your REPORT1 file to LRECL=80


Gerry
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Wed Oct 21, 2009 11:24 am
Reply with quote

Hi Gerry,
Thanks for the reply. I have two queries here. first, Is it mandatory to give the RECFM for report as FBA? and secondly, Is it mandatory that the length of the SORTIN should be equal to the length of the report?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Oct 21, 2009 4:35 pm
Reply with quote

Hi,

if you use the HEADER parameter then the output will be FBA unless you use the REMOVECC paramter in which case the output will FB.

The LRECL for the FBA file will be 1 byte longer then the FB file for the print control chracter.

The second part of your question, the answer is no, it is not mandatory that the length of the SORTIN should be equal to the length of the report.


Gerry
Back to top
View user's profile Send private message
TAPAS PATEL

New User


Joined: 03 Apr 2009
Posts: 47
Location: CHENNAI

PostPosted: Thu Oct 22, 2009 9:51 am
Reply with quote

Hi Gerry,
Thanks a lot for the reply.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts OUTFIL with SAVE option DFSORT/ICETOOL 7
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts Creating Report using SORT DFSORT/ICETOOL 7
Search our Forums:

Back to Top