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

How to fill with zeroes pd intended spaces.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Thu Apr 15, 2021 8:42 pm
Reply with quote

Hello, how are you.

I have the next copy

Code:
FIRST   PIC    9(05)       COMP-3




I tried to use:




Code:
OUTFIL IFTHEN=(WHEN=(56,1,CH,EQ,C'P',AND,34,12,ZD,GT,400000000000),
          BUILD=(3z))


But when I use the output to see it in the FILE MANAGER with the copy I see the classic errror

CAP-OTOR
Ñ2
PD 1:3
<---+>
****** **** Top of data ****
=LGTH ******
=LGTH ******
=LGTH ******
=LGTH ******
=LGTH ******
=LGTH ******

Do you have any clue that I could investigate?

Thank you.[/quote]
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Thu Apr 15, 2021 9:05 pm
Reply with quote

Please show sample Input and desired Output (and use code tags).
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Thu Apr 15, 2021 9:20 pm
Reply with quote

Joerg.Findeisen wrote:
Please show sample Input and desired Output (and use code tags).


Hello, thanks.
The input of this archive is one of 400 bytes, each time the IFTHEN=WHEN clause is satisfied, my intention is to create a record with zeroes pd values that satisfy the PIC 5 COMP-3 requiriment in order to see this right in the file manager.


But when I use

Code:

OUTFIL IFTHEN=(WHEN=(56,1,CH,EQ,C'P',AND,34,12,ZD,GT,400000000000),
BUILD=(3z))


I get one output file that when I tried to see in the file manager with the copy shown above the file manager shows it wrongly.

So the output I desire is one that satisfy the PIC 9(5) COMP-3 requiriment in order to see this right in the file manager, but it seems that the BUILD=(3z) is not working.

Thanks for your help.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Thu Apr 15, 2021 9:29 pm
Reply with quote

See https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-dfsort-data-formats about data formats in DFSORT. You will spot why 3Z is not the right answer for PD. You might use +0,PD,LENGTH=<n> for your purpose.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Thu Apr 15, 2021 9:30 pm
Reply with quote

Joerg.Findeisen wrote:
See https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-dfsort-data-formats about data formats in DFSORT. You will spot why 3Z is not the right answer for PD. You might use +0,PD,LENGTH=<n> for your purpose.


Thank you friend, I own you several helps, I will se that pdf.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Thu Apr 15, 2021 9:38 pm
Reply with quote

With data from COBOL you should also have a look at https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-dfsort-formats-cobol-data-types to see what formats to use. That's pretty straight forward then with the other information. icon_wink.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Thu Apr 15, 2021 10:22 pm
Reply with quote

Ali_gezer wrote:
my intention is to create a record with zeroes pd values that satisfy the PIC 5 COMP-3 requiriment in order to see this right in the file manager.

But when I use
Code:

OUTFIL IFTHEN=(WHEN=(56,1,CH,EQ,C'P',AND,34,12,ZD,GT,400000000000),
BUILD=(3z))


I get one output file that when I tried to see in the file manager with the copy shown above the file manager shows it wrongly.

So the output I desire is one that satisfy the PIC 9(5) COMP-3 requiriment in order to see this right in the file manager, but it seems that the BUILD=(3z) is not working.


The BUILD=(3Z) (not BUILD=(3z)) should create a field looking as X'000000' in memory

The PIC 9(5) COMP-3 VALUE +0 should create a field looking as X'00000C' in memory

Please, try to understand the difference in data formats.
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 Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts To Remove spaces (which is in hex for... JCL & VSAM 10
No new posts How to remove spaces in between. SYNCSORT 12
Search our Forums:

Back to Top