MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Repro - LENGTH INVALID Error

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Kris
Beginner


Joined: 27 May 2006
Posts: 14
Topics: 7

PostPosted: Fri Feb 13, 2009 5:00 pm    Post subject: Repro - LENGTH INVALID Error Reply with quote

Hi,
I'm trying to add header information to a ps file.
Code:

//COPY1   EXEC PGM=IDCAMS,COND=(4,LT)                 
//SYSPRINT DD  SYSOUT=*                               
//UT01     DD  *                                       
--                                                     
-- Header Information
--                                                     
//         DD  DSN=InputFile,DISP=SHR
//         DD  *       
//UT11     DD  DSN=Output,       
//             DISP=(NEW,CATLG,DELETE),           
//             SPACE=(TRK,(10,50),RLSE),       
//             DCB=(RECFM=FB,LRECL=250,BLKSIZE=0)
//SYSIN    DD  *                               
     REPRO IFILE(UT01)-                         
           OFILE(UT11) 
                                                       

Here i'm trying to add Header information to InputFile and get it into Output File. My input file Record Lenght is 250, so iused the same for my output file as well.
When executed the above code, i'm getting the below error

Code:

IDC3302I  ACTION ERROR ON Output
IDC3309I ** RECORD X'6060404040' NOT WRITTEN.  LENGTH INVALID


Can you please help me out, in solving this.
Thanks!!
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Feb 13, 2009 5:30 pm    Post subject: Reply with quote

Kris,

bonk you are concatenating a 80 byte instream data with 250 Byte dataset . The first dataset sets the LRECL to 80 bytes and all the records that have length greater than 80 would result in IDC3309I error. If you just want to add a header to your existing file, you can use DFSORT to create the header. You don't have to specify the DCB for output datasets as sort will automatically copy it from input

Code:
//STEP0100 EXEC PGM=SORT                       
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DSN=InputFile,DISP=SHR
//SORTOUT  DD DSN=Output,       
//            DISP=(NEW,CATLG,DELETE),           
//            SPACE=(TRK,(10,50),RLSE)
//*           
//SYSIN    DD *                               
  SORT FIELDS=COPY                             
  OUTFIL REMOVECC,                             
  HEADER1=('--',/,                             
           '-- HEADER INFORMATION',/,         
           '--')                               
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kris
Beginner


Joined: 27 May 2006
Posts: 14
Topics: 7

PostPosted: Fri Feb 13, 2009 6:07 pm    Post subject: Reply with quote

Thanks Kolusu. Solution worked fine. Smile
I have another query, is there anyway to append two ps files of different length (one is 80 and another is 250)?
Back to top
View user's profile Send private message AIM Address
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Feb 13, 2009 6:38 pm    Post subject: Reply with quote

Kris wrote:

I have another query, is there anyway to append two ps files of different length (one is 80 and another is 250)?


You canNOT concatenate different LRECL FB recfm datasets. However you can concatenate different lrecl VB files . You can always copy the 80 byte file into a 250 byte file and then concatenate them together as shown below

Code:

//STEP0100 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=Your 80 byte file,DISP=SHR                         
//SORTOUT  DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)     
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                             
  INREC OVERLAY=(250:X)                                         
/*                                                             
//STEP0200 EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=&&T1,DISP=SHR                                 
//         DD DSN=your 250 byte file,DISP=SHR 
//SORTOUT  DD DSN=Output,       
//            DISP=(NEW,CATLG,DELETE),           
//            SPACE=(TRK,(10,50),RLSE)
//*           
//SYSIN    DD *                               
  SORT FIELDS=COPY
/*

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Kris
Beginner


Joined: 27 May 2006
Posts: 14
Topics: 7

PostPosted: Fri Feb 13, 2009 7:02 pm    Post subject: Reply with quote

Thanks Kolusu
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group