Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
sureshbabu.jv

New User

Joined: 11 Apr 2006
Posts: 41
Location: Chennai

 Posted: Sat Oct 04, 2008 3:31 pm    Post subject: CONVERT BI TO ZD(NUMERIC) Hi, Please find the input values and declaration below. é éme Ú\# éme óß@ óß@ òù* éme óß@ óß@ ê&ü ê&ü ¼ P éme óß@ óß@ æ^Á æ^Á éme óß@ óß@ =d7 äx éme IACCTCA 062 04 B I whave to convert the input format BI to editable format(ZD or any) I have used THE BELOW CONDITIONS But not worked to me. OUTREC FIELDS=(1,4,B,TO=ZD,LENGTH=8), OUTREC FIELDS=(1,4,BI,TO=FS,LENGTH=8) OUTREC FIELDS=(1,4,BI,TO=ZDF) Could you suggest me that how to convert the above input data to editable format in the output file. Thank YOu! Suresh

Frank Yaeger

DFSORT Moderator

Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

Posted: Sat Oct 04, 2008 9:45 pm    Post subject:

IACCTCA 062 04 B

Does this mean the starting position is 62, the length is 4 and the format is BI? BI implies that the values are all positive. FI would be used if the values can be positive or negative.

If the starting position is 62, why are you using a starting position of 1?

A 4-byte BI field can result in up to 10 digits so:

 Code: OPTION COPY    OUTREC BUILD=(p,4,BI,TO=ZD,LENGTH=10)

should work where p is the correct starting position. But:

 Code: OUTREC FIELDS=(p,4,BI,TO=ZDF)

would also work and you said it didn't (for DFSORT, TO=ZD and TO=ZDF are equivalent and the default output length for 4,BI would be 10).

It would have helped if you'd shown the input values in hex and the expected output values. Please do that (3 or 4 values are sufficient).

What exactly do you mean by it didn't work (error messages, incorrect output values?). What output did you get when you tried this? What output did you expect? Are your values all positive or can they be positive and negative? What messages did you receive? Did you use the correct starting position (62? 1?)? Is the RECFM of the input file FB or VB?
sureshbabu.jv

New User

Joined: 11 Apr 2006
Posts: 41
Location: Chennai

 Posted: Mon Oct 06, 2008 6:35 am    Post subject: Hi Frank Thanks for your response! Starting position is 62 only. Sorry i mentioned 1 instead of 62. RECFM of the input file is FB. All the Input values are POSITIVE values(account numbers). I am getting the copy of input data. Values were not changed.Got the same values to the output file. I tried with above methods but still values were not changed,got the copy of input data only. I have trid using ICETOOL and DFSORT both were not worked to me.. Thank you! Suresh
dick scherrer

Site Director

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

 Posted: Mon Oct 06, 2008 7:13 am    Post subject: Hello, Please post the jcl, control statements and the informational messages created when the jobs were run. Be sure to include the complete information including the message ids.
Frank Yaeger

DFSORT Moderator

Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

Posted: Mon Oct 06, 2008 9:56 pm    Post subject:

Here's a DSORT job that will do what you asked for. I assumed the RECFM is 80 and you want 10 digits for the displayed field. You can change the job if appropriate.

 Code: //S1    EXEC  PGM=ICEMAN //SYSOUT    DD  SYSOUT=* //SORTIN DD DSN=...  input file (FB/80) //SORTOUT DD DSN=...  output file (FB/86) //SYSIN    DD    *   OPTION COPY   INREC BUILD=(1,61,62,4,BI,TO=ZD,LENGTH=10,66,15) /*

If that's not what you want, then you need to describe more exactly what you do want. If it is what you want, but "it doesn't work", then show the JCL, control statements and //SYSOUT messages, and/or the input (hex values) and expected output.
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics How to convert 2 bytes into single by... pkmurali DB2 6 Fri May 25, 2018 1:41 pm How can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us