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
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 |
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 |
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 |
wat is curser?? and its types???
How do I read records from Subfile? what is the purpose of READC explain with example?
how to run only 10 modules of existing N modules in service program in RPGILE ?
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.
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?
what is plat file?
WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?
can i use UPDDTA command in rpg program in which contains a file
explain sflclr, sflend, sfldlt, and sflcsrrrn?
Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?
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
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?