Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Control statements to convert FBA to FB

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 187
Location: Toronto, ON, Canada

PostPosted: Fri Dec 30, 2011 12:03 am    Post subject: Control statements to convert FBA to FB
Reply with quote

I want to share the below sort control cards that can be used to convert a FBA dataset into FB. It shifts every line over 1 byte and inserts a blank line when it encounters a non-blank print control char. This makes the resulting dataset easy to import into another file (such as a Word document) and not waste space.
HINT: use the "Courier New" font and switch to Landscape with 0.5 inch margins to make the file fit.
Code:
 RECORD TYPE=F,LENGTH=(133,,132)                       
 SORT FIELDS=COPY                                     
** IF FIRST CHAR IS BLANK THEN COPY REMAINING RECORD   
** ALL OTHER RECORDS INSERT A BLANK LINE PRIOR         
 OUTFIL FILES=OUT,                                     
   IFTHEN=(WHEN=(1,1,CH,EQ,C' '),BUILD=(2,132)),       
*  IFTHEN=(WHEN=(1,1,CH,EQ,C'1'),BUILD=(/,2,132)),     
*  IFTHEN=(WHEN=(1,1,CH,EQ,C'0'),BUILD=(/,2,132)),     
*  IFTHEN=(WHEN=(1,1,CH,EQ,C'-'),BUILD=(2/,2,132)),   
   IFTHEN=(WHEN=NONE,BUILD=(/,2,132))                 

NOTE: the lines begining with an asterisk are optional can be removed. Also the RECORD statement is not required but I put it there as an error check. If the input file record length was not 133 byte then DFSORT will fail.
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Fri Dec 30, 2011 1:07 am    Post subject:
Reply with quote

Jerryte,

Simply Code RECFM=FB on JCL and use the following control cards.

Code:

  SORT FIELDS=COPY
  INREC BUILD=(2,132)
//*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Control-M restart instruction sonaliingle CA Products 2 Tue Nov 28, 2017 5:05 pm
No new posts Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm
No new posts PLI %IF statements Pedro PL/I & Assembler 1 Tue Sep 19, 2017 12:06 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us