Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problem relating to vsam ksds data loading from ps-file ....

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Problem relating to vsam ksds data loading from ps-file ....
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

Moderator Team Head


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

PostPosted: Wed Feb 22, 2006 3:04 am    Post subject: Re: Problem relating to vsam ksds data loading from ps-file
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    Post subject:
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    Post subject: Re: Problem relating to vsam ksds data loading from ps-file
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    Post subject: Re: Problem relating to vsam ksds data loading from ps-file
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 1 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us