Re: SpamSlayer Alert: [U2] Reading Binary data from a file...
George Gallen wrote: When assigning 1 to System(1017), does that only affect the current process, or all processes running on UV? So, does System(1017) get reset when the program terminates? or do I need to set it back to normal. The setting is per-process and is reset when the program terminates. I created an item containing 1AM2 and then ran this program: PROGRAM TEST OPEN CBFILE TO FT ELSE STOP GOSUB READIT ASSIGN 1 TO SYSTEM(1017) GOSUB READIT GOSUB READIT ASSIGN 0 TO SYSTEM(1017) GOSUB READIT GOSUB READIT STOP READIT: READ X FROM FT, X THEN FOR I = 1 TO LEN(X) PRINT BYTEVAL(X, I):, : NEXT I PRINT END RETURN END Which printed: 49, 254, 50, 49, 10, 50, 10, 49, 10, 50, 10, 49, 254, 50, 49, 254, 50, Unfortunately I'm not aware of any way to check the value of SYSTEM(1017) before setting in case you wish to restore to a previous value. Craig --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: SpamSlayer Alert: [U2] Reading Binary data from a file...
ok. Thanks. George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Craig Bennett Sent: Thursday, July 27, 2006 7:23 PM To: u2-users@listserver.u2ug.org Subject: Re: SpamSlayer Alert: [U2] Reading Binary data from a file... George it does require ASSIGN 1 TO SYSTEM(1017) or UV will convert any CHAR(10) or CHAR(13):CHAR(10) sequence to CHAR(254) on a read and the reverse on a write. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: SpamSlayer Alert: [U2] Reading Binary data from a file...
When assigning 1 to System(1017), does that only affect the current process, or all processes running on UV? So, does System(1017) get reset when the program terminates? or do I need to set it back to normal. George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Craig Bennett Sent: Thursday, July 27, 2006 7:23 PM To: u2-users@listserver.u2ug.org Subject: Re: SpamSlayer Alert: [U2] Reading Binary data from a file... George it does require ASSIGN 1 TO SYSTEM(1017) or UV will convert any CHAR(10) or CHAR(13):CHAR(10) sequence to CHAR(254) on a read and the reverse on a write. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: SpamSlayer Alert: [U2] Reading Binary data from a file...
never mindIt didn't require anything special. I didn't think I could read binary into a varible if it had a CHAR(255) but apparantly I could. I setup a VOC entry for /tmp and then did a READ XDATA FROM F.TMP,file.jpg ELSE STOP and XDATA contained the entire image... George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of George Gallen Sent: Thursday, July 27, 2006 2:16 PM To: u2-users@listserver.u2ug.org Subject: SpamSlayer Alert: [U2] Reading Binary data from a file... I want to write a little routine that will display the ascii codes of a binary file. (aside from running it through base64 first...) Is there a way to open the file and read it is in block by block, and be able to show the SEQ() #'s? I suspect there may be numerous CHAR(255) and CHAR(254)'s. No, this is not a UV file, it's a .jpg image file. Thanks George George Gallen Senior Programmer/Analyst Accounting/Data Division [EMAIL PROTECTED] ph:856.848.1000 Ext 220 SLACK Incorporated - Delivering the best in health care information and education worldwide. http://www.slackinc.com --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: SpamSlayer Alert: [U2] Reading Binary data from a file...
George it does require ASSIGN 1 TO SYSTEM(1017) or UV will convert any CHAR(10) or CHAR(13):CHAR(10) sequence to CHAR(254) on a read and the reverse on a write. George Gallen wrote: never mindIt didn't require anything special. I didn't think I could read binary into a varible if it had a CHAR(255) but apparantly I could. I setup a VOC entry for /tmp and then did a READ XDATA FROM F.TMP,file.jpg ELSE STOP and XDATA contained the entire image... George -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of George Gallen Sent: Thursday, July 27, 2006 2:16 PM To: u2-users@listserver.u2ug.org Subject: SpamSlayer Alert: [U2] Reading Binary data from a file... I want to write a little routine that will display the ascii codes of a binary file. (aside from running it through base64 first...) Is there a way to open the file and read it is in block by block, and be able to show the SEQ() #'s? I suspect there may be numerous CHAR(255) and CHAR(254)'s. No, this is not a UV file, it's a .jpg image file. Thanks George George Gallen Senior Programmer/Analyst Accounting/Data Division [EMAIL PROTECTED] ph:856.848.1000 Ext 220 SLACK Incorporated - Delivering the best in health care information and education worldwide. http://www.slackinc.com --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/