Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Typical RPG Interview questions? 1

Status
Not open for further replies.

PeteAmsterdam

Programmer
Jun 3, 2005
76
US
Please help have an interview tom. haven't had time to study.
 
PeteAmsterdam,

Any question that you cannot honestly anwser off the top of your head, just say so. Then follow up with, "But I know of several places to find the anwser." One of them, of course, is right here!

HTH,
MdnghtPgmr
 
Can you please be specific. There are many RPG versions since it was first introduced. Do you want questions about RPG (first version), RPG FREE or RPG IV? I can give you some qustions from the first to the latest version however, if you have no idea about RPG itself then I can assure you that your interview will be a big failure.
 
jmanj, thank you for making a very good point. I was so rushed today at work. I am working in Operations, but in the past I was more into Programming. I was told that the shop is largely an RPG/400 shop not much ILE. That is both good and bad I guess. It could be a great place to apply new techniques.
Thanks,
Pete
 
So you wanted to go into AS400 environment and you wanted to be a programmer as such. You have not told this forum about your background so much so that we really cannot help much.

For one thing AS400 programming involves understanding a lot about different programming tools such as RPG and CL. You also need to know a working knowledge about it's file organizations. There are a lot of training materials available from IBM or if your company has one then use it.

I myself have been trained in all programming languages with IBM because I was with them for several years. I was so lucky not to pay a single cent learning about the computer world.

AS400 is a proprietary product and if you wanted to work with the environment, you really need a serious training about the different toolset.
 
It was wierd. We had a 20 minute talk. The agent said then there would be the Technical, but there was no technical. The fellow said, think it over, get in touch w/ agent, etc...
I think it is bad, but the agent said the guy does this sometimes and he will have the tech by phone.
In terms of my background, I have been an RPG 4 Programmer then I moved more into Project Management, but 3 years ago crashed into the worst job market since the Depression. So after one year of sitting at home, trying to latch onto Crystal Reports developer and so on, I took an Operator's spot a year ago, hoping to get a higher level position should I get an interview. The Operator's position alows some time to work on learning/brushing up. But it is hard sometimes as the boredom level is very high.

Needless to say, mentally this is very tough, to be at 50% of your last salary, to be moving/connecting PC's and printers, Dumb terminals, creating user profiles, doing WRKACTJOB alot.

Getting back to the thread question, I have worked on subfiles, for prep for the technical. I need the DDS Display words as well. The thing is that they are not that much an ILE shop. WHich is good for me, bec. I have minimal proficiency hands on ILE. I understand the concepts well but have not programmed much. I intend to do more ILE, but I tend to study for the upcoming Interview, so lately this had been Websphere, PKMS, VB/Excel.

Anyone who can please post technical questions for RPG 400 please do so. You never know if one fact can tip the scale in my favor.
TIA,
Pete
 
From what I have read, it seems the easiest method is where the sflpag is say 15 and SFLSIZ is 80. Yet most of the time I have seen SFLPAG 15 SFLSIZ 16. This means u have to use the ROLLUP keyword.
I was wondering w/ todays improved speeds does it matter which subfile method you choose.
Also was wondering how Webface takes a subfile and uses it.
 
I have no idea what a technical test would entail these days.
Last one I had was 2-3 years ago. He asked about Data Stuctures a bit, using Excpt. That's about all I remember.

I need a old list like that very urgently. In this thread it was mentioned that someone has such a list, well now is the time to post it.
 
PeteAmsterdam,

I'm not sure what you mean by "a old list". I can point you to the manuals. The site below has all the manuals. This would include the DDS display file keywords, the complete collection of the CL manuals, the RPG manuals (in several flavors [versions]) and API manuals.


As far as interview questions, that one is damn near impossible. Every shop is different. For example, where I am at now we do not use WebSphere or WSDc. We still use SDA, SDA and RLU. There are multiple reasons for this that I won’t go into right now. Right now I’m in finance. The place I came from was insurance and there are completely different priorities here then there were there. My point being that no two places are looking for the same skill sets. Hell, we have some programmers who are still using the cycle and writing the equivalent of RPG II code! Our employer either doesn’t care or doesn’t know, as long as the job gets done. And that might be the main thing! Show that you can get job done. They (employers) really don’t care HOW you do it, just that you CAN do it. But I ramble…

