View previous topic :: View next topic |
Author |
Message |
luis_a_roman2nd Beginner
Joined: 21 Nov 2003 Posts: 1 Topics: 1
|
Posted: Fri Nov 21, 2003 10:51 am Post subject: Quick questions - ASCII to EBCID |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Nov 21, 2003 11:08 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Nov 21, 2003 1:47 pm Post subject: |
|
|
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 |
|
 |
|
|