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
 

 

Omit record to write into file

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

New User


Joined: 20 Apr 2007
Posts: 14
Location: TORONTO,ONTARIO,CANADA

PostPosted: Fri Oct 12, 2007 10:32 pm    Post subject: Omit record to write into file
Reply with quote

Hi,
I am trying to omit some of the records from the given file with
OMIT COND=
Now I am looking for all the records which I omit in the file for the verifaction.
How do I get those record into file? My codes as below

Code:

//SYSIN    DD  *                       
    SORT FIELDS=(136,7,PD,A,           
                 143,2,PD,A,           
                 1,30,CH,A,             
                 289,26,CH,A,           
                 41,20,CH,A,           
                 61,20,CH,A,           
                 81,25,CH,A)           
     OUTREC FIELDS=(1,380)             
     OMIT COND=(143,2,BI,EQ,X'0000',AND,
         1,30,CH,EQ,C' ',AND,           
         31,10,CH,EQ,C' ',AND,         
         41,20,CH,EQ,C' ',AND,         
         61,20,CH,EQ,C' ',AND,         
         81,25,CH,EQ,C' ',AND,         
         106,10,CH,EQ,C' ',AND, 
         116,20,CH,EQ,C' ',AND, 
         283,2,BI,EQ,X'0000')   
/*                             
//
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: Fri Oct 12, 2007 10:47 pm    Post subject:
Reply with quote

If you want to verify the records with a separate job, just create another job where you have INCLUDE instead of OMIT. Remove the OUTREC statement if you don't want to reformat the verify records.

If you want to verify the records in the same job, you can use OUTFIL OMIT and OUTFIL SAVE as in this DFSORT job. SAVE will keep the records that are omitted by OMIT. I assumed you wanted to reformat the OUT1 records but not the OUT2 records. If you want to reformat the OUT2 records, add ',BUILD=(1,380)' to the second OUTFIL statement.

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...    output file
//OUT2 DD DSN=...  output file
//SYSIN DD *
  SORT FIELDS=(136,7,PD,A,
      143,2,PD,A,
      1,30,CH,A,
      289,26,CH,A,
      41,20,CH,A,
      61,20,CH,A,
      81,25,CH,A)
  OUTFIL FNAMES=OUT1,
   OMIT=(143,2,BI,EQ,X'0000',AND,
    1,30,CH,EQ,C' ',AND,
    31,10,CH,EQ,C' ',AND,
    41,20,CH,EQ,C' ',AND,
    61,20,CH,EQ,C' ',AND,
    81,25,CH,EQ,C' ',AND,
    106,10,CH,EQ,C' ',AND,
    116,20,CH,EQ,C' ',AND,
    283,2,BI,EQ,X'0000'),
   BUILD=(1,380)
  OUTFIL FNAMES=OUT2,SAVE
/*
Back to top
View user's profile Send private message
p_gandhi

New User


Joined: 20 Apr 2007
Posts: 14
Location: TORONTO,ONTARIO,CANADA

PostPosted: Fri Oct 12, 2007 11:19 pm    Post subject: DFSORT OMIT record to write in file
Reply with quote

Hi,
Coded as you showed here, but I am getting follwoing errors

Code:

                          81,25,CH,A)                 **NAME LAST               
             OUTFIL FNAMES=OUT1                                                 
              OMIT COND=(143,2,BI,EQ,X'0000',AND,                               
                  1,30,CH,EQ,C' ',AND,                                         
                  31,10,CH,EQ,C' ',AND,                                         
                  41,20,CH,EQ,C' ',AND,                                         
                  61,20,CH,EQ,C' ',AND,                                         
                  81,25,CH,EQ,C' ',AND,                                         
                  106,10,CH,EQ,C' ',AND,                                       
                  116,20,CH,EQ,C' ',AND,                                       
                  283,2,BI,EQ,X'0000')                                         
              BUILD=(1,380)                                                     
              $                                                                 
ICE005A 0 STATEMENT DEFINER ERROR                                               
             OUTFIL FNAMES=OUT2,SAVE                                           
ICE751I 0 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E7-K11698                     
ICE052I 3 END OF DFSORT                                                         


. . . . . . . . . . . . . . . . . . . . . . . . . . .
Please help me to solve this problem thanks again for your quick reply
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Oct 12, 2007 11:33 pm    Post subject:
Reply with quote

Hello,

Quote:
283,2,BI,EQ,X'0000')
It looks like you've omitted the comma on this line. . .

Please check your code against what Frank posted.
Back to top
View user's profile Send private message
p_gandhi

New User


Joined: 20 Apr 2007
Posts: 14
Location: TORONTO,ONTARIO,CANADA

PostPosted: Fri Oct 12, 2007 11:45 pm    Post subject:
Reply with quote

Sorry for the rouble but if I add that ,(comma) before that line I am getting following error
61,20,CH,A, **NAME MID
81,25,CH,A) **NAME LAST
OUTFIL FNAMES=OUT1
OMIT COND=(143,2,BI,EQ,X'0000',AND,
1,30,CH,EQ,C' ',AND,
31,10,CH,EQ,C' ',AND,
41,20,CH,EQ,C' ',AND,
61,20,CH,EQ,C' ',AND,
81,25,CH,EQ,C' ',AND,
106,10,CH,EQ,C' ',AND,
116,20,CH,EQ,C' ',AND,
283,2,BI,EQ,X'0000'),
BUILD=(1,380)
$
ICE103A 0 INVALID INCLUDE OR OMIT STATEMENT OPERAND
OUTFIL FNAMES=OUT2,SAVE
ICE751I 0 C5-K90007 C6-K90007 C7-K90000 C8-K90007 E7-K11698
ICE052I 3 END OF DFSORT

Also I tried his codes and giving me error message for this kind where he ask me to put comma so I remove commas

1) OUTFIL FNAMES=OUT1
2)283,2,BI,EQ,X'0000'),
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: Fri Oct 12, 2007 11:45 pm    Post subject:
Reply with quote

Paresh,

I erroneously had OMIT COND= instead of OMIT=. I've fixed up the job - please go back and copy it again exactly as it now appears. (That will teach me to take shortcuts and not test the job.)
Back to top
View user's profile Send private message
p_gandhi

New User


Joined: 20 Apr 2007
Posts: 14
Location: TORONTO,ONTARIO,CANADA

PostPosted: Fri Oct 12, 2007 11:54 pm    Post subject:
Reply with quote

Thank you very much everybody; its working Pefect the way I was looking for
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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