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

[Solved]How to add 2 digits to COMP-3 file?


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: Tue Apr 06, 2021 1:05 pm
Reply with quote

Hello, how are you? this is my first question in this great forum.
My doubt is the following.

I have this copy
ID-CAP PIC S9(14)V99 COMP-3

Then I have the next PD file of 7 digits that I unload from a SQL TABLE
____`Î% (7 digits) (the '_' are blank spaces)

In order to open the file in the FAID I added 2 ZERO DIGITS to the pd value of 7 digits in order to form a 9 bytes value:
OUTREC FIELDS=(X'0C',X'0C,64,7)



but when I want to open the file in the FILE-AID it shows it wrongly, with several stars ************

Can you give me some clue of what Im doing wrong?

Thank you very much and I hope I have been clear.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Tue Apr 06, 2021 1:24 pm
Reply with quote

IIRC, instead of:
Code:
OUTREC FIELDS=(X'0C',X'0C,64,7)

try something like
Code:
OUTREC FIELDS=(1Z,64,7)
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Apr 06, 2021 5:09 pm
Reply with quote

And the relevance of this posting to JCL or VSAM?

The question is rhetorical...
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Tue Apr 06, 2021 5:33 pm
Reply with quote

0) it is a good idea to start learning from: how to use code tags in forum’s posts

1) there is no such thing as “a file” in mainframe

2) neither a file, nor a dataset can be COMP-3

3) under no circumstances “digits” can be “added to file”

4) all said above has not a minor relation neither to JCL, nor to VSAM
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Apr 06, 2021 6:01 pm
Reply with quote

sergeyken wrote:
0) it is a good idea to start learning from: how to use code tags in forum’s posts

1) there is no such thing as “a file” in mainframe

2) neither a file, nor a dataset can be COMP-3

3) under no circumstances “digits” can be “added to file”

4) all said above has not a minor relation neither to JCL, nor to VSAM


im sorry, I posted this here because my intention was to find a solution to this requeriment using a jcl expression.
I promise to not commit againd the errors that you remark me in my next topic.

My apologies again.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Apr 06, 2021 6:04 pm
Reply with quote

prino wrote:
And the relevance of this posting to JCL or VSAM?

The question is rhetorical...




im sorry, I posted this here because my intention was to find a solution to this requeriment using a jcl expression.

My apologies again, I promise to not commit againd the errors that you remark me in my next topic.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Apr 06, 2021 6:16 pm
Reply with quote

EDIT.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Apr 06, 2021 6:23 pm
Reply with quote

Joerg.Findeisen wrote:
IIRC, instead of:
Code:
OUTREC FIELDS=(X'0C',X'0C,64,7)

try something like
Code:
OUTREC FIELDS=(1Z,64,7)


Thank you so much, I added 2Z and the work is fine!!!

Can you reccommend me some pdf that teachs me in some didactic way the use of SORT?

Thank you again.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2011
Location: USA

PostPosted: Tue Apr 06, 2021 6:29 pm
Reply with quote

Ali_gezer wrote:
Joerg.Findeisen wrote:
IIRC, instead of:
Code:
OUTREC FIELDS=(X'0C',X'0C,64,7)

try something like
Code:
OUTREC FIELDS=(1Z,64,7)


Thank you so much, I added 2Z and the work is fine!!!

Can you reccommend me some pdf that teachs me in some didactic way the use of SORT?

Thank you again.

Your problem is not with SORT (and not with either JCL, or VSAM).
You need to learn carefully the data formats used by IBM.
Otherwise no SORT manual, neither PDF, nor HTML, not TXT would help.

In your posts, there is absolute mess between “digits” and “bytes”, to say nothing about other terminology...

As a hint: the correct way to extend a 7-bytes to 9-bytes correct COMP-3 field using SORT tool might be as follows
Code:
 BUILD=(64,7,PD,LENGTH=9)

It should be clear only when data formats are not mixed in one’s mind.
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Apr 06, 2021 6:34 pm
Reply with quote

sergeyken wrote:
Ali_gezer wrote:
Joerg.Findeisen wrote:
IIRC, instead of:
Code:
OUTREC FIELDS=(X'0C',X'0C,64,7)

try something like
Code:
OUTREC FIELDS=(1Z,64,7)


Thank you so much, I added 2Z and the work is fine!!!

Can you reccommend me some pdf that teachs me in some didactic way the use of SORT?

Thank you again.

Your problem is not with SORT (and not with either JCL, or VSAM).
You need to learn carefully the data formats used by IBM.
Otherwise no SORT manual, neither PDF, nor HTML, not TXT would help.


Yes, I work since a year in mainframe and this is the first time that I face problems with data formats and so. It was the first time that I need to use the data in a sql column and take it to a copy, so my need was to modify this comp-3 value.
Here in Argentina is common to give work to people who is not fully prepared and believe me I tried various things before asking here.
I have read some cobol texts that a friend gave me but did not find a clue there, so if you consider a good pdf about formats it would be very useful for me.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Tue Apr 06, 2021 7:16 pm
Reply with quote

Moved to DFSORT.

Please google 'dfsort manual' and 'DFSORT Tricks' and you would get a pdf/s to start learning and this site has sticky link for manual under DFSORT section.
www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236878?OpenDocument
Back to top
View user's profile Send private message
Ali_gezer

Active User


Joined: 06 Apr 2021
Posts: 123
Location: argentina

PostPosted: Tue Apr 06, 2021 7:24 pm
Reply with quote

Rohit Umarjikar wrote:
Moved to DFSORT.

Please google 'dfsort manual' and 'DFSORT Tricks' and you would get a pdf/s to start learning and this site has sticky link for manual under DFSORT section.
www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3sc236878?OpenDocument


Thank you.
I will do it.

Greetings.
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 How to split large record length file... DFSORT/ICETOOL 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top