Command to search a record
3 posters
Page 1 of 1
Command to search a record
Is there any CL command to search a record like CHAIN opcode in RPG?
Regards,
Vanitha.
Regards,
Vanitha.
Vanithadevi- Posts : 14
Join date : 2009-07-29
Age : 39
Location : Chennai
Re: Command to search a record
If i want to search a particular record through Cl is not possible.There is No such command(like CHAIN opcode in RPG) available in CL
amarasuresh- Posts : 13
Join date : 2010-06-18
Re: Command to search a record
WE CAN DO IT USING OVRDBF COMMAND POSITION PARAMETER
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Command to search a record
through OVRDBF(over ride DB) command we can do these things
1.override (replace) the file named in the program
2.override certain parameters of a file that are used by the program
3.override the file named in the program and override certain parameters of the file being processed.
But we can't search particular record in the DB like Chain .
1.override (replace) the file named in the program
2.override certain parameters of a file that are used by the program
3.override the file named in the program and override certain parameters of the file being processed.
But we can't search particular record in the DB like Chain .
amarasuresh- Posts : 13
Join date : 2010-06-18
Re: Command to search a record
No suresh...
U just try with OVRDBF-POSITION PARAMETER
It will work...
Starting position in file:
Retrieve order . . . . . . . . _______ *NONE, *START, *END, *RRN, *KEY, *KEYA, *KEYB, *KEYAE, *KEYBE
*RRN-rcd nbr *KEY-nbr key flds ________ Number
*KEY-rec format having key . . ________ Name
*KEY-key value . . . . . . . . ________
U just try with OVRDBF-POSITION PARAMETER
It will work...
Starting position in file:
Retrieve order . . . . . . . . _______ *NONE, *START, *END, *RRN, *KEY, *KEYA, *KEYB, *KEYAE, *KEYBE
*RRN-rcd nbr *KEY-nbr key flds ________ Number
*KEY-rec format having key . . ________ Name
*KEY-key value . . . . . . . . ________
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Re: Command to search a record
Hi suresh,
Try this CL program it will work...
**********************************************
PGM
DCLF FILE(PMS90/EMPMST)
OVRDBF FILE(EMPMST) POSITION(*KEY 1 EMPREC '00101')
RCVF
MONMSG MSGID(CPF0864)
SNDUSRMSG MSG(&EMPNAM)
DLTOVR FILE(EMPMST)
ENDPGM
**********************************************
Explaination in OVRDBF:
Retrieve order:
*START-Starting positioning of the file(BOF)
*END-End of file(eof)
*RRN-Nth record in the file
*KEY-it reads the key value which u specified in the key value(key equal)
*KEYA-it reads the key after which u specified in the key value(key after)
*KEYAE-it reads the key after equal which u specified in the key value(key after equal)
*KEYB-it reads the key before which u specified in the key value(key before)
*KEYBE-it reads the key before equal which u specified in the key value(key before equal)
*NONE-No positioning
***************************************************************
OVRDBF FILE(EMPMST) POSITION(*KEY 1 EMPREC '00101')
I am using *key to fetch record 101,it should be within quotes as '00101'...
***************************************************************
Try this CL program it will work...
**********************************************
PGM
DCLF FILE(PMS90/EMPMST)
OVRDBF FILE(EMPMST) POSITION(*KEY 1 EMPREC '00101')
RCVF
MONMSG MSGID(CPF0864)
SNDUSRMSG MSG(&EMPNAM)
DLTOVR FILE(EMPMST)
ENDPGM
**********************************************
Explaination in OVRDBF:
Retrieve order:
*START-Starting positioning of the file(BOF)
*END-End of file(eof)
*RRN-Nth record in the file
*KEY-it reads the key value which u specified in the key value(key equal)
*KEYA-it reads the key after which u specified in the key value(key after)
*KEYAE-it reads the key after equal which u specified in the key value(key after equal)
*KEYB-it reads the key before which u specified in the key value(key before)
*KEYBE-it reads the key before equal which u specified in the key value(key before equal)
*NONE-No positioning
***************************************************************
OVRDBF FILE(EMPMST) POSITION(*KEY 1 EMPREC '00101')
I am using *key to fetch record 101,it should be within quotes as '00101'...
***************************************************************
soundhar- Posts : 67
Join date : 2010-07-14
Location : Vridhachalam/chennai
Similar topics
» run a cl in rpg
» Record Positioning
» REposition the record
» CL Question
» How to get the record based on key
» Record Positioning
» REposition the record
» CL Question
» How to get the record based on key
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|