View previous topic :: View next topic
Author
Message
arunkumarmuthusamy New User Joined: 08 Jul 2005Posts: 1
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
somasundaran_k Active User Joined: 03 Jun 2003Posts: 134
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
superk Global Moderator Joined: 26 Apr 2004Posts: 4652 Location: Raleigh, NC, USA
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
bagieswari New User Joined: 03 Apr 2004Posts: 1
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
shobam New User Joined: 18 Jul 2005Posts: 34 Location: CN
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
Please enable JavaScript!