After Job Server Routine
Moderators: chulett, rschirm, roy
After Job Server Routine
Hi All,
Is there any way i can read all the text in an existing file and write those contents to another file using after job subroutine.
Is there any way i can read all the text in an existing file and write those contents to another file using after job subroutine.
Thanks and regards
raman
raman
Re: After Job Server Routine
Why does it have to be an after-job routine, when it can be directly done by 'extracting from the input file and writing in an appended mode to the target file'?ds_raman wrote:Hi All,
Is there any way i can read all the text in an existing file and write those contents to another file using after job subroutine.
gateleys
Re: After Job Server Routine
I have the linkcounts captured with some formated string generated in a previous job and the current job has to read all the contents from the previous job and append with new information from the present job.
Thanks and regards
raman
raman
Re: After Job Server Routine
Thanks,gateleys wrote:Code: Select all
cat inputFile >> targetFile
But i need to do this in After job Routine,
Thanks and regards
raman
raman
Re: After Job Server Routine
If the above command suffices, then go to the job properties and in the After SubRoutine, choose ExecSH. In the input value field, place the command. You are good to go.ds_raman wrote:Thanks,gateleys wrote:Code: Select all
cat inputFile >> targetFile
But i need to do this in After job Routine,
gateleys
Re: After Job Server Routine
Thank you Very muchgateleys wrote:If the above command suffices, then go to the job properties and in the After SubRoutine, choose ExecSH. In the input value field, place the command. You are good to go.ds_raman wrote:Thanks,gateleys wrote:Code: Select all
cat inputFile >> targetFile
But i need to do this in After job Routine,
With OpenSeq and ReadSeq i could only assign the first line input to a variable and write to the file, but since it has multiple lines of text its not possible, i the above command does not help.
Thanks and regards
raman
raman
Okay, readseq reads one line. So, put the readseq inside a loop. readseq has an ELSE which will be taken when the file is exhausted. Set the exit condition from the loop.
Code: Select all
EOF=@FALSE
LOOP
READSEQ LINE FROM FILE ELSE EOF=@TRUE
UNTIL EOF DO
...
...
...
REPEAT
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Re: After Job Server Routine
ds_raman wrote:i the above command does not help.
![Confused :?](./images/smilies/icon_confused.gif)
Unless, of course, you need to manipulate the records in some fashion during the process?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Re: After Job Server Routine
Thanks Very Muchds_raman wrote:Thank you Very muchgateleys wrote:If the above command suffices, then go to the job properties and in the After SubRoutine, choose ExecSH. In the input value field, place the command. You are good to go.ds_raman wrote: Thanks,
But i need to do this in After job Routine,
With OpenSeq and ReadSeq i could only assign the first line input to a variable and write to the file, but since it has multiple lines of text its not possible, i the above command does not help.
The syntax i used in the routine to execute the command was wrong, its working fine.
Thanks and regards
raman
raman
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: