IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ASCII to BINARY file conversion


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
satsa

New User


Joined: 28 Jun 2005
Posts: 1

PostPosted: Tue Jun 28, 2005 9:58 am
Reply with quote

How do i convert an ASCII file to a binary file using the JCL without using the FTP? Are there any utilities for this conversion?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jun 28, 2005 3:32 pm
Reply with quote

I'm not sure what you mean by BINARY, since that is usually one of the forms of ASCII data (i.e., ASCII can be either ASCII TEXT or ASCII BINARY) when dealing with Unix machines.

One way to setup data translation is with the DFSORT TRAN=ALTSEQ feature, using your own translation table:
Code:

//STEP0100 EXEC PGM=SORT                             
//SYSOUT    DD SYSOUT=*                                 
//SORTIN    DD DSN=YOUR INPUT DATASET,
//             DISP=SHR
//SORTOUT   DD DSN=YOUR OUTPUT ASCII DATASET,
//             DISP=(NEW,CATLG,DELETE),                 
//             UNIT=SYSDA,                               
//             SPACE=(CYL,(X,Y),RLSE)
//SYSIN     DD *                                       
  OPTION COPY
  OUTREC FIELDS=(1,80,TABLE=ALTSEQ)
  ALTSEQ CODE=(...)
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top