MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inserting ASCII value of Tab key

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Mon Sep 19, 2011 8:13 am    Post subject: Inserting ASCII value of Tab key Reply with quote

Hi,

I have to prepare one file where fields are seperated by Tab Key(file is verified after transmitted to user end in text format). ASCII value of tab key is 09.

Suppose below is my record structure, please let me know how to insert ascii value of tab key in between fields either through COBOL program or through SORT or by another usefull means.

Name PIC X(10)
ID PIC 9(10)
Branch PIC X(20)
_________________
Thanks
Madhu Sudhan
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Mon Sep 19, 2011 10:26 am    Post subject: Reply with quote

psmadhusudhan,

Is this a trick question? Define a TAB-VALUE PIC X and move the hex value.

Code:

Name PIC X(10)
TAB-VAL1 PIC X
ID PIC 9(10)
TAB-VAL2 PIC X
Branch PIC X(20)

MOVE X'09' TO TAB-VAL1
              TAB-VAL2
 

or with sort

Code:

  INREC BUILD=(1,10,X'09',11,10,X'09',21,20)

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Mon Sep 19, 2011 10:47 am    Post subject: Reply with quote

do the contents of NAME and ID contain ASCII or ebcdic data?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
psmadhusudhan
Beginner


Joined: 28 Nov 2006
Posts: 143
Topics: 48

PostPosted: Mon Sep 19, 2011 7:45 pm    Post subject: Reply with quote

kolusu,

No this is not trick question, I dont know whether this movement will really give tab key in the final file or not, thats why I have posted the question.

One small query if we move hexadecimal '09' is it same as ASCII value. Dont mind if it is stupid question.

I will try your solution and let you know.

dbzTHEdinosauer,

NAME and ID eBCDIC data
_________________
Thanks
Madhu Sudhan
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Tue Sep 20, 2011 10:24 am    Post subject: Reply with quote

psmadhusudhan wrote:
kolusu,

No this is not trick question, I dont know whether this movement will really give tab key in the final file or not, thats why I have posted the question.

One small query if we move hexadecimal '09' is it same as ASCII value. Dont mind if it is stupid question.


psmadhusudhan,

I guess you got it all wrong. If your intention is to FTP/XMIT a mainframe file to PC then you need to use the EBCDIC value of the tab (X'05') and it get automatically transferred to the corresponding tab value on the PC side. So move X'05' as tab value between fields and then FTP/XMIT the file to PC.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Fri Sep 30, 2011 11:21 am    Post subject: Reply with quote

I agree with your latest post, Kolusu.

If you separate columns in a file with tab characters (hex 05) and ftp it to a Windows platform and save it as a .prn file, when the file is opened it will open as Excel.

This works better than a .csv file (comma-separated values) at times, in case a comma may be part of your data. Then your fields are not aligned correctly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group