parse file
Moderators: chulett, rschirm, roy
parse file
Hi All,
I have to parse jill file and load the data into table previously i have used one filter command tr -s '\n' ',' in sequential file and is working fine as i have only one format but now the structure of it is varying from job to job how can i make it generic so that it can be used for any structure of jill file and i have to take the jill file from unix can any one share ideas.
Thanks in advance
I have to parse jill file and load the data into table previously i have used one filter command tr -s '\n' ',' in sequential file and is working fine as i have only one format but now the structure of it is varying from job to job how can i make it generic so that it can be used for any structure of jill file and i have to take the jill file from unix can any one share ideas.
Thanks in advance
In autosys we scheduled the jobs and jill file is job information language which consists of details of job scheduled below is sample jil file
insert_job: template job_type: c
box_name: box1
command: ls -l
machine: localhost
owner: lyota01@TANT-A01
permission: gx,ge,wx,we,mx,me
date_conditions: 1
days_of_week: all
start_times: "15:00, 14:00"
run_window: "14:00 - 6:00"
condition: s (job1)
description: "description field"
n_retrys: 12
term_run_time: 60
box_terminator: 1
job_terminator: 1
std_out_file: /tmp/std_out
std_err_file: /tmp/std_err
min_run_alarm: 5
max_run_alarm: 10
alarm_if_fail: 1
max_exit_success: 2
chk_files: /tmp 2000
profile: /tmp/.profile
job_load: 25
priority: 1
auto_delete: 12
insert_job: template job_type: c
box_name: box1
command: ls -l
machine: localhost
owner: lyota01@TANT-A01
permission: gx,ge,wx,we,mx,me
date_conditions: 1
days_of_week: all
start_times: "15:00, 14:00"
run_window: "14:00 - 6:00"
condition: s (job1)
description: "description field"
n_retrys: 12
term_run_time: 60
box_terminator: 1
job_terminator: 1
std_out_file: /tmp/std_out
std_err_file: /tmp/std_err
min_run_alarm: 5
max_run_alarm: 10
alarm_if_fail: 1
max_exit_success: 2
chk_files: /tmp 2000
profile: /tmp/.profile
job_load: 25
priority: 1
auto_delete: 12
I mean there are more then 10 fields but some times may be only 5 or 6 fields may be present like
nsert_job: template job_type: c
box_name: box1
command: ls -l
machine: localhost
owner: lyota01@TANT-A01
permission: gx,ge,wx,we,mx,me
date_conditions: 1
and i want to accomplish my o/p
as
insert_job job_type box_name command machine ---------
templete c box1 ls-l localhost --------------
nsert_job: template job_type: c
box_name: box1
command: ls -l
machine: localhost
owner: lyota01@TANT-A01
permission: gx,ge,wx,we,mx,me
date_conditions: 1
and i want to accomplish my o/p
as
insert_job job_type box_name command machine ---------
templete c box1 ls-l localhost --------------
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
-
- 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: