Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Can any body give the code for this quesition?
Using the following details write C-Spec code to set Name
to"AMMU LABS SYSTEM"

D NAME1 S 10 INZ('AMMU')
D NAME2 S 10 INZ('LABS')
D NAME3 S 10 INZ('SYSTEM')
D NAME S 20

Answers were Sorted based on User's Feedback



Can any body give the code for this quesition? Using the following details write C-Spec code to set..

Answer / vijay

Minor change in above answer, you have to put %trim.



C EVAL NAME = %trim(NAME1) + ' ' + %trim(NAME2)
+ ' ' + %trim(NAME3)

Is This Answer Correct ?    10 Yes 0 No

Can any body give the code for this quesition? Using the following details write C-Spec code to set..

Answer / sudhir

Vijay is correct.... That field lenghts declared for
variables are not exact as of the initial value assigned.
Hence extra spaces will be added. If the variables are
declared of size exactly as the value, then Syam's code can
be used.

Is This Answer Correct ?    2 Yes 0 No

Can any body give the code for this quesition? Using the following details write C-Spec code to set..

Answer / shriram

syam vijay is right..

Is This Answer Correct ?    0 Yes 0 No

Can any body give the code for this quesition? Using the following details write C-Spec code to set..

Answer / syam

C EVAL NAME = NAME1 + ' ' + NAME2 +
' ' + NAME3

Is This Answer Correct ?    2 Yes 3 No

Can any body give the code for this quesition? Using the following details write C-Spec code to set..

Answer / syam

Hi Vijay.....no need of %trim, no leading or trailing
blanks in name1 or name2 or name3.

%trim is required if ' AMMU' or 'LABS '

Is This Answer Correct ?    0 Yes 5 No

Post New Answer



More RPG400 Interview Questions

when will come session device error?

4 Answers   TCS,


What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?

0 Answers   Wipro,


can i use unique key in LF

3 Answers   TCS,


What is the difference between inner join @ outer join

4 Answers  


How can we know running job is batch or interactive?

0 Answers  






What would be the result on writing a data record to a PF file using the "WRITE" opcode after the SETON *ON *INLR statment?

10 Answers  


Write a program to display prime numbers between 1 to 100 using RPGLE.

1 Answers  


WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?

1 Answers  


difference between CHAIN and READE?

8 Answers   HCL,


steps for debugging two rpg programs????

4 Answers  


How to index LF by relative record no (RRN)

1 Answers  


in which journalling which attributes are necessary??/

1 Answers   CTS,






Categories