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

Syncsor conversion from Character to Fixed Point Signed.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat Jun 18, 2011 9:25 am
Reply with quote

Hi,

My input file is having data in Character format (X(19)) which i need to convert into fixed point signed (S9(18)COMP) . Can it be achieved with the below sort card.

Code:
SORT FIELDS=COPY
INREC OVERLAY=(1,19,C,TO=FI,LENGTH=8)
Back to top
View user's profile Send private message
prasanth_thavva

New User


Joined: 28 Jul 2005
Posts: 86
Location: Chennai

PostPosted: Sat Jun 18, 2011 12:05 pm
Reply with quote

yes it can be , have you tried with the control card
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Jun 18, 2011 2:28 pm
Reply with quote

not if the data is non-numeric. Do you mean it is Zoned Decimal?
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Sat Jun 18, 2011 4:37 pm
Reply with quote

Thanks Prashant... Nic the data is numeric... Just making myself familiar with OVERLAY function. Can this function be used along with OUTREC?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Jun 18, 2011 4:58 pm
Reply with quote

Quote:
Can this function be used along with OUTREC?


Never having used SYNCSORT I have no idea but I presume you have access to the manual and that will show the syntax allowed.
Back to top
View user's profile Send private message
kratos86

Active User


Joined: 17 Mar 2008
Posts: 148
Location: Anna NGR

PostPosted: Mon Jun 20, 2011 12:11 pm
Reply with quote

Instead we run your card and provide response. It would be faster if you run the job and see yourself what is the response.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Tue Jun 21, 2011 8:26 pm
Reply with quote

I ran the job but it gave me syntax error. Can anyone help me with this... As is stated earlier i need to convert Character data to Binary. However i was able to convert from Binary to Character with below sort card.


Code:
SORT FIELDS=COPY
INREC OVERLAY=(1,8,BI,TO=CH,LENGTH=19)
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 21, 2011 10:28 pm
Reply with quote

Hello,

The best way for you to get help is to actually post something we can use. This:
Quote:
I ran the job but it gave me syntax error.
is the second worst way to ask a question or present a problem. The worst is to post "It didn't work".

Post the jcl and control statements and all of the informational/diagnostic messages - including all message ids. Use the Code tag to improve readability and preserve alignment.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Wed Jun 22, 2011 7:10 am
Reply with quote

Apologies for not providing the complete data earlier. I can't access mainframe from home and can't access internet from Work hence the delay and inaccuracy in providing the data.Below is the JCL which i used. Input & output file is of variable length. The first 19 bytes which are in character format should be converted to Binary format.

Code:
//STEP0001     EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DISP=SHR,DSN=INPUT.FILE                         
//SORTOUT  DD DISP=OUTPUT.FILE, DISP=SHR                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  OUTREC FIELDS=(1,4,5,19,CH,EDIT(TTTTTTTT),LENGTH=8) 
/*                                                             

Job failed with syntax error in the sort card pointing to CH in the OUTREC statement.

But when i tried converting from binary to character it worked. JCL is same with below sort card.

Code:
SORT FIELDS=COPY                                               
  OUTREC FIELDS=(1,4,5,19,BI,EDIT(TTTTTTTTTTTTTTTTTTT),LENGTH=19) 

Hope this information helps.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jun 22, 2011 9:11 am
Reply with quote

Hello,

Quote:
I can't access mainframe from home and can't access internet from Work hence the delay
When you want to post "mainframe things" suggest you copy them from the mainframe screen and paste them into a e-mail that you send to your home e-mail. When you get home paste the info into your post here.

Quote:
Use the Code tag to improve readability and preserve alignment.
Was this not clear?

Suggest you research the field limit. Is there some reason you did not post the informational/diagnostic messages - including all message ids.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Wed Jun 22, 2011 8:36 pm
Reply with quote

Hi,

Am not supposed to send mail to outside domain.

Diagnostic message.

SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,19,CH,EDIT(TTTTTTTT),LENGTH=8)
*
WER268A INREC STATEMENT : SYNTAX ERROR .

If there is any other to convert from Character to Binary format please inform.
Back to top
View user's profile Send private message
mushreyas

New User


Joined: 18 Jul 2008
Posts: 59
Location: Bangalore

PostPosted: Fri Jun 24, 2011 9:09 pm
Reply with quote

Thanks for your inputs. I was successfully able to perform my requirement.
I had to use the below SORT card.

SORT FIELDS=COPY
OUTREC FIELDS=(1,4,5,19,ZD,TO=BI,LENGTH=8)
As the character data contains only numeric digits i used ZD instead of CH.

Once thanks for your inputs.. I am actually new to this SYNCSORT hence its taking me sometime to learn...
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Jun 25, 2011 12:05 am
Reply with quote

Hello,

Good to hear it is working - i got sidetracked. Thank you for letting us know icon_smile.gif

If you don't already have them, i sugggest you download the documentation for your release of Syncsort so you will have it locally. Syncsort support will help you to this (if your organization is licensed).
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Point and Shoot )PTNS TSO/ISPF 0
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top