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
 

 

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: 59
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: 7236

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: 59
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: 7236

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: 59
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: 1610
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 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
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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