AS400 Iseries Questionnaire

  • View
    321

  • Download
    12

Embed Size (px)

Text of AS400 Iseries Questionnaire

-----Original Message----From: Rajagopal CV [mailto:rajagopal.cv@tatainfotech.com] Sent: Thursday, July 17, 2003 8:23 AM To: Gautam Bhandari; sumit.set@rebusis.com; prakashk@ggn.hcltech.com Subject: Re: Hi gautam, You are quite near the answer in all the cases. I have been working on this yesterday. Please find below my findings. 1. An existing Phy file's DDS has been changed What all steps do u take to create the new *FILE object. For this we have to do all the steps in a CL. No RPG pgm allowed. >First As you said redirect the output of DSPDBR into a file. >RCVF on that file and get the attached logical . (I got stuck here . I was not sure how to retrieve a DB file using RCVF Statement) >Before compiling the new DDS , delete the logicals. > Do CPYF and take backup. > Compile the new DDS. > Copy back the backed up file with *MAP,*DROP option > Recompile the logicals. You will get the SDource member and library from DSPDBR output. 3. Can a call a compiled module of an RPGLE pgm which has only a main procedure ? Yes u can call a compiled *MODULE object using CALLB. But the *MODULE object will have only HFDCO specs . No subprocedures with P . I am just trying to code a program . i.e do CRTPGM (Mod 1, mod2, mod3, Mod4) Mod 1 is your entry module. From Mod 1 you can do CALLB to MOD2, mod3, mod4 etc . I din know this 4. What is signature violation while running ILE programs. whats steps will u take to over come this. This happens in 2 cases 1. Your service program has changed, you have updated the service program using UPDSRVPGM , But you have not updated the program using UPDPGM 2. Your pgm is latest but you have forgotten to do a UPDSRVPGM He said we can find out a Signature attached to a service program using DSP Program refernce . I did not understand . My fundas in ILE is so so ....

6. What is to use of MONMSG. Is EXEC param mandatory ..If EXEC is not added what will happen to the program flow

From where do I get the list of message id's corresponding to each Command (Apart from manuals) The list of escape message is also available on the help of each command. Take F1 on a particular command . Just after the description of the command they have also given all escape messages attached to a command.

7. Does CHAIN statement lock the record beiing chained Is there a way I can lock a record using chain Statement. It seems along with CHAIN ststement we can specify H,N etc to lock your record exclusively ..Need to probe on that . I am yet to try this 8. A pgm has primary File defined in it. The Pri file has no recods. Will the program end normally or abnormally ? Yes it ends normally 9. What is overflow indicator ? Where do I defined it .Do we SETON or SETOF an overflow indicator what happens if I SETON the overflow indicator in the first statement of my program. Please send the pgm codes you have written with overflow indicators

----- Original Message ----From: Gautam Bhandari To: Rajagopal CV ; sumit.set@rebusis.com ; prakashk@ggn.hcltech.com Sent: Tuesday, July 15, 2003 7:13 PM Subject: RE:

HEY GUYS I HAVE TRIED TO ANSWER AS FAR AS I KNOW OR THINK I KNOW PLEASE CORRECT ME WHERE IM WRONG......

1)what did u do ...cpyf to some xyz file which u created within cpyf ....then crtpf (changed dds) and then copy data back from xyz to compiled file..........for dspdbr u took output in outfile and then read that file thru rpg to know name of dependents.......how did u do it this is interesting

3) i guess no but not really sure

4) i think it has some thing to do with identifiers(format or record level) created at compile time ...so whenever u recompile new identifiers are created so all programs using this object ....u may have to recompile to overcome this voilations

