MainFrame Interview Questions
Questions Answers Views Company eMail

How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

1 4044

How do you proceed in case your active AS400 session has got disconnected suddenly, how can you get back to your session ? Is it possible??

1 3202

What is a record lock error?

Wipro,

1248

In case if I want to know whether a record exists in a file, which one do you prefer CHAIN or a SETLL and why ?

1 3043

any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

IBM,

1210

How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1295

I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.

1 2975

What is SQL Code -904 and -903 in DB2 And how to handle it?

IBM,

1 6001

Why we should use cursor ?

3 2937

I know my query will return more than one row but I don't want cursor what should I do?

1 2547

How can you get the number of rows impacted by the last executed query?

1 1984

While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?

JPMorgan Chase,

1798

How to fetch the uncommited data from table ?

JPMorgan Chase,

1 2725

Difference between Find and Read operation in ADABAS file.

Cognizant,

1 4207

I am having n number of records in a table which consists of emp-name is one of the field among them. Now i want to change the first letter of every name with capital.

Cap Gemini,

1 1724


Un-Answered Questions { MainFrame }

I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1912


What is dpf in db2?

650


Does jcl support automatic restart?

733


I have created a command that display Source file and library. Now i want that when i enter library name and press f4 on Source file, pgm should display all the PF- SRC's in that Library. For F4 option i have used Choice program but since only limited paramters are passed in Choice pgm i am not able to paas library name and further can't call a pgm that will display list of Source files. Below is the Code snippet for CMD type object :- CMD PROMPT('Source Scan for HUB Standard') PARM KWD(SOURCE) TYPE(*CHAR) LEN(1) RSTD(*YES) + VALUES(N A) MIN(1) + CHOICE('N,A') PARM KWD(SRCFILE) TYPE(FILE) RSTD(*NO) + PROMPT('SOURCE FILE') FILE: QUAL TYPE(*NAME) LEN(10) RSTD(*NO) EXPR (*YES) + CHOICE(*PGM) + CHOICEPGM (XXXXXLIB/YYYPGM) QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) + SPCVAL((*LIBL)) EXPR(*YES) PROMPT ('Library') Below is the Choice pgm:- PGM PARM(&PARM1 &PARM2) DCL VAR(&PARM1) TYPE(*CHAR) LEN (21) DCL VAR(&PARM2) TYPE(*CHAR) LEN (2000) IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + 21 1) = 'P')) THEN (DO) /* (%SST(&PARM1 21 1) = 'C' *OR %SST (&PARM1 + */ CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') ENDDO IF COND(%SST(&PARM1 1 10) = 'CHOICE ' *AND + %SST(&PARM1 11 10) = 'SRCFILE ' *AND + %SST(&PARM1 21 1) = 'P') THEN (DO) CHGVAR VAR(&PARM2) VALUE('Name, F4 for List') CALL PGM(GTSQL) PARM ('XXXXLIB') return ENDDO Thanks in Advance for looking into.

3025


Is it possible using max on a char column?

591






what is SOC4 error?

722


State the difference between jes2 and jes3?

543


What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

632


Explain in detail about buffer manager and its functionalities?

549


What is runstats and reorg in db2?

775


Differentiate between control interval (ci) and control area (ca)?

518


Discuss about db2 bind?

656


how to handle -911 (deadlock) error in a db2 program so that the program will never abend?

564


What is schema in db2?

566


How do you pull up a query which was previously saved in qmf?

657