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...


How do you define a sort file in JCL that runs the COBOL
program?

Answers were Sorted based on User's Feedback



How do you define a sort file in JCL that runs the COBOL program?..

Answer / shinoy sansilavose

Suppose if you want to sort a file TEST.OUTPUT.FILE which
is the output of your COBOL program then you can do the
following coding in JCL,

//SORTIN DD DSN=TEST.OUTPUT.FILE,DISP=SHR
//SORTOUT DD DSN=TEST.OUTPUT.SORT.FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=TESTDA,
// SPACE=(CYL,(50,50)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)

Now the sorted file TEST.OUTPUT.SORT.FILE will be sorted
based on the field starting from 1 to 5 specified in the
input for SORT.

Is This Answer Correct ?    30 Yes 7 No

How do you define a sort file in JCL that runs the COBOL program?..

Answer / nk

//STEP1 EXEC PGM=MYSORTPGM
//INFILE DD DSN=MY.UNSORTED.FILE,DISP=SHR
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(100,20))
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(100,20))
//OUTFILE DD DSN=MY.SORTED.FILE,
// DISP=(,CATLG,DELETE),
// UNIT=TEST,SPACE=(CYL,(100,10),RLSE),
// DCB=(DSCB.FB,LRECL=500)
SELECT SORTWK01-FILE ASSIGN TO SORTWK01.
SD SORTWK01-FILE
etc.

Is This Answer Correct ?    15 Yes 11 No

How do you define a sort file in JCL that runs the COBOL program?..

Answer / rik

YOU HAVE TO SIMPLY WRITE THE FOLLOWING CODE IN YOUR JCL :

//STEP1 EXEC PGM=SUPERSRT
//SORTIN DD DSN=TEST001.INFILE,DISP=SHR
//SORTOUT DD DSN=TEST001.SORTED,DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0),
// UNIT=WORK,SPACE=(TRK,5,2),RLSE)
//SYSIN DD *
SORT FIELDS=(16,05,ZD,A)
/*

THE CONTAINT OF THE TEST001.INFILE WILL BE COPPIED TO
TEST001.SORTED FILE AND THIS TEST001.SORTED FILE WILL BE
SORTED IN ASCENDING ORDER OF THE CONTAINT OF FIELD POSITION
16 TO 20..

Is This Answer Correct ?    8 Yes 5 No

How do you define a sort file in JCL that runs the COBOL program?..

Answer / priya

Hi,
I want to sort the file in run jcl and i need to get that
sorted file in cobol program there in select statement what
dd name i should mention?

Is This Answer Correct ?    2 Yes 1 No

How do you define a sort file in JCL that runs the COBOL program?..

Answer / savemeenachilar

//STEP1 EXEC
PGM=SORT
//SORTIN DD
DSN=XMMD01.DEV3.REPORT6.LIST,DISP=SHR
//SORTOUT DD
DSN=AMMDPM1.DEV3.SAMPLE.SRTOUT1,
// DISP=
(NEW,CATLG,DELETE),
//
UNIT=SYSDA,
//
MGMTCLAS=DEVL,
// SPACE=(CYL,
(1,10),RLSE),
// DCB=
(RECFM=FB,LRECL=133)
//SYSIN DD
*
SORT FIELDS=
(29,8,CH,A)
SUM
FIELDS=NONE
INCLUDE COND=
(2,1,CH,EQ,C'B',AND,

(113,1,CH,EQ,C'Y',OR,113,1,CH,EQ,C'N'))
/*

//SYSOUT DD
SYSOUT=*
/*

Is This Answer Correct ?    4 Yes 5 No

How do you define a sort file in JCL that runs the COBOL program?..

Answer / ashok

JCL is a dying language man !!

Please indulge in some Emerging Technologies like
PL/I .......

Is This Answer Correct ?    8 Yes 41 No

Post New Answer

More COBOL Interview Questions

SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.

3 Answers   Lehman Brothers,


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


What is the difference between goback, stop run and exit program in cobol?

0 Answers  


How do define dynamic array in cobol.

0 Answers  


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

0 Answers   Winsol Solutions,


I have a sequential file of 100 records. How do I load the records into a two dimensional array ?

3 Answers   IBM, Xansa,


how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?

2 Answers   TCS,


what r the types of perform statement

4 Answers  


what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?

4 Answers   CSE, TCS, Wipro,


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

0 Answers  


How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)

9 Answers   Bank Of America,


write a program to eliminate duplicate records in a input file and send them to output file.

2 Answers   IBM,


Categories