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
 

 

To check for LOW-VALUES...

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

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Wed Aug 27, 2008 12:41 pm    Post subject: To check for LOW-VALUES...
Reply with quote

Hi,

My requirement is to find out the record when the name field X(30) satisfies
any one of following condition.

1. If the first character of name field is space.

Example for this
Code:

 HASA
4CCEC0
081210


2. The name field may have LOW-VALUE at any place, the position of low-value is not fixed. I will select the record if the immediate first character after any LOW-VALUE is space.

Example for this
Code:

HA  N
CC04D4
810050

Here HEXCODE 40 - Space, 00 - LOWVALUE

In COBOL it can solved by UNSTRING by LOW-VALUES. But i want to know is there any possibility to achieve this using SORT utility..
[/code]

Thanks in advance
R KARTHIK
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: Wed Aug 27, 2008 9:16 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INCLUDE COND=(1,1,CH,EQ,C' ',OR,
    1,30,SS,EQ,X'0040')
/*
Back to top
View user's profile Send private message
karthikr44

Active User


Joined: 25 Aug 2007
Posts: 235
Location: Chennai

PostPosted: Thu Aug 28, 2008 12:13 pm    Post subject: Reply to: To check for LOW-VALUES...
Reply with quote

Hi Frank,

Thanks. It s working. But i dont want the record to o/p file for the following case.

Code:

BICKFO       RD ALFRED     
CCCDCD       DC0CDCDCC04444
293266       94013695400000


Here the length of name BICKFORD ALFRED is 15 and there is no occurence of X'0040' within that length. After that i dont want to check for X'0040'. So i want to check the condition X'0040' only within the name. For each record the length of the name may change. The maximum length is 30.

Kindly clarify this case,

Regards
R KARTHIK
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: Thu Aug 28, 2008 9:24 pm    Post subject:
Reply with quote

Quote:
For each record the length of the name may change.


And what exactly is the "rule" for determining the length of the name (that is, where the name ends)?

Quote:
Here the length of name BICKFORD ALFRED is 15


And how can we determine that programmatically? What indicates that the name ends after 15 characters?

I gave you a solution based on what you told me. Was I supposed to read your mind to know that the names "end" based on some "rule" that you didn't tell me about and still haven't explained? In the future, please try to describe your "requirement" completely in your first post to save us all time.
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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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