View previous topic :: View next topic
|
Author |
Message |
Thaise
New User
Joined: 19 Jan 2010 Posts: 3 Location: Brazil
|
|
|
|
Hi
I need to change a sequential PDS file to TEXT (txt) file on JCL and then send it by e-mail.
Does anybody have any suggestion? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
There is no such thing as a text or .TXT file on the mainframe, and no such thing as a "sequential PDS file" anywhere. Please re-state your requirement. |
|
Back to top |
|
|
Thaise
New User
Joined: 19 Jan 2010 Posts: 3 Location: Brazil
|
|
|
|
I couldn't figure it out if I can make a text file on mainframe, because of it I have asked for you.
My file is not a VSAM file.
I believe if it is not a VSAM file, it is a sequential file. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I believe if it is not a VSAM file, it is a sequential file. |
Your belief is wrong. There are sequential files, VSAM files, partitioned (PDS) files, and direct (BDAM) files -- and there have been other file types in the past.
What do you think the difference between a "text file" and a data set is on your mainframe? On a PC, a text file is one that has line delimiters -- but on a mainframe, data sets have records instead of line delimiters. Of course, on a mainframe under Unix System Services, files have line delimiters as well. Terminology is critical in IT, where similar terms may mean very different things. So what are you attempting to accomplish? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Thaise wrote: |
I couldn't figure it out if I can make a text file on mainframe, because of it I have asked for you.
My file is not a VSAM file.
I believe if it is not a VSAM file, it is a sequential file. |
Your belief is incorrect. Aside from various sorts of data sets that are primarily of historical interest today, the partitioned data set (PDS) is very much in use. You will readily see why referring to a "sequential PDS file" is hopelessly confusing.
Now, if you have a physical sequential (PS) data set, and you are copying the contents into the body of your e-mail, no conversion is necessary. If you intend to send it as an attachment, you may have to convert from EBCDIC to AASCII yourself; this is a point on which I am uncertain, not having attempted it myself. If you search these fora for "SMTP", giving Robert Sample or superk, I believe that you will find some truly expert advice. |
|
Back to top |
|
|
Thaise
New User
Joined: 19 Jan 2010 Posts: 3 Location: Brazil
|
|
|
|
I just wanted to know if I can generate .txt files on mainframe thru sequential files, and then, send them by e-mail.
But I guess it is not possible =/ |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Thaise wrote: |
I just wanted to know if I can generate .txt files on mainframe thru sequential files, and then, send them by e-mail.
But I guess it is not possible =/ |
You didn't actually bother to read anything that Mr. Sample or I wrote, did you? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But I guess it is not possible |
Bad guess. . .
You are hung up in the term ".txt file" which does not exist on the mainframe.
Actually if you have a sequential file or a member in a pds, these can be downloaded directly (provided the content is actually text and not binary or packed-decimal numbers or some other non-text content such as an image).
Simply ftp the data to your target system and use it. . . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I email files that are .txt from the mainframe to people with PC's every day. Once the SMTP is set up correctly for an attachment, you can send .txt files or .zip files or whatever is generated on your mainframe. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
If you search these fora for "SMTP", giving Robert Sample or superk, I believe that you will find some truly expert advice. |
Akatsukami, thanks for the kind words! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
Simply ftp the data to your target system and use it. . . |
Sorry 'bout that - i got so carried away with the complete disregard for info posted that i mentioned the wrong transfer method. . .
d |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
You could also try
Code: |
//MAILSTPC EXEC PGM=IEBGENER,COND=(4,LT)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=WELLS.EMAIL.HEADER,DISP=SHR
// DD DSN=WELLS.EMAIL.BODY,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP) <---(B,SMTP) may vary on ur site, check with support group
//SYSIN DD *
/* |
WELLS.EMAIL.HEADER should contain,
Code: |
HELO SMTP
MAIL FROM:<WELLS@XYZ.COM>
RCPT TO: <YOUEMAILADDRESS@COMPANY.COM>
DATA
FROM: WELLS@XYZ.COM
TO: YOUEMAILADDRESS@COMPANY.COM
SUBJECT: Attached is the generated report
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/RICH TEXT;
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=SOMENAME.TXT |
WELLS.EMAIL.BODY is the PDS member or PS file which you are trying to send as email attachment.
As you may already know WELLS.EMAIL.HEADER & WELLS.EMAIL.BODY should have same dataset attributes like LRECL and stuff.
Hope it helps. |
|
Back to top |
|
|
|