View previous topic :: View next topic
|
Author |
Message |
Michael Mays
New User
Joined: 05 May 2010 Posts: 6 Location: Farmington Hills, MI
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Corey Hardy
New User
Joined: 14 Apr 2010 Posts: 9 Location: Virginia
|
|
|
|
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 |
|
|
Michael Mays
New User
Joined: 05 May 2010 Posts: 6 Location: Farmington Hills, MI
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Michael Mays
New User
Joined: 05 May 2010 Posts: 6 Location: Farmington Hills, MI
|
|
|
|
Thanks Robert. I guess that explains why my attachments of LRECL=3000 won't go. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|