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

SORT/ICETOOL Report


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

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Mon Jul 09, 2012 8:27 pm
Reply with quote

Hi,
I have an input file of 399 LRECL.

I want to create a report using ICETOOL/SORT.
My report size shouldn't exceed 133 and all the information from the input file needs to be displayed in the Report.

Is it possible to use ICETOOL/OUTFIL, to print 3 row information (133*3 bytes) for each of the record from Input File (399 bytes).

For example:
Input:
Code:
FIRSTINFORMATIONOMIDDLEINFOLASTINFOX

Output:
Code:
FIRST INFORMATION INFO
MIDDLE
LASTINFOX
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jul 09, 2012 8:41 pm
Reply with quote

Yes, it is possible. Not only possible, but easy. Consult the manual. Look at "reporting" functions and discover the the "/" can give you a new line to put more data on.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Mon Jul 09, 2012 8:45 pm
Reply with quote

There is mismatch in your input amd output

Also how can someone identify the fst,middle and last info ? or is that you wanted to split fst 133,2nd 133 and so on?

Please clarify
Back to top
View user's profile Send private message
Naish

New User


Joined: 07 Dec 2006
Posts: 82
Location: UK

PostPosted: Mon Jul 09, 2012 8:48 pm
Reply with quote

From what I understand, search for RESIZE on the forum or the manual.

Your example doesn't matches your problem description.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Jul 09, 2012 8:51 pm
Reply with quote

RESIZE would do it Naish, but I think that TS mentioned a "report" for which he might have headings and stuff, rather than a plain file,
Back to top
View user's profile Send private message
Naish

New User


Joined: 07 Dec 2006
Posts: 82
Location: UK

PostPosted: Mon Jul 09, 2012 8:59 pm
Reply with quote

Good point Bill. Agree. Thanks.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jul 09, 2012 9:58 pm
Reply with quote

Bill Woodger wrote:
RESIZE would do it Naish, but I think that TS mentioned a "report" for which he might have headings and stuff, rather than a plain file,


RESIZE Would still be the right solution. You can Use OUTFIL reporting features along with RESIZE. The only difference would the OUTFIL will be seeing the input LRECL as 133 instead of 399.

ex:
Code:

//STEP0100 EXEC PGM=ICETOOL                       
//TOOLMSG  DD SYSOUT=*                             
//DFSMSG   DD SYSOUT=*                             
//IN       DD *                                   
ABCDEFGHIJKLMNOPQRSTUVWXYZ                         
//OUT      DD SYSOUT=*                             
//TOOLIN   DD *                                   
  RESIZE FROM(IN) TO(OUT) TOLEN(10) USING(CTL1)   
//CTL1CNTL DD *                                   
  OPTION COPY                                     
  INREC BUILD=(1,26)                               
  OUTFIL REMOVECC,HEADER1=('MY HEADER ',/,10'*')   
//*


will produce
Code:

MY HEADER     
**********     
ABCDEFGHIJ     
KLMNOPQRST     
UVWXYZ         
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Tue Jul 10, 2012 8:28 pm
Reply with quote

Thanks All for the inputs.

While preparing the OUTREC file, I encounter this error

Code:
ICE201I H RECORD TYPE IS F - DATA STARTS IN POSITION 1                   
ICE126A 9 INCONSISTENT REFORMATTING FOR STLREP  : REASON CODE 04, IFTHEN 0


Code:
           OUTREC=(005:001,70,                                           
                    086:071,05,/,                                         
                    005:077,50,                                           
                    086:128,50,/,                                         
                    001:179,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    021:187,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    042:196,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    163:205,3,PD,EDIT=(SIII.IT),SIGNS=(,-),X,             
                    083:208,6,PD,EDIT=(SII,III,III,IIT),SIGNS=(,-),X,     
                    104:215,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    124:224,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X)


What is incorrect with the OUTREC?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 10, 2012 8:38 pm
Reply with quote

Should that column 163 be 063?
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Tue Jul 10, 2012 10:16 pm
Reply with quote

Oops, that should be 063, is that the problem?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Jul 10, 2012 10:22 pm
Reply with quote

Quickest way to find out? Try it!
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Tue Jul 10, 2012 10:26 pm
Reply with quote

Away from the office network, will update as soon as possible.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 11, 2012 3:36 am
Reply with quote

Even if away from the office, if you can look here, you can look at the manuals.

If I make a suggestion which I don't think is related to your problem I'll say so.
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Wed Jul 11, 2012 12:14 pm
Reply with quote

Even with 063, I get the same error icon_sad.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 11, 2012 1:16 pm
Reply with quote

Ah, just notice all those X's on the end of the lines.

Did you account for those when specifying your columns? No.

I'd do it something like this. Columns where needed for spacing across the line, no columns where not needed. I'd have put the X's on a seperate line.

Code:
OUTREC=(005:001,70,                                           
                    086:071,05,/,                                         
                    005:077,50,                                           
                    086:128,50,/,                                         
                    179,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    187,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    196,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    205,3,PD,EDIT=(SIII.IT),SIGNS=(,-),X,             
                    208,6,PD,EDIT=(SII,III,III,IIT),SIGNS=(,-),X,     
                    215,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X,
                    224,8,PD,EDIT=(SIII,III,III,III,IIT),SIGNS=(,-),X)
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Wed Jul 11, 2012 2:30 pm
Reply with quote

Code:
OUTREC=(002:001,70,                               
        080:071,05,/,                             
        002:077,50,                               
        080:128,50,/,                             
        001:179,8,PD,EDIT=(III,III,III,III,IIT),X,
        021:187,8,PD,EDIT=(III,III,III,III,IIT),X,
        041:196,8,PD,EDIT=(III,III,III,III,IIT),X,
        061:205,3,PD,EDIT=(IIT.IT),X,             
        080:208,6,PD,EDIT=(II,IIT.IIIIT),X,       
        094:215,8,PD,EDIT=(III,III,III,III,IIT),X,
        114:224,8,PD,EDIT=(III,III,III,III,IIT),X)


This worked thanks all.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 11, 2012 2:38 pm
Reply with quote

You got rid of the sign instead of changing the field positions?

I suppose all your values are always going to be positive but you didn't realise that when you coded the SIGNS originally...
Back to top
View user's profile Send private message
HameedAli

Active User


Joined: 16 Apr 2009
Posts: 151
Location: India

PostPosted: Wed Jul 11, 2012 3:03 pm
Reply with quote

exactly, and there are few modifications to the starting position of the field.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top