| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| chandhroo Beginner
 
 
 Joined: 02 Dec 2002
 Posts: 36
 Topics: 13
 
 
 | 
			
				|  Posted: Fri Sep 02, 2005 7:39 am    Post subject: Sequencial read of BDAM file in CICS |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| chandhroo Beginner
 
 
 Joined: 02 Dec 2002
 Posts: 36
 Topics: 13
 
 
 | 
			
				|  Posted: Fri Sep 02, 2005 9:00 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| chandhroo Beginner
 
 
 Joined: 02 Dec 2002
 Posts: 36
 Topics: 13
 
 
 | 
			
				|  Posted: Mon Sep 26, 2005 11:49 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  | 
	
		|  |