*MAP,*DROP,*NOCHK
2 posters
Page 1 of 1
*MAP,*DROP,*NOCHK
Can anyone briefly Explain About the full functioning of *map,*drop,*no check with examples...Which case we have to use *Map,which case we hv to use *Drop and accordingly *NoCheck.
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
*map, *drop, *nochk
*MAP is used in the case where you can add a field to your PF without data loss. (Using CPYF command)
*DROP is used in the case where you can remove a field from PF without data loss.(Using CPYF command)
*NOCHK is used in the case where you have to change the name of the particular field in your PF without data loss. (Using CPYF command)
Regards,
Janani .R.S.
*DROP is used in the case where you can remove a field from PF without data loss.(Using CPYF command)
*NOCHK is used in the case where you have to change the name of the particular field in your PF without data loss. (Using CPYF command)
Regards,
Janani .R.S.
Janani Ravikumar- Posts : 7
Join date : 2010-07-19
Re: *MAP,*DROP,*NOCHK
Thanks janani...
Detailed Explaination with examples
I have PF -Empmst with 2 fields with 100 records...
Now u want to add another one field to ur PF...
If u add the field,u have to compile and ur records will get deleted...
In this scenario we use *MAP...
If there is a increase in ur buffer size...
EMPMST
*************
R EMPREC
A EMPCDE 5S 0
A EMPNAM 25A
K EMPCDE
*************
RUNQRY *N EMPMST
EMPCDE EMPNAM
100 ANAND
101 BALA
.
.
.
.
199 SOUNDHAR
*****************
Now we want to add EMPDEP to EMPMST
CPYF FROMFILE(EMPMST) TOFILE(CPYEMPMST) CREATE(*YES)
Now CPYEMPMST will contain 100 records...
Now add a field EMPDEP in EMPMST
*******************
EMPMST
R EMPREC
A EMPCDE 5S 0
A EMPNAM 25A
A EMPDEP 2A
K EMPCDE
*******************
Compile EMPMST
RUNQRY *N EMPMST and check
EMPCDE EMPNAM EMPDEP
100 ANAND
101 BALA
.
.
.
.
199 SOUNDHAR
**************************
Now,
CPYF FROMFILE(CPYEMPMST) TOFILE(EMPMST) CREATE(*YES) REPLACE(*REPLACE) FMTOPT(*MAP)
UPDDTA EMPMST
EMPCDE 100
EMPNAM ANAND
EMPDEP __
EMPCDE 100
EMPNAM ANAND
EMPDEP IT
Like this update empdep for all employee details....
RUNQRY *N EMPMST
EMPCDE EMPNAM EMPDEP
100 ANAND IT
101 BALA EC
.
.
.
199 SOUNDHAR IT
....
....
....
*drop
To remove or delete a field from ur PF,we use *DROP...
If there is a decrease in ur buffer size...
Use above steps itself for *drop also...
*NOCHK
When we need a changes without affecting the buffer ie no increase or decrease in buffer size,we go for *NOCHK
For ex,changes in recfmt name,field name etc....
Detailed Explaination with examples
I have PF -Empmst with 2 fields with 100 records...
Now u want to add another one field to ur PF...
If u add the field,u have to compile and ur records will get deleted...
In this scenario we use *MAP...
If there is a increase in ur buffer size...
EMPMST
*************
R EMPREC
A EMPCDE 5S 0
A EMPNAM 25A
K EMPCDE
*************
RUNQRY *N EMPMST
EMPCDE EMPNAM
100 ANAND
101 BALA
.
.
.
.
199 SOUNDHAR
*****************
Now we want to add EMPDEP to EMPMST
CPYF FROMFILE(EMPMST) TOFILE(CPYEMPMST) CREATE(*YES)
Now CPYEMPMST will contain 100 records...
Now add a field EMPDEP in EMPMST
*******************
EMPMST
R EMPREC
A EMPCDE 5S 0
A EMPNAM 25A
A EMPDEP 2A
K EMPCDE
*******************
Compile EMPMST
RUNQRY *N EMPMST and check
EMPCDE EMPNAM EMPDEP
100 ANAND
101 BALA
.
.
.
.
199 SOUNDHAR
**************************
Now,
CPYF FROMFILE(CPYEMPMST) TOFILE(EMPMST) CREATE(*YES) REPLACE(*REPLACE) FMTOPT(*MAP)
UPDDTA EMPMST
EMPCDE 100
EMPNAM ANAND
EMPDEP __
EMPCDE 100
EMPNAM ANAND
EMPDEP IT
Like this update empdep for all employee details....
RUNQRY *N EMPMST
EMPCDE EMPNAM EMPDEP
100 ANAND IT
101 BALA EC
.
.
.
199 SOUNDHAR IT
....
....
....
*drop
To remove or delete a field from ur PF,we use *DROP...
If there is a decrease in ur buffer size...
Use above steps itself for *drop also...
*NOCHK
When we need a changes without affecting the buffer ie no increase or decrease in buffer size,we go for *NOCHK
For ex,changes in recfmt name,field name etc....
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|