310 pts.
 rpgle
how to get existing library list for perticuler job description

Software/Hardware used:
rpgle
ASKED: Feb 13, 2012  4:35 AM GMT
UPDATED: March 17, 2012  1:37:27 AM GMT
55 pts.

Answer Wiki:
Hi, refer to the API "QWDRJOBD". That should help.
Last Wiki Answer Submitted:  Feb 13, 2012  6:23 AM (GMT)  by  Siri   55 pts.
To see other answers submitted to the Answer Wiki View Answer History.
Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _




 

thanks,i have a lib list like 10,20,30,40,50,60,…..ghghg,kjkjkj,oooi,hhiihih,ouuuu,……if enter new library then it will appear on top seq number will changed .please post code for this

 310 pts.

 

How are you adding the library to your lib list?
If using ADDLIBLE you will find several options to position the library where you need it.

 4,980 pts.

 

please post code for this

Since we don’t know what program is doing it, we have no way of knowing what code to post.

Based upon your description, I would guess that the code is:

EDTLIBL

I’m not aware of anything else that results in anything like your description.

Tom

 66,990 pts.

 

You’re last discussion entry has no question and very little sense. Between the original question and that discussion question I am now totally confused. Are you trying to change the library list in a job descripton or an active jobs library list. I don’t know what command you were using or what was unsatisfactory about it.

If you want useful answers, you have to spend more time on preparing your question.

 36,420 pts.

 

i want change my library list through rpgle program please help me…………………..

 310 pts.

 

i want change my library list through rpgle program…

Please tell what your “library list” means.

In your original question, you say “job description”. Do you want to change the job description initial library list? Or do you want to change the library list of the job that runs your program?

Those are two very different things, so we need to know what you are trying to do.

Describe the business problem that you need to solve. Why are you changing a library list? That will help us understand what you need.

Tom

 66,990 pts.

 

For example i have lib list like 10 vamsi,20 amits ,30 raja, 40 gvklib,50 krishlib,.when i enter new lib like 10 gadde then i want to update total lib list like 10 gadde, 20 vamsi, 30 amits, 40 raja, 50 gvklib, 60 krishlib,so please heip me .this task was given by my trainer .thanks in advance.

 310 pts.

 

What does your trainer do???
Ask your trainer these questions.
Your trainer expects you to solve these problems, not us.
What have you done except ask us?

Now, I think I understand why your questions and answers disappear.

You’ve got a bit of the problem already..ADDLIBLE is a CL command that will do what you seem to want. Now you need to find out how to issue a CL command from RPG. You could google that….

 36,420 pts.

 

For example i have lib list…

Yes, but you still haven’t told us what you mean by “lib list”.

Where is it coming from? Is it a library list on a job description? Or is it the library list for an active job?

…like 10 vamsi,20 amits ,30 raja, 40 gvklib,50 krishlib,…

Where are those numbers coming from? Library lists don’t have numbers.

The EDTLIBL command will display the library list of an active job and will show put sequence numbers next to the libraries. The command lets you use the sequence numbers to change the order of libraries in the list or to insert new libraries in different parts of the list.

Is that where you are seeing the numbers?

If you change that list, it will only affect that one job. If you sign off and sign back on, your new job will not see the changes that you made. Those changes are gone as soon as the first job ends.

So, again I ask — what library list do you need to change?

If we don’t know the answer, we can’t know how to help.

Tom

 66,990 pts.

 

i created one pf with different seqno and lib names

 310 pts.

 

What does the file have to do with this project?

 36,420 pts.

 

In any event - whether storing the libraries in a database, manipulating job description library lists, or manipulating your current library list - you’re going to need to build the programs to effect the maintenance.

 4,945 pts.

 

i created one pf with different seqno and lib names

Okay, but that’s just a file. Do you want to update the file? Or do you want to update a library list?

If you want to update a library list, what library list do you want to update?

Tom

 66,990 pts.

 

I WANT UPDATE FILE LIKE IF I ENTER NEW RECORD THEN SEQNO WILL INCREASE BY 10.

 310 pts.

 

ok but what about library list..looking like a library list ins’t the same thing as bring a library list.

 36,420 pts.

 

NOT LIB LIST JUST I WANT TO UPDATE MY PF LIKE LIBLIST

 310 pts.

 

HERE I POST MY CODE FOR UPDATE CORRECT IT
C ADDSR BEGSR

C *LOVAL SETLL LIBLf
C READ LIBLF
C* IF %FOUND
C DOW not %eof(liblf)
C
C IF %EOF(LIBLF)
C EVAL *IN84=*ON
C LEAVESR
C ENDIF
C
C EVAL SEQNO=SEQNO+10
c update librec
C SEQNO READE LIBLF
C ENDDO
C EVAL *IN84=*ON
C* ENDIF
c ENDSR

 310 pts.

 

It’s either excllent or all wrong.
there seems to be extreme spec drift.

 36,420 pts.

 

C SEQNO READE LIBLF

You don’t want the READE instruction. Just use READ to read the next record.

Tom

 66,990 pts.

 

IF I USE READ INSTEAD OF READE IT GOES INTO THE CONTINUES LOOP,IF I USE READE IT WILL UPDATE FIRST TWO RECORDS ONLY .PLEASE HELP ME

 310 pts.