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
 

 

Dataset becomes Text file

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

New User


Joined: 19 Jan 2010
Posts: 3
Location: Brazil

PostPosted: Thu Jan 13, 2011 11:55 pm    Post subject: Dataset becomes Text file
Reply with quote

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
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jan 14, 2011 12:00 am    Post subject:
Reply with quote

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
View user's profile Send private message
Thaise

New User


Joined: 19 Jan 2010
Posts: 3
Location: Brazil

PostPosted: Fri Jan 14, 2011 12:08 am    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jan 14, 2011 12:20 am    Post subject:
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jan 14, 2011 12:24 am    Post subject:
Reply with quote

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
View user's profile Send private message
Thaise

New User


Joined: 19 Jan 2010
Posts: 3
Location: Brazil

PostPosted: Fri Jan 14, 2011 12:28 am    Post subject:
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Jan 14, 2011 12:50 am    Post subject:
Reply with quote

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 =/

12.gif You didn't actually bother to read anything that Mr. Sample or I wrote, did you?
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: Fri Jan 14, 2011 12:53 am    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jan 14, 2011 1:02 am    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Jan 14, 2011 1:04 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Jan 14, 2011 2:25 am    Post subject: Reply to: Dataset becomes Text file
Reply with quote

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. . . icon_redface.gif

d
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Fri Jan 14, 2011 3:50 pm    Post subject:
Reply with quote

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
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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