Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Insert record @ EOF

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

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Wed Nov 12, 2008 11:20 pm    Post subject: Insert record @ EOF
Reply with quote

I'm comparexing two control cards. When different, I want to take one control card and build a new control card.

I have input file
File Edit Edit_Settings Menu Utilities Com

Code:
                                       
EDIT     SORTIN DSN=P###.W@@@.WD.PWDD#@@V.VTB181S1.SRT   
Command ===>                                     
****** ***************************** Top of Data**************
 OMIT COND=((21,9,CH,EQ,C'831804109'),   
                 OR,(21,9,CH,EQ,C'52470R888'),   
                 OR,(21,9,CH,EQ,C'92204L203'))
****** **************************** Bottom of Data ************


I want output to be:

Code:

EDIT       SORTOUT DSN=P###.W@@@.WD.PWDD#@@SORTOUT   
Command ===>                                     
****** ***************************** Top of Data************
 OMIT COND=((24,9,CH,EQ,C'831804109'), 
        OR,(24,9,CH,EQ,C'52470R888'),
        OR,(24,9,CH,EQ,C'92204L203'))
 OUTREC FIELDS=(1C'*',2,349)
 SORT FIELDS=COPY           
****** **************************** Bottom of Data *********


I have tried:

Code:

 OUTFIL FNAMES=SORTOUT,                           
     IFTHEN=(WHEN=(14,2,CH,EQ,C'21'),           
        OVERLAY=(14:C'24'))                     
 TRAILER1=(2:C'SORT FIELDS=COPY'),               
 TRAILER2=(2:C'OUTREC FIELDS=(1C'*',2,349)')     
 SORT FIELDS=COPY                                 


It does the overlay fine. I'm having problems with the adding the two last lines as trailer records.

Thanks.
Ywheeler
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Nov 13, 2008 12:10 am    Post subject:
Reply with quote

You can use these DFSORT control statements:

Code:

  OPTION COPY                                         
  OUTFIL REMOVECC,                                   
     IFTHEN=(WHEN=(14,2,CH,EQ,C'21'),                 
        OVERLAY=(14:C'24')),                         
     TRAILER1=(2:C'SORT FIELDS=COPY',/,               
       2:C'OUTREC FIELDS=(1C''*'',2,349)')           
Back to top
View user's profile Send private message
ywheeler

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Thu Nov 13, 2008 1:02 am    Post subject:
Reply with quote

Frank, thank you for the quick response. What is REMOVECC ?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Nov 13, 2008 1:12 am    Post subject:
Reply with quote

ywheeler,

When you use report features like header,trailer .., DFSORT will add an additional byte in the begining of the record which will have the ANSI carriage control character. So the LRECL is increased by 1 byte. for example if you have 80 byte FB file and you use reporting features then the output dataset will have 81 byte lrecl and recfm is FBA.

Removecc specifies that the ANSI carriage control character(print) is to be removed from OUTFIL output records for this OUTFIL group before the records are written.DFSORT will set the LRECL to 80 instead of 81 and remove the ANSI carriage control character from each record before it is written.
Back to top
View user's profile Send private message
ywheeler

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Thu Nov 13, 2008 1:18 am    Post subject:
Reply with quote

Thank you for the explaination.
Now when I follow the previous advice, I get an error:


Code:
 
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT
          OPTION=COPY                                   
            OUTFIL REMOVECC,                           
               IFTHEN=(WHEN=(14,2,CH,EQ,C'21'),         
                  OVERLAY=(14:C'24')),                 
               TRAILER1=(2:C'SORT FIELDS=COPY',/,       
                 2:C'OUTREC FIELDS=(1C''*'',2,349)')   
ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT           
ICE751I 0 C5-K26318 C6-K90007 E7-K24705                 
ICE052I 3 END OF DFSORT
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Nov 13, 2008 1:22 am    Post subject: Reply to: Insert record @ EOF
Reply with quote

ywheeler,

You have OPTION=COPY in your control cards which is not a valid DFSORT Control statement. It should be

Code:

  OPTION COPY


OR
Code:
 SORT FIELDS=COPY


Change that and re-run your job
Back to top
View user's profile Send private message
ywheeler

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Thu Nov 13, 2008 1:27 am    Post subject:
Reply with quote

Same error:

Code:

ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFS
          SORT FIELDS=COPY                           
               $                                     
ICE005A 0 STATEMENT DEFINER ERROR                   
            OUTFIL REMOVECC,                         
               IFTHEN=(WHEN=(14,2,CH,EQ,C'21'),     
                  OVERLAY=(14:C'24')),               
               TRAILER1=(2:C'SORT FIELDS=COPY',/,   
                 2:C'OUTREC FIELDS=(1C''*'',2,349)')
ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT         
ICE751I 0 C5-K26318 C6-K90007 E7-K24705             
ICE052I 3 END OF DFSORT
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Nov 13, 2008 1:29 am    Post subject:
Reply with quote

ywheeler,

Make sure that your SORT FIELDS=COPY statements starts in pos 2
Back to top
View user's profile Send private message
ywheeler

New User


Joined: 10 Nov 2006
Posts: 19
Location: New York

PostPosted: Thu Nov 13, 2008 1:31 am    Post subject:
Reply with quote

Thank you so much.
That did it.
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 query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us