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

Is it possible to call a subfile using CL. IF yes.. kindly help me out with explanation...?

3 Answers  


1.How to load Records of a Physical file(PF) in the reverse order, in CL program?

2 Answers   Cap Gemini,


How Chain operation copies the record's data to the input buffer for the program?

0 Answers   IBM,


how to run only 10 modules of existing N modules in service program in RPGILE ?

3 Answers   Wipro,


what is plat file?

6 Answers   Indian Infotech,






What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?

3 Answers   HSBC, 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  


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

1 Answers  


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

0 Answers  


i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.

3 Answers   HSBC,


what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.

2 Answers  


In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening

2 Answers  


Categories