Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all 8500 articles
Browse latest View live

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: sergeyken
Posted: Tue Apr 03, 2018 7:44 am (GMT 5.5)

sudhakar84 wrote:
The declaration of field in cobol is s9(13)v9(2) comp-3

In order to debug or fix your code, you need to check NOT THE FIELD DECLARATION, but THE ACTUAL PHYSICAL VALUE OF THE FIELD to be sorted/selected.
This is classical routine job in programming, known since... 50 years.
_________________
Tyrannosaurus-REXX


SYNCSORT :: RE: Sort numeric fields with trailing spaces

$
0
0
Author: sergeyken
Posted: Tue Apr 03, 2018 7:57 am (GMT 5.5)

sancraig16 wrote:
I did get leading BLANKS and SORT worked. As suggested , I will change the format to CH.

If SORT FIELDS=(...,ZD,...) did not fail with some blanks in the field, that means the sort utility code performed extra check on ZD field before handling it in decimal manner. At the level of machine instructions it might fail with decimal ABEND like S0C7.
SORT FIELDS=(...,CH,...) deals in the same manner as ZD, but CH is also irrelevant to not fully correct ZD values.
This is known as more robust code.
_________________
Tyrannosaurus-REXX

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: sudhakar84
Posted: Tue Apr 03, 2018 9:48 am (GMT 5.5)

sergeyken wrote:
sudhakar84 wrote:
The declaration of field in cobol is s9(13)v9(2) comp-3

In order to debug or fix your code, you need to check NOT THE FIELD DECLARATION, but THE ACTUAL PHYSICAL VALUE OF THE FIELD to be sorted/selected.
This is classical routine job in programming, known since... 50 years.


I totally understand your point. The problem is that I cannot post data from my organization. that will result in loosing my job icon_sad.gif

Kindly let me know if there is a decimal place of 2, do i need to do any correction in my include condition ?

Include cond=(1,8,pd,gt,1)
_________________
Everything is possible.

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: dneufarth
Posted: Tue Apr 03, 2018 10:19 am (GMT 5.5)

Did you at least view the 8 bytes in HEX and verify they are valid 15 digit numeric values?
_________________
Dave

I came here to give you these facts. It is no concern of ours how you run your own planet. But if you threaten to extend your violence, this Earth of yours will be reduced to a burned-out cinder.
The Day The Earth Stood Still

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: dneufarth
Posted: Tue Apr 03, 2018 10:20 am (GMT 5.5)

Eliminated dup post.
_________________
Dave

I came here to give you these facts. It is no concern of ours how you run your own planet. But if you threaten to extend your violence, this Earth of yours will be reduced to a burned-out cinder.
The Day The Earth Stood Still

DFSORT/ICETOOL :: RE: Repeat Sequence Number Until change in the Key

$
0
0
Author: expat
Posted: Tue Apr 03, 2018 1:41 pm (GMT 5.5)

I still believe that it would be better and polite of the OP to actually clarify EXACTLY what the rules are from input to output.
_________________
Some people are like Slinkies. They have no real value,
but it sure is fun to see them pushed down the stairs.

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: sergeyken
Posted: Tue Apr 03, 2018 5:57 pm (GMT 5.5)

sudhakar84 wrote:
The problem is that I cannot post data from my organization. that will result in loosing my job icon_sad.gif

Kindly let me know if there is a decimal place of 2, do i need to do any correction in my include condition ?

Include cond=(1,8,pd,gt,1)

1. You can verify the tested value printed in decimal + hexadecimal by yourself only.

2. I doubt if the exposure of a single 8-byte numeric value (without any context) might violate security policy. For instance:
DEC=1234567890 HEX=0000001234567890C
DEC=9876543210 HEX=0000009876543210C
- does this violate any policy?

Only 1, or 2, or 3 of such numeric values should clarify the issue.

Also, it sounds strange that you debug your not working code with real production data???
Anyway, I recommend you to run a standalone test on limited data to fix this issue alone.


3. Your INCLUDE statement looks fine (but it needs to be coded in caps...)
The only thing I suspect so far: in case your input dataset has RECFM=VB then you need to change the offset by 4:
INCLUDE COND=(5,8,PD,GT,1)
or, for more clarity
INCLUDE COND=(5,8,PD,GT,+1)

In the same manner you might miscalculate the original offset of your field within the record. How do you know the offset is 1? There is no sign of this fact taking into account only the presented information...
_________________
Tyrannosaurus-REXX

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: Arun Raj
Posted: Tue Apr 03, 2018 6:25 pm (GMT 5.5)

