Suppose i have a file with 10 recs and i want to skip only the
7 th record and copy the rest into another file. How do i do
it using SORT?
Answer Posted / sanjay soni
Let me give it a try:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/80)
//SORTOUT DD DSN=... output file (FB/80)
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,80,SEQNUM,3,ZD)
INCLUDE COND=(81,03,NE,ZD,3)
OUTREC BUILD=(1,80)
/*
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How to pass data to a program that is coded in an exec statement?
how you can direct the data to spool using SYSOUT option?
can any one plzzzzzz tell the jcl code for creating ps using idcams
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
Brief description of inline procedure of jcl.
How jcl work to handle various input output file operations?
What do we mean by 'Virtual storage' for a dataset and for a JOBSTEP ? What is the significance of the following statement for a programmer 'Virtual storage results in program addresses being independent of the addresses that actually exist in a computer' ?
How can return codes be tested before execution of a job step?
What is the purpose of dd dummy statement?
How do you create a temporary dataset?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*
Explain how can the attributes of one sms dataset be copied to another dataset?
What is the function of dd disp parameter?
What is the difference between run mode and addressing mode?