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 from the output file if data is blank

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Omit record from the output file if data is blank
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: 1439
Location: Bangalore,India

PostPosted: Mon Oct 15, 2007 2:17 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Mon Oct 15, 2007 9:54 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Oct 16, 2007 8:58 pm    Post subject:
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    Post subject:
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    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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am


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