Jim Hardesty
Software Engineer
NCR Corporation
GAD US HR/Payroll Systems
> *(937) 445-0836
> *
jh151011@...
>
> -----Original Message-----
> From: Carlton Conley [SMTP:
cconley@...]
> Sent: Friday, September 15, 2000 7:54 PM
> To:
psusers@egroups.com
> Subject: RE: [psusers] PLEASE HELP!
>
>
> remember the show statement is one of the best debugging tools with SQR.
> When I have a procedure that is not being called, I start there and work
> back putting in show 'Inside procedure name'. Then I can see where in the
> process I have the problem.
>
> -----Original Message-----
> From: Criss Laidlaw [mailto:
Criss.Laidlaw@...]
> Sent: Friday, September 15, 2000 1:53 PM
> To:
psusers@egroups.com
> Subject: Re: [psusers] PLEASE HELP!
>
>
>
> Usually, a file with an XLS extension is in Excel's own binary format and
> doesn't lend itself to reading line by line. But if you're doing as save
> as... to text format and changing the extension from .txt to .xls then
> your
> file would be fine. Is that what you're doing?
>
> - Criss
>
> ------------------------------
> Criss Laidlaw
> Project Manager, Office for Information Technology
> 22 Lab Campus Drive
> Jesup Hall, Williams College
> Williamstown, MA 01267
>
> ----- Original Message -----
> From: "Dianderas, Edgardo" <
Edgardo.Dianderas@...>
> To: <
psusers@egroups.com>
> Sent: Friday, September 15, 2000 1:09 PM
> Subject: [psusers] PLEASE HELP!
>
>
> >
> > To all,
> >
> > I have written an SQR that reads an excel file ;then it runs a
> > procedure that takes those values to insert in to the PS_JOB table. I
> have
> > check the program a lot of time for error traping and I haven't found
> any
> > errors. Could you take a look at the code a tell me why it is not
> inserting
> > any records into the JOB table? I'll appreciate any help or suggestions
> >
> > Thanks,
> >
> > Begin-Setup
> > Declare-printer Default
> > type = HP
> > End-Declare
> >
> > Declare-Layout Default
> > Orientation = portrait
> > Paper-Size = (Letter)
> > Top-Margin = 0.50
> > Bottom-Margin = 0.50
> > Left-Margin = 0.50
> > Right-Margin = 0.50
> > Line-Height = 1 ! Define a 1 by 1 point grid for
> > Char-Width = 1 ! precise print positioning
> > End-Declare
> > declare-variable
> > date $next_review_dt
> > end-declare
> > End-Setup
> >
> > begin-program
> > encode '<009>' into $tab
> > let $read_file = 'c:\test.xls'
> > open $read_file as 1 for-reading record=1000:vary
> > do read_file
> > close 1
> > end-program
> >
> !-------------------------------------------------------------------------
> --
> > --
> > begin-procedure read_file
> > move 0 to #counter
> > move 0 to #existcount
> >
> > while 1
> >
> > read 1 into $fileline:5000
> > unstring $fileline by $tab into $company $deptid $description $ssn
> > $newemplid $status $empl_rcd# $name
> > $grade $min_hr_hourly $max_rt_hourly $jobtitle
> > $jobcode $hours $worked_hours $hire $last_review_dt
> > $effective_dt $eval_points $evaluating_supervisor
> > $manual_increase_percent $proration_factor $new_hourly_rate
> > $lump_sum_merit_bonus $year_merit $year_lump_sum_merit
> > $proration_merit $proration_lump_sum_merit $actual_merit
> > $actual_merit_dollar $actual_lump_sum_merit
> >
> > do ps_job_check
> > if #end-file
> > break
> > end-if
> >
> > if &std_hours > 0
> > do insert_into_job
> > do update_proc_employment
> > do insert_proc_review
> > end-if
> >
> > if #end-file
> > break
> > end-if
> >
> > end-while
> > end-procedure
> >
> > begin-procedure ps_job_check
> >
> > begin-select
> > pj.emplid &emplid,
> > pj.empl_rcd# &empl_rcd#,
> > pj.effdt &effdt,
> > pj.effseq &effseq,
> > pj.deptid &deptid,
> > pj.jobcode &jobcode,
> > pj.position_nbr &position_nbr,
> > pj.position_override &position_override,
> > pj.posn_change_record &posn_change_record,
> > pj.empl_status &empl_status,
> > pj.action &action,
> > pj.action_dt &action_dt,
> > pj.action_reason &action_reason,
> > pj.location &location,
> > pj.tax_location_cd &tax_location_cd,
> > pj.job_entry_dt &job_entry_dt,
> > pj.dept_entry_dt &dept_entry_dt,
> > pj.position_entry_dt &position_entry_dt,
> > pj.shift &shift,
> > pj.reg_temp ®_temp,
> > pj.full_part_time &full_part_time,
> > pj.company &company,
> > pj.paygroup &paygroup,
> > pj.bas_group_id &bas_group_id,
> > pj.elig_config1 &elig_config1,
> > pj.elig_config2 &elig_config2,
> > pj.elig_config3 &elig_config3,
> > pj.ben_status &ben_status,
> > pj.cobra_action &cobra_action,
> > pj.empl_type &empl_type,
> > pj.holiday_schedule &holiday_schedule,
> > pj.std_hours &std_hours,
> > pj.officer_cd &officer_cd,
> > pj.empl_class &empl_class,
> > pj.sal_admin_plan &sal_admin_plan,
> > pj.grade &grade,
> > pj.grade_entry_dt &grade_entry_dt,
> > pj.step &step,
> > pj.step_entry_dt &step_entry_dt,
> > pj.gl_pay_type &gl_pay_type,
> > pj.acct_cd &acct_cd,
> > pj.earns_dist_type &earns_dist_type,
> > pj.salary_matrix_cd &salary_matrix_cd,
> > pj.rating_scale &rating_scale,
> > pj.review_rating &review_rating,
> > pj.review_dt &review_dt,
> > pj.comp_frequency &comp_frequency,
> > pj.comprate &comprate,
> > pj.change_amt &change_amt,
> > pj.change_pct &change_pct,
> > pj.annual_rt &annual_rt,
> > pj.monthly_rt &monthly_rt,
> > pj.hourly_rt &hourly_rt,
> > pj.annl_benef_base_rt &annl_benef_base_rt,
> > pj.shift_rt &shift_rt,
> > pj.shift_factor &shift_factor,
> > pj.currency_cd ¤cy_cd,
> > pj.flsa_status &flsa_status,
> > pj.eeo_class &eeo_class,
> > pj.function_cd &function_cd,
> > pj.hourly_rt_fra &hourly_rt_fra,
> > pj.accdnt_cd_fra &accdnt_cd_fra,
> > pj.estabid &estabid,
> > to_char(sysdate,'MM/DD/YYYY') &new_action_dt
> >
> >
> > add 1 to #counter
> > print #counter (+1,1)
> >
> > move &comprate to #comprate
> > move &std_hours to #std_hours
> >
> > !new dates
> > let $new_effdt = strtodate($effective_dt,'DD-MON-YY')
> >
> > !new calculations
> > let #new_comprate = ltrim($new_hourly_rate,'$')
> > let #new_change_amt = ltrim($actual_merit_dollar,'$')
> > let $new_change_percent = ((#new_change_amt * 100) / #comprate)
> >
> > !new yearly & monthly
> > let #new_annual_rt = ((#new_comprate * #std_hours) * 52)
> > let $new_monthly_rt = (#new_annual_rt /12)
> >
> > move #new_comprate to $new_comprate
> > move #new_change_amt to $new_change_amt
> > move #new_annual_rt to $new_annual_rt
> >
> > from ps_job pj
> >
> > where pj.emplid = $newemplid
> > and pj.effdt = (select max(x.effdt) from ps_job x
> > where x.emplid = pj.emplid
> > and x.empl_rcd# = pj.empl_rcd#)
> > end-select
> >
> > end-procedure
> >
> > Begin-Procedure insert_into_job
> > Begin-sql
> > insert into ps_job(emplid, empl_rcd#, effdt, effseq, deptid, jobcode,
> > position_nbr,
> > position_override, posn_change_record, empl_status,
> > action,action_dt,
> > action_reason, location, tax_location_cd,
> job_entry_dt,
> > dept_entry_dt,
> > position_entry_dt, shift, reg_temp, full_part_time,
> > company, paygroup,
> > bas_group_id, elig_config1, elig_config2,
> elig_config3,
> > ben_status,
> > cobra_action, empl_type, holiday_schedule,
> std_hours,
> > officer_cd,
> > empl_class, sal_admin_plan, grade, grade_entry_dt,
> > step,step_entry_dt,
> > gl_pay_type, acct_cd, earns_dist_type,
> salary_matrix_cd,
> > rating_scale,
> > review_rating, review_dt, comp_frequency, comprate,
> > change_amt, change_pct,
> > annual_rt, monthly_rt, hourly_rt,
> annl_benef_base_rt,
> > shift_rt, shift_factor,
> > currency_cd, flsa_status, eeo_class, function_cd,
> > hourly_rt_fra, accdnt_cd_fra,
> > estabid)
> > values (&emplid, &empl_rcd#, $new_effdt, &effseq, &deptid, &jobcode,
> > &position_nbr, &position_override,
> > &posn_change_record, &empl_status, 'PAY', &new_action_dt,
> 'MER',
> > &location, &tax_location_cd,
> > &job_entry_dt, &dept_entry_dt, &position_entry_dt, &shift,
> > ®_temp, &full_part_time,
> > &company, &paygroup, &bas_group_id, &elig_config1,
> &elig_config2,
> > &elig_config3, &ben_status,
> > &cobra_action, &empl_type, &holiday_schedule, &std_hours,
> > &officer_cd, &empl_class,
> > &sal_admin_plan, &grade, &grade_entry_dt, &step,
> &step_entry_dt,
> > &gl_pay_type, &acct_cd,
> > &earns_dist_type, &salary_matrix_cd, &rating_scale,
> > &review_rating, &new_action_dt, &comp_frequency,
> > $new_comprate, $new_change_amt, $new_change_percent,
> > $new_annual_rt, $new_monthly_rt, $new_comprate,
> > &annl_benef_base_rt, &shift_rt, &shift_factor, ¤cy_cd,
> > &flsa_status, &eeo_class,
> > &function_cd, &hourly_rt_fra, &accdnt_cd_fra, &estabid)
> > End-sql
> > string 'add_job' &emplid &empl_rcd# $new_effdt by ' ' into $test
> > print $test (+1,1)
> > !print #counter (+1,1)
> > !commit
> > End-Procedure
> >
> > Begin-Procedure update_proc_employment
> > Begin-sql
> > update ps_employment set last_increase_dt = $effective_dt
> >
> > where emplid = $newemplid
> > End-sql
> > !commit
> > End-Procedure
> >
> > Begin-Procedure insert_proc_review
> > begin-select
> > per.emplid &per_emplid,
> > per.empl_rcd# &per_empl_rcd#,
> > max(per.effdt) &per_effdt,
> > per.next_review_dt &per_next_review,
> > per.review_from_dt &per_review_from_dt,
> > per.review_thru_dt &per_review_thru_dt,
> > per.review_type &per_review_type,
> > per.rating_scale &per_rating_scale,
> > per.review_rating &per_review_rating,
> > per.review_score &per_review_score
> >
> > do insert_into_employee_review
> >
> > from ps_employee_review per
> > where per.emplid = $newemplid
> >
> > group by per.emplid,
> > per.empl_rcd#,
> > per.next_review_dt,
> > per.review_from_dt,
> > per.review_thru_dt,
> > per.review_type,
> > per.rating_scale,
> > per.review_rating,
> > per.review_score
> > end-select
> > end-procedure
> >
> > begin-procedure insert_into_employee_review
> > let $next_review_dt =
> > dateadd(strtodate($effective_dt,'DD-MON-YY'),'month',12)
> > Begin-sql
> > insert into ps_employee_review(emplid, empl_rcd#, effdt,
> next_review_dt,
> > review_from_dt,
> > review_thru_dt, review_type,
> rating_scale,
> > review_rating,
> > review_score)
> >
> >
> values(&per_emplid,&per_empl_rcd#,$new_effdt,$next_review_dt,&per_effdt,$n
> ew
> > _effdt,
> >
> > &per_review_type,&per_rating_scale,&per_review_rating,$eval_points)
> >
> > End-sql
> > !commit
> > end-procedure
> >
> > Ed Dianderas
> >
> >
> > To unsubscribe from this group send a blank message to
>
psusers-unsubscribe@egroups.com or contact
psusers-owner@egroups.com
> >
> >
>
>
> To unsubscribe from this group send a blank message to
>
psusers-unsubscribe@egroups.com or contact
psusers-owner@egroups.com
>
>
> To unsubscribe from this group send a blank message to
>
psusers-unsubscribe@egroups.com or contact
psusers-owner@egroups.com