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 

Quick questions - ASCII to EBCID

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


Joined: 21 Nov 2003
Posts: 1
Topics: 1

PostPosted: Fri Nov 21, 2003 10:51 am    Post subject: Quick questions - ASCII to EBCID Reply with quote

Does any one know how can I change a file from ASCI format to EBCID?
I have an ASCII file that I need to translate to EBCID in order to print it.

Could I do this translation with COBOL or another utility? I just need to replaces the first 13 characters of the file to blanks.

Thank you.

Luis Roman
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Nov 21, 2003 11:08 am    Post subject: Reply with quote

Luis Roman,

You can use sort to switch between ASCII & EBCDIC. But I am confused with your request.You said
Quote:

I just need to replaces the first 13 characters of the file to blanks.


What about the other fields? DO you want to convert the entire file or Just the first 13 characters to blanks?

Please post a sample of input and output data.

Thanks

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


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

PostPosted: Fri Nov 21, 2003 1:47 pm    Post subject: Reply with quote

Luis Roman sent me an offline mesg with his query.

Quote:

kolusu

What sorts parameters do I need to used to changed the file? Do I need to use
SORT or ICETOOL? An example, will be helpfull.

Thank again Kolusu. Your cooperation is appreciated.

Luis Roman


Luis,

The EBCDIC translation varies from shop to shop as there isn't one standard table.So you can set up your own ALTSEQ table and you can use DFSORT'S ALTSEQ feature.The following Jcl will convert the ascii file to ebcdic based on the ALTSEQ table you mention.I assumed that your input file length is 80 bytes and is of FB RECFM.

Code:
         
//STEP0100 EXEC PGM=SORT                   
//SYSOUT    DD SYSOUT=*                   
//SORTIN    DD DSN=YOUR INPUT ASCII DSN,
//             DISP=SHR
//SORTOUT   DD DSN=YOUR OUTPUT EBCDIC DSN,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=SYSDA,
//             SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *                           
  SORT FIELDS=COPY
  OUTREC FIELDS=(1,80,TABLE=ALTSEQ)
  ALTSEQ CODE=(...)       
//*



Hope this helps...

cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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