3,740 pts.
 read PF member records using SQL400
How to Read PF member records using SQL400....
PF1 contain 3 members like (mbr1, mbr2, mbr3), now i want to read all records from mbr2 using SQL400...
please share me the Query... 


Software/Hardware used:
as400 v5r3
ASKED: February 2, 2012  4:07 PM
UPDATED: February 28, 2012  8:44 AM

Answer Wiki:
My PF (PF1) contain three member (mbr1, mbr2 and mbr3)... <b>CREATE ALIAS LIB1/ALIASMBR1 FOR LIB1/PF1 (MBR1)</b> aliasmbr1 -> my alias name... after just run alias name like this.... <b>select * from aliasmbr1</b>
Last Wiki Answer Submitted:  February 5, 2012  5:14 pm  by  CharlieBrowne   32,835 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,835 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks Mr. Charlie Browne, i got the answer from your hints….
i created ALIAS for my member file and run the alias name, it ll work fine….

 3,740 pts.

 

i don’t know, i think this is right place for my another one question,

i created PF in my library (lib1) and i tried to create LF for my PF in QTEMP library. but i can’t create it… i ll show error.. that is ” Message . . . . : File TEST3 created in library QTEMP.”
please give me a suggestion…

 3,740 pts.

 

i ll show error.. that is ” Message . . . . : File TEST3 created in library QTEMP.”

Text from a message is usualy not helpful to someone else. The message identifier is more important. More than one message identifier can have the same text.

please give me a suggestion…

However, in this case, it doesn’t matter because that isn’t an error message. The file was created in QTEMP just as you asked for.

There is no suggestion possible because there is nothing wrong.

Tom

 107,995 pts.

 

Why PF and LF didn’t create in QTEMP…. any reason for it….

 3,740 pts.

 

From the message it appears that the logical was created.
Perhaps you are confused about the neature of the QTEMP library.
Scope of QtEMP – one job, DURATION of QTEMP – duration of that job
If your logical is created in a batch operation it will only be visible to that batch job and will only last until the batch job ends.
If you logical is creted bu an interative job (session) it is only visible in that session and will disappear when the session ends.
A batch job could issue the command CRTLF and then Compile an RPG program that uses the logical.
A batch job could issue the command CRTLF and then run an RPG program that uses the file.
So QTEMP is 1 temporary 2 issolated to the job.
Phil

 44,150 pts.

 

if you;re using option 14 to compile the logical and it compiles in batch — it’s a seperate job stream and when it ends the logical ceases to exist.

 44,150 pts.

 

thanks Mr. Phil, i got your points…

so, doesn’t we create the PF, LF and RPG program?

where we can use the QTEMP library…

 3,740 pts.

 

QTEMP can be used for objects that are Job specific.
Advantages
- Each job is certain of having unique set of the objects in QTEMP — workfile are a good example
- There is automatic cleanup, when Job ends Qtemp and all objects in Qtemp disappear
Disadvantages
- Any evidence in these objects that will help track down job problems are gone when job ends.
- These objects cannot generally be shared between jobs

 44,150 pts.

 

where we can use the QTEMP library…

Every job has its own unique QTEMP library. If you create an object in QTEMP, no other job can see that object.

Often, a file in QTEMP will be created from a CRTDUPOBJ command. An application might have an empty file description in that application’s data library. Different jobs may duplicate that file description into QTEMP to have a private copy. The job can put data into the private file to use for temporary work without interference with or from other jobs that are doing the same kind of work.

You might compile over the original file description in the main data library (the “template” file), and use OVRDBF to override to the temporary version in your QTEMP library at run time. When your job finishes, the QTEMP library goes away automatically. All temporary data goes away when the job ends.

Tom

 107,995 pts.

 

Thanks Mr. Tom and Phil……..

i didn’t learn AS400 from any institution…. i have learning myself… so only i am asking like this question… both your helping for my career…

one more Thanks for you….

 3,740 pts.