Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Looking for a Frank Yaeger article

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Charles Wolters

New User


Joined: 30 Mar 2011
Posts: 48
Location: United States

PostPosted: Tue Jan 12, 2016 11:39 pm    Post subject: Looking for a Frank Yaeger article
Reply with quote

Does anyone have a copy of Frank Yaeger's article: DFSORT: Parsing Delimited & Variable Length Fields? I think it was originally published in z/Journal in 2007 but its URL appears defunct. I did find a reprint at the following Web site but the figures cited by Frank are missing and it would be more informative with the figures. The article is very well written for a parsing newbie like myself.

http://enterprisesystemsmedia.com/article/dfsort-parsing-delimited-variable-length-fields

Charles Wolters
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jan 13, 2016 1:09 am    Post subject: Reply to: Looking for a Frank Yaeger article
Reply with quote

Did you search the IBM Mainframes DFSORT forum, for Frank Yeager/Yaeger posts? Could very well be that he posted it there as well.

HTH....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Wed Jan 13, 2016 1:37 am    Post subject:
Reply with quote

Google found it for me at http://enterprisesystemsmedia.com/article/dfsort-parsing-delimited-variable-length-fields#sr=g&m=o&cp=or&ct=-tmc&st=%28opu%20qspwjefe%29&ts=1452629152
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jan 13, 2016 1:41 am    Post subject: Reply to: Looking for a Frank Yaeger article
Reply with quote

Except that's the same link which Charles provided :-)
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jan 13, 2016 5:55 pm    Post subject: Reply to: Looking for a Frank Yaeger article
Reply with quote

I've rebuilt the examples from the text. Note that there are "scannos" in the text as well (failure of the Optical Character Recognition after text is scanned).

Figure 1

Code:
  OPTION COPY
  INREC PARSE=(%00=(ENDBEFR=C',',
                    FIXLEN=8),
               %01=(ENDBEFR=C',',
                    PAIR=QUOTE,
                    FIXLEN=25),
               %02=(FIXLEN=7)),
        BUILD=(%00,
               %01,
                JFY=(SHIFT=LEFT,PREBLANK=C'"'),
               %02)


Data:
Code:
APRIL,"REX,SELF,DUMBO",GRAY


Output:
Code:
APRIL   REX,SELF,DUMBO           GRAY



Figure 2

Code:
  INREC PARSE=(%00=(ABSPOS=6,
                    ENDBEFR=C';',
                    FIXLEN=7),
               %=(ENDBEFR=C';'),
               %01=(ENDBEFR=C';',
                    FIXLEN=12),
               %02=(FIXLEN=12)),
        OVERLAY=(41:
                  %02,
                 55:
                  %01,
                 70:
                  %00,
                   UFF,TO=PD,LENGTH=4)
                                     
  SORT FIELDS=(41,12,CH,A,
               55,12,CH,A,
               70,4,CH,A)
                                     
  OUTREC BUILD=(1,40)


Data:
Code:
0001;16,786;R732;SUE V;RITZ
0002;20;SALES;RUPERT THE;BEAR
0003;10.01;R732;SUE V;RITZ


Output:
Code:
0002;20;SALES;RUPERT THE;BEAR
0003;10.01;R732;SUE V;RITZ   
0001;16,786;R732;SUE V;RITZ 



Figure 3

Code:
  INREC IFTHEN=(WHEN=INIT,
                 PARSE=(%1=(STARTAFT=C'FIRST=',
                            ENDBEFR=C' ',FIXLEN=8))),
        IFTHEN=(WHEN=INIT,
                 PARSE=(%2=(STARTAFT=C'MIDDLE=',
                            ENDBEFR=C' ',FIXLEN=12))),
        IFTHEN=(WHEN=INIT,
                 PARSE=(%3=(STARTAFT=C'LAST=',
                            ENDBEFR=C' ',FIXLEN=12))),
        IFTHEN=(WHEN=INIT,
                 PARSE=(%4=(STARTAFT=C'PROFIT=',
                            STARTAFT=C'LOSS=',
                            ENDBEFR=C' ',FIXLEN=7))),
        IFTHEN=(WHEN=INIT,
                 BUILD=(%01,
                        %02,
                        %03,
                        %04,
                          SFF,
                          EDIT=(IIT.TTS),
                          SIGNS=(,,+,-)))
  SORT FIELDS=COPY