6) in library qsys there are message files QXXXMSG WHERE XXX IS FOR MESSAGES U WANT ESCAPE MESSAGES CPFSERIES RESIDE IN QCPFMSG FILE IN QSYS AND SO ON ....IF U HAVE as-400 ACCESS THEN JUST DO WRKMSGF QSYS/*ALL AND ULL FIND ALL THESE MESSAGE FILES.........

MONMSG I GUESS TRAPS THIS MESSAGE IDS AND USED TO MONITOR THESE MESSAGES SUCH AS ESCAPE...SO MONMSG MSGID(CPF000) MONITORS ALL CPF MESSAGES.

7) i think chain locks record .......u can chain with no lock by specifying chain(n).....and other one is CHAIN(E) what it does i don know....

8)should end normally.

9) overflow indicator at f specs with printer file......this is set on by itself when page length specified while compiling printer file ( take 14 and f10 on printer file being compiled ull see) is reached and on it being on you have the logic for skip page (write header again).....have written a couple of programs if u need i can send it to u

10) at openqryf u have to specify a parm open which can be *inp; *out;*upd;*all............. yes u can override a specific member also..... u can update records if u give lock state of record format as *shrupd but if u give *Shrunp u cannot

12) CMPPFM OR OPTION 54 ON WRKMBRPDM SCREEN

13) MULTI DIM ARRAY (THOUGH NOT VERY SURE THIS I TOO HAVE NEEDED IN FEW PROGRAMS BUT HAVE ALWAYS USED A WORKAROUND)

D D

XYZ XY1

DS 1 8 DIM(2)

14) single page subfiles are used instead of load all when the output may have huge number of records and you are not aware of its number ...what happens is load all will fst get alll the records and then display them which may take a lot of time and resource s if o/p is gigantic where as in single page you get the num of records specified in sflpag and display them then go back get other set and display them.......u have to handle page up and page down thru pollup and rolldown indicators which are set on and off in rpg....mind u roll up is page down

15) u have something as a fix numeric as a parm for create pgm which does something for this purpose -----Original Message----From: Rajagopal CV [mailto:rajagopal.cv@tatainfotech.com] Sent: Tuesday, July 15, 2003 5:26 AM To: Undisclosed-Recipient:@nepzmail.in.tatainfotech.com; Subject: Fw: Dear friends,

Jus wanted to share the type of questions asked during technical rounds of as400 skills

1. An existing Phy file's DDS has been changed What all steps do u take to create the new *FILE object.

Write all the steps in a CL program to create the new object of Physical file including back-up, creating new logicals etc etc. Even DSPDBRhas to be within the CL program..

I had to really sweat OUT writing the CL pgm

2. Is PGM and ENDPGM mandatory in CL Pgm.

When is it mandatory ?

Not mandatory. But used if we have to pass a parameter to the CL program

3. Can a call a compiled module of an RPGLE pgm which has only a main procedure ?

4. What is signature violation while running ILE programs. whats steps will u take to over come this.

5. How do I debug a batch program ? Using STRSRVJOB How do I debug a batch program wriiten in RPG/400. i.e we have to run STRDBG on an RPG/400 program. How,

6. What is to use of MONMSG. Is EXEC param mandatory ..If EXEC is not added what will happen to the program flow From where do I get the list of message id's corresponding to each Command (Apart from manuals)

7. Does CHAIN statement lock the record beiing chained Is there a way I can lock a record using chain Statement.

It seems along with CHAIN ststement we can specify H,N etc to lock your record exclusively ..Need to probe on that .

8. A pgm has primary File defined in it. The Pri file has no recods. Will the program end normally or abnormally ?

9. What is overflow indicator ? Where do I defined it .Do we SETON or SETOF an overflow indicator what happens if I SETON the overflow indicator in the first statement of my program.

10. What is OPNQRYF. Do we need to OVRDBF the file before OPNQRYF. If yes then why ? Can I update the File's records which is opened using OPNQRYF statement?

There were questions on Multimember physical file. Can I override to a member of a Phy file. During OVRDBF what is *SHDUPD param do.

11.What is a join file . How do I create a join file. What is the necessary condition to create a join file.

12. Which command do I use to compare the sources of two Programs ?

13. Differences between Arrays ..What is an Array File ? How can I have multi-dimensional arrays in RPG.

14.Basic concepts of Subfile ..Keywords etc. ...Esp on SFLNXTCHG ..where is it defined and how READC is used etc etc ......Why should we go for Single page ..How do I view the 15th page if I am viewing the 25th page ..How is Page up,Page down handled in Single page subfiles

15. What is decimal data error... can I make a program ignore decimal data error.

It seems while CRTPGM we can mention it to *Ignore decimal-data errors.

That's all I can remember now

-----Original Message----From: Rajagopal CV [mailto:rajagopal.cv@tatainfotech.com] Sent: Tuesday, July 15, 2003 3:56 PM To: Undisclosed-Recipient:@nepzmail.in.tatainfotech.com; Subject: Fw: Dear friends, Jus wanted to share the type of questions asked during technical rounds of as400 skills 1. An existing Phy file's DDS has been changed What all steps do u take to create the new *FILE object. Write all the steps in a CL program to create the new object of Physical file including back-up, creating new logicals etc etc. Even DSPDBRhas to be within the CL program.. I had to really sweat OUT writing the CL pgm 2. Is PGM and ENDPGM mandatory in CL Pgm. When is it mandatory ? Not mandatory. But used if we have to pass a parameter to the CL program 3. Can a call a compiled module of an RPGLE pgm which has only a main procedure ? 4. What is signature violation while running ILE programs. whats steps will u take to over come this. 5. How do I debug a batch program ? Using STRSRVJOB How do I debug a batch program wriiten in RPG