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
 

 

Find and replace junk value

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

Active User


Joined: 05 Oct 2006
Posts: 144

PostPosted: Tue Oct 18, 2011 6:31 pm    Post subject: Find and replace junk value
Reply with quote

HI,

i have a file. layout is as below.

lrecl=18,

01 rec.
05 depot 9(5).
05 product 9(9).
05 qty S9(7) comp-3.

if in case the qty field has junk value then I should replace it with zero. Can we check this? Something like is numeric kind of check?

Regds,
useit
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Oct 18, 2011 6:59 pm    Post subject:
Reply with quote

DEFINE A JUNK VALUE? You do realize that a comp-3 field would not be viewable field?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 18, 2011 7:01 pm    Post subject:
Reply with quote

useit,
look here.
http://ibmmainframes.com/viewtopic.php?p=144080&highlight=replace#144080
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 144

PostPosted: Tue Oct 18, 2011 7:32 pm    Post subject:
Reply with quote

Hi,

i know alt seq is used only when we know the exact value..then by using ALTSEQ we can replace it. but i my case i will not be knowig the exact value.
i case the value doesnt fall between 0 and 9999999 I should replace those values with zero.
say in case of high values, low values, -ve values etc...

Regds,
useit.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 18, 2011 7:38 pm    Post subject:
Reply with quote

well, I remember Frank saying something about numeric checks being
possible in sort.

so I knew that if I ever needed to do that,
if would just take looking in the manual to find out how it is done.

i guess you are waiting for someone to give you the code? huh?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Oct 18, 2011 7:57 pm    Post subject: Reply to: Find and replace junk value through jcl
Reply with quote

You are in DFSORT forum, DFSORT manuals are available on the web, verify there if you can test a comp-3 for numeric.

How about trying less than zero or greater than your max value? Have a check on what a non-numeric in a PD is treated as in DFSORT. It's all in the manual, I expect.
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 18, 2011 10:43 pm    Post subject:
Reply with quote

useit,

If I understand what you want to do (and I'm not sure I do), then you can use these DFSORT statements:

Code:

  OPTION COPY                           
  INREC IFTHEN=(WHEN=(15,4,PD,NE,NUM), 
    OVERLAY=(15:+0,TO=PD,LENGTH=4))     
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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm


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