in a cl pgm
records are copied to a file in qtemp
a pgm is called to delete records from the file in qtemp
no of records in file in library qtemp is checked wat shud
be the count of records let say it was 10 initially
endpgm

Answers were Sorted based on User's Feedback



in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file i..

Answer / raghav

In following scenario the Record count will be 10.

CL program:

PGM

CPYF FROMFILE(LIB1/PF1) TOFILE(QTEMP/PF1) MBROPT(*ADD) CRTFILE(*YES)

SBMJOB CMD(CALL PGM(PGM1)) JOB(PGM1)

ENDPGM

In this scenario when a job is submitted in the batch, the system has its own QTEMP library and hence RPG program PGM1 will not find file PF1 in Qtemp.  

Is This Answer Correct ?    1 Yes 1 No

in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file i..

Answer / aa

Considering that all the records in the file in library QTEMP were deleted, the record count at the end would be zero.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

0 Answers  


1.String operatio such as moving the characters to the variables? 2.what are the building functions for check file longs? 3.which of the following methods will make externally describe file fields available to a program? A: A/copy statement that specifies the library file and member of the field reference file source code B: A data structure definition specification that names the file on the EXTNAME keyword C: A data structure definition specification that names the file on the IMPORT keyword? D: A Definition specification for each desired field with the REFFLD keyword

1 Answers   CSC, CTS,


Can we found a record existance in a file w/o reading the file?

6 Answers   Traitsys Technologies,


suppose if we want to update the data in cl what we will do?

9 Answers  


Need a sql query: retrive all duplicate records in table

3 Answers  






To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...

5 Answers  


Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?

6 Answers  


1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?

12 Answers   IBM, Opus,


1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.

4 Answers   HCL,


How to set on/off a group of indicators in a single statement?

3 Answers  


are there any useful c runtime apis that I can call from rpg iv?

0 Answers   IBM,


can any body correct the following code? Following a procedure which returns the maximum of two numbers.Correct the following code. P GETMAX B D GETMAX PI D NUM1 35 0 D NUM2 45 0 C IF NUM1 > NUM2 C RETURN NUM1 C ELSE C RETURN NUM2 C ENDIF P GETMAX E

1 Answers  


Categories