Announcement

Collapse
No announcement yet.

Re[4]: pc vs unix fomat

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Re[4]: pc vs unix fomat



    Hello Ron,

    I guess I forgot to be specific, I am actually writing the script that
    generates the file. And an editor like EditPlus easily converts the
    file from Unix to PC. That is how I know what needs to be done. I have
    also looked at the file in WinHex to verify the differences. Now I
    just need the script "pieces," that's the command/syntax, to generate the correct code to
    "terminate" the line(s) correctly. Empressa is NOT doing it from a
    Win2K server, or Mia on my local pc. And, using a utility to complete
    the operation in the end, by end users is NOT really an option I can
    consider right now.

    <MvASSIGN NAME="mystring" VALUE="{mystring}">
    <MvEXPORT
    FILE="{My_Directory $ 'myfile.dat'}"
    FIELDS="mystring"
    DELIMITER="">

    I would think that this code should do it. I doesn't.

    <MvASSIGN NAME="myLF" VALUE="{asciichar(10)}">
    <MvASSIGN NAME="mystring" VALUE="{mystring$myLF}">
    <MvEXPORT
    FILE="{My_Directory $ 'myfile.dat'}"
    FIELDS="mystring"
    DELIMITER="">


    This code also doesn't work. It simply put a
    in the string.

    I cannot find anything in the docs for what mivascript command would
    add a LF, silently, if you will. Any ideas out there?

    Thanks,

    Scott
    IDS


    Monday, December 13, 2004, 6:31:59 AM, you wrote:

    RW> I don't know how to tell you to do it in Miva. But what you need to do is
    RW> replace the Unix LF line terminator with a Windows CR LF terminator. I am
    RW> sure you can create a small routine to accomplish it or take a look for a
    RW> free unility.



    RW> -----Original Message-----
    RW> From: [email protected] [mailto:[email protected]]
    RW> On Behalf Of Scott Shepard
    RW> Sent: Monday, December 13, 2004 1:57 AM
    RW> To: Ron Weiss
    RW> Cc: [email protected]
    RW> Subject: Re[2]: [mrc] pc vs unix fomat

    RW> Hello Ron,

    RW> How to do this in MivaScript since it's a being executed via Mia or
    RW> Empressa for Windows. A unix flavor hasn't been tested yet.

    RW> -Scott
    RW> IDS

    RW> Sunday, December 12, 2004, 9:17:06 PM, you wrote:

    RW>> Scott,
    RW>> Your line terminator is incorrect. You can use the unix xtod command to
    RW>> correct it.

    RW>> -----Original Message-----
    RW>> From: [email protected]
    RW> [mailto:[email protected]]
    RW>> On Behalf Of Scott Shepard
    RW>> Sent: Sunday, December 12, 2004 10:17 PM
    RW>> To: [email protected]
    RW>> Subject: [mrc] pc vs unix fomat

    RW>> Hello,

    RW>> having trouble reaching the miva-users list for some reason, but
    RW>> it's a MM module I'm using anyway.

    RW>> A batch report module exports some data. That data is then used
    RW>> for/in another application. The application is having trouble reading
    RW> the
    RW>> end of the first line of data. I've been able to remedy the issue by
    RW>> loading the file in a text editor. The data is recognized as UNIX,
    RW>> funny, it's on a windows machine and being tested using Mia (3.9
    RW>> whatever btw). I use to to know why things like this might happen.
    RW>> So it's now loaded in the text editor as UNIX, I save the file
    RW>> format as "PC", I use the data file and the application reads it
    RW>> perfectly.

    RW>> What might be happening?

    RW>> an uncompiled script, a windows server running empressa/uncompiled
    RW>> MM, and also tested under Mia.

    RW>> TIA






    --
    Best regards,
    Scott
    mailto:[email protected]




    #2
    Re[4]: pc vs unix fomat



    Hi

    The main difference between Unix and Windows format is:
    Unix uses for new line 1 character ->
    (with the ascii code 10)

    Windows uses for new line 2 character ->
    (with ascii code 10 and 13)

    Try to change this line
    <MvASSIGN NAME="myLF" VALUE="{asciichar(10)}">

    with
    <MvASSIGN NAME="myLF" VALUE="{asciichar(10)$asciichar(13)}">
    or
    <MvASSIGN NAME="myLF" VALUE="{'
    '}">
    It should work now

    Gaspar Zoltan
    www.keepcalling.com



    On Mon, 13 Dec 2004 21:55:46 -0800, Scott Shepard <[email protected]>
    wrote:

    > Hello Ron,
    >
    > I guess I forgot to be specific, I am actually writing the script that
    > generates the file. And an editor like EditPlus easily converts the
    > file from Unix to PC. That is how I know what needs to be done. I have
    > also looked at the file in WinHex to verify the differences. Now I
    > just need the script "pieces," that's the command/syntax, to generate
    > the correct code to
    > "terminate" the line(s) correctly. Empressa is NOT doing it from a
    > Win2K server, or Mia on my local pc. And, using a utility to complete
    > the operation in the end, by end users is NOT really an option I can
    > consider right now.
    >
    > <MvASSIGN NAME="mystring" VALUE="{mystring}">
    > <MvEXPORT
    > FILE="{My_Directory $ 'myfile.dat'}"
    > FIELDS="mystring"
    > DELIMITER="">
    >
    > I would think that this code should do it. I doesn't.
    >
    > <MvASSIGN NAME="myLF" VALUE="{asciichar(10)}">
    > <MvASSIGN NAME="mystring" VALUE="{mystring$myLF}">
    > <MvEXPORT
    > FILE="{My_Directory $ 'myfile.dat'}"
    > FIELDS="mystring"
    > DELIMITER="">
    >
    > This code also doesn't work. It simply put a
    in the string.
    >
    > I cannot find anything in the docs for what mivascript command would
    > add a LF, silently, if you will. Any ideas out there?
    >
    > Thanks,
    >
    > Scott
    > IDS
    >
    >
    > Monday, December 13, 2004, 6:31:59 AM, you wrote:
    >
    > RW> I don't know how to tell you to do it in Miva. But what you need to
    > do is
    > RW> replace the Unix LF line terminator with a Windows CR LF terminator.
    > I am
    > RW> sure you can create a small routine to accomplish it or take a look
    > for a
    > RW> free unility.
    >
    >
    >
    > RW> -----Original Message-----
    > RW> From: [email protected]
    > [mailto:[email protected]]
    > RW> On Behalf Of Scott Shepard
    > RW> Sent: Monday, December 13, 2004 1:57 AM
    > RW> To: Ron Weiss
    > RW> Cc: [email protected]
    > RW> Subject: Re[2]: [mrc] pc vs unix fomat
    >
    > RW> Hello Ron,
    >
    > RW> How to do this in MivaScript since it's a being executed via Mia or
    > RW> Empressa for Windows. A unix flavor hasn't been tested yet.
    >
    > RW> -Scott
    > RW> IDS
    >
    > RW> Sunday, December 12, 2004, 9:17:06 PM, you wrote:
    >
    > RW>> Scott,
    > RW>> Your line terminator is incorrect. You can use the unix xtod
    > command to
    > RW>> correct it.
    >
    > RW>> -----Original Message-----
    > RW>> From: [email protected]
    > RW> [mailto:[email protected]]
    > RW>> On Behalf Of Scott Shepard
    > RW>> Sent: Sunday, December 12, 2004 10:17 PM
    > RW>> To: [email protected]
    > RW>> Subject: [mrc] pc vs unix fomat
    >
    > RW>> Hello,
    >
    > RW>> having trouble reaching the miva-users list for some reason, but
    > RW>> it's a MM module I'm using anyway.
    >
    > RW>> A batch report module exports some data. That data is then used
    > RW>> for/in another application. The application is having trouble
    > reading
    > RW> the
    > RW>> end of the first line of data. I've been able to remedy the issue
    > by
    > RW>> loading the file in a text editor. The data is recognized as UNIX,
    > RW>> funny, it's on a windows machine and being tested using Mia (3.9
    > RW>> whatever btw). I use to to know why things like this might happen.
    > RW>> So it's now loaded in the text editor as UNIX, I save the file
    > RW>> format as "PC", I use the data file and the application reads it
    > RW>> perfectly.
    >
    > RW>> What might be happening?
    >
    > RW>> an uncompiled script, a windows server running empressa/uncompiled
    > RW>> MM, and also tested under Mia.
    > RW>> TIA
    >
    >
    >
    >
    >
    >



    Comment

    Working...
    X