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

Problem relating to vsam ksds data loading from ps-file ....


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
VENKATA999
Warnings : 2

New User


Joined: 05 Jan 2006
Posts: 44

PostPosted: Tue Feb 21, 2006 11:16 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Feb 22, 2006 3:04 am
Reply with quote

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
View user's profile Send private message
sendil

New User


Joined: 30 Jun 2005
Posts: 27

PostPosted: Wed Feb 22, 2006 2:35 pm
Reply with quote

Please try TSO FREEALL command in your command line. Then you can submit the job again.
Back to top
View user's profile Send private message
VENKATA999
Warnings : 2

New User


Joined: 05 Jan 2006
Posts: 44

PostPosted: Wed Feb 22, 2006 5:14 pm
Reply with quote

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
View user's profile Send private message
VENKATA999
Warnings : 2

New User


Joined: 05 Jan 2006
Posts: 44

PostPosted: Wed Feb 22, 2006 6:25 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top