I have a job that I run which takes in a sequential file that contains a list of files and validates whether each file exists. If not, it creates the file for me. Anytime I have a new hash file, I add its name to the sequentail file and rerun the job. Here is the code: FileName = "g:EGARepository":AuditAppName:"HashFiles.txt"
OpenSeq FileName to FileVar
Else Call DSLogFatal("Could not open ":FileName,"Create Hash Files")
EOF = 0
Loop Until EOF
ReadSeq NewFile From FileVar
Then GoSub CheckAndCreate
Else EOF = 1
Repeat
Return
CheckAndCreate:
If NewFile = ""
Then Return
NewFile = TRIM(NewFile)
Command = "FILE.USAGE ":NewFile
Call DSExecute("UV",Command,output,returncode)
If output[1,7] = "Illegal"
Then
Command = "CREATE.FILE ":NewFile:" DYNAMIC"
Call DSExecute("UV",Command,output,returncode)
If returncode = 0
Then Call DSLogInfo(NewFile,"FILE ALLOCATED")
Else Call DSLogFatal(NewFile,"ERROR ALLOCATING FILE")
End
Else
Call DSLogInfo(NewFile,"FILE ALREADY EXISTS")
End
Return
Alexandre Stoulov wrote: Hi, All!
Please advise how can I easily recreate hash files when I migrate DS project from for examle NT box to UNIX box?
Best regards,Alexandre Stoulov
------------------------------
Consultant. Business Intelligence Projects
TERN Company
mailto:
alexs@tern.ru
---------------------------------
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone with Yahoo! by Phone.