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

Omit record from the output file if data is blank


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kumar shobhit

New User


Joined: 29 May 2007
Posts: 14
Location: bangalore

PostPosted: Mon Oct 15, 2007 12:43 pm
Reply with quote

Hi All,

I have to omit records from output file if the feilds is blank for a particular records. The feilds is define as graphic(Double byte) (UTF -16).
Can anybody suggest me what we should put in omit cond ??????

details :

delcaration :

VAR1 graphic(75).

Starting position in the input file : 50
end postion : 200

Length 150 byte

Requirement : to omit any record which is blank (in this case X'0020')

I tried using omit cond =(50,150,BI,X'0020')

but it is not working, Iam not sure if this is the correct syntax for double byte data.


Pls let me know if u require any details , I was not able to put actual data as it is confidential.
[/img]
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Oct 15, 2007 2:17 pm
Reply with quote

Kumar,

Quote:
omit cond =(50,150,BI,X'0020')

Where is the comparision operator in the OMIT statement? If this is not a typo error, refer manual available in the manuals link for the syntax.

Also you specified a string lenght of 150, if you fail to provide string (0020 in your case) which is 150 in length, DFSORT does some PADDING.
Refer manauls for more info.
Back to top
View user's profile Send private message
Kumar shobhit

New User


Joined: 29 May 2007
Posts: 14
Location: bangalore

PostPosted: Mon Oct 15, 2007 2:28 pm
Reply with quote

HI maurli,

Thks for ur reply. sorry , i have typed the omit cond incorrectly . Actually i have typed cond as
omit cond =(50,150,BI,eq,X'0020')

Iam not getting any sysntax error.

Let me tell u wat i actually want,

if the feilds which have UTF 16 Data, starting from 50 ,(feilds is defined as graphic(75), so will take 150 byte), have no data i.e blank in UTF 16 represented as '0020'. it shd get omitted.

Could you pls suggest me how to implement this LOgic.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Mon Oct 15, 2007 9:54 pm
Reply with quote

Quote:
if the feilds which have UTF 16 Data, starting from 50 ,(feilds is defined as graphic(75), so will take 150 byte), have no data i.e blank in UTF 16 represented as '0020'. it shd get omitted.


You seem to be saying that you have a 150 byte field that starts in position 50. But it's not clear what you mean by "blank in UTF 16 represented as X'0020'. Does that mean that only positions 50-51 need to have X'0020', or that every two bytes needs to have X'0020' (e.g. 50-51 has X'0020', 52-53 has X'0020', etc), or something else? Please describe clearly what you want to test for.
Back to top
View user's profile Send private message
Kumar shobhit

New User


Joined: 29 May 2007
Posts: 14
Location: bangalore

PostPosted: Tue Oct 16, 2007 11:07 am
Reply with quote

Hi Frank,

I mean to say that every 2 byte needs to have '0020' . Just to be more clear i stated that that blank in utf 16 means '0020', seems i confused you all. what i actually mean that if every position have value '0020', it shd be omitted . pls let me know iam clear or u neen any futher clarification.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Oct 16, 2007 8:58 pm
Reply with quote

You could use a DFSORT job like this to do what you asked for. I assumed your input file has RECFM=FB and LRECL=300, but the job can be changed for other attributes.

Code:

//S1    EXEC  PGM=ICEMAN                   
//SYSOUT    DD  SYSOUT=*                   
//SORTIN DD DSN=...  input file (FB/300)       
//SORTOUT DD DSN=...  output file (FB/300)
//SYSIN    DD    *                         
  OPTION COPY                               
* Generate X'0020...0020' for 150 characters starting in 301
  INREC OVERLAY=(301:75X'0020')             
* Compare 50,150 to 301,150
  OUTFIL OMIT=(50,150,BI,EQ,301,150,BI),BUILD=(1,300)     
/*
Back to top
View user's profile Send private message
Kumar shobhit

New User


Joined: 29 May 2007
Posts: 14
Location: bangalore

PostPosted: Wed Oct 17, 2007 6:21 pm
Reply with quote

Hi Frank,

I think that will solve my purpose.

Thank you.
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 TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top