Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Padding zeroes in a signed comp-3 field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Sep 26, 2007 3:18 pm    Post subject: Padding zeroes in a signed comp-3 field
Reply with quote

Hi,

I got a requirement as follows. To pad zeroes in a field with following defintion.
Code:
AMT               PIC S9(6)V99  COMP-3.
Field is at position 3462.

Condition is that location 2562 should have value A for padding.

I used a following sort card.

Code:
OPTION COPY                                                         
INREC IFTHEN=(WHEN=(2562,1,CH,EQ,C'A'),                           
              BUILD=(1,3461,3462:4Z,3466:X'0C',3467,1533))         
OUTFIL IFOUTLEN=5000     


Quote:
I am using SYNCSORT 1.2.2.2R.


Unfortunately I dont have manual for this release. I have for 1.2.0, which does not have IFTHEN.

As you can see I cheated to include sign C in the last nibble at positio 3466. Can any body suggest a straight forward methord. Sort card I mentioned is working fine. I but I like to have decent one.

Thanks,
Abin.
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 3:33 pm    Post subject:
Reply with quote

First off, won't add the X'0C' to the end imbed the original sign into the middle of the number? Sort of like 01234c0c?
If you contact Syncsort, they can provide you with the documentation you need....From a prior post:
Quote:
Get the manuals, it is not that difficult.....
Quote:
Unfortunately, all licensed SyncSort customers must request manuals directly from us, or download it from our website using an online support account. It is in breach of contract for an individual to share SyncSort documentation with others outside of their own company. However, please feel free to pass on my contact info to anyone who is in need of manuals and I would be happy to assist.
Regards,
Alissa
Alissa Margulies
SyncSort Mainframe Support
201.930.8260
zos_tech@syncsort.com

and:
Alissa Margulies wrote:
dick scherrer wrote:
Which Syncsort publication has the writeup for IFTHEN? My downloaded doc does not have IFTHEN.

Hi Dick,

The SyncSort for z/OS 1.2 Addendum contains the BUILD, IFTHEN, IFOUTLEN, and OVERLAY Parameters.

If you have a SyncSort Online Customer Support Account, you can download the file named "SyncSort 1.2 Programmers Guide Add.pdf"

Regards,
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Sep 26, 2007 3:43 pm    Post subject:
Reply with quote

Hi,

Quote:
First off, won't add the X'0C' to the end imbed the original sign into the middle of the number? Sort of like 01234c0c?


Don't think so. An input as following
Code:
00000   
0020C
Became as follows.
Code:
00000
0000C


Thanks,
Abin
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 4:06 pm    Post subject:
Reply with quote

Ah, overlay rather than append....
But how is the 0C overlaying the 2000C?
Ah, the 4Z?
Why not just overlay the entire field with a PD zero?
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Sep 26, 2007 4:22 pm    Post subject:
Reply with quote

Quote:
Why not just overlay the entire field with a PD zero?


You mean use
Code:
3462:5Z
instead of
Code:
3462:4Z,3466:X'0C'


Ah the problem is the result will be like
Code:
00000
00000
which is invalid in a signed PD field. The last nibble which is the sign is what made me cheat the card.

Any other way of doing it straight without making confsuion?

Thanks,
Abin
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Sep 26, 2007 4:44 pm    Post subject:
Reply with quote

No, something more like
3462:4,PD,+0......?
Is that valid?
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Sep 26, 2007 5:07 pm    Post subject:
Reply with quote

Nope getting an error

Code:
BUILD=(1,3461,3462:4,PD,+0,3467,1534))   
                    *       


Some thing like below card does the work, provided we get an abend if field 3462,5 contains an invalid PD value, which will happen in my case. Also sign nibble remains constant. If it's a D, remains a D, when I need C there.

Code:
BUILD=(1,3461,3462,5,PD,MUL,+0,PD,LENGTH=5,3467,1534)) 


Thanks,
abin
Back to top
View user's profile Send private message
abin

Active User


Joined: 14 Aug 2006
Posts: 198

PostPosted: Wed Sep 26, 2007 5:24 pm    Post subject:
Reply with quote

Hi CICS GUY,

Quote:
No, something more like
3462:4,PD,+0......?
Is that valid?


I think you meant something like this.

Code:
3462:+0,TO=PD,LENGTH=5
This works, problem sign nibble contains F instead of C. I think F and C means +, correct? Is there any possibillity of problems arising from this. In normal COBOL when we create COMP-3 it contains C.

Thanks,
Abin.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm
No new posts Sort two file having same field, one ... himanshu malik DFSORT/ICETOOL 7 Thu Feb 02, 2017 10:09 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us