Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
Posted: Fri Oct 21, 2016 10:41 am Post subject: FB to VB using OUTREC
I deliberately wrote the subject header as I did after googling and finding lots of examples using OUTFIL, but none using OUTREC. It could well be that I'm attacking the problem the wrong way, but here's what I'm trying to do.
My input file is FB, 2000. My output file should be VB, 1000 (why the input file is so large compared to the output file is a matter for those who created it).
This is my JCL
I only want to select those record containing IP01P in position 10.
I want the output file to contain 32 blanks and THEN contain the data from position 10 onwards.
Every variation I've tried gives me error
Quote:
ICE043A 3 INVALID DATA SET ATTRIBUTES: SORTOUT RECFM - REASON CODE IS 08
ICE751I 0 C5-I35397 C6-I35397 C7-I35397 C8-I35397 E7-I35397
Can anyone suggest how I should solve this. Thanks.
(At the same time, I assume there's a better way of including 32 blanks at the start without coding it the way I did (something similar to Rexx's COPIES ????) _________________ Michael
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Fri Oct 21, 2016 9:12 pm Post subject: Re: FB to VB using OUTREC
misi01 wrote:
I deliberately wrote the subject header as I did after googling and finding lots of examples using OUTFIL, but none using OUTREC. It could well be that I'm attacking the problem the wrong way, but here's what I'm trying to do.
Misi01,
A quick clarification here. If you wanted to convert an FB file to VB file using OUTREC, then you need to use the Parm CONVERT. However DFSORT supports the CONVERT parameter on the OUTFIL statement, but not on the OUTREC statement. If you specify the CONVERT parameter on DFSORT's OUTREC statement, you'll get an error message instructing you to use CONVERT (or VTOF) on the OUTFIL statement instead of on the OUTREC statement.
misi01 wrote:
My input file is FB, 2000. My output file should be VB, 1000 (why the input file is so large compared to the output file is a matter for those who created it).
I only want to select those record containing IP01P in position 10.
I want the output file to contain 32 blanks and THEN contain the data from position 10 onwards.
Every variation I've tried gives me error
Quote:
ICE043A 3 INVALID DATA SET ATTRIBUTES: SORTOUT RECFM - REASON CODE IS 08
ICE751I 0 C5-I35397 C6-I35397 C7-I35397 C8-I35397 E7-I35397
Can anyone suggest how I should solve this. Thanks.
(At the same time, I assume there's a better way of including 32 blanks at the start without coding it the way I did (something similar to Rexx's COPIES ????)
Nascar9 has shown you how you to code "n" spaces.
If you looked up ICE043A message in DFSORT message and codes manual for reason code 8 you would have noticed that you have mismatch of RECFM's.
As for solving the problem, Your Include statement is already selecting M23 records and IP01P records and there is no reason as to why you need to check again for M23 value.
Use the following control cards (UNTESTED)
Code:
//SYSIN DD *
INCLUDE COND=(01,3,CH,EQ,C'M23',AND, $ Only M23 and
10,5,CH,EQ,C'IP01P') $ IP01P records
Joined: 02 Dec 2002 Posts: 616 Topics: 171 Location: Stockholm, Sweden
Posted: Sat Oct 22, 2016 12:10 am Post subject: As usual, thanks Kolusu
I'll try that first thing on Monday morning.
I did look up the error message but got the impression that it was caused by something like the sum of the lengths of my sub-fields not being equal to the length of my variable file. Then I got sidetracked by various examples that showed the first part of the build being 1,4 (for the RDW).
It's really frustrating when you "know" something can be done with dfsort/icetool, but despite all your attempts you don't get the right results.
FWIW - I have a PDS library of various sort examples. As I discover new solutions,I add the example to that library. I didn't know you could include comments in the way you've done (and really like your example above with the comments for each step. That's something I'll start using) _________________ Michael
Not only do they give you the commentary, but you get to use them - define in one place, use as in as many places as you need, with no only one place to typo/maintain (the definition).
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Mon Oct 24, 2016 11:39 am Post subject: Re: As usual, thanks Kolusu
misi01 wrote:
I did look up the error message but got the impression that it was caused by something like the sum of the lengths of my sub-fields not being equal to the length of my variable file.
Misi01,
I am not sure where you got that information but "ICE043A 3 INVALID DATA SET ATTRIBUTES: SORTOUT RECFM - REASON CODE IS 08 is explained as follows.
ICE043A- Reason Code 8 wrote:
8. Input and output data sets have mixed fixed length and variable length record formats, or mixed valid and invalid record formats. Examples: The SORTIN data set has RECFM=FB and the SORTOUT data set has RECFM=VB. The SORTIN01 data set has RECFM=VB and the SORTOUT data set has RECFM=F or RECFM=U.
It's really frustrating when you "know" something can be done with dfsort/icetool, but despite all your attempts you don't get the right results.
Well most of the time you seem to fixated on certain thing and then scour the internet for that. As I mentioned earlier, I would suggest that you start looking first into "DFSORT Application programming Guide" which would answer most of your queries.
misi01 wrote:
FWIW - I have a PDS library of various sort examples. As I discover new solutions,I add the example to that library. I didn't know you could include comments in the way you've done (and really like your example above with the comments for each step. That's something I'll start using)
well most of the solutions I post have some level of comments and also I code the statements in the order they are processed. Comments are useful in the long run and helps in maintaining the code.
Here is a pictorial representation of DFSORT processing.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum