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

I have a file .In that file i have 3 fields. Those fields are eno, ename, esal.Keyfield is eno. In that file i have data like this for eno 1,2,3,4,5. Now i need to display 2nd record. That means i need to set the pointer on 2nd record... Then, write the complete rpg program using setll.

1 Answers  


how do you use commitment control in rpg?

0 Answers   IBM,


When will DUMP & DEBUG be ignored?

3 Answers   IBM,


Errors in Sql query will be in which state?

1 Answers  


WHAT IS MEANT BY SIGNATURE VAILOTION ERROR

1 Answers   IBM,






How to print output from openquery in as400 ?

1 Answers   Four soft,


What will be the value of STRING after line 0106 is executed in the code below? 0101 E* Fromfiletofile..tabnameprnentlenpdatabnamlenpda 0102 E ARR 8 1 0103 ISTRING DS 0104 I 1 8 ARR 0105 C MOVE *BLANK STRING 0106 C MOVEA'ABC' ARR A) 'AAAAAAAA' B) 'BBBBBBBB' C) 'CCCCCCCC' D) 'ABC ' E) ' ABC'

2 Answers  


what is an online rpg?

0 Answers   IBM,


What are the types of identifiers?

0 Answers  


can I touch the array during treatments?

0 Answers   IBM,


Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

2 Answers   iGate,


ESCAPE message sent by child program can be handled by parent program using which keyword?

2 Answers  


Categories