Question

RPG programming and AS/400

Asked by: jjjjjjj

Big points for this, so ya gotta do some thinking!!

I want 30 questions that would most likely come up in an interview that programmers and managers ask potential new RPG programming employees.  Here are the guidelines:

10 questions that are basic, designed to see if the candidate has a basic understanding of the AS/400 and RPG and CL, and how to navigate through concepts such as wrkmbrpdm.

10 questions that are intermediate, ie..programming style, possible solutions to programming problems, uses of the language, best practices, interfacing with CL programs and CL calls.

10 questions that are advanced.  These questions should determine that the candidate has a firm grasp on programming, advanced problem solving, creative ideas for difficult problems. The purpose of these is to see the candidate sweat a little and also to see if the candidate can be resourceful and give the correct response.

All questions should come with correct, proven answers and or explanations.  Narratives are welcome.

Maximum points on this is really 500!!!!!  But because I hope that more than one expert will participate, I set the points to 250, should I need to honor the work of 2 experts.  If two experts comment and both comments are worthy of reward, I will issue 250 to each.  If only one comments and the work is worthy, I will award 500 points.

Good luck,

jjjjjjj

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2002-12-05 at 10:38:51ID20416653
Tags

rpg

,

interview

,

questions

Topic

Programming for iSeries / AS400

Participating Experts
2
Points
400
Comments
8

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Need to write code in CL/RPG for downloading AS/40…
    Hi, I am prashant here. I have one new requriment. I need to download the AS/400 spool file into Excel. But I can not use any tools even if it is free. I need to use either CL or RPG language. So is it possible to down load the spool file in to excel with the use of CL/RPG ?...
  2. Search on AS/400
    Hi, I need to check the code of a program on AS/400. I know the name of the program. I don't know in what library to look. Is there a way to search for a program on AS/400 by name? Thanks

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mmcmillenPosted on 2002-12-09 at 16:13:18ID: 7557123

I have always found asking questions about specific navigation through applications as unfair and deceiving.  Just because a user doesn't know a command and all its parameters by memory does not mean they don't know how to use it and don't have the skills. For example, I have been on the S/36 and As400 for 14 years and I have never typed in wrkmbrpdm.  I just typed it in to see what it was.  I recognized the screen and also that I get there from the strpdm menu.  10 different people will have 10 different ways to get to the same place.  

If these interviews are going to be actual tests I would set up something on the system for them to work with. You could print out a program that does a few things, some obvious , some not so obvious and have them flow chart it or tell you what the result would be from given sets of input.  

Design a program on the AS400 that has some bugs in it. First, have some that keep it from compiling.  Then after they correct that, have some logic errors.  

Test them on subfiles.  Test  them on database theory.  Ask them about when to use goto's(NEVER!). That type of thing.  

Give them an abstract situation.  Ask them to give you a solution.  

Don't expect them to know every opcode syntax verbatim. Don't expect them to know what position field 2 is in an rpgIV program.  There are people that know that stuff and make good coders, but in my experience they can't think out of the box.  

 

by: jjjjjjjPosted on 2002-12-10 at 07:40:36ID: 7560181

Thanks for the comments.  My desire is to still have the 30 questions, although your comments are valid.

One note on the GOTO: yes I agree that in theory the goto should never be used; in practice however a little goes a long way.

For example, Let's say that you are validating screen fields for errors.  There are 6 fields each of which could be in error.  In the error validation subroutine, an error is encountered in the first field so the message is retrieved, etc...  The 6th field is in error as well. Same logic applies.  With the PC and RI attributes on each field with different indicators, when the program returns control to the screen both fields are RI, but the PC is on field 6.  The message indicates that field 6 is in error, so the user corrects it, and presses enter, which returns another error, with the correct message now on field 1.

My preference in a situation such as this is to use the GOTO and tag features offered in RPG because once an error is encountered, why bother checking all of the other fields? While the processing time may not be that much, it is non value added.  Additionally, once the error is encountered, it is dealt with and the screen now has control so the user can correct.  

If you can come up with 30 good questions, I will review and comment, and you could possibly wind up with 500 points.  As a reminder, the question states that ya gotta think about this one.  Your comments are good, but with no questions, I have to let this one remain open.  I do want to know your opinion on the scenario I played above concerning screen field validation.  With 14 years as a programmer, you definitely have the goods, and I am confident you could go into the wayback machine and get some questions from prior interviews you have been through.

jjjjjjj

 

by: mmcmillenPosted on 2002-12-10 at 08:13:53ID: 7560359

I'll work on some questions.  As far as the example for the screen errors what I do instead of using goto's is this.

create a variable , character, one position. Lets call it "Valid".   I set up a subroutine to check for all errors for the screen.  

scr1val     begsr

valid       eq       'Y'

check for validity on field 1.

if there is an error set valid = 'N' and set any indicators needed.

