Hi all
I have a file in UNIX server which I want to call it in server routine
Steps I have implemented -
Called a script in routine which will create a file in a specifed location.
I need to call the file in routine so that I can read it and process further
Can you help me out with this
Need to call a file in Server routine
Moderators: chulett, rschirm, roy
Need to call a file in Server routine
Naveen Rapaka
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
Call DSExecute("SH", "pathname_of_script", OutputOfCommand, ExitStatusOfCommand)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
The file and path are passed in the file is read and the value returned.
Just a simple one that reads a file with one column and one row.
Just a simple one that reads a file with one column and one row.
Code: Select all
Function(FileName)
**FileName = Trim(FilePath):Trim(Company):"_":Trim(TableName):".SKEY.Stat"
Call DSLogInfo("FileName:":FileName, "Msg")
OPENSEQ FileName TO FILE2 Then
ValidOpen = @TRUE
READSEQ vLineRaw FROM FILE2
ON ERROR
CLOSE FILE2
ErrorCode = 1
Done = @TRUE
End Then
vLine = vLineRaw
FileStatus = vLine
Call DSLogInfo(vLine, "Msg")
End Else
Done = @TRUE
End
CLOSESEQ FILE2
Call DSLogInfo("Files Closed", "Msg")
Ans=FileStatus
END
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill