AS/400 schedule job

1355 pts.
Tags:
AS/400
AS/400 jobs
Hi All, I need some help on AS/400 schedule job because I'm new in AS/400. I have a file has two column which are code and time, now I want to run a program based on this files values like if code =1 and time =1.00 then call lib/xxx so on... in AS/400 schedule job dynamically. Thanks in advance.

Software/Hardware used:
Software

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne

    I'm confused. Why not just use the Job Scheduler that comes with the system instead of writing something yourself.

    Try command WRKJOBSCDE

    If I am missing something, please give us more information.

    41,380 pointsBadges:
    report
  • TomLiotta
    You haven't told us what problem you're having. You told us what you want to do, but you didn't tell us where you are stuck. Do you want someone to write the programming for you? We can suggest consultants who'd be willing to do the work. -- Tom
    125,585 pointsBadges:
    report
  • 9783444184
    Sorry,I don't want some one write code for me.i just want idea.
    i have a pf  with two column code and time now i want my job will run according to the pf records where codes and times are different. Like
    If code=86 and time=12.00 pm
    call 'XYZ'
    endif

    If code=87 and time=1.00 am
    call 'XYZ'
    endif

    If code=88 and time=2.00 pm
    call 'XYZ'
    endif
    and so no....

    Thanks

    1,355 pointsBadges:
    report
  • TomLiotta

    How are you intending to "schedule" your scheduling program so that it runs at exactly 12:00 PM and 1:00 PM and 2:00 PM and any other time that might be in your file? Your scheduling program would need to know every time that was in your file in order to run the IF-tests at the exact times, otherwise the times will never be 'equal'.

    I can't think of any good way to write your program. That is, it needs to access some fairly low-level functions in order to synchronize with the system clock while alse not using excessive CPU time.

    Tom

    125,585 pointsBadges:
    report
  • CharlieBrowne

    I still do not understand why you are trying to develop something that already exists (In a much better form) that software that already exists on your system).

    If you MUST do it, then if the times are always on the hour, you could write that program using DLYJOB that wakes up every hour and then call your program to process those jobs that are scheduled for that hour.

    41,380 pointsBadges:
    report
  • PGMBOB

    I would suggest having the name of the program to call in the database.

    When the time is right you call the program provided in the record.

    What if there are 2 programs to run at ths same time?

    Maybey you could plan for a day of the week to include or bypass.

    Any days off or holidays?

    You might want to submit the program in a job so you don't miss your schedule by a long running program.

    Make sure to update the time as you loop through your schedule records.

    Consider updateing the date time the selected record was processed so you dont process the same job over and over the same time.

    Yes the Job Scheduler does all of this already.

    PGMBOB

    1,085 pointsBadges:
    report
  • ToddN2000

    Sounds simple enough. Do it in a CLLE program do a RCVF on you pf. Test for your data conditions and if valid do a SBMJOB with a scheduled date and time ?

    10,895 pointsBadges:
    report
  • TomLiotta

    Test for your data conditions and if valid do a SBMJOB with a scheduled date and time ?

    That's probably the only reasonable way to do it given the description of the problem. It'd still be necessary to know how to "schedule" the program that reads the file and be sure nothing interferes with it.

    We're all trying to figure why records should be added to the file rather than adding entries to the system job scheduler. Then you don't even need to write the requested program, you don't need to have it running, you don't need a file... etc.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following