IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Using EZtrieve to fetch a record in a KSDS VSAM file


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thilakvs
Warnings : 1

New User


Joined: 07 Aug 2007
Posts: 27
Location: chennai

PostPosted: Wed Aug 29, 2007 11:39 am
Reply with quote

Using EZtrieve to fetch a record in a KSDS VSAM file...how can we do this..?
Back to top
View user's profile Send private message
rsm143

New User


Joined: 29 May 2007
Posts: 4
Location: india

PostPosted: Wed Aug 29, 2007 5:36 pm
Reply with quote

hit the vsam file with there key
then move required varibales in ur ws section .........

this is a small example ... in this program a filed is updating
which is key of vsam table
**************************************************

//S010EZT EXEC PGM=EZTPA00,COND=(0,NE,STEP001)
//SYSPRINT DD SYSOUT=*
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,(10,10),RLSE)
//SYSOUT DD SYSOUT=*
//PFTABLE DD DSN=MPMT.PROD.PFTABLE,DISP=SHR
//SYSIN DD *
FILE TABLE VS UPDATE
XXX-REC 1 200 A
XXXT-KEY 1 20 A
XXXT-ENTITY 1 3 A
XXXT-TBL-IND 4 9 A
XXXT-TBL-VALUE 13 8 A
XXXT-SHORT-DESC 21 10 A
XXXT-LONG-DESC 31 30 A

WS-XXX-REC W 200 A
WS-XXXT-TBL-VALUE WS-XXX-REC +12 8 A
WS-XXXT-SHORT-DESC WS-XXX-REC +20 10 A
WS-XXXT-LONG-DESC WS-XXX-REC +30 30 A

JOB INPUT NULL

XXXT-ENTITY = '1 '
XXXT-TBL-IND = 'TRAN_TYPE'
XXXT-TBL-VALUE = '454 '
READ PFTABLE KEY XXXT-KEY STATUS
IF FILE-STATUS(PFTABLE) EQ 0
DISPLAY 'READ SUCCESSFULL'
WS-XXX-REC = XXX-REC
WRITE PFTABLE DELETE STATUS
IF FILE-STATUS(PFTABLE) EQ 0
DISPLAY 'DELETE SUCCESSFULL'
END-IF
WS-XXXT-TBL-VALUE = '458 '
XXX-REC = WS-XXX-REC
WRITE PFTABLE ADD STATUS
WS-XXXT-TBL-VALUE = '454 '
XXX-REC = WS-XXX-REC
WRITE PFTABLE ADD STATUS
END-IF

IF FILE-STATUS(PFTABLE) EQ 00
DISPLAY 'UPDATE SUCCESSFULL'
ELSE
DISPLAY 'ERROR IN WRITING VSAM'
DISPLAY 'VSAM STATUS' FILE-STATUS(PFTABLE)
END-IF
STOP
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top