Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 attchmvs from rexx subroutine that re... harisukumaran CLIST & REXX 1 Fri Jan 19, 2018 5:29 am
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 1 Tue Sep 12, 2017 1:42 am
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us