MainFrame Interview Questions
Questions Answers Views Company eMail

How to fetch the last row from the table in SQL (db2)?

1008

Write a program to display prime numbers between 1 to 100 using RPGLE.

1 4366

if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

834

How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY

838

have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file

895

How to read records in reverse order in flat file?

1 1506

what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include temporary file used for sorting in assign statement?

1 1483

what is the difference between perform varying and perform

1 1500

difference between internal sort and external sort

1 1571

i want to store 20 digits . how will u do it in cobol ?

835

01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250

1 1536

WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

825

WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99 VALUE 123.45. PROCEDURE DIVISION. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. compiler : IGYGR1080-S A "VALUE" clause literal was not compatible with the data category o subject data item. The "VALUE" clause was discarded. WORKING-STORAGE SECTION. 77 W-A PIC 9(3)V99 VALUE 23.75. 77 W-B PIC ZZ9V99. PROCEDURE DIVISION. MOVE 123.45 TO W-B. MOVE W-A TO W-B. DISPLAY W-B. STOP RUN. 2375

1005

what if any ,is the syntax error in the following piece of code 01 B PIC A(7) 02 C PIC 9(4) ........ IF(B NUMERIC) ADD 10 TO C a.the condition in the if statement is wrong b.noting is wrong c.because C is initialised.ADD 10 TO C is wrong d.both B and C shoud have same size.

1 1908

01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable

1 1392


Un-Answered Questions { MainFrame }

List the different jcl statements that are not permitted in the procedures?

616


Explain the purpose of the file status clause in the select statement?

501


Hi, While I am trying to produce a html report from SAS interactive screen, I am always getting an error. I have attached the result of interactive execution with this. Please help me on this. NOTE: All profile changes will be lost at the end of the session. 1 *libname ia 'U19K.CAPS.SAS'; 2 3 /*Data declaration*/ 4 data work.staff; 5 infile 'U19K.CAPS.SAS (RAWDATA1)'; 6 input LastName $ 1-10 FirstName $ 11- 20 7 JobTitle $ 21-23 Salary 24- 28 8 BirthDat $ 29-37 Gender $ 38 9 run; 10 11 /*Basic "format" statement*/ 12 /*assign range of values to a variable and use it*/ 13 /*'$' should be used for a alphanumeric manipulation*/ NOTE: The infile 'U19K.CAPS.SAS(RAWDATA1)' is: Dsname=U19K.CAPS.SAS (RAWDATA1), Unit=3390,Volume=XTD007,Disp=SHR,Blksize=6160, Lrecl=80,Recfm=FB NOTE: 20 records were read from the infile 'U19K.CAPS.SAS (RAWDATA1)'. NOTE: The data set WORK.STAFF has 20 observations and 7 variables. NOTE: The DATA statement used 0.01 CPU seconds and 7537K. NOTE: The address space has used a maximum of 3676K below the line and 15196K above the line. 14 proc format; 15 value Salrange low- 10000='Below' 16 10001- 20000='Medium' 17 20001- High='Above'; NOTE: Format SALRANGE has been output. 18 value $Gender F='Female' 19 M='Male'; NOTE: Format Ă…GENDER has been output. 20 run; NOTE: The PROCEDURE FORMAT used 0.00 CPU seconds and 7523K. NOTE: The address space has used a maximum of 3676K below the line and 15196K above the line. 21 22 /*ODS-Output delivery system to create html file*/ 23 ods listing close; 24 ods html file='C:\Documents and Settings\u19k\Desktop\html1.html'; NOTE: Writing HTML Body file: C:\Documents and Settings\u19k\Desktop\html1.html ERROR: Invalid file, C:\DOCUMENTS AND SETTINGS\U19K\DESKTOP\HTML1.HTML. WARNING: No body file. HTML output will not be created. 25 26 /*Basic "label" statement*/ 27 proc print data=work.staff split=''; 28 label LastName='Last Name' 29 FirstName='First Name' 30 JobTitle='Job Title' 31 Salary='Annual Salary'; 32 format Salary Salrange. Gender $Gender.; 33 var LastName FirstName JobTitle Salary Gender; 34 title 'Employee database'; 35 run; WARNING: No output destinations active. NOTE: The PROCEDURE PRINT used 0.00 CPU seconds and 10275K. NOTE: The address space has used a maximum of 3676K below the line and 15196K above the line. 36 37 /*ODS-html closing*/ 38 ods html close; 39 ods listing;

2355


have you already used rexx - even for limited purposes? Do you need to maintain a high level of productivity during your transition to unix?

546


what is the sequence when using cursor?

578






how to get the cursor position?

682


write a jcl to execute a job by 7:00 am on jan 20,1986?

666


how do you use commitment control in rpg?

711


Explain how to update data area in cobol 400 program?

553


How does cobol compile db2 program?

588


What is schema in db2?

558


Explain how can a jobs execution priority be modified?

715


What are the jcl procedures?

620


Difference between cobol and cobol-ii?

677


what will happen when you try to open an empty vsam file in a cobol program for input?

604