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
 

 

Random or a sequential read of a VSAM file can we do

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
vijaycics

New User


Joined: 01 Jul 2005
Posts: 1

PostPosted: Fri Jul 01, 2005 9:37 am    Post subject: Random or a sequential read of a VSAM file can we do
Reply with quote

Hi People,

I have a question from my end. When we do a random or a sequential read of a VSAM file can we do like this.

Let me say file that i want to read are 'ABCD' and 'EFGH'.

IF condition one applies then I read 'ABCD' by moving the key to the key field of the file 'ABCD' else i read 'EFGH. So my code will be

Move key to gen-KEY
IF condition 1
Move 'ABCD' to ws-file-name
Else
Move 'EFGH' to ws-file-name
END-IF

EXEC CICS READ
DATASET(ws-file-name)
INTO (file-REC)
RIDFLD(gen-key)
LENGTH(WS-length)
RESP(WS-RESPONSE)
END-EXEC

Will this work?
Back to top
View user's profile Send private message

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sun Jul 03, 2005 2:57 am    Post subject:
Reply with quote

ws-file-name Must not be a variable. You must use a literal in DATASET / FILE field.
Back to top
View user's profile Send private message
sivamf

New User


Joined: 28 May 2005
Posts: 6

PostPosted: Mon Aug 01, 2005 1:23 am    Post subject:
Reply with quote

You have to Code two read comands with dataset names hardcoded

if true

read dataset"abcd"

else

read dataset "efgh"

end-if.
(put it in right syntax)
Back to top
View user's profile Send private message
sivamf

New User


Joined: 28 May 2005
Posts: 6

PostPosted: Mon Aug 01, 2005 1:24 am    Post subject: Re: Random or a sequential read of a VSAM file can we do
Reply with quote

You have to code two read commands with two dataset names hard coded
Back to top
View user's profile Send private message
batu544

New User


Joined: 21 Jul 2005
Posts: 16
Location: bangalore

PostPosted: Mon Aug 01, 2005 5:37 pm    Post subject:
Reply with quote

hi vijaycics,
U r right. U can code in that way . there is nothing wrong in ur coding style.
Back to top
View user's profile Send private message
batu544

New User


Joined: 21 Jul 2005
Posts: 16
Location: bangalore

PostPosted: Mon Aug 01, 2005 5:38 pm    Post subject:
Reply with quote

hi vijaycics,
U r right. U can code in that way . there is nothing wrong in ur coding style.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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