How to declare the dynamic(run time) array in rpgle?
can you please give example

Answers were Sorted based on User's Feedback



How to declare the dynamic(run time) array in rpgle? can you please give example..

Answer / royal

Dmonth S 5s 0 DIM(5)
DI S 2p 0 inz(1)
c dow i <= 10
c* eval month(i) = i
c month(i) dsply
c eval i = i + 1
c enddo
/FREE
*INLR = *ON ;
/END-FREE


this answer is not correct please give me correct code

Is This Answer Correct ?    3 Yes 2 No

How to declare the dynamic(run time) array in rpgle? can you please give example..

Answer / karthik

Dary1 s dim(5)
Dn s 2p 0 inz(1)
c dow(n<=10)
c ary1(n) dsply
c eval n=n+1
c enddo
c seton lr

Is This Answer Correct ?    3 Yes 5 No

Post New Answer

More RPG400 Interview Questions

RPG/400 faqs?

1 Answers   HSBC,


Hi friends, Can you give the solution for the below mention simple code.and explain.what is output D CHR1 S 4A INZ('PEN') D CHR2 S 10A INZ('MYGET') D CHR3 S 8A INZ('GOOD') D CHR4 S 22A INZ C MOVEL CHR1 CHR4 C MOVE CHR2 CHR4 C EVAL CHR4=CHR3 C MOVE CHR1 CHR4

4 Answers  


1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please tell me in real senario? 1.TESTN, 2.EVAL 3.EVALR, TIME, 4.MONITOR 5. ENDMON 6.ON-ERROR 7.COMMIT ROLLBACK?

1 Answers   CSC,


Are all these RPG/400 Interviewed Questions being asked recently? are current?

1 Answers  


wat is curser?? and its types???

4 Answers   HSBC,


HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE

1 Answers   IBM,


suppose one file is used by 100 user and file is locked by 100 user, what are the impact analysis?

1 Answers  


why subproc not run in dftactgrp?????/plz explain

2 Answers   CSC,


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

0 Answers   IBM,


How do I link an existing logical file to it's Physical File without recompiling?

2 Answers  


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

3 Answers   Wipro,


Please help me, I have created window subfile,I have created Footer with same lengh and postion of window SFL. When I call the pgm, first is shows only Footer and then it shows subfile records.This time Footer is not showsing ..plz hel me how can i do it...? Sameple DDS and RPG: A R WIN1 SFL A*%%TS SD 20090130 165346 MUNSHIJ REL-V4R2M0 5769- PW1 A FLD001 1Y 0B 4 3EDTCDE (Z) A ATFILE R O 4 7REFFLD (QWHFDBAS/ATFILE LIB/LIBF- A ILE) A R WINCTL SFLCTL (WIN1) A*%%TS SD 20090202 123459 MUNSHIJ REL-V4R2M0 5769- PW1 A ALTNAME ('y') A SFLSIZ (0004) A SFLPAG (0004) A WINDOW (FOOTER) A ROLLUP (27) A ROLLDOWN (28) A CF12 (12 'Cancel') A 50 SFLDSP A N51 SFLDSPCTL A 51 SFLCLR A 1 2'Select Option,Press enter' A 2 3'1= Select' A R FOOTER A* A WINDOW(8 31 9 43) A 8 4'F12 = Cancel' A R DUMMY ASSUME A 24 10' ' in RPG: Dow *IN12 = *Off Write Footer Fxfmt WInCTL

2 Answers  


Categories