IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Option of USING MOVE keyword in SORT`


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Guruprasad.R

New User


Joined: 03 Sep 2009
Posts: 2
Location: US

PostPosted: Thu Sep 03, 2009 11:25 pm
Reply with quote

I have a JCL step that executes a FileAID utility like below:
------------------------------------------------------------------------------------
//PS010 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=A
//DD01 DD DSN=BEXP.PMSTB.N.IMAGE.XREF.PDSE,DISP=SHR
//DD01O DD DISP=(NEW,CATLG,CATLG),DSN=BEXD.PMSTB.N.MEM,
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=0,
// SPACE=(TRK,(75,5),RLSE)
//SYSIN DD *
$$DD01 COPYALL IF=(1,EQ,C'CMA'),
MOVE=(+0,C'$$DD01 LMODDIR MEMBER='),
MOVE=(+0,8,40),
OUT=0
//*
----------------------------------------------------------------------------------
Infile looks like this:

CMA02254P01'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225401)'
CMA02254P02'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225402)'
CMA02254P03'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225403)'
CMA02254P04'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225404)'
CMA02254P05'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225405)'

And after writing, the Outfile looks like this:

$$DD01 LMODDIR MEMBER=C0225401
$$DD01 LMODDIR MEMBER=C0225402
$$DD01 LMODDIR MEMBER=C0225403
$$DD01 LMODDIR MEMBER=C0225404
$$DD01 LMODDIR MEMBER=C0225405

I was trying to achieve the same result thru SORT or ICETOOL, I am facing some problem with syntax. Can someone please provide me a syntax for addressing the above situation.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Sep 03, 2009 11:34 pm
Reply with quote

The equivalent DFSORT job would be:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=BEXP.PMSTB.N.IMAGE.XREF.PDSE,DISP=SHR
//SORTOUT DD DISP=(NEW,CATLG,CATLG),DSN=BEXD.PMSTB.N.MEM,
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=0,
// SPACE=(TRK,(75,5),RLSE)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'CMA'),
    BUILD=(C'$$DD01 LMODDIR MEMBER=',40,8,80:X))
/*
Back to top
View user's profile Send private message
Guruprasad.R

New User


Joined: 03 Sep 2009
Posts: 2
Location: US

PostPosted: Thu Sep 03, 2009 11:52 pm
Reply with quote

Thanks for the Solution. it works as desired. I just had one small question. What does this 80:X for in this Build ?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Sep 04, 2009 12:44 am
Reply with quote

80:X is a convenient way of setting the record length (and LRECL) to 80.

It just says to pad out the records with blanks from the last specified position to position 80. So in the output records you would have the constant, the 40,8 input field and then blanks up to and including position 80, and the LRECL would automatically be set to 80.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top