IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

unload all the members from dataset to text file


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Karthikeyan Subbarayan

New User


Joined: 24 Feb 2008
Posts: 62
Location: Boston

PostPosted: Fri Aug 23, 2013 12:31 am
Reply with quote

Hi,
I have a dataset with 500+ members in it. I need to unload the entire dataset to a text file and each member name should be the file name of the text file.

For eg:
QUAL1.QUAL2.DATASET has 4 members like
MEM1
MEM2,
MEM3,
MEM4

now i need to unload the entire dataset to text file
where MEM1.txt should have all the data available in MEM1
similarly MEM2.txt should have all the data available in MEM2,
MEM3.txt should have all the data available in MEM3
and MEM4.txt should have all the data available in MEM4


Is it possible to do by file transfer ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Fri Aug 23, 2013 12:42 am
Reply with quote

Not that I'm aware. To the left, a Rexx script using ISPF services to get the list of members and tailor a skeleton should do it quite nicely.
Back to top
View user's profile Send private message
Karthikeyan Subbarayan

New User


Joined: 24 Feb 2008
Posts: 62
Location: Boston

PostPosted: Fri Aug 23, 2013 12:54 am
Reply with quote

but is it possible to unload to our local PC for all the members ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Fri Aug 23, 2013 1:05 am
Reply with quote

Probably. You don't say what terminal emulator you use, but I use Rumba, and a PDS(E) member can easily be unloaded to a PC file by its Transfer feature. I have no need to do such a thing, and therefore haven't tried writing a macro to do it, but I expect it could be done.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Fri Aug 23, 2013 2:40 am
Reply with quote

ISPF Workstation Agent can do what you are asking for.

See option 3.7.2. If you specify the workstation file as say: P:\documents\*.txt the ISPF member name will be substituted for the asterisk.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Fri Aug 23, 2013 2:46 am
Reply with quote

Karthikeyan Subbarayan wrote:
but is it possible to unload to our local PC for all the members ?

What I'm puzzled about in all answers is the lack of a pretty fundamental question:

Why would you like to do that?

Employees taking files from the system to their own PC? Why the flipping 'ell do they need those files on their PC? To take to a competitor? To set up their own business?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Aug 23, 2013 3:05 am
Reply with quote

Hello,

Most PCs have an ftp client installed - most are GUI these days.

Start the FTP client. Switch to the proper pc directory and on the mainframe, use the PDS name as the directory and it will show all of the members as though they were individual files. Select some or all of the members and transfer them (ASCII) to the PC.

I use this fairly often to keep custom sets of "tools/toys" - too lazy to go back and make them all generic icon_cool.gif
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Aug 23, 2013 6:20 pm
Reply with quote

Code:
(command prompt)
(change to target PC directory)
cd \backup_mf_stuff

ftp -i mainframe_ip_address
(login with mainfame id/password)
cd 'wtso.wneg.pds'
>>'wtso.wneg.pds' is a partition dataset
mget *
bye

(back at command prompt)
ren *.   *.txt
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 23, 2013 8:11 pm
Reply with quote

Ed: I recommend toggling the PROMPT option so the FTP runs without the question about downloading each member.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Aug 26, 2013 6:25 pm
Reply with quote

that's what the '-i' does on the command line.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Thu Sep 05, 2013 1:43 pm
Reply with quote

If you have FileAid on your system you can unload an entire PDS into a single flat-file with member name headings and the member contents following. I've found this very useful at times. The output file could be post processed to generate the separate text files from that.

Go to FileAid option 6 (Search/Update Facility) and select B (Browse Globally)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Load new table with Old unload - DB2 DB2 6
Search our Forums:

Back to Top