stream('file','c','seek ='x) problem
Author |
Message |
William H. Geiger II #1 / 5
|
 stream('file','c','seek ='x) problem
Hi, I seem to be having a problem with the stream('file','c','seek ='x) function in Classic Rexx, OS/2 Warp 4, FP1. If I do: stream('file','c','open read') stream('file','c','seek ='x) the read pointer does not move to x but says at 0 (the stream function returns NULL). If I do: stream('file','c','open read') linein('file') stream('file','c','seek ='x) Then the read pointer moves to the correct position in the file (stream funtion returns x). Has anyone else notice this problem? -- ----------------------------------------------------------- William H. Geiger III http://www.*-*-*.com/ ~whgiii Geiger Consulting Cooking With Warp 4.0 Author of E-Secure - PGP Front End for MR/2 Ice PGP & MR/2 the only way for secure e-mail.
-----------------------------------------------------------
|
Fri, 08 Oct 1999 03:00:00 GMT |
|
 |
J. Turinc #2 / 5
|
 stream('file','c','seek ='x) problem
Quote: > Hi, > I seem to be having a problem with the stream('file','c','seek ='x) > function in Classic Rexx, OS/2 Warp 4, FP1. > If I do: > stream('file','c','open read') > stream('file','c','seek ='x) > the read pointer does not move to x but says at 0 (the stream function > returns NULL).
I think you actually want: stream(file,'c','open read') linein(file) stream(file,'c','seek ='x) (unless the literal "file" is the actual name of your input file) - otherwise, it would make sense a file name "file" doesn't exist and you would receive the NULL. The modified statements reference a file name contained in the variable file... Quote: > stream('file','c','open read') > linein('file') > stream('file','c','seek ='x) > Then the read pointer moves to the correct position in the file (stream > funtion returns x).
+----------------------------------------------------------- | J. Turincs - Database and Operating systems | Mainframes and PCs +-----------------------------------------------------------
|
Sat, 09 Oct 1999 03:00:00 GMT |
|
 |
Jerry Le #3 / 5
|
 stream('file','c','seek ='x) problem
Quote: >Hi, >I seem to be having a problem with the stream('file','c','seek ='x) >function in Classic Rexx, OS/2 Warp 4, FP1. >If I do: > stream('file','c','open read') > stream('file','c','seek ='x) >the read pointer does not move to x but says at 0 (the stream function >returns NULL). >If I do: > stream('file','c','open read') > linein('file') > stream('file','c','seek ='x) >Then the read pointer moves to the correct position in the file (stream >funtion returns x). >Has anyone else notice this problem?
Not exactly that problem, but another where Classic ReXX's syntax for the stream seek command will create a syntax error under Object ReXX, and Object ReXX's syntax for it will create a syntax error under Classic ReXX. The difference in the 'seek' stream command Classic ReXX vs. Object ReXX is: Object ReXX requires the use of the word read or write, whereas Classic Rexx does not call stream hosts_dat, 'c', 'seek ='5 works under Classic ReXX but not Object ReXX whereas call stream hosts_dat, 'c', 'seek ='5 'read' works under Object but not Classic --
Jerry Levy Marblehead, MA (USA)
|
Wed, 13 Oct 1999 03:00:00 GMT |
|
 |
Ian Colli #4 / 5
|
 stream('file','c','seek ='x) problem
Quote: >I seem to be having a problem with the stream('file','c','seek ='x)
I might add (though it's probably too late) that what you've got there is a syntax error because it looks like a literal hex string ('seek ='x) but doesn't contain valid hex characters. --
------ http://www.comlab.ox.ac.uk/oucl/users/ian.collier/imc.html New to this group? Answers to frequently-asked questions can be had from http://rexx.hursley.ibm.com/rexx/ .
|
Sun, 17 Oct 1999 03:00:00 GMT |
|
|
|