|
View previous topic :: View next topic
|
| Author |
Message |
VENKATA999 Warnings : 2 New User
.jpg)
Joined: 05 Jan 2006 Posts: 44
|
|
|
|
Hi Friends ,
i am trying to load the ksds dataset from ps-file through the cobol prog .
see my prog .
the prog is like
| Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. RUNPROG .
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION .
FILE-CONTROL .
SELECT INFILE ASSIGN TO UT-S-INPUT .
SELECT OUTFILE ASSIGN TO DD2
ORGANIZATION IS INDEXED
ACCESS MODE IS SEQUENTIAL
RECORD KEY IS WS-NO .
DATA DIVISION.
FILE SECTION .
FD INFILE .
01 INFILE-REC .
03 WS-NO1 PIC X(2) .
03 FILLER PIC X(1) .
03 WS-NAME PIC A(15) .
03 WS-SAL PIC 9(5) .
03 FILLER PIC X(57) .
FD OUTFILE .
01 OUTFILE-REC .
03 WS-NO PIC X(2) .
03 FILLER PIC X(1) .
03 WS-NAME PIC A(15) .
03 WS-SAL PIC 9(5) .
03 FILLER PIC X(57) .
WORKING-STORAGE SECTION .
01 WS-WORK-AREA .
02 ARE-THERE-MORE-RECORDS PIC X(3) VALUE 'YES' .
88 MORE-RECORDS VALUE 'YES' .
88 NO-MORE-RECORDS VALUE 'NO' .
PROCEDURE DIVISION .
MAIN-PARA .
OPEN OUTPUT OUTFILE .
PERFORM OPEN-PARA.
PERFORM PROCESS-PARA UNTIL NO-MORE-RECORDS .
PERFORM END-PARA .
STOP RUN .
OPEN-PARA .
OPEN INPUT INFILE .
* OPEN OUTPUT OUTFILE .
READ INFILE
AT END MOVE 'NO' TO ARE-THERE-MORE-RECORDS
END-READ .
PROCESS-PARA .
MOVE INFILE-REC TO OUTFILE-REC .
WRITE OUTFILE-REC
INVALID KEY DISPLAY 'IN VALID REC', INFILE-REC
END-WRITE .
READ INFILE
AT END MOVE 'NO' TO ARE-THERE-MORE-RECORDS
END-READ .
END-PARA .
CLOSE INFILE , OUTFILE .
STOP RUN .
|
The jcl i have written is ..
| Code: |
//NZNMB2TE JOB (xxxxxx),'VENKATA',CLASS=X,MSGCLASS=Y,
// NOTIFY=NZNMB2,MSGLEVEL=(1,1)
//STEP01 EXEC PROC=IGYWCL,MEM=RUNPROG
//STEPLIB DD DSN=NZNMB2.TEST.INDEX.FILE,DISP=SHR
//* DD DSN=SYS1.COBLIB,DISP=SHR
//COBOL.SYSIN DD DSN=NZNMB2.TEST.INDEX.FILE(&MEM),DISP=SHR
//LKED.SYSLMOD DD DSN=NZNMB2.TEST.INDEX.LOAD(&MEM),DISP=SHR
//STEP02 EXEC PGM=RUNPROG
//STEPLIB DD DSN=NZNMB2.TEST.INDEX.LOAD,DISP=SHR
//INPUT DD DSN=NZNMB2.TEST.INDEX.OUTFILE,DISP=OLD
//DD2 DD DSN=NZNMB2.TEST.INDEX.FILE.CLUSTER,DISP=OLD
//SYSOUT DD SYSOUT=*
//DISPLAY DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//
|
But when i run the same i am getting the error( user abend u000 u4028 like below in sysout
A logic error occurred. Neither FILE STATUS nor a declarative was specified
at relative location X'0524'. The status code was 48.
From compile unit RUNPROG at entry point RUNPROG at compile unit offset
at address 00007D3C.
based on the error code it meam file not opened for output either in output or i-o .
but i have opened it correctly . I did not understand why my jcl is not running . If any help done on this issue is greatly appreciated .
Thanks in advance, |
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Interesting.
My system runs the program just fine, without any errors.
Maybe the data isn't in sorted order by the key? |
|
| Back to top |
|
 |
sendil
New User
Joined: 30 Jun 2005 Posts: 27
|
|
|
|
| Please try TSO FREEALL command in your command line. Then you can submit the job again. |
|
| Back to top |
|
 |
VENKATA999 Warnings : 2 New User
.jpg)
Joined: 05 Jan 2006 Posts: 44
|
|
|
|
Hi Friends ,
I tried the with the TSO FREEALL commad , but getting message command not found . Can you please walk me through steps .
Thanks a lot ... |
|
| Back to top |
|
 |
VENKATA999 Warnings : 2 New User
.jpg)
Joined: 05 Jan 2006 Posts: 44
|
|
|
|
Hi Friends ,
It is working for me now , while createing the ksds file , i write keys like
KEYS(2,1) , i correced it now to KEYS(2,0) . After seeing superk reply , i concentrated on keys area , and did the change the as above .
I am very happy , it is workin for me now ..
but i have one query , while creating the ksds , shall we need to count from 0 . I mean is it comulsory ? . Please clarify ....
Once agian thanks a lot to all and specially to superk ,
Venkata , |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|