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

Trasfering a particular record into notepad using FTP


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

New User


Joined: 02 Apr 2016
Posts: 18
Location: India

PostPosted: Sat Apr 02, 2016 10:46 pm
Reply with quote

Hi Guys,

I need a help. I have a VSAM file which has many records(around 6K).
All the data present are in hex format. and the VSAM is a KSDS format.
I need just one record from that VSAM file into my note pad. Is there any possibility for that to be done.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Sun Apr 03, 2016 12:06 am
Reply with quote

1. Use IDCAMS REPRO to copy the record to a sequential data set.
2. FTP the sequential data set to a file on your PC by connecting from the PC to the mainframe.
3. Open the file with Notepad.

There are other ways to accomplish this, depending upon what tools are available at your site.
Back to top
View user's profile Send private message
nico_neoz

New User


Joined: 02 Apr 2016
Posts: 18
Location: India

PostPosted: Sun Apr 03, 2016 7:42 am
Reply with quote

How do I specifically select that record provided the data is in hex format
eg ROBERTSAMPLE will be as mentioned below , in the record
RBRSML
OETAPE

So what should I do to specifically select the record which has RobertSample. I usually find the desired record using f x'RobertSample' in that file. Can I use similar function for REPRO.

Btw I use FileAid tool. Can that be useful in making the task easier.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Sun Apr 03, 2016 8:31 am
Reply with quote

If you read the "How to code subparameters" chapter of the manual Access Method Services for Catalogs in the DFSMS bookshelf for any release of z/OS, you will find that subparameters (such as FROMKEY and TOKEY in a REPRO command) can use text, hexadecimal, or binary values. So you could code the FROMKEY and TOKEY as (X'ROBERTSAMPLE') and the REPRO will work. Or, you could code your JCL with spaces for the length of the FROMKEY and TOKEY fields, turn hexadecimal on (with the HEX ON ISPF/EDIT command), change the FROMKEY and TOKEY values to the necessary hexadecimal values, and then turn hexadecimal back off.

This is, of course, assuming that you are looking for a record in the KSDS by the key value. If you are looking for some random character string (which you did NOT state in your original post), your best procedure will probably be to dump the entire data set to a sequential data set, edit the sequential data set, and then use a FIND command. On the ISPF EDIT command line typing X ALL; F X'??????'; DEL X ALL will leave you with only the line (or lines) that contain your desired data in the data set -- assuming you're using the ; as a command separator.

Use File Aid if you want -- but my suggestions are for IDCAMS, not File Aid. I know File Aid supports hexadecimal values since I used it at a previous employer, but I do not currently have access to it and hence cannot speak about how to get what you want with it.
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 COBOL Table data to a flat file with ... COBOL Programming 8
No new posts Write a current record plus previous ... DFSORT/ICETOOL 4
No new posts Error while fetching the record from ... COBOL Programming 3
No new posts Print report for each record from mul... CA Products 1
No new posts fetch the record number from FMNMAIN ... CLIST & REXX 10
Search our Forums:

Back to Top