MdnghtPgmr
PeteAmsterdam,
 
Thanks MP, still there should be some questions out there. Like the standard ones, what is the difference bet. DOW and DOU, what is USROPN, *PSSR.
The subfiles I have reviewed pretty good. I need some more review for the DSPLY files. some things are the same in all shops, tho your point is a good one.
 
OK guys, the technical is on for next week. Please help, please post your typical RPG 400 questions you get, w/ some ILE RPG as well.
Thanks,
Pete
 
PeteAmsterdam,

Thanks! That was fun. Got seven out of seven!

MdnghtPgmr
 
Here are some questions, if anyone knows answers to all or some, please post.

1. How do u know a record exists without doing read and chain?
2. What will be ur approach in going either for OPNQRYF or Logical files. Which one to go for?
3. How do u manage that the records doesn’t get locked by a CHAIN or READ operation?(This he asked indirectly by taking a subfile selection screen and another update screen)
4. How do u call procedures in ILE?
5. What is the syntax of passing parameters to a procedure by value?
6. Have u used binder language like coding export to procedures ?
7. How do u code file field renames in ILE RPG?
8. In ProgramB there is a submitjob ,which is a call to program C .There is also a CALL to program D from B. How would u check the program C has been executed in D?


9. How do you find whether a record is locked or not.
Difference between RPG/400 and RPG4
10. Is there any thing advantage for date variables in RPG4?

11. How do you find whether a job is a batch job or interactive?

12.What you have to do in the display file when you are using message subfile

13· How to set on/off a group of indicators in a single statement.
14. How can you determine the number of characters in a variable?
15. Let's consider a variable X of length 20. Move value 'ABC' to it.
How to determine how many characters does X have?
16. Suppose you have 3 members in a database file.

17. How to read records from all the members
without using CL (OVRDBF) ie it should be handled exclusively in an RPG program?
18. How do you do indexing in a physical file?
19. PF contains 50 fiedls how can u update only 2 fields?

20. Can indexed file be accessed in arrival sequence in RPG 21. when will DUMP & DEBUG be ignored
22. what is the necc. command needed before OPNQRYF & why
23 can u copy the records created by the OPNQRYF to other files & how
25. diff, ways to pass data between pgms. which is the efficient way
35. What are the necessary keywords required to code a message subfile?
36. What is the purpose of FRCDTA keyword?
37. What is the purpose of PUTOVR keyword?
45. What is Group job?
51. How do you detect unused spool storage?
52. What are the functions of remote job entry?
53. What is journalling and commitment control?
54. What is the purpose of Panel Groups?
55. How can a screen field that has changed since the last output
operation be detected?
56. What would be the effect on the field where reverse image,
underline, and high intensity?
57. Can more than one subfile record be displayed on one line?


Ref file and usage
Activation group and commitment control
SQLRPG compilation
FTP - Default user password
 
Pete,

Good grief! ;-)

I have cut and pasted your questions into a MS Word document and I will work on it as time permits.

I must say that I don't think I've ever been asked more than four or five of these types of questions in any one interview.

It may be some time before I post back, I will get done what I can...

MdnghtPgmr
 
This is all I had time for today. Gotta go. Let me know how I did!


1. How do u know a record exists without doing read and chain?

SETLL and %FOUND

2. What will be ur approach in going either for OPNQRYF or Logical files. Which one to go for?

Depends. How many logicals are already over the file? How often with the job be run? Is this a one time or permanent job. And many others. It depends on your system and your rules.

3. How do u manage that the records doesn’t get locked by a CHAIN or READ operation?(This he asked indirectly by taking a subfile selection screen and another update screen)

Depends. You can define the F spec for input only. You can code the CHAIN or READ with the (N) extender. I didn’t understand your part in the ().

4. How do u call procedures in ILE?

CallP or simply reference the procedure name. So you could do some like:
DayOfWeek = GetWeekDay( *DATE );
Or
If GetWeekDay(*DATE) = 2;

