IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Read files in CICS


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
passion_sujesh

New User


Joined: 14 Mar 2008
Posts: 74
Location: India,Chennai

PostPosted: Fri Jul 23, 2010 11:40 am
Reply with quote

Hi all,

I have an requirement in which i have to read a file based on value from the screen. If the value in screen is '1' i have to read file 'FILEA', If the value is '2', i have to read file 'FILEB' ..... There are 6 such files.

I tried moving the file name based on the condition and then read it. But it abbended. Can u please help me in this. Please let me know if we can pass the ddname dynamically?

Approach i tried:

If value = '1'
move 'FILEA' to ws-dd-name
else
if value = '2'
move 'FILEB' to ws-dd-name
else
....
ENd-if.

EXEC CICS STARTBR DATASET ('ws-dd-name')
RIDFLD (KEY)
GTEQ
END-EXEC.


Thanks in advance
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Fri Jul 23, 2010 1:06 pm
Reply with quote

Quote:
EXEC CICS STARTBR DATASET ('ws-dd-name')
RIDFLD (KEY)
GTEQ
END-EXEC.


You don't use quotes around a variable name. Try
Code:
EXEC CICS STARTBR DATASET (ws-dd-name)
RIDFLD (KEY)
GTEQ
END-EXEC.


Garry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top