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
 

 

Concatenate files with different lengths?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Michael Mays

New User


Joined: 05 May 2010
Posts: 6
Location: Farmington Hills, MI

PostPosted: Wed May 05, 2010 9:18 pm    Post subject: Concatenate files with different lengths?
Reply with quote

I am composing an Email with several attached files of different record lengths. We are attempting to use IEBGENER to concatenate the files then deliver the output to SMTP. Another post mentions that IEBGENER copy functions are intercepted by DFSORT(or SYNCSORT), which generates:
WER171A CONCAT DS, LRECLS NE OR RECFMS DIFF
SYNCSORT COPY FEATURE CALLED - RC = 12

Is there an easy way to do this? or do I need to manually(COBOL) reformat each file to a common LRECL?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Wed May 05, 2010 9:27 pm    Post subject:
Reply with quote

If the files are FIXED length, you must reformat all to match the length of the longest LRECL. If the files are VARIABLE length, you are not required to do so. Assuming, based upon your post, that they are fixed length you must do the reformat with a utility or a program.
Back to top
View user's profile Send private message
Corey Hardy

New User


Joined: 14 Apr 2010
Posts: 9
Location: Virginia

PostPosted: Thu May 06, 2010 12:38 am    Post subject: Reply to: Concatenate files with different lengths?
Reply with quote

Assuming that the LRECL of your longest file is 200 and the LRECL of input file #1 is 80; the sort below will expand the LRECL of input file #1 from 80 to 200.

Code:

//SRTFIL1  EXEC PGM=SORT                           
//SYSIN    DD *                                                 
 SORT FIELDS=COPY                                               
 OUTFIL FILES=1,                                               
       OUTREC=(001:001,080,                                   
               200:C' ')                                       
//SORTIN   DD DSN=INPUT.FILE,DISP=SHR                           
//SORTOF1  DD DSN=OTPUT.FILE,DISP=(NEW,CATLG,DELETE)
Back to top
View user's profile Send private message
Michael Mays

New User


Joined: 05 May 2010
Posts: 6
Location: Farmington Hills, MI

PostPosted: Thu May 06, 2010 6:55 pm    Post subject:
Reply with quote

Thanks Corey! I asked for "simple", that's what you gave me, and it worked perfectly. Now just got to figure out why SMTP won't send files with LRECL > 80 bytes... but that will probably be another post.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Thu May 06, 2010 8:52 pm    Post subject:
Reply with quote

SMTP quite happily handles files with records up to 998 bytes in length; if you aren't getting files with more than 80 bytes to send, it is something you are doing at your site. Of course, you cannot use DD * for records with lengths greater than 80, but I've sent many a file with longer record lengths by storing my commands and data into a PDS of the desired record length and using that as input.
Back to top
View user's profile Send private message
Michael Mays

New User


Joined: 05 May 2010
Posts: 6
Location: Farmington Hills, MI

PostPosted: Thu May 06, 2010 10:25 pm    Post subject:
Reply with quote

Thanks Robert. I guess that explains why my attachments of LRECL=3000 won't go.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8055
Location: East Dubuque, Illinois, USA

PostPosted: Thu May 06, 2010 11:24 pm    Post subject:
Reply with quote

LOL -- sure does. RFC 2821 and 2822 describe SMTP in all its gory details. If you want to know more about them, Google either. The actual limit is 1000 bytes per line but the last two bytes are reserved for carriage return and line feed.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
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 Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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