mid statement
Todd
todd at weshyd.com
Thu Nov 17 16:54:35 PST 2005
At 07:45 PM 11/17/2005 -0500, you wrote:
>On Thu, Nov 17, 2005 at 04:13:43PM -0800, Todd, the prominent pundit,
>witicized:
> > SCO5.0.7
> > filePro 5.0.14R4
> >
> > Am I missing something obvious or is the following not allowed. I am
> > getting a syntax error on the mid statement:
> >
> > 1 ------- - - - - - - - - - - - - - - - -
> > ¦
> > If: ¦
> > Then: lookup dtl = macswodtl r=free -e
> > 2 ------- - - - - - - - - - - - - - -
> - -
> > ¦
> > If: ¦
> > Then: copy dtl
> > 3 ------- - - - - - - - - - - - - - -
> - -
> > ¦
> > If: ¦
> > Then: dtl[1] = "WC80597"
> > 4 ------- - - - - - - - - - - - - - -
> - -
> > ¦ If: ' SPECIAL KEY, W/O# & PART NUMBER
> > Then: mid(dtl[30],"1","7") = "WC80597"
> >
> > *** A filePro Error Has Occurred ***
> >
> > Line Number: 4
> >
> > mid(dtl[30],"1","7") = "WC80597"
> > ^
> > Process contains a syntax error at position indicated.
> >
> > Thanks for your help.
>
>Shouldn't that be dtl(30) using parens rather than brackets? This is a
>lookup, not an array. I've never heard they were interchangeable on
>lookup aliases.
I tried both ways, same result.
>Incidentally, I would personally make sure line 2 has a failure test of:
>
>IF: not dtl
>THEN: 'handle error condition here
I would think it would always find a free record, unless I ran out of
disk space. But your right, I should probably make a habit of it.
Sorry Mark. I did mean to reply to the list.
>mark->
>--
>There is no "I" in TEAM.
>This would be the primary reason I've chosen not to join one.
>_______________________________________________
>Filepro-list mailing list
>Filepro-list at lists.celestial.com
>http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list