Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

OPEN ERROR SORTIN in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Wed Oct 10, 2007 11:49 am    Post subject: OPEN ERROR SORTIN in DFSORT
Reply with quote

Hi,

In my below job when i use my input file of LRECL=80, it is running fine and displaying SORTOUT as well. But when i use another input file of LRECL=106 then i am getting MAXCC=16. In the spool SORTOUT of step030 or step040 is not displaying. It is giving the following error.
Code:

  OPTION COPY                                       
 OPEN ERROR SORTIN                                 
 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E7-K11698 
 END OF DFSORT                                     


The job is to check whether it has same number of records in two input files.If record count is matching then it will compare records based on the key provided:

Here is the job:
Code:

//COMPARE JOB 1,CLASS=6,MSGCLASS=0,NOTIFY=&SYSUID
//JCLLIB   JCLLIB ORDER=(MY.PDS.PROCLIB)
//JSTEP010 EXEC COMPARE
//STEP010.INPUT1 DD DSN=MY.INPUT.FILE1,DISP=SHR
//STEP010.INPUT2 DD DSN=MY.INPUT.FILE2,DISP=SHR
//*


And the proc is
Code:

//COMPARE  PROC INPUT1=, 
//             INPUT2=,   
//STEP010  EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//SYSUDUMP DD SYSOUT=C                                           
//SYSPRINT DD SYSOUT=*                                           
//SORTOUT  DD SYSOUT=*                                           
//SYSOUT   DD SYSOUT=*                                           
//INPUT1   DD DSN=&INPUT1,DISP=SHR                               
//INPUT2   DD DSN=&INPUT2,DISP=SHR                               
//TEMP1    DD DSN=&&TEMP1,DISP=(MOD,PASS)                         
//TEMP2    DD DSN=&&TEMP2,DISP=(NEW,PASS),                       
//             SPACE=(CYL,(100,500))                             
//TOOLIN   DD *
COPY FROM(INPUT1) TO(TEMP1) USING(CTL1)           
COPY FROM(INPUT2) TO(TEMP1) USING(CTL2)           
SELECT FROM(TEMP1) TO(TEMP2) ON(28,8,BI) ALLDUPS 
/*
//CTL1CNTL DD *
OUTFIL FNAMES=TEMP1,NODETAIL,REMOVECC,                           
TRAILER1=(1:C'COUNT OF RECORDS IN INPUT1:',COUNT=(M11,LENGTH=8))
/*
//CTL2CNTL DD *
OUTFIL FNAMES=TEMP1,NODETAIL,REMOVECC,                           
TRAILER1=(1:C'COUNT OF RECORDS IN INPUT2:',COUNT=(M11,LENGTH=8))
/*
//STEP020  EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//TEMP1    DD DSN=*.STEP010.TEMP1,DISP=(OLD,PASS)                 
//SORTIN   DD DSN=&&TEMP2,DISP=(OLD,DELETE)                       
//SORTOUT  DD DUMMY                                               
//SYSIN    DD *
OPTION COPY,NULLOUT=RC4
/*
// IF (RC=4) THEN                                                 
//STEP030  EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DSN=MY.PDS.DATA(DATA030A),DISP=SHR 
//         DD DSN=*.STEP010.TEMP1,DISP=(OLD,DELETE)                 
//SORTOUT  DD SYSOUT=*                                             
//SYSIN    DD *
OPTION COPY
/*
// ELSE                                                             
// IF (RC=0) THEN                                                   
//STEP040  EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DSN=MY.PDS.DATA(DATA040A),DISP=SHR
//         DD DSN=*.STEP010.TEMP1,DISP=(OLD,DELETE)               
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *
OPTION COPY
/*
//*
//STEP050  EXEC PGM=ICETOOL
//SYMNAMES DD *
Key,1,10,CH
Record,1,500
Seqno,*,8,ZD
Startcol,=
Id,*,2,CH
Id1,=,1
Id2,*,1
/*
//SYMNOUT DD SYSOUT=*
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=C
//SYSPRINT DD SYSOUT=*
//INPUT1   DD DSN=&INPUT1,DISP=SHR
//INPUT2   DD DSN=&INPUT2,DISP=SHR
//TEMP     DD DSN=&&TEMP,DISP=(MOD,PASS)
//MATCH    DD DSN=MY.OUTPUT.MATCH,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//F1ONLY   DD DSN=MY.OUTPUT.F1ONLY,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//F2ONLY   DD DSN=MY.OUTPUT.F2ONLY,
//            DISP=(,CATLG,DELETE),SPACE=(CYL,(500,500),RLSE),
//            DCB=(*.STEP010.INPUT1)
//TOOLIN   DD *
COPY FROM(INPUT1) TO(TEMP) USING(CTL1)
COPY FROM(INPUT2) TO(TEMP) USING(CTL2)
SPLICE FROM(TEMP) TO(MATCH) ON(Seqno) ON(Key) -
  WITH(Id2) KEEPNODUPS USING(CTL3)
/*
//CTL1CNTL DD *
  INREC OVERLAY=(Startcol:SEQNUM,8,ZD,C'11')
/*
//CTL2CNTL DD *
  INREC OVERLAY=(Startcol:SEQNUM,8,ZD,C'22')
/*
//CTL3CNTL DD *
  OUTFIL FNAMES=MATCH,INCLUDE=(Id,EQ,C'12'),OUTREC=(Record)
  OUTFIL FNAMES=F1ONLY,INCLUDE=(Id,EQ,C'11'),OUTREC=(Record)
  OUTFIL FNAMES=F2ONLY,INCLUDE=(Id,EQ,C'22'),OUTREC=(Record)
/*


MY.PDS.DATA(DATA030A)
Code:

**********COUNT NOT MATCH************


MY.PDS.DATA(DATA040A)
Code:

************COUNT MATCH**************


Why i am getting OPEN ERROR SORTIN. How can i resolve this.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Oct 10, 2007 11:56 am    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

At a quick glance You are concatenating datasets with different DCB attributes

from Your post I infer that the sequential dataset lrecl changes ,
but You said nothing about the partitioned
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Oct 10, 2007 11:58 am    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

The problem is with the record length. check the link posted below which gives you more info on the OPEN ERROR.

http://ibmmainframes.com/about19101.html
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Wed Oct 10, 2007 12:14 pm    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

Actually the job flow is as follows.
Suppose u run a job yesterday with one input file and generated a output file. And u made some changes in the program. So u again run the same program today with same input file but new output file.
So now u had two output files. One is yesterdays and todays.
Now first i want to compare these two output files whether they had same number of records and same set or records are there are not based on the key provided.

The first step010 counts number of records in both files and write to temp2 file when both had same number of records.
and in my temp 2 files it will be having COUNT OF RECORDS IN INPUT1 and INPUT2.

The second step give RC=4 when the temp2 is empty which means mismatch in count of records.

The third step STEP030 should display as follows:
**********COUNT NOT MATCH************
COUNT OF RECORDS IN INPUT1:20
COUNT OF RECORDS IN INPUT2:18
The fourth step STEP040 should display as follows:
**********COUNT MATCH************
COUNT OF RECORDS IN INPUT1:20
COUNT OF RECORDS IN INPUT2:20
Here where i am encountering the problem.
It is not giving SORTOUT in my spool when i give my input file of LRECL other than 80.

But my last step is executing and creating the output files.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Oct 10, 2007 12:26 pm    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

Quote:
It is not giving SORTOUT in my spool when i give my input file of LRECL other than 80.

You already said that,
You last post tells nothing useful to solve Your error,
the flow of the procedure is irrelevant.
ONLY THE RECORD LENGTHS OF THE INPUT FILES ARE
we already gave You the solution.
I will repeat the suggestion, in case You had not read my previous post

what is changing is the sequential dataset record lenght ( right ? )
in Your procedure/job_stream You are concatenating a partitioned dataset ahead of a sequential one ( right ?)
Code:
//SORTIN   DD DSN=MY.PDS.DATA(DATA030A),DISP=SHR
//         DD DSN=*.STEP010.TEMP1,DISP=(OLD,DELETE)         


Your job runs OK when the record length is 80 ( right ? )
I assume that also the partitioned dataset record length is 80

When You concatenate to it a dataset with a different record
lenght ( 106 - in this case)

THEN YOU GET AN INPUT ERROR

YOU CANNOT CONCATENATE DATASETS WITH DIFFERENT ATTRIBUTES
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Wed Oct 10, 2007 1:41 pm    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

Hi enrico-sorichetti,

Thanks for you reply.
I got it what you told. What ever u said is correct. We cannot concatenate datasets with different attributes.
So i made the following chagnes in my job.
My Partioned Data set LRECL is 80.
So in my first step when i am creating temp1 it is (MOD,PASS)
I changed it as follows

Code:

//TEMP1    DD DSN=&&TEMP1,DISP=(MOD,PASS),           
//            RECFM=FB,LRECL=80,SPACE=(CYL,(100,500))


So both are of LRECL=80. Now i can concatenate.

And now my code is running fine.
THANK YOU SO MUCH.
Thanks for you reply.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Wed Oct 10, 2007 1:44 pm    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

Glad to have been helpful :-)

but are You sure You are not dropping anything from Your
106 bytes record dataset
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Wed Oct 10, 2007 3:27 pm    Post subject: Reply to: OPEN ERROR SORTIN
Reply with quote

Hi,

Actually i am concatenating as follows
Code:

//SORTIN   DD DSN=MY.PDS.DATA(DATA030A),DISP=SHR
//         DD DSN=*.STEP010.TEMP1,DISP=(OLD,DELETE)           


In MY.PDS.DATA(DATA030A) i had
**********COUNT NOT MATCH************

and in my TEMP1 i will get from STEP010 as
COUNT OF RECORDS IN INPUT1:20
COUNT OF RECORDS IN INPUT2:18

So i wont loose any of my data. I am sure.
It is not related to data. It is to diaplay only.
Got it.
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 Need help with below DB2 error ashek15 DB2 3 Sat Mar 18, 2017 5:56 am
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts Row not found Sql error GaganGarg DB2 7 Tue Mar 07, 2017 6:29 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us