Desktop productivity for business analysts and programmers

VSAM read looping infinite in Z/OS

Reply
N/A
Posts: 0

VSAM read looping infinite in Z/OS

Hi,
Please help me in correcting the code. Our workshop has SAS under Z/OS.

I have VSAM file configuration shown below:

Organization: KSDS
KSDS key length: 4
KSDS key location: 0
Average record size: 80
Maximum record size: 80


Here is the sample output from the file:

---- +----1----+----2-
**********************
1234 saikrishna
1235 xxxxxxxxxx

Here is the code I used to access key 1235

DATA FILEIN;
ID='1235';
KEYVAR= ID;
INFILE INFIL VSAM KEY=KEYVAR;
INPUT
@5 NAME $CHAR12.;
;
PROC PRINT DATA=FILEIN;
;

The Mainframe batch job keep on running for ever.. I cancelled the job and added the code IF _N_ > 100 THEN STOP; then I noticed the logic is reading the same record again and again (in the output it has 100 records same).

Could you please suggest me the code to handle this situation?



Thanks,
Sai
Ask a Question
Discussion stats
  • 0 replies
  • 81 views
  • 0 likes
  • 1 in conversation