Extract specified number of characters of special records.



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Extract specified number of characters of special records.

Postby Mehdi shri » Tue Oct 02, 2012 1:42 pm

Dear friend
I have this input QSAM for SORTIN DD.

ACCTOUNT 00002001 0000000001
BALL 99000001ABCDEFGHIJKLMN
BALL 99000002AABBCCDDEEFFGG


I want to extract records they have ACCOUNT and BALL. But only 13 character of records which contain BALL like below:

ACCTOUNT 00002001 0000000001
BALL 99000001
BALL 99000002


What is the control statement for this?
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Extract specified number of characters of special recor

Postby BillyBoyo » Tue Oct 02, 2012 2:06 pm

Can you construct a large example input file, which represents the combinations of data that can occur.

Can ACCTOUNT (is that a typo?) be present without BALL records following? Can BALL records be present without ACCTOUNT preceding? Are records with ACCTOUNT and BALL also mixed with other records? That type of thing.

Then show the expected output for each group of records.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Extract specified number of characters of special recor

Postby Mehdi shri » Tue Oct 02, 2012 5:38 pm

I want all records but record which has BALL must be reformated to give of 13 first charactes of its.
Mehdi shri
 
Posts: 138
Joined: Sun Jan 16, 2011 6:30 pm
Has thanked: 57 times
Been thanked: 0 time

Re: Extract specified number of characters of special recor

Postby BillyBoyo » Tue Oct 02, 2012 5:42 pm

  OPTION COPY
  INREC IFTHEN=(WHEN=(1,4,CH,EQ,C'BALL'),BUILD=(1,13))

These users thanked the author BillyBoyo for the post:
Mehdi shri (Tue Oct 02, 2012 6:25 pm)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post