Skip to main content
Question

UniVerse DATA statement allows the at variable @DATA but does not allow @TIME. What at variables are allowed?

  • August 19, 2021
  • 5 replies
  • 0 views

All,

I have a PAragraph that runs a program and feeds data into it using the DATA statement to provide input. One of my DATA statements has a pathname with an
'@DATE' in it. I.E. C:TEMPFILE@DATE.TXT. I tried C:TEMPFILE@DATA@TIME.TXT, the pathname had the current date but the '@TIME' was just '@TIME'. The documentation was pretty thin on this topic. What at variables are allowed in a DATA statement?

Jon​​

5 replies

Shawn Waldie
Forum|alt.badge.img
  • 54 replies
  • August 19, 2021
All,

I have a PAragraph that runs a program and feeds data into it using the DATA statement to provide input. One of my DATA statements has a pathname with an
'@DATE' in it. I.E. C:TEMPFILE@DATE.TXT. I tried C:TEMPFILE@DATA@TIME.TXT, the pathname had the current date but the '@TIME' was just '@TIME'. The documentation was pretty thin on this topic. What at variables are allowed in a DATA statement?

Jon​​
I don't know Universe, so I don't know the answer to your specific question.

I don't even know if it will work in Unidata, but something like this may be a possible solution:
SELECT AnyFile SAMPLE 1 SAVING EVAL "'C:TEMPFILE':@DATE:@TIME:'.TXT'"
SAVE.LIST SL.REC
.
.
.
DATA <<F(SAVEDLISTS,SL.REC000,1)>>

  • 0 replies
  • August 20, 2021
All,

I have a PAragraph that runs a program and feeds data into it using the DATA statement to provide input. One of my DATA statements has a pathname with an
'@DATE' in it. I.E. C:TEMPFILE@DATE.TXT. I tried C:TEMPFILE@DATA@TIME.TXT, the pathname had the current date but the '@TIME' was just '@TIME'. The documentation was pretty thin on this topic. What at variables are allowed in a DATA statement?

Jon​​
Shawn,

Thanks! It does work in UniVerse. I'm still curious what at-variables are allowed/evaluated in a DATA statement.​

Neil Morris
  • Rocketeer
  • 207 replies
  • August 20, 2021
All,

I have a PAragraph that runs a program and feeds data into it using the DATA statement to provide input. One of my DATA statements has a pathname with an
'@DATE' in it. I.E. C:TEMPFILE@DATE.TXT. I tried C:TEMPFILE@DATA@TIME.TXT, the pathname had the current date but the '@TIME' was just '@TIME'. The documentation was pretty thin on this topic. What at variables are allowed in a DATA statement?

Jon​​
Jon,
Do you have a specific example of @DATE being interpreted in a DATA statement?
I just ran a simple test and whatever I put in the DATA statement such as @DATE or @TIME was being picked up literally.
I can do some research but was curious how you got @DATE to work.
Thanks,
Neil
​​​​

  • 0 replies
  • August 20, 2021
All,

I have a PAragraph that runs a program and feeds data into it using the DATA statement to provide input. One of my DATA statements has a pathname with an
'@DATE' in it. I.E. C:TEMPFILE@DATE.TXT. I tried C:TEMPFILE@DATA@TIME.TXT, the pathname had the current date but the '@TIME' was just '@TIME'. The documentation was pretty thin on this topic. What at variables are allowed in a DATA statement?

Jon​​
Neil,

My bad! It appears the program I was running changes the '@DATE' in the code. 

Jon

Neil Morris
  • Rocketeer
  • 207 replies
  • August 20, 2021
All,

I have a PAragraph that runs a program and feeds data into it using the DATA statement to provide input. One of my DATA statements has a pathname with an
'@DATE' in it. I.E. C:TEMPFILE@DATE.TXT. I tried C:TEMPFILE@DATA@TIME.TXT, the pathname had the current date but the '@TIME' was just '@TIME'. The documentation was pretty thin on this topic. What at variables are allowed in a DATA statement?

Jon​​
Hi Jon,
Thanks for that update. As best as I can tell (without further research), the text supplied in a DATA statement is passed literally to the input statement.
I don't think any @variables are translated as part of a DATA statement.
Does that give you what you need?
Thanks,
Neil