Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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
No new posts To remove spaces from a VB file using... Selvarajars DFSORT/ICETOOL 5 Thu Jun 21, 2018 6:57 pm
No new posts B059 PREMATURE END OF FILE mvmadhuvenkatesh CA Products 5 Tue Jun 19, 2018 10:50 am
No new posts Formating output file Niki DFSORT/ICETOOL 3 Fri Jun 15, 2018 3:27 pm
No new posts Need help on TDQ load from file using... subratarec CICS 4 Wed Jun 13, 2018 11:32 pm
No new posts To Understand EXECIO Read Parameter OPEN Ilavenil CLIST & REXX 2 Tue May 29, 2018 1:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us