Hi friends,
Can you give the solution for the below mention simple
code.and explain.what is output
D CHR1 S 4A INZ('PEN')
D CHR2 S 10A INZ('MYGET')
D CHR3 S 8A INZ('GOOD')
D CHR4 S 22A INZ
C MOVEL CHR1 CHR4
C MOVE CHR2 CHR4
C EVAL CHR4=CHR3
C MOVE CHR1 CHR4
Answers were Sorted based on User's Feedback
C MOVEL CHR1 CHR4
CHR4='PEN '
C MOVE CHR2 CHR4
CHR4='PEN MYGET '
C EVAL CHR4=CHR3
CHR4='GOOD '
C MOVE CHR1 CHR4
CHR4='GOOD PEN '
Is This Answer Correct ? | 13 Yes | 0 No |
PGM: *************** Beginning of data ***********************
DCHR1 S 4A INZ('PEN')
DCHR2 S 10A INZ('MYGET')
DCHR3 S 8A INZ('GOOD')
DCHR4 S 22A
C MOVEL CHR1 CHR4
C MOVEL CHR2 CHR4
C EVAL CHR4=CHR3
C MOVE CHR1 CHR4
C CHR1 DSPLY
C CHR2 DSPLY
C CHR3 DSPLY
C CHR4 DSPLY
C SETON
****************** End of data **************************
O/P:
DSPLY PEN
DSPLY MYGET
DSPLY GOOD
DSPLY GOOD PEN
Is This Answer Correct ? | 2 Yes | 0 No |
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
what will happen two jobs have same name are submitted
How can we make use of SETLL operation in CL?
In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening
what is decimal data error? when it will come and how to achieve(rectify) this error please give me solution as well as code
IN RLU what are the record level keyword is used?
Suppose we have 10 records with same name and we are reading using READE,after 4 record i have to use CHAIN what is the output
If record-format name in an externally-described file has already been defined as a file-name.how to solve this?
RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.
A rpg or clp command to find if the file field is defined as a character or numeric field.
The RP program is displaying records 11 times .But there are 10 records in a pf.(ie last record is displayed twice).How to display records only 10 times?
Can anybody tell me, does CL/400 handle LEVEL check while running the CL program....? plz share your experience...