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
 
Merge fileds Error: Out of sequence in sortin02

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Merge fileds Error: Out of sequence in sortin02
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Jul 08, 2005 7:42 pm    Post subject: Re: merge fileds
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    Post subject: Re: merge fileds
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    Post subject:
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    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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

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