before checking validity on next field,  check for valid = 'Y'.


 

by: P_S_PricePosted on 2002-12-17 at 01:37:15ID: 7594076

Tests like this for new employees are a never ending Trial.

One of the  best tests I have experienced is an example small program that has deliberate errors in it (Syntax), (Logic), (Advanced Techniques).

This really sorts out the men from the Boys.

 

by: jjjjjjjPosted on 2003-01-02 at 09:30:19ID: 7656673

Because I have not received the 30 questions, I will be removing the question on 1/7/03.  This should give all of you ample time to provide the requested answer/comment.

Regards,

jjjjjjj

 

by: mmcmillenPosted on 2003-01-02 at 09:46:06ID: 7656779

Ok.   Been a little busy lately
I'll get on it

 

by: mmcmillenPosted on 2003-01-06 at 13:18:59ID: 7678515

I came up with 23 questions.  The probelm solving questions are tough to come up with.   You could take some existing code and ask them to read it and predict the outcome.  Throw some bad code in there and see if they pick up on it.  One thing I did to an interviewee once was during the interview I had a phone call about a problem.  I asked them what they thought might be wrong.








10 basic questions.



1. What is the library list ?            I set of system and user libraries that contain files and programs for the users to access.

2.  What are the two parts of the library list and what do they signify ?    User and system . The user section contains user libraries and the system section contains system libraries.

3.  Does library list order matter ?  If so, why ?  Yes.  because the programs look to the top of the library list looking for files or programs and work their way down the list.

4.  What commands are used to display or edit the library list ?  dsplible,  addlible , edtlibl.

5.  Where is the users initial library list defined ?   job description

6.  What is Qtemp ?    A temporary library assigned to the user at signon.

7.  A user runs a program that populates a file named test in library qtemp with data.   If the user then submits a job that runs a report from that file what will happen ?  

     The prgram will not be able to find the file because the file is not in the qtemp library of the submitted job.

8.  What is an input primary file ?   This file is used in RPG programs and if the programming cycle is used, will process all records in the file.

9.   What is LR ?    Last record indicator.

10.   Can you process files within an RPG program without defining them ?  Yes, if you use embedded sql and the rpg program type is sqlrpgle.




10 intermmediate questions

1.  what is a level check error and what is the remedy ?    A level check is caused by a program trying to access a file that has been changed in DDS since the program was last compiled.  You must recompile all programs that use this file .

2.  when using  SELECT/ENDSL in a program what step can be taken to ensure most efficient operation?   The WHEN statements should be listed in order of likelihood of occurance. The most likely should be first and so on. This will keep the program from having to do more comparisons than needed.

3.  Can you call a program from a CL that is in a library that is not in the users library list ?.   Yes you can.  You can hardcode the library in the cl or addlible libraryname and rmvlible libraryname in the cl.  

4.  Can you display screens from a CL?  Yes, using dclf .  

5.  After a chain command what two things should you program for ?  1.   What to do if no records are found.  2. What to do when a record is found.

6.  You have some order entry/Receiving programs that all do some of the same inventory relief functions.  What is the best way to do these functions and why ?
     You should have a standalone program that recieves/returns data .  This way the code to do the function  isn't   in all the programs using it,but in one spot. Also, if the functions need modified there is only one program to change, not many.

7.   What do you have to define in an rpg program to pass parameters ?    plist, parms.

8.  What do you have to define in a CL to pass programs ?    PGM PARM(&PARM1,&PARM2)    dcl &PARM  

9.  You have an rpg program that uses a file named  ORDCUR (Orders for Current Month) as input. This program generates a report showing order information.  
     You want to be able to generate the same report using a different file for input. This file is called ORDYTD (Orders Entered Year To Date).  How could you avoid having to create seperate programs to generate the report for the two files ?     In the CL you could test for what the user wants  current or ytd.  If the choice is current, call the program as normal. If the choice is ytd prior to the call add the line  OVRDBF     FILE(ORDCUR) TOFILE(ORDYTD) . This will override the ORDCUR file in the rpg program to ORDYTD.

10.  How many subfile records can be defined?   9999

 

11.  What method(s) can be used to get data to a PC file ?   FTP,  Client Access File Transfer

12.  Describe the steps taken to most efficiently and effectively  write an application(s) from start to finish.    
      a.  get the requirements for the application.  make sure they are well defined and thorough.
      b.  analyze the requirements, and plan out what programs/files/screens  need created or modified, and their purpose etc
      c.  write the programs
      d.   test thoroughly
      e.   have the users test
      f.   document  
     
13.  Name some benefits of rpgiv over rpgiii.    eval statements,  better date functions,  extended factor two

 

by: jjjjjjjPosted on 2003-01-08 at 15:13:08ID: 7689964

23 questions X 16.7 points per (500/30) = 400

Thanks for the help.
jjjjjjj

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...