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
 

 

unload all the members from dataset to text file

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

New User


Joined: 24 Feb 2008
Posts: 56
Location: Boston

PostPosted: Fri Aug 23, 2013 12:31 am    Post subject: unload all the members from dataset to text file
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: 1754
Location: Bloomington, IL

PostPosted: Fri Aug 23, 2013 12:42 am    Post subject:
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: 56
Location: Boston

PostPosted: Fri Aug 23, 2013 12:54 am    Post subject: Reply to: unload all the members from dataset to text file
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: 1754
Location: Bloomington, IL

PostPosted: Fri Aug 23, 2013 1:05 am    Post subject:
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: 650
Location: Whitby, ON, Canada

PostPosted: Fri Aug 23, 2013 2:40 am    Post subject:
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: 1009
Location: Oostende, Belgium

PostPosted: Fri Aug 23, 2013 2:46 am    Post subject: Re: Reply to: unload all the members from dataset to text fi
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

Site Director


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

PostPosted: Fri Aug 23, 2013 3:05 am    Post subject:
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    Post subject:
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: 8036
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 23, 2013 8:11 pm    Post subject:
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    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 440
Location: London

PostPosted: Thu Sep 05, 2013 1:43 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 11 Thu Apr 27, 2017 9:42 am
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm


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