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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 2 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm


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