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

Merge fileds Error: Out of sequence in sortin02


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

New User


Joined: 08 Jul 2005
Posts: 1

PostPosted: Fri Jul 08, 2005 12:02 pm
Reply with quote

im trying to merge three ps files

when i submit the job i get an error as

out of sequence in sortin02 or

out of sequence in sortin03

i tried to make the contents of the files in the ascending order

even then im getting the same error.

im also not sure about the sysntax of the merge fields

suggest me a merge field with parameters

here's the job
Code:


//U117557$ JOB MSGCLASS=X,MSGLEVEL=(1,1),CLASS=B,
//         REGION=5M,NOTIFY=&SYSUID             
//STEP1     EXEC PGM=SORT                       
//SYSPRINT  DD SYSOUT=*                         
//SYSOUT    DD SYSOUT=*                         
//SORTIN01  DD DSN=U117557.TRAIN.IN1,DISP=SHR   
//SORTIN02  DD DSN=U117557.TRAIN.IN2,DISP=SHR   
//SORTIN03  DD DSN=U117557.TRAIN.IN3,DISP=SHR   
//SORTOUT   DD DSN=U117557.TRAIN.OUT1,DISP=SHR   
//SYSIN     DD *                                 
          MERGE FIELDS=(12,3,A,6,5,A),FORMAT=CH 
/*                                               


im getting a maxcc=16


the contents of the ps files are as follows

1)U117557.TRAIN.IN1

arun
pradeep
push

2)U117557.TRAIN.IN2

dnarmatha
esanu
fkutti
gmathan


3)U117557.TRAIN.IN3

aganeshram
bdinesh
cindia
Back to top
View user's profile Send private message
somasundaran_k

Active User


Joined: 03 Jun 2003
Posts: 134

PostPosted: Fri Jul 08, 2005 7:25 pm
Reply with quote

If the input files are not sorted you may get this error. MERGE expects the files to be in the presorted order. Try to sort these files before merging them.

hth
-Som
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Fri Jul 08, 2005 7:42 pm
Reply with quote

I don't understand your MERGE statement:

MERGE FIELDS=(12,3,A,6,5,A),FORMAT=CH

The data you show appears to be characters, starting in column 1 for a length of 10. Why is your MERGE statement not defined as:

MERGE FIELDS=(1,10,A),FORMAT=CH

which would give you this output:

aganeshram
arun
bdinesh
cindia
dnarmatha
esanu
fkutti
gmathan
pradeep
push
Back to top
View user's profile Send private message
bagieswari

New User


Joined: 03 Apr 2004
Posts: 1

PostPosted: Mon Jul 18, 2005 5:24 pm
Reply with quote

This is the general syntax of the MERGE field.

MERGE FIELDS=(Positionofthefield, Lengthfromtheposition, Ascending/Descending,FORMAT)
Supposing if u want to merge files first on one field, later on another field u'll repeat the same.

And ur merge field says,
U r going to merge the files based
on the field which start at 12th pos, and length 3 and in ascending order.
Then on the field at 6th position and length five.
But in the inputs u have given there is nothing starting at 12th pos
MERGE FIELDS=(12,3,A,6,5,A),FORMAT=CH

Try this

MERGE FIELDS=(1,2,A,CH)
Back to top
View user's profile Send private message
shobam

New User


Joined: 18 Jul 2005
Posts: 34
Location: CN

PostPosted: Mon Jul 18, 2005 6:04 pm
Reply with quote

Try Sorting each input file with the following option

Code:

  SORT FIELDS=(12,3,A,6,5,A),FORMAT=CH


and merge the sorted files with

Code:

  MERGE FIELDS=(12,3,A,6,5,A),FORMAT=CH


Hope this will work.
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top