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
 

 

Syncsor conversion from Character to Fixed Point Signed.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsor conversion from Character to Fixed Point Signed.
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    Post subject: Reply to: Syncsor conversion from Character to Fixed Point S
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: 1715
Location: UK

PostPosted: Sat Jun 18, 2011 2:28 pm    Post subject:
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    Post subject: Reply to: Syncsor conversion from Character to Fixed Point S
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: 1715
Location: UK

PostPosted: Sat Jun 18, 2011 4:58 pm    Post subject:
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    Post subject:
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    Post subject: Reply to: Syncsor conversion from Character to Fixed Point S
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

Site Director


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

PostPosted: Tue Jun 21, 2011 10:28 pm    Post subject:
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    Post subject: Reply to: Syncsor conversion from Character to Fixed Point S
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

Site Director


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

PostPosted: Wed Jun 22, 2011 9:11 am    Post subject:
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    Post subject: Reply to: Syncsor conversion from Character to Fixed Point S
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    Post subject: Reply to: Syncsor conversion from Character to Fixed Point S
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

Site Director


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

PostPosted: Sat Jun 25, 2011 12:05 am    Post subject:
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    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 File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Continuation Character ballaswaroop SYNCSORT 8 Thu Aug 25, 2016 4:46 pm


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