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
 
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: 8154
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: 8154
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: 8154
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 Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 5 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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