I have an operation inside a loop and save the output in each iteration, but I would like to name the file according to the iteration number, with leading zero if it's not a three digit number.
*DO, i, 1, 30
!operations goes here....
!...
!...
!out to file
/OUTPUT,%i%,txt
ENDDO
It however named the file as 1.txt, 2.txt, ... and 30.txt, not 001.txt, 002.txt.
I have tried
/OUTPUT,%02i,txt
/OUTPUT,%02i%,txt
But they output as literal string: %02i.txt and %02i%.txt respectively.
How to overcome this? Thanks!