IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extended extraction


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jul 31, 2014 9:17 pm
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Aug 01, 2014 1:25 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts RPLDDDD field for extended VSAM - ESDS JCL & VSAM 1
This topic is locked: you cannot edit posts or make replies. VSAM I/O - Extended Addressability - ... JCL & VSAM 12
No new posts Blue zone error with an invalid exten... CICS 3
No new posts How to browse RECFM=VBS DSORG=PSE seq... JCL & VSAM 7
No new posts Business Rule extraction CLIST & REXX 9
Search our Forums:

Back to Top