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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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