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

To check for LOW-VALUES...


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


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

PostPosted: Wed Aug 27, 2008 9:16 pm
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
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 Developer


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

PostPosted: Thu Aug 28, 2008 9:24 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top