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 Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am


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