Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Option of USING MOVE keyword in SORT`

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Option of USING MOVE keyword in SORT`
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 Moderator


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

PostPosted: Thu Sep 03, 2009 11:34 pm    Post subject:
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    Post subject: Equivalent SORT
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 Moderator


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

PostPosted: Fri Sep 04, 2009 12:44 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Where is output from PARM ABEXIT (SNA... packerm CA Products 3 Thu Sep 28, 2017 4:06 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us