Username:

Password:


Lost Password?

Register now!
Home
Music Services
Get Personal!
Contact
Flying Snowman Productions Forum Index
   AS/400 (iSeries)
     File Input and Output on iSeries using Rexx
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
The Flying Snowman
Posted on: 2005/10/18 15:23
Webmaster
Joined: 2004/10/31
From: BE
Posts: 2208
Online
File Input and Output on iSeries using Rexx
I you look at the Appendix I of the REXX/400 Programmer's Guide (http://publib.boulder.ibm.com/iseries/v5r2/ic2924/books/c4157280.pdf), you'll notice that it's not so easy to read or write a file, compared to Rexx running on other IBM operating systems like VM/CMS or MVS/TSO. Another interesting document about this can be found on http://www-912.ibm.com/s_dir/slkbase.NSF/0/f463a8aaf7dd36af8625689a00538de1?OpenDocument


There is of course a workaround. To read from a file in REXX/400, you have to use several CL commands (assume the inlib variable contains the library name, the infile variable contains the file name, and the inmbr variable contains the member name to read). The variable reccnt returns the number of records present in the file, you retrieve this number using the CL RTVMBRD (retrieve member description) command. You then use the CL OVRDBF (override database file) command to read from the file, instead of the terminal:

/* get the number of records in the file */
'RTVMBRD FILE('inlib'/'infile') MBR('inmbr') NBRCURRCD(&reccnt)'

/* read from the file instead of the keyboard */
'OVRDBF FILE(STDIN) TOFILE('inlib'/'infile') MBR('inmbr')'

do reccnt
parse pull recin
end

To write to several files, instead of printing to the terminal, do the following. Call another Rexx exec, invoke the Rexx interpreter (assume the outlib variable contains the name of the output library, outfile the name of the output file, outmbr the name of the output member, and recout contains the line of data you want to write to the file):

"STRREXPRC SRCMBR(WRITFIL2) PARM('outputlib("outlib")",
"outputfile("outfile")",
"outputmbr("outmbr")",
"outrec("recout")')"

In the Rexx WRITFIL2 you do the following. Override the STDOUT file to your output library/file/member. Then issue a say command, and it will be printed into that file. For each file, you call the WRITFIL2 rexx from within your calling rexx, using the strrexprc command like described above, otherwise the override will not work (works only once in a rexx interpreter session).

'OVRDBF FILE(STDOUT) TOFILE('outlib'/'outfile') MBR('outmbr')'
say recout

You might have to translate some things in order to prevent syntax errors, in case your data contains single quotes or parenthesis. In the calling Rexx, first do :

outrec = translate("[]´","()'")

In the called WRITFIL2 rexx, translate it back to the original value:

outrec = translate("()'","[]´")

To get the parameters passed in WRITFIL2, do the following in the beginning of the WRITFIL2 Rexx:

arg 'OUTPUTLIB('outlib')'
arg 'OUTPUTFILE('outfile')'
arg 'OUTPUTMBR('outmbr')'
arg 'OUTREC('outrec')'

Threaded | Newest First Previous Topic | Next Topic | Top

Register To Post
 
Kemper Packs Testimonies:

Suseguitar from Kemper forum:
I had a chance to play one of the profiles (037508) yesterday in our rehearsal room, played my Strat with Quarterpounds ;) - the solosound is just awesome, assertive, supporting and inspiring. Great work!

Ibot39 from Kemper forum:
After testing the profiles my conclusion is: The pack does exactly what the author is advertising. You get the Blackmore sound from the mentioned era. Humbuckers are possible, other 70s rock-sounds with a little tweaking. But the real soul of this pack is authentic Blackmore-tone! For this it was created with an ear for details and this is were the rigs shine! Thanks for the nice pictures that complement this special pack. I have to highlight the pdf that comes with the profiles offering very detailed information. Great!

Laker from Kemper forum:
These profiles are the real deal IMHO.

Riddlescott from Kemper Forum:
I like it the better the longer i play it. What i also appreciate is the tasty effects settings. Highly recommended for the real Marshall Bluesy Staccato Strat Sound.

raiellojr from Kemper forum:
I like the pack a lot...a little tweaking and I can get real close to your sound samples.

Laker from Kemper forum:
Blackmore Marshall Major profiles [Flying Snowman Prods] - Only the one amp a Marshall Major but it sounds like the real deal. These profiles are outstanding. Everything they make sounds great. What I really like about them is their sound samples sound just like what you download. IMHO a lot of other profilers do not sound the same.

Acolbourn from Kemper forum:
Thanks for the tips, just wanted to follow up for any else on the hunt for Frusciante tone. For profiles I tried flying snowman's more black pack listed above and they sound great!


Copyright © 1999-2019 Flying Snowman Productions. All rights reserved.
Designed and developed by Flying Snowman Productions
Best viewed with settings 1024 x 768 pixels
You need to enable your cookies for excellent browsing experience