MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sequencial read of BDAM file in CICS

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
chandhroo
Beginner


Joined: 02 Dec 2002
Posts: 36
Topics: 13

PostPosted: Fri Sep 02, 2005 7:39 am    Post subject: Sequencial read of BDAM file in CICS Reply with quote

Hi All,
I'm trying to read BDAM file sequencially in CICS, during STARTBR it hits EIBRESP=16(INVALID REQUEST).

My aim is to read all the records from BDAM file in CICS and send to different program to write in the MQ queue. I have given below the the variable declaration and coding.
Code:


02  PASSWORD-FOR-UPDATE.                                     
    05  T-1                         PIC X.                   
    05  T-2                         PIC S9(2)                 
                                    USAGE IS   COMPUTATIONAL.
    05  USER-PASSWORD               PIC X(6).                 


 200-STARTBR.                               
*********************************************
*    SET THE POINTER TO READ PASSWORD FILE. 
*********************************************
     MOVE LOW-VALUE TO T-1                   
     MOVE 1 TO T-2                           
     MOVE SPACES TO USER-PASSWORD           
     EXEC CICS STARTBR                       
         DATASET(WS-PASSWORD-FILE)           
         RIDFLD(PASSWORD-FOR-UPDATE)         
         GTEQ                               
         NOHANDLE                           
     END-EXEC                               

 300-PASSWORD-READ-NEXT.                     
**********************************************
*    READ PASSWORD FILE SEQUENTIALLY.         
**********************************************
     EXEC CICS READNEXT                       
          DATASET(WS-PASSWORD-FILE)           
          INTO(COM-DISK-AREA)                 
          RIDFLD(PASSWORD-FOR-UPDATE)         
          NOHANDLE                           
     END-EXEC                                 



When I created BDAM file, I wrote records passing
MOVE LOW-VALUE TO T-1
MOVE 1 TO T-2
and value to USER-PASSWORD

I haven't done this before for BDAM file and Id don't am I in the correct path. Any help to read all the records from BDAM file sequencially is greatly appreciated.

Thanks
Chandru
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Fri Sep 02, 2005 8:35 am    Post subject: Reply with quote

chandhroo,

hmm may be for BDAM files you need to specify the DEBKEY or DEBREC? Check this link for detailed explanation of STARTBR

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DFHP4P00/1.233?DT=20011208214846

Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chandhroo
Beginner


Joined: 02 Dec 2002
Posts: 36
Topics: 13

PostPosted: Fri Sep 02, 2005 9:00 am    Post subject: Reply with quote

Hi,
Thanks for you note, I tried both, but getting same error.
200-STARTBR.
*********************************************
* SET THE POINTER TO READ PASSWORD FILE.
*********************************************
MOVE LOW-VALUE TO T-1
MOVE 1 TO T-2
MOVE SPACES TO USER-PASSWORD
EXEC CICS STARTBR
DATASET(WS-PASSWORD-FILE)
RIDFLD(PASSWORD-FOR-UPDATE)
DEBKEY / DEBREC
NOHANDLE
END-EXEC
Back to top
View user's profile Send private message
chandhroo
Beginner


Joined: 02 Dec 2002
Posts: 36
Topics: 13

PostPosted: Mon Sep 26, 2005 11:49 am    Post subject: Reply with quote

Hi,
This issue is sorted out. It was the file definition problem in CICS region. The file defintion was changed to support BROWSE funtion, then it is working fine. Anyway thanks for your support.
Thanks
Chandru
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group