Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Converting s9(9) comp field to char

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Fri Jan 22, 2016 12:14 pm    Post subject: Converting s9(9) comp field to char
Reply with quote

Hi ,

I need to convert the s9(9) comp field to CHAR.

The Data looks as below

000001 I BE BLMN CORP
000002 I BE BMNO CORP
000003 $A PE HELLOC JAKE
000004 A PE HELLOC TOM

The first 4 bytes belongs to custid which I need to convert to CHAR

Could you please help me to resolve this issue.

Regards,
L.Nethaji
Back to top
View user's profile Send private message

l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Fri Jan 22, 2016 12:23 pm    Post subject: Reply to: Converting s9(9) comp field to char
Reply with quote

Hi ,

The input file looks as below .

I BE BLMN CORP
I BE BMNO CORP
$A PE HELLOC JAKE
A PE HELLOC TOM

My bad the rows got pasted in my previous post.Apologies.

I just need to convert it to CHAR

Regards,
L.nethaji
Back to top
View user's profile Send private message
l.nethaji

New User


Joined: 16 Mar 2008
Posts: 90
Location: tamil nadu

PostPosted: Fri Jan 22, 2016 12:44 pm    Post subject: Reply to: Converting s9(9) comp field to char
Reply with quote

HI,

I tried the below JCL .

//JS111 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=ACSTNS1.ACST831P.TB01008
//SORTOUT DD DSN=ACSTN&LVL..ACST831P.TB01008.OUTPUT,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,BLKSIZE=0,DSORG=PS),
// UNIT=SYSDA,SPACE=&SPC1
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,4,BI,CH,LENGTH=11,7,2)
//*

Its giving Syntax error in CH. I am able to do only for converting to numeric edited field.Not able to do it for Char.

Regards,
L.Nethaji
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Jan 22, 2016 2:14 pm    Post subject: Reply to: Converting s9(9) comp field to char
Reply with quote

Code tags. Use them.

If you don't post the error, why should we guess at it?

Have you looked up the error by its message-code?

The is no concept of conversion to "CH".

Since you've not indicated how you want the output, just see what 1,4,BI does. If that's not good enough for you, look at TO= and LENGTH= or the specification of an EDIT mask (EDIT=). Even others.

Can you point to the part of the manual which made you think you could convert to CH? I can attempt to arrange to get it fixed.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us