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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

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