View previous topic :: View next topic
|
Author |
Message |
naveensri2005 Currently Banned New User
Joined: 22 Mar 2005 Posts: 51 Location: chennai
|
|
|
|
hi
In cics is it possible for rewrite a records in to a esds-files? if possible how it is? is it possible to read a record by using set and generic option. how it is.
naveen |
|
Back to top |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
naveensri2005,
Rewrite:
- Read the record with Update option
- Make updates
- Rewrite it to the file
Code: |
EXEC CICS READ
DATASET (DSNAME)
INTO (WS-VAR)
RIDFLD (KEY-FLD)
LENGTH (LENGTH-FLD)
UPDATE
RBA
END-EXEC |
Once the Read is successful, Update the required fields and rewrite the record as below
Code: |
EXEC CICS REWRITE
DATASET (DSNAME)
FROM (WS-VAR)
LENGTH (LENGTH-FLD)
RBA
END-EXEC |
Read with SET:
Code: |
EXEC CICS READ
DATASET (DSNAME)
SET (ADDRESS OF WS-VAR)
RIDFLD (KEY-FLD)
LENGTH (LENGTH-FLD)
RBA
END-EXEC |
Read with GENERIC:
Code: |
EXEC CICS READ
DATASET (DSNAME)
INTO (WS-VAR)
RIDFLD (KEY-FLD)
LENGTH (LENGTH-FLD)
GENERIC
KEYLENGTH (KEY-LENGTH-FLD)
RBA
END-EXEC |
Hope this helps
Regards
Mayuresh |
|
Back to top |
|
|
naveensri2005 Currently Banned New User
Joined: 22 Mar 2005 Posts: 51 Location: chennai
|
|
|
|
hi
thanks for answer |
|
Back to top |
|
|
David P
Active User
Joined: 11 Apr 2005 Posts: 106 Location: Cincinnati Ohio
|
|
|
|
Hi Mayuresh,
I believe the rewrite in ESDS is valid only if the lenght of the record which is to be rewritten is same as the previous record.
Correct me if I am wrong.
regards,
David. |
|
Back to top |
|
|
rachel
New User
Joined: 09 Mar 2005 Posts: 13
|
|
|
|
Hi,
Is there a Key Field for esds file ?
|
|
Back to top |
|
|
rachel
New User
Joined: 09 Mar 2005 Posts: 13
|
|
|
|
Hi,
Sorry for the misguidance, you can actually replace the field name in RIDFLD with RBA address in case of ESDS.
|
|
Back to top |
|
|
harish_mf
New User
Joined: 31 Jul 2005 Posts: 18 Location: bangalore
|
|
|
|
rewriting the esds in cics, if u known the RBA value it can be but of same length record. |
|
Back to top |
|
|
|