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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

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