Re: DFSORT PARSE question
>What's wrong with Popeye "The Sailor" Man? :-) :-) I yam what I yam, and that's all that I yam! I'm Popeye The Sailor Man! I yam strong to the finache! 'Cause I eats my spanache! I'm Popeye The Sailor Man! Toot! Toot! (Child of the '60's -- too much TV) Sorry for the continuation of an O/T; I couldn't resist! - Too busy driving to stop for gas! -- 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
Re: DFSORT PARSE question
What's wrong with Popeye "The Sailor" Man? :-) :-) Martin Packer Performance Consultant IBM United Kingdom Ltd +44-20-8832-5167 +44-7802-245-584 [EMAIL PROTECTED] Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU -- 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
Re: DFSORT PARSE question
2008/10/29 Chase, John <[EMAIL PROTECTED]>: > OK, that's fine for the specific cases. Now generalize it so: > > "Ludwig Van Beethoven" => "Beethoven" > "Henry Ford"=> "Ford" > "Harvey L. Cliburn" => "Cliburn" > "Viktor Korchnoi" => "Korchnoi" > "Elmer Fudd"=> "Fudd" > "Popeye the Sailor Man" => "Man" > "Robert James Fischer" => "Fischer" > "Wm. J. Clinton"=> "Clinton" > Etc. "Mao Zedong"=> "Mao" "Mao Tse Tung" => "Mao" "John Junior" => "Junior" "John S. Junior"=> "Junior" "John Smith Junior" => "Smith" "John Smith Esquire"=> "Smith" "John Smith III"=> "Smith" Tony H. -- 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
Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
Frank, I also "Speak RACF" and might be able to help. Feel free to contact me offlist, if you feel it appropriate. Been through a similar exercise with dataset profiles. Frank Yaeger wrote: John Chase wrote on 10/29/2008 05:38:15 AM: From an IRRDBU00 unload, I have need to list each individual user ID with access granted to each individual CICS transaction in the GCICSTRN class. We use the "grouping profile" to define the CICS transactions to RACF, wherein each "grouping profile" contains one or more transactions as "members". We also strive to grant access to user groups, wherein each user group has one or more user IDs "connected" to it. Thus: ... Can it be done with ICETOOL "out of the box"? I'm beginning to think it cannot. I don't speak RACF so I'm having a difficult time understanding the "rules"> for getting from input to output. Going through the output records: I see that OE01 is associated with ORDENTRY, the Access List has ORDENTRY associated with ORDTAKER, and ORDTAKER is associated with Andy. But that same set of associations doesn't seem to work for OE01/ANDY/SHIPPER. I might be able to figure out how to do what you want with DFSORT's ICETOOL, but first I'd need to understand what you want to do. Please explain the "rules" for getting from input to output to me in terms of your input and output record example. Offline would probably be best ([EMAIL PROTECTED])., Frank Yaeger - DFSORT Development Team (IBM) - [EMAIL PROTECTED] Specialties: FINDREP, WHEN=GROUP, DATASORT, ICETOOL, 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 -- 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
Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
John Chase wrote on 10/29/2008 05:38:15 AM: > From an IRRDBU00 unload, I have need to list each individual user ID > with access granted to each individual CICS transaction in the GCICSTRN > class. We use the "grouping profile" to define the CICS transactions to > RACF, wherein each "grouping profile" contains one or more transactions > as "members". We also strive to grant access to user groups, wherein > each user group has one or more user IDs "connected" to it. Thus: > > ... > > Can it be done with ICETOOL "out of the box"? I'm beginning to think it > cannot. I don't speak RACF so I'm having a difficult time understanding the "rules"> for getting from input to output. Going through the output records: I see that OE01 is associated with ORDENTRY, the Access List has ORDENTRY associated with ORDTAKER, and ORDTAKER is associated with Andy. But that same set of associations doesn't seem to work for OE01/ANDY/SHIPPER. I might be able to figure out how to do what you want with DFSORT's ICETOOL, but first I'd need to understand what you want to do. Please explain the "rules" for getting from input to output to me in terms of your input and output record example. Offline would probably be best ([EMAIL PROTECTED])., Frank Yaeger - DFSORT Development Team (IBM) - [EMAIL PROTECTED] Specialties: FINDREP, WHEN=GROUP, DATASORT, ICETOOL, 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
Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
> -Original Message- > From: IBM Mainframe Discussion List On Behalf Of John McKown > > On Wed, 29 Oct 2008 08:38:13 -0500, Chase, John wrote: > > [ snip ] > > > >I'll probably have to write an ad-hoc program to do the final > >"splicing". If so, that would give me a "self-teaching" exercise in > >Java programming. :-) > > Could be. I think we're both "pushing the envelope". I'm basically trying to > emulate doing a PROC SQL which does a JOIN operation on three tables. Not a > pretty sight! I think what I'm after is analogous to RACLIST processing, but without the final resolution to "single highest access". -jc- -- 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
Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
On Wed, 29 Oct 2008 08:38:13 -0500, Chase, John <[EMAIL PROTECTED]> wrote: >> -Original Message- >> From: IBM Mainframe Discussion List On Behalf Of John McKown >> Sent: Wednesday, October 29, 2008 7:51 AM >> To: IBM-MAIN@BAMA.UA.EDU >> Subject: Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE >> question) >> >> John, >> >> I am also really splicing three record types together. The 0200 (base >USER >> records), 0220 (TSO segment), and 0230 (CICS segment). The way that I >did it >> was to >> >> 1) run plain SORT to split the 0200, 0220, and 0230 records into >separate >> temporary datasets. >> >> 2) SPLICE the 0200 and 0220 records together into another temporary >> dataset. >> >> 3) SPLICE the temp DSN in #2 with the 0230 records. > >I think I've already tried most variations on that theme. What it seems >to boil down to is that, no matter how I "slice" it, I end up with >multiple "base" records that will require the same "overlays". ICETOOL >seems to only "go forward" with both the "base" and "overlay" records. > >I'll probably have to write an ad-hoc program to do the final >"splicing". If so, that would give me a "self-teaching" exercise in >Java programming. :-) > >-jc- Could be. I think we're both "pushing the envelope". I'm basically trying to emulate doing a PROC SQL which does a JOIN operation on three tables. Not a pretty sight! It they don't watch out, I do something really NASTY by using my Linux desktop in a z/OS batch job. I already have a PostgreSQL database set up to hold the RACF IRRDBU00 data, a PERL program to load it, and various PSQL scripts to generate reports. I can use the Dovetailed Technologies Co:Z product to have my z/OS job run those scripts "in line" from my z/OS job, returning the information to z/OS as "sysout" in the invoking step. Nice product! And free-as-in-beer! I am about to propose that we do something like this, but using SAS on a Linux/Intel server. Just so that we are "supported". -- John -- John -- 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
Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
> -Original Message- > From: IBM Mainframe Discussion List On Behalf Of John McKown > Sent: Wednesday, October 29, 2008 7:51 AM > To: IBM-MAIN@BAMA.UA.EDU > Subject: Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE > question) > > John, > > I am also really splicing three record types together. The 0200 (base USER > records), 0220 (TSO segment), and 0230 (CICS segment). The way that I did it > was to > > 1) run plain SORT to split the 0200, 0220, and 0230 records into separate > temporary datasets. > > 2) SPLICE the 0200 and 0220 records together into another temporary > dataset. > > 3) SPLICE the temp DSN in #2 with the 0230 records. I think I've already tried most variations on that theme. What it seems to boil down to is that, no matter how I "slice" it, I end up with multiple "base" records that will require the same "overlays". ICETOOL seems to only "go forward" with both the "base" and "overlay" records. I'll probably have to write an ad-hoc program to do the final "splicing". If so, that would give me a "self-teaching" exercise in Java programming. :-) -jc- -- 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
Re: DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
John, I am also really splicing three record types together. The 0200 (base USER records), 0220 (TSO segment), and 0230 (CICS segment). The way that I did it was to 1) run plain SORT to split the 0200, 0220, and 0230 records into separate temporary datasets. 2) SPLICE the 0200 and 0220 records together into another temporary dataset. 3) SPLICE the temp DSN in #2 with the 0230 records. //STEP0003 EXEC PGM=SORT //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTIN DD DSN=TSHPN.RACF.FLATFILE,DISP=SHR //SORTOUT DD DSN=&&JUNK,LIKE=TSHPN.RACF.FLATFILE, // DISP=(NEW,PASS) //TYPE200 DD DSN=&&TYPE200,LIKE=TSHPN.RACF.FLATFILE, // DISP=(NEW,PASS) //TYPE220 DD DSN=&&TYPE220,LIKE=TSHPN.RACF.FLATFILE, // DISP=(NEW,PASS) //TYPE230 DD DSN=&&TYPE230,LIKE=TSHPN.RACF.FLATFILE, // DISP=(NEW,PASS) //SYSINDD * OPTION VLSHRT SORT FIELDS=(COPY) INCLUDE COND=(10,3,CH,GE,C'AAA',AND, 10,3,CH,LE,C'ZZZ',AND, 13,1,CH,GE,C'0',AND, 13,1,CH,LE,C'9',AND, 14,1,CH,GE,C'0',AND, 14,1,CH,LE,C'9',AND, 15,1,CH,GE,C'0',AND, 15,1,CH,LE,C'9',AND, 10,3,CH,NE,C'IBM',AND, 10,3,CH,NE,C'MIB',AND, 10,2,CH,NE,C'TS',AND, 16,1,CH,EQ,C' ') INREC IFTHEN=(WHEN=(5,4,CH,EQ,C'0200',AND, 109,8,CH,EQ,C''), OVERLAY=(118:C' ')) OUTFIL FNAMES=TYPE200,INCLUDE=(5,4,CH,EQ,C'0200'), BUILD=(1,4,5,4,10,8,19,10,44,1,49,1,54,1, 79,20,100,8,109,8,118,10,385,1,390,1, 395,1,400,1,C'|',28C'\') OUTFIL FNAMES=TYPE220,INCLUDE=(5,4,CH,EQ,C'0220'), BUILD=(1,4,5,4,10,8,18:63C'*',19,7,154,8,209,8,C'|') OUTFIL FNAMES=TYPE230,INCLUDE=(5,4,CH,EQ,C'0230'), BUILD=(1,4,5,4,10,8,18:87C'#',19,3,C'|') /* //STEP0006 EXEC PGM=ICETOOL //TYPE200 DD DSN=&&TYPE200,DISP=(OLD,PASS) // DD DSN=&&TYPE220,DISP=(OLD,PASS) //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=X, // HOLD=YES //TOOLMSG DD SYSOUT=X, // HOLD=YES //DFSMSG DD SYSOUT=X, // HOLD=YES //SYSINDD DUMMY //TOOLIN DD * SPLICE FROM(TYPE200) - TO(OUTPUT1) - ON(8,8,CH) - USING(SPL1) - KEEPNODUPS - WITH(81,24) - VLENMAX SPLICE FROM(TYPE230) - TO(OUTPUT2) - ON(8,8,CH) - KEEPNODUPS - USING(SPL1) - WITH(105,4) - VLENMAX //* //SPL1CNTL DD * OPTION VLSHRT SORT FIELDS=(8,8,CH,A,5,4,CH,A) //SPL2CNTL DD * OPTION VLSHRT SORT FIELDS=(8,8,CH,A,5,4,CH,A) //OUTPUT1 DD DSN=TSHPN.RACF.OUTPUT1, // DISP=(NEW,CATLG,DELETE), // RECFM=VB,LRECL=6000,BLKSIZE=0,DSORG=PS, // SPACE=(CYL,(200,100),RLSE), // UNIT=(SYSDA,10) //TYPE230 DD DSN=&&TYPE230,DISP=(OLD,PASS) // DD DISP=(OLD,PASS),DSN=*.OUTPUT1,VOL=REF=*.OUTPUT1 //OUTPUT2 DD DSN=TSHPN.RACF.OUTPUT2, // DISP=(NEW,CATLG,DELETE), // RECFM=VB,LRECL=6000,BLKSIZE=0,DSORG=PS, // SPACE=(CYL,(200,100),RLSE), // UNIT=(SYSDA,10) -- John -- 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
DFSORT/ICETOOL SPLICE question (was RE: DFSORT PARSE question)
Piggybacking on John M.'s question: >From an IRRDBU00 unload, I have need to list each individual user ID with access granted to each individual CICS transaction in the GCICSTRN class. We use the "grouping profile" to define the CICS transactions to RACF, wherein each "grouping profile" contains one or more transactions as "members". We also strive to grant access to user groups, wherein each user group has one or more user IDs "connected" to it. Thus: User group User ID (From "0102" records) -- --- ORDTAKERANDY ORDTAKERBEVERLY ORDTAKERCHUCK SHIPPER ANDY SHIPPER DALE SHIPPER FRANK PACKER DALE PACKER FRANK PACKER GEORGE PACKER HANK Tran Group Tran ID (From "0503" records) -- --- ORDENTRYOE01 ORDENTRYOE02 ORDENTRYOE10 PACKING PA01 PACKING PA03 LABELINGLB02 INVENTORY IN01 INVENTORY IN05 INVENTORY IN10 BILLING BIL1 BILLING BIL2 Access Lists: ResourceAccessor(From "0505" records) ORDENTRYORDTAKER ORDENTRYPACKER PACKING PACKER PACKING SHIPPER LABELINGPACKER LABELINGSHIPPER INVENTORY ORDTAKER INVENTORY PACKER INVENTORY SHIPPER BILLING ORDTAKER Desired result: Tran ID User ID User group --- --- -- OE01ANDYORDTAKER OE01ANDYSHIPPER OE01BEVERLY ORDTAKER OE01CHUCK ORDTAKER OE02ANDYORDTAKER OE02ANDYSHIPPER OE02BEVERLY ORDTAKER OE02CHUCK ORDTAKER And so on. Note that each user ID can be "connected" to more than one user group, and (despite best efforts to avoid it) a single transaction ID can be a "member" of more than one "grouping profile". Also, I can already format the various records as needed for splicing. So far I've been able to list EITHER all occurrences of an individual transaction with the user groups in the access lists, OR each individual user ID with the "grouping profiles" to which they have been granted access, but haven't found a way to "take the final step" to match individual user IDs with individual transaction IDs. Can it be done with ICETOOL "out of the box"? I'm beginning to think it cannot. TIA, -jc- -- 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
Re: DFSORT PARSE question
> -Original Message- > From: IBM Mainframe Discussion List On Behalf Of Elardus Engelbrecht > > John McKown wrote: > > >I have a field in a record which is a person's name. It is rather "free format" > and may contain one or more "names", separated by one or more blanks. By > our definition, the person's "last name" is the last non-blank series of > characters in this field. The field is a max of 20 characters (it is > the "Programmer Name Field" in RACF). > > >So for "John McKown", I want "McKown". For "William S. Story", I want > "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF > reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this > one seems to be killing me. > > Why suffer to death? Just use SS. > This excerpt from ICETOOLS will get you starting: > >SORT FIELDS=(10,8,CH,A) >INCLUDE COND=(5,4,CH,EQ,C'0200',AND, >(79,20,SS,EQ,C'BURP',OR, > 79,20,SS,EQ,C'STORY')) > > You will get all 0200 records with BURP or STORY somewhere within that > field. > > USER IDUSER NAME > > 11 I BURP REAL BIG > 22 LITTLE STORY > 33 BORED LAZY BURP > 44 STORY LAND OK, that's fine for the specific cases. Now generalize it so: "Ludwig Van Beethoven" => "Beethoven" "Henry Ford"=> "Ford" "Harvey L. Cliburn" => "Cliburn" "Viktor Korchnoi" => "Korchnoi" "Elmer Fudd"=> "Fudd" "Popeye the Sailor Man" => "Man" "Robert James Fischer" => "Fischer" "Wm. J. Clinton"=> "Clinton" Etc. -jc- -- 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
Re: DFSORT PARSE question
On Tue, 28 Oct 2008, Rick Fochtman wrote: > Be very careful about that kind of generalization. I could be "Mr. R. A. > Fochtman Jr." to be perfectly correct. Then what??? > Well, it is what they would be getting now, so I don't care. I'm not going to kill myself trying to make this thing perfect. I'm P.O.'ed enough about having to convert all my SAS reports to other languages as it is. And it will "not look the same" either. Too bad. I'm not going to try to make DFSORT output look identical to PROC SQL output. Mr. Merrill has suggested getting a Linux/Intel version of SAS and porting the mainframe reports to use that. I do know a way, using Co:Z, to have those same reports run on Linux/Intel with the output appearing in my z/OS job. So that may be a possibility. I'm going to mention it in staff meeting. I'd guess the chances are about a 1000 to 1 against it. (I would say a million to one, but wizards at the Unseen University in Anhk-Morpork have calculated that million to one chances occur 9 times out of 10.) -- Q: What do theoretical physicists drink beer from? A: Ein Stein. Maranatha! John McKown -- 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
Re: DFSORT PARSE question
Be very careful about that kind of generalization. I could be "Mr. R. A. Fochtman Jr." to be perfectly correct. Then what??? Schwarz, Barry A wrote: If you assume a maximum number nn of "tokens" in a name (your worst sample had 4), you could parse %01, %02, ..., %nn. For names with less tokens than the max, the empty parsed fields will be set to blank. You could then test these in an IF-THEN-WHEN set in reverse order using only the last one that is not blank. Something along the lines of IF %04 not blank BUILD with %04 ELSE IF %03 not blank BUILD with %03 etc. Or you could wait for Frank to chime in with a simpler solution. -Original Message- From: John McKown Sent: Tuesday, October 28, 2008 11:39 AM To: IBM-MAIN@BAMA.UA.EDU Subject: DFSORT PARSE question I don't see a way to do this, but I'll ask. I have a field in a record which is a person's name. It is rather "free format" and may contain one or more "names", separated by one or more blanks. By our definition, the person's "last name" is the last non-blank series of characters in this field. The field is a max of 20 characters (it is the "Programmer Name Field" in RACF). So for "John McKown", I want "McKown". For "William S. Story", I want "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one seems to be killing me. -- 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 -- 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
DFSORT PARSE question
John, I don't have a solution for you (Other than, of course, how easy this would be to do in COBOL If you need a SORT and a report, COBOL internal SORT with Report Writer would do this for you easily), but ... Are you certain you don't have any John Smith, Jr or Mary Brown, III type entries in your input? "John McKown" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > I don't see a way to do this, but I'll ask. I have a field in a record which > is a person's name. It is rather "free format" and may contain one or more > "names", separated by one or more blanks. By our definition, the person's > "last name" is the last non-blank series of characters in this field. The > field is a max of 20 characters (it is the "Programmer Name Field" in RACF). > So for "John McKown", I want "McKown". For "William S. Story", I want > "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF > reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one > seems to be killing me. > > Any ideas? > > -- > John > > -- > 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 > -- 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
Re: DFSORT PARSE question
On Tue, 28 Oct 2008 12:33:00 -0700, Frank Yaeger <[EMAIL PROTECTED]> wrote: >/* >//SORTOUT DD SYSOUT=* >//SYSINDD* > OPTION COPY > INREC IFOUTLEN=20, > IFTHEN=(WHEN=INIT, >PARSE=(%01=(ABSPOS=15,STARTAT=NONBLANK,FIXLEN=20,ENDBEFR=BLANKS), >%02=(FIXLEN=20,ENDBEFR=BLANKS), >%03=(FIXLEN=20,ENDBEFR=BLANKS), >%04=(FIXLEN=20,ENDBEFR=BLANKS), >%05=(FIXLEN=20)), >BUILD=(%01,21:%02,41:%03,61:%04,81:%05)), > IFTHEN=(WHEN=(81,1,CH,NE,C' '),BUILD=(81,20)), > IFTHEN=(WHEN=(61,1,CH,NE,C' '),BUILD=(61,20)), > IFTHEN=(WHEN=(41,1,CH,NE,C' '),BUILD=(41,20)), > IFTHEN=(WHEN=(21,1,CH,NE,C' '),BUILD=(21,20)), > IFTHEN=(WHEN=(1,1,CH,NE,C' '),BUILD=(1,20, >/* > AAA! My brain just melted! Thanks very much. This looks to be what I needed to get a report sorted by "last name". -- John -- 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
Re: DFSORT PARSE question
If you assume a maximum number nn of "tokens" in a name (your worst sample had 4), you could parse %01, %02, ..., %nn. For names with less tokens than the max, the empty parsed fields will be set to blank. You could then test these in an IF-THEN-WHEN set in reverse order using only the last one that is not blank. Something along the lines of IF %04 not blank BUILD with %04 ELSE IF %03 not blank BUILD with %03 etc. Or you could wait for Frank to chime in with a simpler solution. -Original Message- From: John McKown Sent: Tuesday, October 28, 2008 11:39 AM To: IBM-MAIN@BAMA.UA.EDU Subject: DFSORT PARSE question I don't see a way to do this, but I'll ask. I have a field in a record which is a person's name. It is rather "free format" and may contain one or more "names", separated by one or more blanks. By our definition, the person's "last name" is the last non-blank series of characters in this field. The field is a max of 20 characters (it is the "Programmer Name Field" in RACF). So for "John McKown", I want "McKown". For "William S. Story", I want "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one seems to be killing me. -- 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
Re: DFSORT PARSE question
John McKown wrote on 10/28/2008 11:39:07 AM: > I don't see a way to do this, but I'll ask. I have a field in a record which > is a person's name. It is rather "free format" and may contain one or more > "names", separated by one or more blanks. By our definition, the person's > "last name" is the last non-blank series of characters in this field. The > field is a max of 20 characters (it is the "Programmer Name Field" in RACF). > So for "John McKown", I want "McKown". For "William S. Story", I want > "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF > reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one > seems to be killing me. > > Any ideas? You can PARSE the individual "names" into %nn variables and then use IFTHEN, clauses to keep the last %nn variable that's nonblank as in the DFSORT job below. I assumed that you just have one 20-byte field, the extracted name can be the maximum of 20 characters, and there can be a maximum of 5 subnames. The job can be changed appropriately for other situations. Note that if the field of interest is in the middle of other fields, we'd need to extract it after the end of the record and operate on it there (using ABSPOS=p in the first IFTHEN clause). If you want more specific help, give me a good example of the input records and the expected output records. //S1EXEC PGM=ICEMAN //SYSOUTDD SYSOUT=* //SORTIN DD * John McKown William S. Story A. B. D. Burp Marilyn Monroe F R A N Kroger Abby One-very-long-name-- /* //SORTOUT DD SYSOUT=* //SYSINDD* OPTION COPY INREC IFOUTLEN=20, IFTHEN=(WHEN=INIT, PARSE=(%01=(ABSPOS=15,STARTAT=NONBLANK,FIXLEN=20,ENDBEFR=BLANKS), %02=(FIXLEN=20,ENDBEFR=BLANKS), %03=(FIXLEN=20,ENDBEFR=BLANKS), %04=(FIXLEN=20,ENDBEFR=BLANKS), %05=(FIXLEN=20)), BUILD=(%01,21:%02,41:%03,61:%04,81:%05)), IFTHEN=(WHEN=(81,1,CH,NE,C' '),BUILD=(81,20)), IFTHEN=(WHEN=(61,1,CH,NE,C' '),BUILD=(61,20)), IFTHEN=(WHEN=(41,1,CH,NE,C' '),BUILD=(41,20)), IFTHEN=(WHEN=(21,1,CH,NE,C' '),BUILD=(21,20)), IFTHEN=(WHEN=(1,1,CH,NE,C' '),BUILD=(1,20, /* SORTOUT would have these records: McKown Story Burp Monroe Kroger Abby One-very-long-name-- Frank Yaeger - DFSORT Development Team (IBM) - [EMAIL PROTECTED] Specialties: FINDREP, WHEN=GROUP, DATASORT, ICETOOL, 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
Re: DFSORT PARSE question
I can't test this, having Brand S sort, but DFSORT IFTHEN, PARSE and BUILD might do this. There's an example in the DFSORT manual about parsing an IP address into 4 3-byte octets. Once could use a smiliar technique and parse the name field into x (how many words could possibly be in the name field) 20-byte fixed-length fields. Then, use separate BUILD statements to only include the xth word if it is non-blank, the (x-1)th word only if it's non-blank and the xth is blank, and so on.. -- 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 --- Begin Message --- I don't see a way to do this, but I'll ask. I have a field in a record which is a person's name. It is rather "free format" and may contain one or more "names", separated by one or more blanks. By our definition, the person's "last name" is the last non-blank series of characters in this field. The field is a max of 20 characters (it is the "Programmer Name Field" in RACF). So for "John McKown", I want "McKown". For "William S. Story", I want "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one seems to be killing me. Any ideas? -- John -- 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 -- 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 >>>>>>>>>>>>>> HDT Original External RFC822 Hdrs Begin <<<<<<<<<<<<<< X-Env-Sender: [EMAIL PROTECTED] X-Env-Recipient: [EMAIL PROTECTED] X-End-of-Envelope: Received: from ??? ([199.120.166.242]) by nccourts.org (FISC HDT v1.3R SMTP gateway for Unix System Services) with SMTP id emailscan.nccourts.org; Tue, 28 Oct 2008 14:53:45 -0400 Received: from emailscan.nccourts.org (emailscan [127.0.0.1]) by localhost.nccourts.org (Postfix) with ESMTP id C83A52AD8324 for <[EMAIL PROTECTED]>; Tue, 28 Oct 2008 14:53:37 -0400 (EDT) Received: from lsvmail.ua.edu (lsvmail.ua.edu [130.160.224.250])by emailscan.nccourts.org (Postfix) with ESMTP id B10E12AD8308for <[EMAIL PROTECTED]>; Tue, 28 Oct 2008 14:53:37 -0400 (EDT) Received: from bama ([130.160.4.114])by lsvmail.ua.edu (L-Soft HDMail 1.1-3); Tue, 28 Oct 2008 13:39:14 -0500 X-VirtualServerGroup: Default Received: by BAMA.UA.EDU (LISTSERV-TCP/IP release 15.0) with spool id 668225 for IBM-MAIN@BAMA.UA.EDU; Tue, 28 Oct 2008 13:39:08 -0500 Received: from mailapp-1.ua.edu ([130.160.4.236]) by bama.ua.edu (8.13.8+Sun/8.13.8) with ESMTP id m9SId8vw010018 for ; Tue, 28 Oct 2008 13:39:08 -0500 (CDT) X-IronPort-AV: E=Sophos;i="4.33,500,1220245200"; d="scan'208";a="2704237" Received: from lsvmail.ua.edu ([130.160.224.250]) by mailapp-1.ua.edu with ESMTP; 28 Oct 2008 13:39:07 -0500 Received: from bama ([130.160.4.114]) by lsvmail.ua.edu (L-Soft HDMail 1.1-3); Tue, 28 Oct 2008 13:39:08 -0500 X-Destination-ID: IBM-MAIN@BAMA.UA.EDU X-MailingID: 0::0::0::0153026 X-SMHeaderMap: mid="X-MailingID" X-SMFBL: SUJNLU1BSU5AQkFNQS5VQS5FRFU= X-Mailer: L-Soft HDMail 1.1-3 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Antivirus: checked in 0.020sec at bama.ua.edu ([130.160.4.114]) by smf-clamdv1.2.1 - http://smfs.sf.net/ X-MIME-Autoconverted: from quoted-printable to 8bit by bama.ua.edu id m9SId8vw010037 Message-ID: <[EMAIL PROTECTED]> Newsgroups: bit.listserv.ibm-main Date: Tue, 28 Oct 2008 13:39:07 -0500 Reply-To: IBM Mainframe Discussion List Sender: IBM Mainframe Discussion List From: John McKown <[EMAIL PROTECTED]> Subject: DFSORT PARSE question To: IBM-MAIN@BAMA.UA.EDU Precedence: list List-Help: <http://bama.ua.edu/cgi-bin/wa?LIST=IBM-MAIN>, <mailto:[EMAIL PROTECTED]> List-Unsubscribe: <mailto:[EMAIL PROTECTED]> List-Subscribe: <mailto:[EMAIL PROTECTED]> List-Owner: <mailto:[EMAIL PROTECTED]> List-Archive: <http://bama.ua.edu/cgi-bin/wa?LIST=IBM-MAIN> X-imss-version: 2.051 X-imss-r
Re: DFSORT PARSE question
John McKown wrote: >I have a field in a record which is a person's name. It is rather "free >format" and may contain one or more "names", separated by one or more blanks. By our definition, the person's "last name" is the last non-blank series of characters in this field. The field is a max of 20 characters (it is the "Programmer Name Field" in RACF). >So for "John McKown", I want "McKown". For "William S. Story", I want "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one seems to be killing me. Why suffer to death? Just use SS. This excerpt from ICETOOLS will get you starting: SORT FIELDS=(10,8,CH,A) INCLUDE COND=(5,4,CH,EQ,C'0200',AND, (79,20,SS,EQ,C'BURP',OR, 79,20,SS,EQ,C'STORY')) You will get all 0200 records with BURP or STORY somewhere within that field. USER IDUSER NAME 11 I BURP REAL BIG 22 LITTLE STORY 33 BORED LAZY BURP 44 STORY LAND HTH! Groete / Greetings Elardus Engelbrecht -- 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
DFSORT PARSE question
I don't see a way to do this, but I'll ask. I have a field in a record which is a person's name. It is rather "free format" and may contain one or more "names", separated by one or more blanks. By our definition, the person's "last name" is the last non-blank series of characters in this field. The field is a max of 20 characters (it is the "Programmer Name Field" in RACF). So for "John McKown", I want "McKown". For "William S. Story", I want "Story". For "A. B. D. Burp", I want "Burp". So far, I've gotten all my RACF reporting from the IRRDBU00 unload done using DFSORT's ICETOOL. But this one seems to be killing me. Any ideas? -- John -- 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