Are you looking for a job change? Searching for an other job can be so cumbersome that it can turn into a job itself. If you are expertise in Data bases then prepare well for the job interviews to get your dream job. Here's our recommendation on the important things to need to prepare for the job interview to achieve your career goals in an easy way. DB 400 is the same as to DB2 and it is another version of it. It includes non relational structure and designs. Looking for a job can be cumbersome and tiring, especially when you are not aware of it. Follow Wisdomjobs page for DB 400 job interview questions and answers page to get through your job interview successfully in first attempt.
Question 1. How To Know Total No Of Records In Pf With Out Using Sql?
By using dspfd command you can find out total on record.
here u can find out total no of records.
Question 2. Last Statement Of Any Rpg Pgm Is Lr?
Not necessarily. LR is generally set on after all processing is doen i.e. at the end of the program but there is no hard and fast rule for that.
Question 3. Maximum How Many Fields We Can Create Under A Record Format Of Pf?
We can give max of 8000 fields in rec format of a PF.But it also depend on the no. of bytes occupied by the record formate.Because rec. format of PF may occupy atmax 32766 bytes.ie if there is only one field which occupy 32766 bytes then we can't define a new field in record format.
so it depend on the no. of bytes occupied by the field defined in the record format.
Question 4. How Many Max. Record Format A Logical File Have?
8000. this can vary,can be lesser if date format, alphanumeric fields are used.
Question 5. Why Journalling Is Compulsory Before Commitment Control?
Commitment ctrl is use to save /rollback the group of chages and Journalling is use to save the changed records in Jorunal reciver.
Question 6. Why We Create The Physical File Member?
A member is like an Individual file.It is possible to Have 32767 such members within the same PF.Each member added to the file will exactly get the same record format( fields,types and KWDS) on the file.This facility is provided to meet the requirement when many files are needed to be created with same structure.Here just Create file once with MAXMBRS(as many reqd) and ADDPFM will do it.Easy to create and maintain as a single object.Each member is identified by unique name within file.
Examples : A School has attendance register per class. Each Class has 4 sections and in all10 classes. Instead of Creating and maintaining 40 files and scaterred in a library, one can create a PF and add 40 members in one object.
Secondly All Physical files created need not necessarily have members. Some files are created to store field definitons only and are called field refrence files. They need not have members.
Question 7. Is Constant Can Be Define As A Key Field?
Question 8. Is It Possible To Create A Logical File Whose Physical File Is Not In Same Library?
Yes, Just put the user library in which you want to create on top and followed by other library in which physical file is located. provided the first library should not have physical file. Then try to create the logical.
Question 9. How To Add A Field To A Pf And Compile It Without Loss Of Data?
First Add the fields whatever you want then use CHGPF command
Update the Physical file.No need to compile again.
Question 10. How To Find The List Of Source Physical Files In A Library? Is There Any Way To Get A List?
WRKOBJPDM LIB(KCS) OBJ(*ALL) OBJTYPE(*FILE) OBJATR('PF-SRC')
Question 11. Suppose I Have A Pf,it Contains 5 Members,how To Access Particular Member Data From Logical File ?and What Is The Use Of Member In Pf?
Ans1:Reading member 5 of myfilepf
CRTLF FILE(KCS/MYFILELF) SRCFILE(KCS/KC1) DTAMBRS ((KCS/MYFILEPF (MBR5)))
ADDLFM FILE(KCS/MYFILELF) MBR(MYFILEBR) DTAMBRS ((KCS/MYFILEPF (MBR5)))
Ans2:For accounting purpose each month data can be stored as 12 different members So that we can easily access one month data or 12 months together. Easy to maintain 12 members in one PF file instead of 12 PF Files.
Question 12. How To Read A Pf In Reverse(from Last Rec To First) Using Cl?
In this example empfile for reading in reverse order is used.
ovrdbf file(empfile) share(*yes)
opnqryf file((empfile)) keyfld((empno *descend))
readf: rcvf rcdfmt(mpfilr)
monmsg msgid(cpf0864) exec(goto cmdlbl(end))
Question 13. How To Retrieve A Physical File After Deleting That? What Is Keyword Used For That?
In the DD statement's DISP parameter write DISP=KEEP.And to access the file with disposition KEEP we need to supply the volume srail number as vol=ser=xxxx.
Question 14. When We Create A Pf And Did Not Fill Up Maint Parameter, Then By Default Which Access Path Will The System Take & Why?
Access Path Maint parameter use *IMMED. Access path is updated each time a record is changed, added, or deleted from a member.
Question 15. I Have Physical File With 100 Records,there Is No Any Duplicate Records In This Pf.based On This Pf One Logical File I Have Used.but This Lf Is Viewing Only 80 Records Only Of That Pf?what Is The Reason For This?
If there is any selection criteria in LF then it may be displaying accordingly. If there is no "Select" or "Omit" it should display 100 records. Have a look at LF once again.
Question 16. How To Know The Particular Record In Pf With Out Reading?
you'll come to know whether the record is found. that's all.but not what(value) is in the record.
Question 17. How To Know Logical File Belongs To Which Physical File Without Source?
if you do a DSPDBR on a logical file it wont show you the name of the physical file that it is based on. Rather you need to use DSPFD on the logical file. DSPDBR on a physical file will show the names of all the LF files based on that PF.
Question 18. What Is Open Data Path? And What Is The Diff B/w Access Path And Open Data Path?
An access path describes the order in which the rows are retrieved from a database file. If the rows in the file are accessed in a physical sequence, that is known as an arrival sequence access path. If the rows need to be processed in an ordered manner, then a keyed access path is needed to sort the data in the specified order. With DB2 for iSeries, keyed access paths are supplied to DB2 by creating a keyed logical file, keyed physical file, or SQL index.
An access path and an open data path are used together to process the rows in a database file. The open data path (ODP) is the path through which all input and output operations are performed on a database file. The ODP is used to connect the requesting program with the data in the file. As data is retrieved from or inserted into the file, the ODP will use an access path to navigate to a row within in the file. If the rows need to be processed in a sorted owner, then someone will need to supply a keyed access path by creating a keyed physical file, keyed logical file or SQL index.
An ODP is created and used each time that a file is opened or when an SQL statement is executed. There are ways to have an ODP shared or reused instead of creating the ODP each time.
Question 19. How To Update Physical File Using Logical File With Example?
Declare the logical file in update mode in the RPG program.
Chain at the record needed to be updated and afer changing the field value use UPDATE opcode with the record format name of the LF.The record gets updated
Question 20. How To Update Physical Files Using Normal Logical File?
To Update physical file in RPG use opcode UPDATE.
Note: Logical file should be simeple logical file. We can't update physical file with help of Join logical file.
Question 21. One Physical File Can Have How Many Max Of Logical Files? What Is The Primary File?
Question 22. What Is The Interactive Job? What Is The Batch Job? How To Change The Batch Job To Interactive Job?
When you sign-on an AS/400 system, you are interacting with interactive jobs(e.g.QINTER). The System-jobs which are presubmitted are called batch jobs(e.g.QBATCH, QSPL, QCMN etc.,)
If u want to know whether a job is in Interactive or Batch, u can use RTVJOBA command with attribute JOB-TYPE on that job.
if it has a value '1' = Interative; '0' = Batch.
you can change a Batch-job to Interactive-job as long as it is in JOBQ(by changing the environment on CHGJOB(opt-2) command to QINTER or QPGMR); once it's active we cannot change the type.
Question 23. What Is The Purpose Of The Chain And Setll And Setgt?
CHAIN is used for random retrieval from a File. In other words, whatever value used by programmer in Factor 1/Key against CHAIN opcode will be used as search/find criteria in database file. NO VALUE RETRIEVED IN NO CRITERIA MATCH. It can be well understand, in case of using composite keys.
But in case of SETLL and SETGT, program will return some value, if any value present in the database/physical file.
It is recommended, use CHAIN only, if record exist in database file, instead of SETLL and SETGT, which can be used otherwise.
Question 24. A Pf Containing 100 Records... My Query Is How To Display From 11th Record In The Pf?
We can positioned to nth record in file in CL with the help of OVRDBF command.
OVRDBF FILE(file-name) POSITION(*RRN 11)
Question 25. I Had Created One Physical File Tell Me Command To Enter Data In To?
By the use of the cmd UPDDTA Pfname use can enter the data into the physical file. Note: dn't compile the pf after entering the data into the pf.
Question 26. Can We Concatenate Fields In Physical File? If Yes How Can We Do?
No, we cannot concat fields in Physical File. However, in logical file, we can concat 2 or more fields together into 1 field. format is..
DB 400 Related Tutorials
|IBM - RPG Tutorial||IBM DB2 Tutorial|
|Data Warehousing Tutorial||COBOL Tutorial|
|DB2 Using SQL Tutorial|
DB 400 Related Interview Questions
|IBM - RPG Interview Questions||IBM DB2 Interview Questions|
|Data Warehousing Interview Questions||COBOL Interview Questions|
|DB2 Using SQL Interview Questions||SQL Interview Questions|
|AS400 Interview Questions||DB2 SQL Programming Interview Questions|
|Mainframe DB2 Interview Questions||Rpgle Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.