sudhakar84 wrote:
The problem is that I cannot post data from my organization. that will result in loosing my job icon_sad.gif
The problem you mentioned so far is that you see values = 1 in your output, where you expect values only >1. I don't think posting the value '1' that got INCLUDed into your output (in HEX) is so sensitive that you will lose your job.

sergeyken,

The OP mentioned in his very first post that he is working with an FB input.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard


DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: sudhakar84
Posted: Tue Apr 03, 2018 6:30 pm (GMT 5.5)

sergeyken wrote:
sudhakar84 wrote:
The problem is that I cannot post data from my organization. that will result in loosing my job icon_sad.gif

Kindly let me know if there is a decimal place of 2, do i need to do any correction in my include condition ?

Include cond=(1,8,pd,gt,1)

1. You can verify the tested value printed in decimal + hexadecimal by yourself only.

2. I doubt if the exposure of a single 8-byte numeric value (without any context) might violate security policy. For instance:
DEC=1234567890 HEX=0000001234567890C
DEC=9876543210 HEX=0000009876543210C
- does this violate any policy?

Only 1, or 2, or 3 of such numeric values should clarify the issue.

Also, it sounds strange that you debug your not working code with real production data???
Anyway, I recommend you to run a standalone test on limited data to fix this issue alone.


3. Your INCLUDE statement looks fine (but it needs to be coded in caps...)
The only thing I suspect so far: in case your input dataset has RECFM=VB then you need to change the offset by 4:
INCLUDE COND=(5,8,PD,GT,1)
or, for more clarity
INCLUDE COND=(5,8,PD,GT,+1)

In the same manner you might miscalculate the original offset of your field within the record. How do you know the offset is 1? There is no sign of this fact taking into account only the presented information...


I found the answer. It should be
INCLUDE COND=(5,8,PD,GT,+100)
_________________
Everything is possible.

SYNCSORT :: RE: Sort numeric fields with trailing spaces

$
0
0
Author: Arun Raj
Subject: Reply to: Sort numeric fields with trailing spaces
Posted: Tue Apr 03, 2018 6:38 pm (GMT 5.5)

sancraig16,

You might be able to achieve this without altering the input data by using the UFF format:

UNTESTED:
Code:
 SORT FIELDS=(1,2,UFF,A)

_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard

DFSORT/ICETOOL :: RE: Extract the records with a PD field's value greater than 1

$
0
0
Author: sergeyken
Posted: Tue Apr 03, 2018 8:54 pm (GMT 5.5)

sudhakar84 wrote:
I found the answer. It should be
INCLUDE COND=(5,8,PD,GT,+100)

So, there have been two bugs in the original version of your code...

It always makes sense to run a standalone test specifically on the suspicious data, as suggested in previous replies. In that case you'd discover your problem immediately, without long discussion on this forum, while giving us no meaningful info...

Two major issues were not mentioned:
1) you have RECFM=VB (difficult to guess in advance)
2) you did not mention which sort of "decimal 1" do you mean? It actually must be "decimal 1.00". The format PIC '9(13)V9(2)' COMP-3 is visible ONLY WITHIN the corresponding COBOL code; outside of COBOL it is considered as if it was PIC '9(15)' COMP-3
_________________
Tyrannosaurus-REXX

CA Products :: RE: CA7 - Monthly job schedule

$
0
0
Author: Benchwarmer
Subject: Reply to: CA7 - Monthly job schedule
Posted: Tue Apr 03, 2018 9:23 pm (GMT 5.5)

Thank you @Robert Sample

SCHDYONLY = 'N' - days are calculated based on calendar days

Using above rule my current CA7 definition calculated the last day of month (RDAY=-00) as 31st march.

SCHID=001 has restriction not to come out on NRDAY=-00. Since 30th march is not a month end, job came into queue.

SCHID=002 has restriction to run only on RDAY=-00. But with ROLL='B' the job came into queue on 30th march.

SCHDYONLY = 'Y' - Days are calculated based on business days

By changing my job to use a equivalent calendar with SCHDYONLY = 'Y' resolved my issue.

CA Products :: RE: CA7 - Monthly job schedule

$
0
0
Author: Robert Sample
Posted: Tue Apr 03, 2018 9:33 pm (GMT 5.5)

Glad to hear you got it resolved!
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth

SYNCSORT :: RE: Sort numeric fields with trailing spaces

$
0
0
Author: Rohit Umarjikar
Posted: Tue Apr 03, 2018 10:12 pm (GMT 5.5)

UFF will work but if you have -ve values also then UFF won't work you will then need SFF.
_________________
Regards,
Rohit Umarjikar
A leader is one who knows the way, goes the way, and shows the way.

SYNCSORT :: RE: Sort numeric fields with trailing spaces

