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
 

 

Error while splitting the records?

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Error while splitting the records?
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    Post subject:
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    Post subject: Reply to: Error while splitting the records?
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: 8593
Location: Back in jolly old England

PostPosted: Wed Oct 01, 2008 3:07 pm    Post subject:
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    Post subject:
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: 2284
Location: @my desk

PostPosted: Wed Oct 01, 2008 3:52 pm    Post subject:
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    Post subject: Reply to: Error while splitting the records?
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    Post subject: Reply to: Error while splitting the records?
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    Post subject: Reply to: Error while splitting the records?
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 Moderator


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

PostPosted: Wed Oct 01, 2008 10:28 pm    Post subject:
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.    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 DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IDC2902I Error tzeche ABENDS & Debugging 2 Tue Mar 28, 2017 11:39 am
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 7 Mon Mar 27, 2017 3:59 pm


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