Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

wat is curser?? and its types???

4 Answers   HSBC,


How do I read records from Subfile? what is the purpose of READC explain with example?

4 Answers   IBM,


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

3 Answers   Wipro,


I have some doubts on subfile----------- -----I wrote a prog on subfile to display the records. Every thing is clear but i defined a field called "opt" as input field in subfile record format from that input field i wish to enter into new screen called "EDIT" which i created it as a separate RCD in display file. i gave opt as 2 for edit just like in WRKMBRPDM screen please telll me the code and how can i code for it in RPG.

3 Answers  


When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?

5 Answers   Mphasis,


what is plat file?

6 Answers   Indian Infotech,


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

1 Answers  


can i use UPDDTA command in rpg program in which contains a file

1 Answers   TCS,


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?

2 Answers   HSBC,


There is a excel sheet having details of Old account number and new account number. I need to update these details in my AS400 files. i.e. all the records having old account number should be replaced with new account number. There can be 100 or 200 or 300 PFs...no fix files known. how can we do this?Solution should be performance oriented

3 Answers   Cap Gemini, IBM,


WHERE DO WE USE COMIT KEYWORD IN AN RPG PROGRAM? YOU MADE SOME CHANGES TO DATABASE BUT YOU DON'T WANT TO SAVE THOSE CHANGES NOW? HOW DO YOU HANDLE THIS ONE?

2 Answers  


Categories