Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using EZtrieve to fetch a record in a KSDS VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
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    Post subject: Using EZtrieve to fetch a record in a KSDS VSAM file
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    Post subject: Reply to: Using EZtrieve to fetch a record in a KSDS VSAM fi
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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 5 Wed Jul 26, 2017 7:35 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us