YouTube Icon

Interview Questions.

Top 100+ Db 400 Interview Questions And Answers - May 29, 2020

fluid

Top 100+ Db 400 Interview Questions And Answers

Question 1. How To Know Total No Of Records In Pf With Out Using Sql?

Answer :

By using dspfd command you can find out total on file.

Dspfd (libname/filename)

right here u can discover total no of statistics.

Question 2. Last Statement Of Any Rpg Pgm Is Lr?

Answer :

Not always. LR is typically set on in any case processing is doen i.E. At the cease of the program however there's no difficult and fast rule for that.

IBM - RPG Interview Questions
Question 3. Maximum How Many Fields We Can Create Under A Record Format Of Pf?

Answer :

We can deliver max of 8000 fields in rec layout of a PF.But it also rely upon the no. Of bytes occupied by the file formate.Because rec. Layout of PF might also occupy atmax 32766 bytes.Ie if there's best one discipline which occupy 32766 bytes then we can not define a brand new subject in record format.

So it depend upon the no. Of bytes occupied with the aid of the field described in the document layout.

Ex.

Char discipline - max price(32766 bytes)
variable duration subject - max price(32740 bytes)
allow null discipline - max price(32765)
variable & allownull area - max value(32739)
Question 4. How Many Max. Record Format A Logical File Have?

Answer :

8000. This will vary,can be lesser if date format, alphanumeric fields are used.

IBM - RPG Tutorial
Question five. Why Journalling Is Compulsory Before Commitment Control?

Answer :

Commitment ctrl is find to store /rollback the institution of chages and Journalling is locate to save the changed records in Jorunal reciver.

IBM DB2 Interview Questions
Question 6. Why We Create The Physical File Member?

Answer :

A member is like an Individual document.It is possible to Have 32767 such participants inside the same PF.Each member delivered to the file will exactly get the identical document format( fields,sorts and KWDS) at the document.This facility is furnished to satisfy the requirement whilst 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 preserve as a single item.Each member is diagnosed through specific name inside record. 

Examples : A School has attendance register in step with magnificence. Each Class has four sections and in all10 classes. Instead of Creating and keeping 40 documents and scaterred in a library, it is easy to create a PF and upload forty participants in a single object.

Secondly All Physical files created want not necessarily have members. Some files are created to keep field definitons only and are called discipline refrence files. They want no longer have individuals.

Question 7. Is Constant Can Be Define As A Key Field?

Answer :

Firstly a Constant cannot be a part of a File area listing.
There is not any which means in having a Constant within the Key discipline.
IBM DB2 Tutorial Data Warehousing Interview Questions
Question 8. Is It Possible To Create A Logical File Whose Physical File Is Not In Same Library?

Answer :

Yes, Just placed the person library in that you want to create on pinnacle and followed by using different library wherein bodily report is located. Supplied the first library need to no longer have physical file. Then attempt to create the logical.

Question nine. How To Add A Field To A Pf And Compile It Without Loss Of Data?

Answer :

First Add the fields something you need then use CHGPF command

Physical record . . . . . . . . . > MyPf 
Library . . . . . . . . . . . MyLib 
System . . . . . . . . . . . . . *LCL 
Source report . . . . . . . . . . MYSourceFile 
Library . . . . . . . . . . . MyLib 
Update the Physical file.No need to bring together again.

COBOL Interview Questions
Question 10. How To Find The List Of Source Physical Files In A Library? Is There Any Way To Get A List?

Answer :

WRKOBJPDM LIB(KCS) OBJ(*ALL) OBJTYPE(*FILE) OBJATR('PF-SRC')

Data Warehousing Tutorial
Question eleven. 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?

Answer :

Ans1:Reading member 5 of myfilepf

CRTLF FILE(KCS/MYFILELF) SRCFILE(KCS/KC1) DTAMBRS ((KCS/MYFILEPF (MBR5)))

Or

ADDLFM FILE(KCS/MYFILELF) MBR(MYFILEBR) DTAMBRS ((KCS/MYFILEPF (MBR5)))

Ans2:For accounting cause every month information may be saved as 12 one of a kind contributors So that we can without difficulty access one month statistics or one year together. Easy to keep 12 participants in one PF record as opposed to 12 PF Files.

DB2 Using SQL Interview Questions
Question 12. How To Read A Pf In Reverse(from Last Rec To First) Using Cl?

Answer :

In this example empfile for studying in reverse  order is used.

Pgm 
dclf report(empfile) 
ovrdbf report(empfile) share(*sure) 
opnqryf file((empfile)) keyfld((empno *descend)) 
readf: rcvf rcdfmt(mpfilr) 
monmsg msgid(cpf0864) exec(goto cmdlbl(stop)) 
goto readf 
quit:
endpgm

IBM - RPG Interview Questions
Question 13. How To Retrieve A Physical File After Deleting That? What Is Keyword Used For That?

Answer :

In the DD declaration's DISP parameter write DISP=KEEP.And to get right of entry to the report with disposition KEEP we want to deliver the volume srail number as vol=ser=xxxx.

COBOL Tutorial
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?

Answer :

Access Path Maint parameter use *IMMED.  Access course is updated on every occasion a report is modified, added, or deleted from a member.

Question 15. I Have Physical File With 100 Records,there Is No Any Duplicate Records In This Pf.Primarily based On This Pf One Logical File I Have Used.However This Lf Is Viewing Only eighty Records Only Of That Pf?What Is The Reason For This?

