IBM Mainframe Discussion List <[email protected]> wrote on 11/04/2007 03:30:30 AM: > I have a DFSORT question regarding symbol definitions in SYMNAMES. I did > check the manual, and I don't think that what I want to do is possible, but > here goes... > > I have the following symbol defined in a sort record: > > LAST_NAME,1,20,CH > > I'm using that symbol to BUILD that field into two different sort > record formats > (A and B). The field appears in different columns in records A and > B. So I have > these symbols defined: > > A_LAST_NAME,*,20,CH > > and > > B_LAST_NAME,*,20,CH > > I can't use the equals sign to denote "use the previous length" > within records > A and B. What I'm wondering is if there's a way I can assign a length to a > symbol (for example), and then use that symbol as a constant length > throughout SYMNAMES. I actually did try that, but it failed. It > appears that I > have no choice but to replicate the constant length of "20" for every > occurrence of the "last name" (assuming that I never want it truncated) in > every record that it appears. > > Am I missing something? Thanks so much.
You can't specify something like: LLEN,20 A_LAST_NAME,*,LLEN,CH if that's what you're asking. Obviously, coding 20 in each LAST_NAME symbol rather than LLEN is not the problem since in either case you have to code something. If the idea is to be able to change the length easily in every LAST_NAME symbol, how about doing some processing on the SYMNAMES statements instead. For example, if your SYMNAMES data set has: * Record A A_SYM1,5,CH A_LAST_NAME,*,20,CH * Record B B_SYM1,15,5,CH B_LAST_NAME,*,20,CH * Record C C_SYM1,25,5,CH C_LAST_NAME,*,20,CH and you want to change 20 to 30 in every LAST_NAME symbol, you can use a DFSORT job like this or some appropriate variation of it: //CHG EXEC PGM=ICEMAN //SYSOUT DD SYSOUT=* //SORTIN DD DSN=... SYMNAMES data set //SORTOUT DD DSN=&&S1,UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(,PASS) //SYSIN DD * OPTION COPY INREC IFTHEN=(WHEN=(3,9,CH,EQ,C'LAST_NAME'),OVERLAY=(15:C'30')) /* //S1 EXEC PGM=ICEMAN //SYMNAMES DD DSN=&&S1,DISP=(OLD,PASS) ... If that doesn't help, then please explain the "problem" you're trying to solve in more detail with an example. Frank Yaeger - DFSORT Development Team (IBM) - [EMAIL PROTECTED] Specialties: PARSE, JFY, SQZ, ICETOOL, IFTHEN, OVERLAY, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/ ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

