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

how to copy from a particular line


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue May 22, 2012 9:10 pm
Reply with quote

Excel handles tab delimited files - I've just created one. Don't ask me what happened next? I still cannot find what I need to PARSE and convert from VB to FB in one go!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed May 23, 2012 12:49 am
Reply with quote

Far too quick - no mention of PARSE at all. But this is hijacking the thread so I will leave it and see if I can find an appropriate example somewhere.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed May 23, 2012 2:32 am
Reply with quote

well here is a way to create a semicolon delimited file using DFSORT

Code:

//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DATA,DLM=$$                                             
JOBXXXX CPUTIME 196.0 TOTAL ELAPSED TIME 200.8                       
//NXXXXX JOB,CLASS                                                   
//STEP1                                                               
//                                                                   
//                                                                   
RELATIONSHIPS                                                         
PROCESSING OPTIONS                                                   
TABLE NAME NOOF ROWS                                                 
TAB1 9018                                                             
TAB2 2000                                                             
$$                                                                   
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,18,CH,EQ,C'PROCESSING OPTIONS'), 
  PUSH=(81:ID=1,SEQ=8))                                               
  OUTFIL INCLUDE=(81,1,CH,GT,C' ',AND,82,8,ZD,GT,2),IFOUTLEN=25,     
  REMOVECC,HEADER1=('TABLE NAME;NO:OF ROWS;'),IFTHEN=(WHEN=INIT,     
   PARSE=(%01=(ENDBEFR=C' ',FIXLEN=10),%02=(FIXLEN=10)),             
   BUILD=(%01,JFY=(SHIFT=RIGHT),C';',%02,UFF,M11,LENGTH=10,C';'))     
//*


The output from this is
Code:

TABLE NAME;NO:OF ROWS;
      TAB1;0000009018;
      TAB2;0000002000;
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
Search our Forums:

Back to Top