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

Error while splitting the records?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Wed Oct 01, 2008 12:53 pm
Reply with quote

Hi,

I am trying the pick the last 2 records from the file. i ended up with the following error message.

ICE126A 2 INCONSISTENT *INREC IFTHEN 0 REFORMATTING FIELD FOUND
ICE751I 0 C5-Q95214 C6-Q95214 C7-BASE C8-Q95214 E7-Q95214

TOOLMSG:

ICE606I 0 DFSORT CALL 0001 FOR SORT FROM IN TO OUTFIL USING CTL1
ICE602I 0 OPERATION RETURN CODE: 16

My record format is VB and LRECL = 2500.

This is the sort field i used in my JCL:

//CTL1CNTL DD *
INREC FIELDS=(5,2504,2505:SEQNUM,8,ZD)
SORT FIELDS=(2505,8,ZD,D)
OUTFIL FNAMES=T1,ENDREC=2

//CTL2CNTL DD *
SORT FIELDS=(2505,8,ZD,A)
OUTFIL FNAMES=OUT,OUTREC=(5,2504)

The same JCL is working fine for me for FB dataset after making necessary changes in the sort fields. But for VB, it is throwing the above error.Help me in solving this?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Oct 01, 2008 2:54 pm
Reply with quote

Probably you need to use VTOF and then insert sequence number at end of record.
Back to top
View user's profile Send private message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Wed Oct 01, 2008 2:58 pm
Reply with quote

Hi Sambhaji,

Could you elaborate it further by an example?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Oct 01, 2008 3:07 pm
Reply with quote

Take a look HERE to see an example of what you need.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Oct 01, 2008 3:29 pm
Reply with quote

use
SORT FIELDS=COPY
OUTFIL VTOF,OUTREC=(5,196,SEQNUM,8,ZD)
as first cntl
and taking output process further
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Wed Oct 01, 2008 3:52 pm
Reply with quote

Hi,

From whatever has posted so far i seems the TS wants both his input and output as VB. Hence padding should NOT be done at the end as in the case of FB files.
You can modify your CTLn cards like this to achieve this.

Code:
//CTL1CNTL DD *                       
  INREC BUILD=(1,4,5:SEQNUM,8,ZD,13:5)
  SORT FIELDS=(5,8,ZD,D)             
  OUTFIL FNAMES=T1,ENDREC=2           
//CTL2CNTL DD *                       
  SORT FIELDS=(5,8,ZD,A)             
  OUTFIL FNAMES=OUT,OUTREC=(1,4,5:13)
Back to top
View user's profile Send private message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Wed Oct 01, 2008 4:09 pm
Reply with quote

Thanks arcvns,

its worked fine for me.

Actually i also tried the same , from the sort trick PDF.
Back to top
View user's profile Send private message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Wed Oct 01, 2008 4:16 pm
Reply with quote

Hi,

i just noticed that ...My input looks something like below..

Code:
H________  Header record (1st byte)
I (invoices)
I
I
I
H______Header record
I
I

One header has more 1 to N no. of invoices...So is there any way to splitting the record meaningfully?
Back to top
View user's profile Send private message
Guru Prasath

New User


Joined: 04 Jun 2008
Posts: 36
Location: Chennai

PostPosted: Wed Oct 01, 2008 4:27 pm
Reply with quote

I have small clue on this...

My trailer record will tell , how many headers records are there in the file.

So i have to split the file from the last...and stop at the given header count.

For ex:

My trailer record say
Code:
 T00154 


means 154 header records are there. So if i want to split it into last 50 records means..the file has to read from the backwards and stops at the 50th header...

Am i clear?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Oct 01, 2008 10:28 pm
Reply with quote

I am closing this topic. Please start a new topic and give a complete description of what you're trying to do. Show an example of your input records and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of all relevant fields. Explain the "rules" for getting from input to output.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top