Data:
Code:
MIDDLE=JEFFERSON FIRST=GEORGE LAST=WASHINGTON LOSS=152.03-
 FIRST=SPACE                               LAST=SHIP


Output:
Code:
GEORGE  JEFFERSON   WASHINGTON  152.03-
SPACE               SHIP          0.00+


The article is indeed very good, as it shows some powerful use of PARSE, and trickier to follow without the examples.

I've included a link to this in the comments part of the article.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jan 13, 2016 9:36 pm    Post subject: Reply to: Looking for a Frank Yaeger article
Reply with quote

There is a way to use ABSPOS=1, discussed by Frank Yaeger in the article, for the final example, so that the PARSE can be done only once:

Code:
  INREC IFTHEN=(WHEN=INIT,
                      OVERLAY=(81:
                                C' FIRST= ',
                                C' LAST= ',
                                C' MIDDLE= ',
                                C' PROFIT= ',
                                C' LOSS= ')),
        IFTHEN=(WHEN=INIT,
                 PARSE=(%1=(STARTAFT=C'FIRST=',
                            ABSPOS=1,
                            ENDBEFR=C' ',FIXLEN=8),
                        %2=(STARTAFT=C'MIDDLE=',
                            ABSPOS=1,
                            ENDBEFR=C' ',FIXLEN=12),
                        %3=(STARTAFT=C'LAST=',
                            ABSPOS=1,
                            ENDBEFR=C' ',FIXLEN=12),
                        %4=(STARTAFT=C'PROFIT=',
                            ABSPOS=1,
                            STARTAFT=C'LOSS=',
                            ENDBEFR=C' ',FIXLEN=7))),
        IFTHEN=(WHEN=INIT,
                 BUILD=(%01,
                        %02,
                        %03,
                        %04,
                          SFF,
                          EDIT=(IIT.TTS),
                          SIGNS=(,,+,-)))
 SORT FIELDS=COPY


The code ensures that a parameter will always be found, even if not existing in the source data, by adding all the valid parameters to the end of each record.

In itself, not especially useful, but it is a very convenient way to set default values for keyword-field parsing.

Code:
  INREC IFTHEN=(WHEN=INIT,
                      OVERLAY=(81:
                                C' FIRST=JOE ',
                                C' LAST=BLOGS ',
                                C' MIDDLE=X ',
                                C' PROFIT=+30.00 ',
                                C' LOSS= ')),
        IFTHEN=(WHEN=INIT,
                 PARSE=(%1=(STARTAFT=C'FIRST=',
                            ABSPOS=1,
                            ENDBEFR=C' ',FIXLEN=8),
                        %2=(STARTAFT=C'MIDDLE=',
                            ABSPOS=1,
                            ENDBEFR=C' ',FIXLEN=12),
                        %3=(STARTAFT=C'LAST=',
                            ABSPOS=1,
                            ENDBEFR=C' ',FIXLEN=12),
                        %4=(STARTAFT=C'PROFIT=',
                            ABSPOS=1,
                            STARTAFT=C'LOSS=',
                            ENDBEFR=C' ',FIXLEN=7))),
        IFTHEN=(WHEN=INIT,
                 BUILD=(%01,
                        %02,
                        %03,
                        %04,
                          SFF,
                          EDIT=(IIT.TTS),
                          SIGNS=(,,+,-)))
 SORT FIELDS=COPY


The actual example doesn't lend itself to defaults as such, but serves. Here is the output from a blank line of input:

Code:
JOE     X           BLOGS        30.00+


It's also a good example for the use of DFSORT symbols/SYMNAMES...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Any news on Frank Yaeger ? rakesha.hg General Talk & Fun Stuff 5 Tue Dec 11, 2012 5:58 pm
No new posts Article: Will there be a jobless reco... Bill O'Boyle General Talk & Fun Stuff 1 Wed Jan 05, 2011 12:24 am
No new posts Documentation disagreements - one for... Captain Paralytic DFSORT/ICETOOL 7 Wed Sep 15, 2010 4:15 pm
No new posts I wonder what Frank has to say on this Anuj Dhawan General Talk & Fun Stuff 4 Mon Aug 09, 2010 7:42 pm
No new posts DFSORT article in z/Journal (Oct/Nov) Frank Yaeger DFSORT/ICETOOL 4 Wed Nov 21, 2007 3:28 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us