View previous topic :: View next topic
|
Author |
Message |
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
I have an input file and it contains only country code in the file.
Input file Data:-
IN
I need to create a PS file with Country Code name.
output file :-
TESTPRD.IN.DHARMA.T123#1.CBAI1234
// UNIT=SYSDA,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=800,DSORG=PS),
// SPACE=(1,(50,50),RLSE)
If the file contains Country code as "SR" then output file should create as
output file :-
TESTPRD.SR.DHARMA.T123#1.CBAI1234
Could you please let me know how can it be acheived. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
What have you tried so far? |
|
Back to top |
|
|
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
I have tried with Inrec build but it is not working. Could you please help me out |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1231 Location: Bamberg, Germany
|
|
|
|
Show some code of what you have tried. |
|
Back to top |
|
|
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
Ihave used the below code:
Input file:-
ATEST.INPUT.SW
data in input file:-
IN
//JS010 EXEC PGM=SORT
//SORTIN DD DSN=ATEST.INPUT.SW,DISP=SHR
//OUTDD DD DSN=&&TEMP,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(1,1),RLSE),
// UNIT=(SYSDA,30),
// DCB=(RECFM=FB,LRECL=800,BLKSIZE=0,DSORG=PS)
//*
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(100,50),RLSE)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(100,50),RLSE)
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(100,50),RLSE)
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSDUMP DD SYSOUT=*
//*
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1:C'A123PRD.',9,2,12:C'.SWOOSH.CBC#1.CBAIFB2B')
OUTFIL FNAMES=OUTDD,VTOF
/* |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
You said you tried with INREC BUILD but then show:
Code: |
SORT FIELDS=COPY
OUTREC BUILD=(1:C'A123PRD.',9,2,12:C'.SWOOSH.CBC#1.CBAIFB2B')
OUTFIL FNAMES=OUTDD,VTOF |
Your should use code tags for your example.
Your job has no //SORTOUT DD statement.
It looks like you expect output in a temporay dataset - //OUTDD - but don't tell SORT this.
You have both OUTREC and OUTFIL - only one should be used.
Constants in your BUILD control card don't match your stated requirements.
You will not find 'IN' in positions 9,2 of the input file.
This approach will not dynamically create the dataset.
Is today's date significant?
Garry |
|
Back to top |
|
|
dharmaraok
New User
Joined: 10 Mar 2011 Posts: 45 Location: india
|
|
|
|
Could you please help me out with JCL with the given requirements.
Its a little bit urgent |
|
Back to top |
|
|
Apoorva
New User
Joined: 28 Jan 2020 Posts: 49 Location: India
|
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
1) Use code tags when posting data, code
2) Search - this has been answered before
3) Do you want JCL or sort control statements? they are not the same.
4) If you need urgent then pay a consultant - people responding on forums do so for free, in their own time, and as and when they want - if they want to. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2012 Location: USA
|
|
|
|
Garry Carroll wrote: |
You have both OUTREC and OUTFIL - only one should be used. |
Both can be used, easily. (Of course, when needed) |
|
Back to top |
|
|
|