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
 

 

IEBGENER SPLICE and EMAIL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Ronny John

New User


Joined: 30 Mar 2010
Posts: 33
Location: USA

PostPosted: Tue Sep 25, 2012 8:07 pm    Post subject: IEBGENER SPLICE and EMAIL
Reply with quote

I have a requirement to send an email to client with two file names and their count as below:
To
Cc
Subj
Content:
These are the two file names
XXXXXXXX.txt RECORDS:000020300
YYYYYYYY.txt RECORDS:000030000

Regards,
XXX


I took the count names and formatted the file names using two splices

One of them is given below:

//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
SPLICE FROM(T1) TO(OUT) ON(81,5,ZD) WITH(49,9) USING(CTL3)
/*
//CTL1CNTL DD *
INREC BUILD=(1,39,C' RECORDS:',81:SEQNUM,5,ZD)
/*
//CTL2CNTL DD *
INREC BUILD=(49:26,9,81:SEQNUM,5,ZD)
/*
//CTL3CNTL DD *
OUTFIL FNAMES=OUT,BUILD=(1,80)


But the issue is, when I use IEBGENER to send out the email, the second file name gets appended to the first file name. That is the email content will become


These are the two file names
XXXXXXXX.txt RECORDS:000020300YYYYYYYY.txt RECORDS:000030000

All the files have lrecl of 80 bytes. Please let me know why this happens and how to resolve it. If the data I gave are incomplete, please let me know what all you need to resolve it?
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 25, 2012 11:02 pm    Post subject:
Reply with quote

Ronny John,

I am not sure why you need splice in here. All you need is a simple copy to get the counts and use that file to send an email using IEBGENER.

Use the following DFSORT/ICETOOL JCL

Code:

//STEP0100 EXEC PGM=ICETOOL                                             
//TOOLMSG  DD SYSOUT=*                                                 
//DFSMSG   DD SYSOUT=*                                                 
//IN1      DD *                                                         
XXXXXXXX.TXT                                                           
XXXXXXXX.TXT                                                           
XXXXXXXX.TXT                                                           
XXXXXXXX.TXT                                                           
XXXXXXXX.TXT                                                           
XXXXXXXX.TXT                                                           
//IN2      DD *                                                         
YYYYYYYY.TXT                                                           
YYYYYYYY.TXT                                                           
YYYYYYYY.TXT                                                           
//OUT      DD DSN=&&OUT,DISP=(MOD,PASS,DELETE),SPACE=(TRK,(1,0),RLSE)   
//TOOLIN   DD *                                                         
  COPY FROM(IN1) USING(CTL1)                                           
  COPY FROM(IN2) USING(CTL1)
//*                                           
//CTL1CNTL DD *                                                         
  OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,BUILD=(80X),                     
  TRAILER1=(1,39,' RECORDS : ',COUNT)                                   
//*     
//STEP0200 EXEC PGM=IEBGENER
//SYSIN    DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2   DD SYSOUT=(A,SMTP)
//SYSUT1   DD *
HELO SYSA
MAIL FROM:<blahblah@blah.com>
RCPT TO:<mehmeh@meh.COM>
DATA
FROM:      <blahblah@blah.com>
TO:        <mehmeh@meh.COM>
SUBJECT: Report with Counts
//          DD DSN=&&OUT,DISP=(OLD,DELETE,DELETE)
// DD *                                           
.                                                 
QUIT                                             
//*
Back to top
View user's profile Send private message
Ronny John

New User


Joined: 30 Mar 2010
Posts: 33
Location: USA

PostPosted: Wed Sep 26, 2012 1:10 am    Post subject: Reply to: IEBGENER SPLICE and EMAIL
Reply with quote

Let me correct that.
i have to send an email with the content

"The two files have been processed
Filename1.txt records: 20000->this is teh count
Filename2.txt records: 300->this is teh count

regards,
XXX

The filenames are generated and placed in a flatfile. There is a logic to create the file name Filename1.txt and Filename2.txt is a complex process. Using IEBGENER what we did is to get the count.

The next step is the IEBGENER for sending the email.
There we face the issue, ie the file names gets appended without the line break
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Sep 26, 2012 1:29 am    Post subject:
Reply with quote

Ron,

if you would just one time,
provide a decent set of requirements and descriptions,
your threads would consist of 2 posts:
1. your request
2. somebody's thought and effort which you could then turn-in at work as your solution.
Back to top
View user's profile Send private message
Ronny John

New User


Joined: 30 Mar 2010
Posts: 33
Location: USA

PostPosted: Wed Sep 26, 2012 1:38 am    Post subject: Reply to: IEBGENER SPLICE and EMAIL
Reply with quote

Sorry for that, never thought my initial post would make all this confusion.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Sep 26, 2012 1:45 am    Post subject: Re: Reply to: IEBGENER SPLICE and EMAIL
Reply with quote

Ronny John wrote:
Let me correct that.
i have to send an email with the content


If you have looked at the job I have shown , the only varying content is the counts part. Rest of the text is all static. So can't you change the contents of SYSUTI? to have whatever static text you want?

Did you even run the job I showed above?

Ronny John wrote:

The filenames are generated and placed in a flatfile. There is a logic to create the file name Filename1.txt and Filename2.txt is a complex process. Using IEBGENER what we did is to get the count.


For some unknown reason people dig a hole too deep unnecessarily and I think this is one such instance.

I have no idea as to what your requirement is any more.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 26, 2012 2:58 am    Post subject:
Reply with quote

Hello,

Quote:
Sorry for that, never thought my initial post would make all this confusion.
As happens here Very often, you posted something that was completely clear to you. What needed to be posted is something that would be clear to almost everyone.

When posting make sure that what you post will be understandable to people who have no knowledge of what you are trying to do - but would prefer to help.

Is it safe to say that you want to count the records in 2 files and present these counts in the e-mail?

What happens when you run the process Kolusu provided?

As Kolusu mentioned, it looks like you have made this overly complicated. . .
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 175
Location: UK

PostPosted: Wed Sep 26, 2012 12:30 pm    Post subject:
Reply with quote

I have had similar issues. Maybe this will help -

http://ibmmainframes.com/viewtopic.php?t=58441&highlight=
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts How to send email with Rich Text usin... santhosh5983 JCL & VSAM 4 Fri Apr 08, 2016 2:30 am
No new posts Matching records using splice for COM... hiravibk DFSORT/ICETOOL 4 Sun Sep 27, 2015 12:05 pm
No new posts Email trigger through JCL Madhusudhan Prahlad JCL & VSAM 10 Mon Aug 31, 2015 3:43 pm
No new posts Dot "." missing from email ... Harsh Pawar JCL & VSAM 3 Thu Apr 30, 2015 4:13 pm


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