Dear everyone,
I have a file with records packed into the hexadecimal notation ; the hex look like
0012102
120187D
Now, much of the other records have C in place of the last D. I would like to find out the logical expression which will indicate to DFSORT to pick up only records in which the last character is (in hex view)
[any-digit]
D
Thank you for your help and time,
Find records with any digit followed by D
-
- Posts: 24
- Joined: Mon Apr 23, 2018 2:51 pm
- Skillset: Cobol, CICS, DB2
- Referer: regular google searches
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Find records with any digit followed by D
The brute force way would be to use 0D through 9D in your INCLUDE statements - only 10 conditions
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Posts: 24
- Joined: Mon Apr 23, 2018 2:51 pm
- Skillset: Cobol, CICS, DB2
- Referer: regular google searches
Re: Find records with any digit followed by D
Indeed ; do you know of any less cumbersome way to deal with it ? For example, the find option allows P'#' to search for any numeric character... Isn't there anything similar in DFSORT ?
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Find records with any digit followed by D
did You ever hear about the format of negative packed numbers ???
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Posts: 24
- Joined: Mon Apr 23, 2018 2:51 pm
- Skillset: Cobol, CICS, DB2
- Referer: regular google searches
Re: Find records with any digit followed by D
It seems to me that packed numbers are represented with a final letter to indicate their sign: C for positive, D for negative, and I do not remember the others.
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Find records with any digit followed by D
and I do not remember the others.
but the principle of operations does

Code: Select all
┌───────┬────────────────────────────┐
│ │ Recognized As │
│ Code ├─────────┬──────────────────┤
│Binary │ Digit │ Sign │
├───────┼─────────┼──────────────────┤
│ 0 │ 0 │ Invalid │
│ 1 │ 1 │ Invalid │
│ 10 │ 2 │ Invalid │
│ 11 │ 3 │ Invalid │
│ 100 │ 4 │ Invalid │
│ 101 │ 5 │ Invalid │
│ 110 │ 6 │ Invalid │
│ 111 │ 7 │ Invalid │
│ 1000 │ 8 │ Invalid │
│ 1001 │ 9 │ Invalid │
│ 1010 │ Invalid │ Plus │
│ 1011 │ Invalid │ Minus │
│ 1100 │ Invalid │ Plus - preferred │
│ 1101 │ Invalid │ Minus -preferred │
│ 1110 │ Invalid │ Plus │
│ 1111 │ Invalid │ Plus (zone) │
└───────┴─────────┴──────────────────┘
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: Find records with any digit followed by D
So
And why should DFSort, which precedes ISPF by a number of years, have the same facilities?
Code: Select all
LT,0
And why should DFSort, which precedes ISPF by a number of years, have the same facilities?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Posts: 24
- Joined: Mon Apr 23, 2018 2:51 pm
- Skillset: Cobol, CICS, DB2
- Referer: regular google searches
Re: Find records with any digit followed by D
NicC wrote:SoCode: Select all
LT,0
And why should DFSort, which precedes ISPF by a number of years, have the same facilities?
I finally did this the other way around: I omitted every record greater than 0 (not sure if it's more/less/same efficient). However this still required to unpack the numbers, which I did from PD to FS format.
I also wasn't truly aware that DFSORT was there way before ISPF

-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Find records with any digit followed by D
However this still required to unpack the numbers,
not for the comparison .
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Similar Topics
- Replies
- Views
- Last post
-
-
Insert records from File1 between records of File2
by Daouchiche » Wed Nov 10, 2021 6:37 am » in DFSORT/ICETOOL/ICEGENER - 6
- 2348
-
by sergeyken
View the latest post
Thu Nov 11, 2021 12:43 am
-
-
-
REXX Code to find if PDS JCL member has how many DD
by abhilashanaik » Tue Sep 14, 2021 11:17 am » in CLIST & REXX - 5
- 2291
-
by sergeyken
View the latest post
Wed Sep 15, 2021 6:02 am
-
-
- 3
- 1206
-
by sergeyken
View the latest post
Wed May 18, 2022 4:40 pm
-
-
Find the version of a cobol program through its load module
by vinigim » Fri Oct 30, 2020 3:16 am » in IBM Cobol - 5
- 5150
-
by chaat
View the latest post
Sat Nov 07, 2020 8:40 am
-
-
- 6
- 2435
-
by sergeyken
View the latest post
Thu Dec 09, 2021 8:10 pm