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
 

 

Extended extraction

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

New User


Joined: 24 Jul 2014
Posts: 2
Location: FRANCE

PostPosted: Thu Jul 31, 2014 3:42 pm    Post subject: Extended extraction
Reply with quote

Hello all,

I have a flat ASA file (lrecl=133), who contents :

Code:

1PAGE 01  DOC : 2014                                 
 PAGE 01 LINE 2                                     
 PAGE 01 LINE 3                                     
 PAGE 01 LINE 4                                     
 PAGE 01 LINE 5                                     
 PAGE 01 LINE 6                                     
1PAGE 02
 PAGE 02 LINE 1                                     
 PAGE 02 LINE 2
1PAGE 03  DOC : 2014                                 
 PAGE 03 LINE 1                                     
1PAGE 04  DOC : 2014                                 
 PAGE 04 LINE 2                                     
 PAGE 04 LINE 3                                     
 PAGE 04 LINE 4                                     
1PAGE 05  DOC : 2014                                 
 PAGE 05 LINE 2                                     
1PAGE 06  DOC : 2014                                 
 PAGE 06 LINE 2                                     
1PAGE 07  DOC : 2014               
 PAGE 07 LINE 1                                     
 PAGE 07 LINE 2       


Thus the "DOC number 1" contains 2 pages, the DOC number 2 begins at page 3...
Every DOC begins with "DOC : 2014" and contents x pages and y lines per page.

I want only the 2 first DOCs with all pages and lines AND the 2 last DOCs with all pages and lines also, all in one pass if possible.

I wrote a small ASM program who do this but my boss prefers ICETOOL or DFSORT for production.

It's possible ?

Thank a lot
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7233

PostPosted: Thu Jul 31, 2014 9:17 pm    Post subject: Reply to: Extended extraction
Reply with quote

JOINKEYS with the same file on both input DDs.

In JNF1CNTL using INREC with WHEN=GROUP for the DOC to PUSH an ID to an extension of the record.

In JNF2CNTL use INCLUDE to get only the DOC records. Use INREC to put a sequence number in an extension to the record (same length as the ID you PUSHed in the other). Then subtract two from the sequence number.

A REFORMAT statement with the entire F1 record and the match marker.

JOIN UNPAIRED,F1

In the main task, INCLUDE for (match marker equal to B AND extension equal to 1 or 2), OR match marker equal to 1 (unmatched records).

Strip off the extension with BUILD on INREC.
Back to top
View user's profile Send private message
liam,khaosong

New User


Joined: 24 Jul 2014
Posts: 2
Location: FRANCE

PostPosted: Fri Aug 01, 2014 1:08 pm    Post subject:
Reply with quote

Thank you very much Bill

but... icon_redface.gif

I would not want to abuse but would it be possible that you put the complete code ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7233

PostPosted: Fri Aug 01, 2014 1:25 pm    Post subject: Reply to: Extended extraction
Reply with quote

Of course it would be possible, but time precludes.

Take it one piece at a time, with shortened/simplified data and watch how it builds up (don't use OUTFIL until you can see what is happening to everything).
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
No new posts "Extended Monitor Facility" Ricardo Viegas All Other Mainframe Topics 4 Fri Dec 19, 2014 10:22 pm
No new posts Record Extraction Mismatch from Header sri_gans CLIST & REXX 3 Mon Dec 08, 2014 8:23 am
No new posts Query about IMS extended checkpoint u... sivasaras IMS DB/DC 5 Mon Sep 08, 2014 7:59 pm
No new posts Record extraction using JCL Sort Sumeendar SYNCSORT 12 Tue Apr 08, 2014 6:39 pm
No new posts Extraction of applications and jobs p... omprakash.mf IBM Tools 9 Fri Mar 28, 2014 10:05 am


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