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

ICE244A message: reuse of % variables disallowed


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

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Thu Feb 11, 2010 8:05 am
Reply with quote

Frank,

We are processing a delimited input file, and we wish to use DFSORT's INREC PARSE function to format the records (via BUILD). There are several "record types" present in the file; the record type is always identified at a fixed position in the record. We know we can use IFTHEN PARSE to test the identifier, and then parse the fields into % variables, based upon the expected fields for each record type.

Our problem is overcoming the limit of 100 parsed variables, in conjunction with the restriction against reusing any particular variable. No input record, regardless of its type, will have anywhere near 100 fields. But if we multiply the number of record types by the number of fields in each record, we exceed 100. We had thought that we could reuse the % variables in multiple IFTHEN PARSE clauses, but that produced this error on the second occurrence of %01:

ICE244A F DUPLICATE PARSED FIELD DEFINITION

Is there a recommended approach in a situation like this? If it will be helpful, we will post a specific example, but perhaps this generic description will be enough for you to guide us (or point us to an example).

Thanks,

David
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: Thu Feb 11, 2010 11:14 pm
Reply with quote

David,

It's true that you can use up to 100 parsed variables in one pass. So you may have to use multiple passes (e.g. use multiple COPY operators in ICETOOL).

There may be another way, but it's difficult to tell based on the generic description. So please do post a specific example of input records and expected output records, along with the rules for getting from input to output.
Back to top
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Fri Feb 12, 2010 6:08 am
Reply with quote

>It's true that you can use up to 100 parsed variables in one pass.<

I see... I think I misinterpreted the documentation ("Each %nn parsed field (%00-%99) can only be defined once per run with PARSE...") I took the word "run" to mean that the parsed variables could not be reused within a single execution of ICETOOL.

But if I understand correctly, we can reuse the variables in different ICETOOL operators within the same ICETOOL execution. I.e., we could have multiple COPY operators and use IFTHEN to parse only a subset of the record types in each COPY. As long as we don't exceed 100 variables in each operator, DFSORT will be happy, and we can MOD the parsed output records together into a single output dataset. Generally speaking, does that concept work?

David
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: Fri Feb 12, 2010 6:19 am
Reply with quote

Quote:
But if I understand correctly, we can reuse the variables in different ICETOOL operators within the same ICETOOL execution. I.e., we could have multiple COPY operators and use IFTHEN to parse only a subset of the record types in each COPY. As long as we don't exceed 100 variables in each operator, DFSORT will be happy, and we can MOD the parsed output records together into a single output dataset. Generally speaking, does that concept work?


Yes, that's correct. You can use up to 100 %nn variables for each operator.
Back to top
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Sat Feb 13, 2010 12:10 am
Reply with quote

Great, Frank. Thanks for the info.

Have a great holiday weekend,

David
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
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
No new posts IMS Message : DFS3577A IMS DB/DC 4
No new posts dsnrexx fails without error message CLIST & REXX 9
No new posts JCL with variables JCL & VSAM 1
No new posts JCL Variables JCL & VSAM 1
Search our Forums:

Back to Top