[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20000217: 7 digit dates in McBASI and BATCH files



>From: Bill Fingerhut <address@hidden>
>Organization: Lyndon State College
>Keywords: 200002171441.HAA13883 McIDAS McBASI CCYYDDD

Bill,

>When working with the new 7 digit date, in both BATCH 
>and mcb scripts, I have run into problems as
>illustrated below. Seven digit numbers are written
>in scientific notation, not as an integer. 
>
>ECHO #SYS(2036)     ---> appears as
>ECHO 2000048
>
>However,
>
>RUN "KEYIN "ECHO ";KSYS(2036) 
>ECHO .200005E+07
>                                                                              
>RUN "KEYIN "ECHO ";KSYS$(2036) 
>ECHO  
>
>I can work around this in BATCH files. But, I can not
>use the KSYS function in mcbasi. Any ideas?

This is a known problem at SSEC for which there is not yet a fix.  Here
is what they provided as a workaround to a user who asked the same
question:

  If you are not doing any math with the day value, we think you could
  just pass the date as a character string into your keyin.

  In your keyin, change the DAY= input to a character string (a$, b$,
  etc.).

  Since McIDAS ADDE commands accept the 5 or 7 digit dates, it should
  befine if you use the 5 digit Julian date in the DAY= keyword. In 7.5
  or 7.6, you can get the 5 digit julian day as a numeric with this
  expression:

  LET D=VAL(MID$(DATE$,3,5))

  The MID$ strips the CC off the front of the julian day and the VAL
  makes it numeric. Then you can pass D into the DAY= keyword.

  If you are using older commands (e.g. SC or UP), and you need the
  7 digit day passed to a command, you can create the 7 digit day
  by referencing the system key table:

  d  = ksys(2013)
  a$ = str$(int(d/1000)) + mid$(mod(d,1000)+1000,2,3)

  Tom Whittaker thought this one up, and with it you could use a$ for
  the 7 digit date.

They then finished with:

  If neither of these work, send us an example of your McBASI script,
  and we can come up with a work-around.

I will echo this.  If nothing in the above helps, send me a script so
I can see if I can figure something out.

Tom


pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy