i just need the first and last record from a sequencial
file?how

Answer Posted / sneha

USE SKIP(N) To skip number of records
if 10 accounts are there and u want to skip first 7 records
use
//sysin dd*
repro infile(dd1) -
outfile(dd2) -
skip(07) -
count(03)
/*
for 1st and last
//sysin dd*
repro infile(dd1) -
outfile(dd2) -
count(1) -
skip(08) -
count(01)
/*

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to compare two datasets without using superce because output is limited to 133 bytes

1486


which utility is used to sort a file in jcl?

750


write a jcl to execute a job by 7:00 am on jan 20,1986?

701


I have mainpgm(abc) this is the only cobol pgm(non-db2).And this pgm calling subpgm name "acd" this also only cobol(non- Db)and this pgm calling some other subpgm this pgm has cobol-db2 pgm. 1) IF you calling static mode how to run and how to compile? 2) IF you calling dynamic mode how to run and how to compile? plz suggestion me.

1956


Can I send output of job to my remote device careerride123?

668






What does a disposition of (new,catlg,keep) for a dsn mean?

619


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

1804


How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?

673


Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period:

3532


what sort card you will use to copy the data from one dataset to another dataset?

734


when can a job time-out occur? How to overcome that?

753


How can a jobs execution priority be modified?

799


What are steplib and joblib?

725


What are the 4 fields in dd statement?

744


Explain the function of //jcllib statement?

708