Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

sample code for read a 2nd record from last in flatfile how
can do?

Answer Posted / nsingh

ADD SEQUENCE NUMBER

SORT FIELDS=COPY
OUTREC FIELDS = (1,80,SEQNUM,ZD,A)

NOW SORT SEQ NUM IN DESCENDING ORDER
SORT FIELDS=(81,4,ZD,D)

INCLUDE ONLY 2ND LAST REC
SORT FILEDS = COPY
INCLUDE COND = (81,4,ZD,EQ,0002')

REMOVE SEQ NUM FROM FILE & THIS REC IS SELECTED
SORT FIELDS =COPY
OUTREC FIELDS = (1,80)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are 77 levels used for?

1067


State the various causes of s0c1, s0c5 and s0c7.

1030


Can we redefine the field of x(200) to less than 200?

1319


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

3109


Give some examples of command terminators?

1204


how to refer the data field?

2214


Explain how to differentiate call by context by comparing it to other calls?

1135


how do you reference the variable unblock file formats from cobol programs

1289


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

1179


What kind of error is trapped by on size error option?

1185


How are the next sentence and continue different from each other?

1235


) what is the difference between AID and HANDLE AID?

2105


How do we get current date from system with century in COBOL?

1334


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

823


What is the Purpose of POINTER Phrase in STRING command in COBOL?

1201