View previous topic :: View next topic
|
Author |
Message |
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
IIRC, instead of:
Code: |
OUTREC FIELDS=(X'0C',X'0C,64,7) |
try something like
Code: |
OUTREC FIELDS=(1Z,64,7) |
|
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
And the relevance of this posting to JCL or VSAM?
The question is rhetorical... |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2011 Location: USA
|
|
|
|
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 |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
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 |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
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 |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
EDIT. |
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2011 Location: USA
|
|
|
|
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 |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
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 |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
Back to top |
|
|
Ali_gezer
Active User
Joined: 06 Apr 2021 Posts: 123 Location: argentina
|
|
|
|
Thank you.
I will do it.
Greetings. |
|
Back to top |
|
|
|