5. What is the syntax of passing parameters to a procedure by value?

The syntax of the actual call or the prototype syntax? Or did you mean neither one?

6. Have u used binder language like coding export to procedures ?

Yes, see below:

STRPGMEXP PGMLVL( *CURRENT )

EXPORT SYMBOL( 'MSGBOX' )
EXPORT SYMBOL( 'ACTMETHOD' )

ENDPGMEXP

STRPGMEXP PGMLVL( *PRV )

EXPORT SYMBOL( 'MSGBOX' )

ENDPGMEXP

7. How do u code file field renames in ILE RPG?

Depends. You can use the I spec (old way). You can use the PREFIX keyword on the F spec.

8. In ProgramB there is a submitjob ,which is a call to program C.There is also a CALL to program D from B. How would u check the program C has been executed in D?

Depends. You could set up a data area or a data queue. You could pass messages. Just a couple of ways.

9. How do you find whether a record is locked or not.

Depends. In older RPG the *PSSR was used. In a newer program I would use a MONITOR block.

Difference between RPG/400 and RPG4

Is this a question or related to previous question?

10. Is there any thing advantage for date variables in RPG4?

Yes. There are all sorts of new BIFs that work with the date, time and timestamp type fields.

11. How do you find whether a job is a batch job or interactive?

RTVJOBA TYPE 0=Batch, 1=Interactive

12. What you have to do in the display file when you are using message subfile

Define the subfile and subfile control records? Not sure what you’re looking for here.

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

Trick question, right? In the past this little trick was done with a MOVEA ‘00000’ *IN30. This is considered bad programming practice today.

14. How can you determine the number of characters in a variable?

%CHECKR(‘ ‘ : variable)

15. Let's consider a variable X of length 20. Move value 'ABC' to it. How to determine how many characters does X have?

With both 14 and 15 I can’t tell if you are looking for the length of the DATA in the variable or the length of the variable itself.
%CHECKR = Length of data &LEN = Length of variable

16. Suppose you have 3 members in a database file.
17. How to read records from all the members without using CL (OVRDBF) ie it should be handled exclusively in an RPG program?

As far as I know, can’t be done. Unless of course you call a CLP from the RPG, but as far as this question goes, wouldn’t that be cheating? ;-)

18. How do you do indexing in a physical file?

I don’t understand the question. Do you mean adding key fields? Do you mean creating logicals?

19. PF contains 50 fiedls how can u update only 2 fields?

Depends [tried of “hearing” that yet? :) ] The old way would be to code the fields on O specs then do an EXCEPT. The new way is UPDATE RecordName %FIELDS( Field1 : Field2 )

20. Can indexed file be accessed in arrival sequence in RPG

By indexed I assume you mean a logical file? Sure, just don’t specify the K on the F spec.

21. when will DUMP & DEBUG be ignored

DEBUG(*NO)

22. what is the necc. command needed before OPNQRYF & why

OVRDBF SHARE(*YES) Because the OPNQRYF and the program to process the file must share an access path.

23. can u copy the records created by the OPNQRYF to other files & how

Sure. CPYFRMQRYF

24. diff, ways to pass data between pgms. which is the efficient way

Just three are 1) pass parms, 2) *LDA, 3). DATAARA. Most efficient? PARMs

35.What are the necessary keywords required to code a message subfile?




36. What is the purpose of FRCDTA keyword?
37. What is the purpose of PUTOVR keyword?
45. What is Group job?
51. How do you detect unused spool storage?
52. What are the functions of remote job entry?
53. What is journalling and commitment control?
54. What is the purpose of Panel Groups?
55. How can a screen field that has changed since the last output
operation be detected?
56. What would be the effect on the field where reverse image,
underline, and high intensity?
57. Can more than one subfile record be displayed on one line?

 
God bless you Midnight programmer, I wish you all success and happiness.

You Are Lovable Just the Way You Are

If you ever feel that somebody is attacking that, be willing to stand up and fight for your life for that. Don't ever let anybody tell you that you are bad.

As a human being, how can you be bad? You are beautiful and you are lovable. Never let anybody take that away from you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top