DMS500Tech
Technical User
I am having trouble formating an output file using "fwrite"
Fwrite is being used with varibles and strings "text"
The data is being written to the output file, just not the way I want it to.
I cannot figure out how to send a carriage return at the end of each fwrite.
This is basically a script to output the results in a structured form so it can be used as a script in another program.
No matter what I try the output wants to come out in random formats with a lot of tabs inserted between writes in what seems to be random also.
Here is a sample of the code I am using.
fwrite 0 asignvp 30 ;"asgnvphem,vp," VPid
pause 1
fwrite 0 correlate 30 ;"correlate,"AcctNum","VPid
pause 1
fwrite 0 "y" 1
pause 1
fwrite 0 catv 30 ;"catv,vp,"VPid,off"
pause 1
fwrite 0 "y" 1
pause 1
I am using a pause so I don't overflow the buffer. At first I was having a problem with partial strings being written.
The pause seems to have fixed that problem.
Any suggestions would be greatly appreciated.
Fwrite is being used with varibles and strings "text"
The data is being written to the output file, just not the way I want it to.
I cannot figure out how to send a carriage return at the end of each fwrite.
This is basically a script to output the results in a structured form so it can be used as a script in another program.
No matter what I try the output wants to come out in random formats with a lot of tabs inserted between writes in what seems to be random also.
Here is a sample of the code I am using.
fwrite 0 asignvp 30 ;"asgnvphem,vp," VPid
pause 1
fwrite 0 correlate 30 ;"correlate,"AcctNum","VPid
pause 1
fwrite 0 "y" 1
pause 1
fwrite 0 catv 30 ;"catv,vp,"VPid,off"
pause 1
fwrite 0 "y" 1
pause 1
I am using a pause so I don't overflow the buffer. At first I was having a problem with partial strings being written.
The pause seems to have fixed that problem.
Any suggestions would be greatly appreciated.