4

As stated in my title, I am hoping that some one can throw some basic REXX commands my way. I have user guides but they are very huge and the table of contents do not point to anything TAPE DRIVE related. I just need to know the basic commands for opening, closing, reading, and writing a file to a TAPE DRIVE, not disk.

Any help would be much appreciated, thank you!

SORC_
  • 79
  • 2
  • 7
  • 2
    Well, z/OS has "device independence". IO with a tape is no different from IO with a disk. However, if you are going to be executing in "foreground", many sites have a policy which does not allow tapes to be assigned to a TSO session. So, likely, you'll have to run "TSO in batch". The next question is, what are you doing that you want to read tapes in Rexx? Tapes perhaps indicate "big data". Rexx may not be the best for that. So more about the actual task, please. – Bill Woodger Jul 02 '13 at 22:07
  • Thank you Bill, your answer has been very informative. I am not actually reading and writing anything to tape. I need the IO commands from the mainframe that are sent when a file is opened, closed, read, or written to a tape drive. – SORC_ Jul 02 '13 at 22:16
  • I believe these are what I am looking for: – SORC_ Jul 02 '13 at 22:17
  • http://support.microsoft.com/kb/99063 – SORC_ Jul 02 '13 at 22:18
  • Sorry, I am new to this site and I kept hitting enter to get a new line :)... not trying to spam my comments to you, Sir. – SORC_ Jul 02 '13 at 22:18
  • No problem. What you can do is copy all the text out of your comments, delete all your comments, and then add one new comment with what you want. – Bill Woodger Jul 02 '13 at 23:27
  • I'm not sure I understand what you mean about wanting the IO commands that are sent to a tape drive. Unless you mean really low-level stuff (Channel Command Words and suchlike). Rexx is a high-level language. The IO Rexx does does not go near the hardware. Be aware that Rexx runs on many platforms, and especially IO can differ from platform to platform. Please update your question with what you are actually trying to do. Forget Rexx. Why do you want to know what commands are sent to a tape drive? If you want to read data in the Mainframe from Rexx, see @cshneid's comment. EXECIO does the lot. – Bill Woodger Jul 02 '13 at 23:32
  • Why on *earth* would you ever seek information about z/OS commands on a Microsoft site?? If you needed to speak Swahili, would you look in a Spanish-English dictionary? – WarrenT Jul 03 '13 at 02:43
  • @BillWoodger I am told on what I consider good authority of an expert mainframe DBA and REXX evangelist, that modern REXX can actually out-perform COBOL on I/O, due to low level access that it can use. Sadly IBM has left IBM i, the platform that I primarily work on, with only a version of classic REXX, ported from the early days of SAA two decades ago. – WarrenT Jul 03 '13 at 02:58
  • @WarrenT, you have a "can" there, which means some worms. However, I wasn't referring to the IO. Rexx is interpreted. Means some "overhead". Overhead * 1,000,000,000 might not be so good where data read is to be processed. However, turns out TS doesn't need to read/write anything just need to know the commands. – Bill Woodger Jul 03 '13 at 06:36
  • @BillWoodger Yes I said "can". One can write poorly performing programs in any language. If I said "always" someone may say I did X & it's slower. I hear it about SQL. Mostly I find they didn't understand how to write it better, or didnt have good indexes. They only proved they hadn't known how to do it faster. Pure interpreted languages have some overhead that pure compiled languages generally don't. Each interpreter implementation varies. Perl & Forth can come close to C. I hear many bright systems programmers have tuned mainframe REXX phenomenally. But I use IBM i, so what do I know? ;-) – WarrenT Jul 04 '13 at 16:02

1 Answers1

5

I believe you are looking for the EXECIO command. @BillWoodger's comments are accurate, you are likely to end up running your Rexx code in batch.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • Wonderful, you guys have been great. I have a lot to learn about mainframe IO. This is great reading material. – SORC_ Jul 02 '13 at 22:38