$
0
0
Author: Arun Raj
Posted: Tue Apr 03, 2018 10:51 pm (GMT 5.5)

The OPs representative sample does not show any negative symbols in it, so I would leave it to the OP's discretion.
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard


COBOL Programming :: RE: Searching a table for the field name?

$
0
0
Author: socker_dad
Posted: Wed Apr 04, 2018 3:01 am (GMT 5.5)

The table has been loaded with the column headings:
Code:
01  WS-REPORT-TABLE.
    05  WS-REPORT-LAYOUT-DATA   OCCURS 200 TIMES
                                                   ASCENDING KEY WS-RPT-SEQ-NBR
                                                   INDEXED BY WS-RPT-NDX.
        10  WS-RPT-SEQ-NBR           PIC S9(4) COMP.
        10  WS-RPT-FLD-DESC          PIC  X(25).


The cursor fetches many rows - to keep it simple, one of the fields it fetches is PHB03-POLICY_ID, which contains the value 'ABC123456'. I need to use the field name PHB03-POLICY_ID to read the above table for the real column header, so here's my search statement:
Code:
SEARCH ALL WS-REPORT-LAYOUT-DATA
    AT END DISPLAY 'ENTRY NOT FOUND'
    WHEN WS-RPT-FLD-DESC (WS-TPR-NDX) = PHB03-POLICY_ID
         DISPLAY 'NEW HEADER FOUND'
END-SEARCH


However, this is only searching for the value 'ABC123456', not PHB03-POLICY-ID. What did I forget? I tried the keyword 'CURSOR', but that just gave me a compile error.

(Yes, I RTFM - which is incredibly short on examples.)
_________________
********************************
When in doubt, define the field as alphanumeric and punt.

COBOL Programming :: RE: Searching a table for the field name?

$
0
0
Author: Rohit Umarjikar
Posted: Wed Apr 04, 2018 8:07 am (GMT 5.5)

Do I understand correctly that you’re trying to find a column name instead of the values and asking if that’s possible?
_________________
Regards,
Rohit Umarjikar
A leader is one who knows the way, goes the way, and shows the way.

COBOL Programming :: RE: Searching a table for the field name?

$
0
0
Author: socker_dad
Posted: Wed Apr 04, 2018 9:21 am (GMT 5.5)

Believe it or not, the boss wants me to get BOTH the value and the column name. I thought it was a joke, but he's serious!
_________________
********************************
When in doubt, define the field as alphanumeric and punt.

All Other Mainframe Topics :: converting a mainframe file with ASA CC to word document

$
0
0
Author: Lynne Schuler
Subject: converting a mainframe file with ASA CC to word document
Posted: Wed Apr 04, 2018 9:44 am (GMT 5.5)

is there any tool that will convert an assembler listing or mainframe report with ASA carriage control to a file you can read with the right format? so it looks like it would if you had printed a hardcopy on a printer?

I've looked around and it seems everything wants to keep the ASA if you go to file. I want something I can read from my screen or pc. I was thinking a word document would be nice because you could add your own notes, highlighting, etc to any report or listing (like i've done with pen on a listing).

but frankly, I would be happy just to have the correct spacing so everything isn't crunched together. In an assembly listing, for every blank line, or space command, it just puts in a 0 CC (for double space), which means all your subroutines which you took pains to separate visually are now squished togehter when you look at the listing on file.

and yes, I know I could write something that would take the listing and inseart a blank line for a CC of 0 in the output - but I would like to know if there is already a tool out already out there?

Thanks,
_________________
Lynne

All Other Mainframe Topics :: RE: converting a mainframe file with ASA CC to word document

$
0
0
Author: steve-myers
Posted: Wed Apr 04, 2018 10:37 am (GMT 5.5)

What I did years ago (back in the 1990s) was I wrote a mainframe program to build a text data set using the form feed character and blank lines in place of carriage control characters. The program handles both ASA and machine carriage control. I can download this data set to my PC as a text transfer (the EBCDIC FF character translates to the Ascii FF character) and load the PC file into a word processor.

WordPerfect and M$ Word worked well, LibreOffice and/or Open Office have trouble. You tell the word processor to use a fixed width, usually around 8 point font and print in landscape mode. You'll find you have to fiddle with margins to get good results. I could persuade Word Perfect to go 2 mainframe pages in one print page in portrait mode with very tiny type, or even 4 pages with very very tiny type, though I had to rearrange the pages to get good results, but that stuff only ran on WinXP. In any event the page rearrangement code got lost when the WinXP machine croaked a few years ago.

Windoze Notepad displays the file quite nicely - obviously with no pagination.

Viewing all 8500 articles
Browse latest View live