Run AS/400 backup based on objects count

510 pts.
Tags:
AS/400 backup
AS/400 objects
SAVF
SAVLIB
I have a requiremet that I need to run a savlib command if the particular library has more than 100 objects.[Br style="padding: 0px; margin: 0px;" />How this can be done?[Br style="padding: 0px; margin: 0px;" />[Br style="padding: 0px; margin: 0px;" />Help me out with this!
First i have to create a SAVF.
how to create a savf.
and also 
i need the code to do the above condition....
Please...
[Br style="padding: 0px; margin: 0px;" />


Software/Hardware used:
AS400

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: 5  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
  • HMSSL2K
    This should help you. "How to create a Save file" and CL Programming
    3,175 pointsBadges:
    report
  • TomLiotta
    This appears to be a homework type of question. You need to post the work that you have already done so that any discussion can guide towards a solution. In general, you should always post what you have done. Your specific question was: how to create a savf. Run the Create Save File command. You should know how to find all commands that "Create" objects as well as all commands that process "save files". Do you need guidance on how to find commands? Tom
    125,585 pointsBadges:
    report
  • pdraebel
    To get to the number of Objects in a library a DSPLIB with output *PRINT will give you a spoolfile that lists the number of objects. You will have to extract that information from the spool in case you need to use that in a Program. Another option to seek out is the info returned by the (QLIRLIBD) API.
    2,975 pointsBadges:
    report
  • wpoulin
    You could also use DSPOBJD yourlib/*ALL to an outfile. Then either count the number of objects in that outfile or do a DSPFD of that outfile to a 2nd outfile and read that 2nd outfile which could give you the record count. Hope htis helps, Bill Poulin
    2,480 pointsBadges:
    report
  • pdraebel
    Well Bill, that's the classic CL programming technique, but if you want a serious performance boost API is the way to go although it may require some more effort from the programmers side. Peter
    2,975 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