Answer :

If there may be any selection criteria in LF then it is able to be showing as a result. If there may be no "Select" or "Omit" it should show one hundred records. Have a take a look at LF once again.

SQL Interview Questions
Question 16. How To Know The Particular Record In Pf With Out Reading?

Answer :

you will come to know whether the record is found. It's all.But no longer what(price) is in the record.

DB2 Using SQL Tutorial
Question 17. How To Know Logical File Belongs To Which Physical File Without Source?

Answer :

if you do a DSPDBR on a logical document it wont display you the call of the bodily report that it's far based totally on. Rather you need to use DSPFD at the logical file. DSPDBR on a bodily report will display the names of all the LF documents based on that PF.

AS400 Interview Questions
Question 18. What Is Open Data Path? And What Is The Diff B/w Access Path And Open Data Path?

Answer :

An get entry to course describes the order wherein the rows are retrieved from a database document. If the rows in the record are accessed in a bodily sequence, this is referred to as an arrival collection get right of entry to route. If the rows want to be processed in an ordered manner, then a keyed get right of entry to course is needed to kind the facts in the unique order. With DB2 for iSeries, keyed access paths are furnished to DB2 through creating a keyed logical report, keyed physical document, or SQL index. 

An get admission to course and an open records path are used collectively to procedure the rows in a database report. The open statistics course (ODP) is the course thru which all input and output operations are achieved on a database document. The ODP is used to attach the inquiring for program with the information inside the record. As records is retrieved from or inserted into the report, the ODP will use an access course to navigate to a row inside inside the record. If the rows need to be processed in a taken care of owner, then a person will want to supply a keyed get right of entry to direction with the aid of growing a keyed bodily file, keyed logical record or SQL index. 

An ODP is created and used every time that a document is opened or whilst an SQL declaration is executed. There are methods to have an ODP shared or reused in preference to growing the ODP whenever.

IBM DB2 Interview Questions
Question 19. How To Update Physical File Using Logical File With Example?

Answer :

Declare the logical document in update mode inside the RPG application.

Chain at the document had to be up to date and afer changing the field value use UPDATE opcode with the record format call of the LF.The file receives up to date

Question 20. How To Update Physical Files Using Normal Logical File?

Answer :

To Update physical report in RPG use opcode UPDATE. 

Example:

FLF1 IF E k DISK
key1 Setll LF1
READ LF1
UPDATE LF1
Note: Logical report must be simeple logical document. We can not replace physical record with assist of Join logical document.

DB2 SQL Programming Interview Questions
Question 21. One Physical File Can Have How Many Max Of Logical Files? What Is The Primary File?

Answer :

one bodily report will have multiple logical files.
Priamary file is used in rpg application cycle to mechanically examine statistics in a cycle.
Question 22. What Is The Interactive Job? What Is The Batch Job? How To Change The Batch Job To Interactive Job?

Answer :

When you signal-on an AS/four hundred device, you are interacting with interactive jobs(e.G.QINTER). The System-jobs which are presubmitted are referred to as batch jobs(e.G.QBATCH, QSPL, QCMN and many others.,)

If u want to recognize whether a process is in Interactive or Batch, u can use RTVJOBA command with attribute JOB-TYPE on that activity.

If it has a value '1' = Interative; 'zero' = Batch.

You could change a Batch-task to Interactive-task so long as it's far in JOBQ(with the aid of changing the surroundings on CHGJOB(decide-2) command to QINTER or QPGMR); as soon as it is lively we can't change the sort.

Question 23. What Is The Purpose Of The Chain And Setll And Setgt?

Answer :

CHAIN is used for random retrieval from a File. In other words, some thing cost utilized by programmer in Factor 1/Key against CHAIN opcode could be used as search/locate standards in database record. NO VALUE RETRIEVED IN NO CRITERIA MATCH. It may be nicely apprehend, in case of the usage of composite keys.

But in case of SETLL and SETGT, software will go back some cost, if any cost present inside the database/bodily document.

CHAIN = Sets pointer on actual cost
SETLL = Sets pointer on Lower Limit of the value
SETGT = Sets pointer on Greater Limit of the cost
==========================================================

It is usually recommended, use CHAIN simplest, if document exist in database file, in place of SETLL and SETGT, which can be used otherwise.

Mainframe DB2 Interview Questions
Question 24. A Pf Containing a hundred Records... My Query Is How To Display From eleventh Record In The Pf?

Answer :

We can positioned to nth report in document in CL with the assist of OVRDBF command.

Synatax:

OVRDBF FILE(report-name) POSITION(*RRN eleven)

This will positioned record on 11th document so RCVF command will read eleventh document in record.
If you want to examine with key conditioned then we will specify *KEY,*KEYA,KEYAE and so forth to placed with key specified in command.
Data Warehousing Interview Questions
Question 25. I Had Created One Physical File Tell Me Command To Enter Data In To?

Answer :

By the usage of the cmd UPDDTA Pfname use can enter the information into the bodily record. Note: dn't assemble the pf after getting into the statistics into the pf.

Question 26. Can We Concatenate Fields In Physical File? If Yes How Can We Do?

Answer :

No, we can't concat fields in Physical File. However, in  logical record, we can concat 2 or extra fields together into 1 discipline. Layout is.. 

Rpgle Interview Questions




CFG