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!

Interview question

Status
Not open for further replies.

kaysweet

Programmer
Apr 24, 2005
5
US
I was asked this question. Can someone help please?
A PF contains field1(char 8). It contains a date field in mmddyyyy format. what will you do to get this correctly sorted by year using a LF? - is there a way?

what is the command in CL that displays the total number of records of a PF?

how do you debug a program that is running in batch?

Does someone have any interview sample questions? Please help.

Thank you.

 
You mean you don't have any idea what this simple questions are all about? Have you ever heard of AS400 before? I don't want to be rude but it seems you have no idea what you are going into.
 
Thanks a lot! I feel really really stupid now. been programming for years but never had to do this. nway, thanks for your reply.
 
Well year sequencing, has always been fun. I believe there are some better ways to do this in RPGIV. If you want a LF to be sequenced coming into a program, look at the keywords in the DDS definitions. I think that may help you. Different systems (ERPs), do it different ways. For example, JD Edwards World, converts all the dates to Julian dates, and number fields, that way dattes can be sorted, and chosen easier.
 
kaysweet,

Some more answers,
what is the command in CL that displays the total number of records of a PF?
DSPFD (Display file desc.)
In a CL program you can use...
RTVMBRD FILE(MYLIB/AA) NBRCURRCD(&TOTALRECS)

how do you debug a program that is running in batch?
This requires the appropriate authority...
STRDBG (as normal)... then use STRSRVJOB. The job must be active (or on hold) for you to service it. A simple method is to use a CL program with a DLYJOB command before calling the program you wish to debug.

A note, if the program is an OPM program you can use..
STRISDB PGM(MYLIB/MYPGM) INVPGM(*NO) SRVJOB(*SELECT)
It will allow you to select the job to service when you start the debug session.

I hope this helps...


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top