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: 6966
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: 6966
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: 7306

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 Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
No new posts Find out a active PGM jpsager JCL & VSAM 10 Fri Oct 07, 2016 4:32 pm


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