Whenever you use = for m, you must ensure that the previous length is the one you want. In particular, if you insert a new field symbol with the wrong length before a symbol that uses = for m, you will need to change = to the actual length you want.
Using the Keyword POSITION you just set the position but not its length. _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Sep 16, 2011 12:43 pm Post subject:
Quote:
I have a need to redefine TRANSDAT to test if it contains blanks.
You don't need to redefine it. You can use:
Code:
INCLUDE COND=(TRANSDAT,CH,EQ,C' ')
to do what you want. DFSORT will transform it to:
Code:
INCLUDE COND=(1,5,CH,EQ,C' ')
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Kolusu, thanks for the reply. Unfortunately, I find this rule confusing and does not see the point of being able to use "=" for m after a POSITION statement.
Thanks Frank Yaeger, it solved my current problem.
the last length is 6.
afterwards, you add a POSITION statement, and I repeat what Kolusu said:
Using the Keyword POSITION you just set the position but not its length.
easy rule to remember. POSITION sets POSITION, but not m.
Had the statement prior to the POSITION an m of 5, you could have gotten away with it.
but all you would have to do is insert another statement before the POSITION and you run the risk of a bad m, again. _________________ Dick Brenholtz
American living in Varel, Germany
Perhaps the bigest challange on these "boards" is language. Quite often people post something with good intentions, but the wording causes rather negative reactions. _________________ All the best,
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Sep 19, 2011 12:04 pm Post subject:
Quote:
I find this rule confusing and does not see the point of being able to use "=" for m after a POSITION statement.
Although using "=" for m after POSITION,name is allowed, it is NOT the purpose for "=" for m. "=" for m has other purposes. For example, if you had a group of volsers, you could use "=" for m like this:
Code:
VOLSER1,21,6,CH
VOLSER2,*,=,=
VOLSER3,*,=,=
POSITION,name is like ORG in Assembler. It lets you reuse an area in a different way. From the DFSORT book:
As an example of how POSITION,symbol can be used, if you specify the following SYMNAMES statements:
Code:
Workarea,21,100 Use workarea for volsers
volser1,=,6,CH
volser2,*,6,CH
POSITION,Workarea Reuse workarea for status and dsname
status,=,1,BI
dsname,*,44,CH
As I said in my previous post there is no need to redefine a field with the same position and length as another just to change the format so "=" for m isn't needed for that purpose. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Thanks for clarifying that it is not the purpose that you should use the "=" in that case.
I try to use symnames wherever possible to avoid hard coding. If I could make a wish for future versions would be that it was possible to use symnames everywhere.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Sep 20, 2011 11:59 am Post subject:
Quote:
If I could make a wish for future versions would be that it was possible to use symnames everywhere.
I'm glad you like DFSORT symbols. Where exactly do you want to use symbols that you can't? _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 21, 2011 12:14 pm Post subject:
Thanks for the clarification. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
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