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 |
i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.
1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?
in rpg could u please tell me errors types and meanings like 3030 that ....
check existence of one record without using chain or read?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
how can I tell when to replace the array?
can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?
what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.
What is I90(Insure 90)?
Difference between RESET and CLEAR
How can read PF in reverse order (end to start) in CL pgm..
how can an indexed file be used as arrival sequence in RPG?