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
 

 

Convert a full word field to character

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Thu Jul 18, 2013 7:43 pm    Post subject: Convert a full word field to character
Reply with quote

I have a record where two fields are defined as full words, and I am trying to convert the to character fields.

This is what the fields look like when I display them with Hex On.

000B 007C
002C 00D8

This is the code that I have tried along with several others.

RLEN = SUBSTR(TMCDATA,093,004)
XLEN = X2C(B2X(RLEN))

I get the following error and I am not sure what I am doing wrong,
any help in the would be greatful.

43 *-* XLEN = X2C(B2X(RLEN)),
43 +++ XLEN = X2C(B2X(RLEN)),
IRX0040I Error running TESTIT, line 43: Incorrect call to routine,
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Thu Jul 18, 2013 7:51 pm    Post subject: Reply to: Convert a full word field to character
Reply with quote

show what You expect for the data posted
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Thu Jul 18, 2013 7:55 pm    Post subject:
Reply with quote

from the first field I would expect to see 700 and from the second field I expect to see 32200 as the values. the first field is the record length and the second filed is the blksize, I am pulling this from the CA1 TMC dataset for a file.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1746
Location: Bloomington, IL

PostPosted: Thu Jul 18, 2013 8:26 pm    Post subject:
Reply with quote

I believe you want the C2D function. The other functions work strings that are interpreted as binary or hexadecimal numbers; C2D works with characters (i.e., actual binary values).
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Thu Jul 18, 2013 8:50 pm    Post subject:
Reply with quote

Akatsuukami,

Thanks that was the trick. I was making this more diffcult than was need.
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
No new posts INVALID FIELD OR CONSTANT IN SORTOF ?? Ron Klop DFSORT/ICETOOL 8 Wed Jan 11, 2017 3:44 pm
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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