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
 
Multiple tasks in one DFSORT ?

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

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Wed Nov 15, 2006 1:30 am    Post subject: Multiple tasks in one DFSORT ?
Reply with quote

Hello everyone,
This is my challenge, I have VARIABLE length input file and want to remove blanks, and squeeze data to left, change all *'s to zeroes, ignore some data and extract other data to finally create an output file in FIXED length.

How can all this be done in one DFSORT job ? or is iyt more that one.

would someone be able to provide solution ?

Input file looks like this
00375 1035 49ABCD
00378 *151 01ABCDE FGHIJKLM
35680 *880 99ZZZZZZ XXXX

OUTPUT TO LOOK LIKE THIS...
003751035ABCD
003780151ABCDE FGHIJKLM
356800880ZZZZZZ XXXX
Back to top
View user's profile Send private message

srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Wed Nov 15, 2006 1:49 am    Post subject: Re: Multiple tasks in one DFSORT ? no SQZfunction allowed
Reply with quote

I just found out we do not have the SQZ function installed. so how can I get around that problem ?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Nov 15, 2006 2:28 am    Post subject:
Reply with quote

If that's the way your data looks, then you don't need SQZ to do what you want to do. You say you have variable length input, but I suspect it's really FB with records having different numbers of blanks at the end rather than VB. At any rate, here's FB and VB versions of the job:

FB version

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=... output file (FB)
//SYSIN    DD    *
  OPTION COPY
  INREC BUILD=(1,5,7,1,CHANGE=(1,C'*',C'0'),NOMATCH=(7,1),
    8,3,14,14)
/*


VB version

Code:

//S2    EXEC  PGM=ICEMAN                                         
//SYSOUT    DD  SYSOUT=*                                         
//SORTIN DD DSN=&&VB,DISP=(OLD,PASS)                             
//SORTOUT DD DSN=&&O1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)   
//SYSIN    DD    *                                               
  OPTION COPY                                                     
  INREC BUILD=(1,9,11,1,CHANGE=(1,C'*',C'0'),NOMATCH=(11,1),     
    12,3,18)
/*                                                     
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Wed Nov 15, 2006 9:56 pm    Post subject:
Reply with quote

Thanks for all your help Frank
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Wed Nov 15, 2006 10:06 pm    Post subject: This is how did it...the long way around
Reply with quote

I managed to create the desired result but in the following three separate steps...

1) Convert from VB to FB

//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=FB1,VTOF,OUTREC=(5,80)


2) Reformat data

//SYSIN DD *
OPTION COPY
INREC BUILD=(1,5,6:7,4,12:14,65)


3) Change Asterisk to Zero

OPTION COPY
ALTSEQ CODE=(5CF0)
OUTREC FIELDS=(1,80,TRAN=ALTSEQ)


Thanks Frank for making it more efficient ..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Nov 15, 2006 11:29 pm    Post subject:
Reply with quote

Per your offline note, you really are trying to convert from VB to FB as you said originally but I misunderstood. Here's how to do that in one pass with DFSORT. I assume you're using TRAN=ALTSEQ because the * can be anywhere in the record, so I've factored that in.

Code:

  OPTION COPY
  ALTSEQ CODE=(5CF0)
  INREC BUILD=(1,4,5,TRAN=ALTSEQ)
  OUTFIL VTOF,OUTREC=(5,5,6:11,4,12:18,65)
Back to top
View user's profile Send private message
srj1957

New User


Joined: 15 Dec 2005
Posts: 72
Location: RALEIGH NC, USA

PostPosted: Thu Nov 16, 2006 10:29 pm    Post subject:
Reply with quote

Good point about
Quote:
I assume you're using TRAN=ALTSEQ because the * can be anywhere in the record, ...
What if I would want to use ALTSEQ in a particular position in the record ?
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 ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

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