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
 
Regading ascii and ebcedic in sort.

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

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Wed Mar 05, 2014 4:51 pm    Post subject: Regading ascii and ebcedic in sort.
Reply with quote

Hi all... i was trying to filter out records in as per below requirement:
characters having 'A' to 'O'in 3rd position in one file(say: SORTOF01) and remaining in 2nd file. The sort card below worked fine for me:
Code:
SORT FIELDS=COPY
OUTFIL INCLUDE=(3,1,AC,GE,X'41',AND,3,1,AC,LE,X'4F'),FILES=01
OUTFIL OMIT=(3,1,AC,GE,X'41',AND,3,1,AC,LE,X'4F'),FILES=02

However, i have a doubt here. Mainframes uses EBCEDIC.In sort card i used 3,1,AC,x'41 which compares hexcode in ASCII. hex of A in ascii is 41 and 'O' is 4F. My doubt is how the hex code in ascii is working in EBCEDIC environment. Might be a silly question to ask, but wanted to figure out and get ur advice.

Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Mar 05, 2014 5:09 pm    Post subject: Reply to: Regading ascii and ebcedic in sort.
Reply with quote

The key will be to discover what field type AC means. Have you looked in your manual (I know the answer is No, so do so now).
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Wed Mar 05, 2014 5:26 pm    Post subject: Reply to: Regading ascii and ebcedic in sort.
Reply with quote

Hi Bill.. I had a look into the manual. That is what was confusing me.
AC stands for ASCII character. But how is dfsort comparing ascii hex codes when z/os uses ebcedic.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Wed Mar 05, 2014 5:53 pm    Post subject: Reply to: Regading ascii and ebcedic in sort.
Reply with quote

Well, in the example it is not strictly needed, but a useful note to help explain the code.

Data is data, It is all bits. Even ASCII these days has eight bits. If you print your file in hex, it'll look like hex. It is just that the values mean different things in the different conventions.

You could in your example replace AC with CH. However, if not using hex constants... well, you can discover uses for AC.

z/OS has no problem processing ASCII data. The only problem processing ASCII data correctly (a different thing) is to know what is ASCII.

It is generally easier to convert from ASCII to EBCDIC as a file arrives, and the other way as a file departs. However, it is not mandatory.
Back to top
View user's profile Send private message
rikdeb

New User


Joined: 19 Jan 2009
Posts: 62
Location: hyderabad

PostPosted: Wed Mar 05, 2014 5:58 pm    Post subject: Reply to: Regading ascii and ebcedic in sort.
Reply with quote

Thanks Bill..!
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1806
Location: NY,USA

PostPosted: Thu Mar 06, 2014 8:04 am    Post subject:
Reply with quote

As Bill said in detail, the below link would also support to wat you asked for,

http://www-01.ibm.com/support/docview.wss?uid=isg3T7000242
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

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