View previous topic :: View next topic
Author
Message
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
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
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
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
Pandora-Box Global Moderator Joined: 07 Sep 2006Posts: 1592 Location: Andromeda Galaxy
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
Naish New User Joined: 07 Dec 2006Posts: 82 Location: UK
From what I understand, search for RESIZE on the forum or the manual.
Your example doesn't matches your problem description.
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
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
Naish New User Joined: 07 Dec 2006Posts: 82 Location: UK
Good point Bill. Agree. Thanks.
Back to top
Skolusu Senior Member Joined: 07 Dec 2007Posts: 2205 Location: San Jose
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
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
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
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
Should that column 163 be 063?
Back to top
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
Oops, that should be 063, is that the problem?
Back to top
Nic Clouston Global Moderator Joined: 10 May 2007Posts: 2455 Location: Hampshire, UK
Quickest way to find out? Try it!
Back to top
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
Away from the office network, will update as soon as possible.
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
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
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
Even with 063, I get the same error
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
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
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
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
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
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
HameedAli Active User Joined: 16 Apr 2009Posts: 151 Location: India
exactly, and there are few modifications to the starting position of the field.
Back to top
Please enable JavaScript!